[ library(conjunto) | Reference Manual | Alphabetic Index ]

# #(?Sterm,?Var)

Var is the cardinality of the set term Sterm.
?Sterm
A set term or a ground set.
?Var
A free variable, a domain variable or an integer.

## Description

Var is the cardinality of the set term Sterm. If Sterm is a known set and Var is free, Var is instanciated to the cardinality of Sterm. If both are known, the predicate checks that Var is the cardinality of Sterm. If Sterm is a set variable and Var is free, Var becomes a domain variable representing the set term cardinality. The predicate is delayed and activated as soon as one of the bounds of Sterm or Var is modified. If Sterm is a set variable and and Var is a domain variable it checks that Var contains the cardinality of Sterm. It might infer a modification of the bounds of the set domain.

None.

No.

## Examples

eclipse 3]: S `:: {}..{c,d}, S1= {1,2,3}, #(S \/ S1, V).

S = S{{} .. {c, d}}
S1 = {1, 2, 3}
V = Card{[3..5]}

Delayed goals:
union_s({1, 2, 3}, S{{} .. {c, d}},
R{{1, 2, 3} .. {1, 2, 3, c, d}})
car_s(R{{1, 2, 3} .. {1, 2, 3, c, d}}, Card{[3..5]})
yes.