Expand description
Set algebra on finite sets, as TLC evaluates it.
These port TLC’s eager forms (SetEnumValue.cup, cap, diff; tlaplus
94d0c50), including which results stay unnormalized: a union is built
unnormalized, and an intersection or difference keeps its left operand’s state. That
matters for TLC’s errors, because membership in an unnormalized set is a linear scan
with equals (fixture ErrMemNormalized). Membership uses the checked
crate::tlc::member. Lazy unions of infinite sets are dive-eval’s concern
(DeferredSet).
Functions§
- choose
- The first element of
sin normalized order that satisfiespred: TLC’sCHOOSE x \in s : pred(x)(Tool,OPCODE_bc, which enumerates withOrdering.NORMALIZED).Nonewhen no element satisfies it. - difference
a \ b(SetEnumValue.diff).- intersect
a \cap b(SetEnumValue.cap).- union
a \cup b(SetEnumValue.cup):a’s elements, thenb’s elements not ina, unnormalized.