% F( P5 x1 n3 U1 h$ G1 j( iFormal Sets$ o. S; a. o) `8 H/ B
A formal set consists of the subset of elements of some carrier set (structure) on which a certain predicate assumes the value `true'. % w% R6 ?' h- m 6 N$ Z5 t% \2 |- ?+ E4 U! \The only set-theoretic operations that can be performed on formal sets are union, intersection, difference and symmetric difference, and element membership testing. % m9 e& P+ ]6 B- m' g
" R0 @7 I" Y# h( a& Z
9 ?/ X) R3 S( B- p; R$ l/ u7 j) Y: F
' H# R8 @9 j1 n9 e& n
S := { 1 .. 5};9 n: y: W$ ` H w0 w! p1 N
> P := PowerSet(S);8 K) O+ G0 L3 M- [' ?0 ^
P;' p+ H6 J" e' o0 }4 O3 \8 W
PFS:=PowerFormalSet(S);6 |4 e' O( S5 @
PFS; & C5 f9 S! f. G% N# O4 DF := { 2, 4 }; + h7 W' Y8 l6 I: E7 M5 Q; NFF := { 2/3, 4 };; y$ ]( X4 ~0 [' H. \- _3 C
6 s. L5 W+ K+ e2 Z F in P;/ h# h2 P7 V9 _9 h
FF in P;, A0 M b3 @+ }% }
F in PFS;; ]# p' n% h9 L
FF in PFS; 0 I. }( p, x( v& }0 L& k5 SSet of subsets of { 1 .. 5 } ! u7 R$ _. \, D7 D. ySet of formal subsets of { 1 .. 5 } 2 W7 N( |5 l$ ]true. [8 j, O) S+ Z: ^! b
false: M- t" A4 U) c) T8 H
; D% u/ E( \) u
>> F in PFS; : q; @5 a3 p1 r9 m! O+ C3 r ^ ! N8 S$ A6 J1 H& l4 W' d1 S. TRuntime error in 'in': Bad argument types2 }4 }5 r& ?1 m3 [3 F6 f
3 J x) A0 ]; t# I
) ?5 W5 W4 Z5 ?* x* P, d2 d
>> FF in PFS; % e7 Z& Y0 D4 O. v ^ ) i: |5 p& ?$ S ~1 t- WRuntime error in 'in': Bad argument types