6 O3 ^, ]) M: e" {Formal Sets$ k3 b/ c, I$ Z5 t; T! R1 \1 q! L0 G
A formal set consists of the subset of elements of some carrier set (structure) on which a certain predicate assumes the value `true'. 3 V5 P; f6 s r. ?9 u: T5 w5 }$ C0 g1 r' J$ L8 a
The only set-theoretic operations that can be performed on formal sets are union, intersection, difference and symmetric difference, and element membership testing. 8 F; E" y5 j \$ V* {. X
5 g' y4 @5 B. K1 A* P5 i% U% K5 A9 { + G; x* n# F3 [3 p 7 U9 Q) b q: D8 k$ L* D7 X( r7 KS := { 1 .. 5};0 m/ g$ v. b! |- w$ {5 F- G
> P := PowerSet(S); / @' y T- V5 I4 ]/ a# Q( NP; " P& l& G3 g I& b$ Z/ q0 SPFS:=PowerFormalSet(S); 4 Z0 v. a7 x0 wPFS;& z' q. u- w3 v6 p5 m
F := { 2, 4 }; ' i8 w1 x q7 D p+ h1 b* x6 [ xFF := { 2/3, 4 }; " Y- y1 f D" m' b( z1 H ( A1 m6 F% E: R' Z# C% w* v F in P; 1 c' q( N6 F+ Q8 T$ v0 w vFF in P;( q( q N9 k$ h# h" i6 n
F in PFS; 4 `! q" Z7 p) `& A j, |6 lFF in PFS;3 C" |& M* n- g6 h' j; O' @
Set of subsets of { 1 .. 5 } , Q6 P/ K) i2 q3 m7 dSet of formal subsets of { 1 .. 5 } 4 g( k/ e6 ]) y/ C: Ftrue * e! k$ N8 D) R' J afalse9 _! y3 Y% M8 d, Q
7 U& \1 m' r% i5 Y>> F in PFS;/ O( f d. F0 {/ ~; I
^ + a" l7 B' t) K) GRuntime error in 'in': Bad argument types - C% O3 e. S5 I2 O! {# N6 w7 W" _1 m4 q. a, [" K- E2 G
9 |4 r8 a0 }3 m. d. O9 @7 }: }
>> FF in PFS; 7 H% d$ K& d; Z) C. \ ^6 c5 l Y7 w* J0 K6 r
Runtime error in 'in': Bad argument types