' Z' l" n; J& [* @2 H3 h5 y2 h9 PFormal Sets& L/ N6 [& Q' j9 L
A formal set consists of the subset of elements of some carrier set (structure) on which a certain predicate assumes the value `true'. & E9 ~2 ^$ b% D L/ z
3 I9 I5 V, |' ^! S: Z2 sThe only set-theoretic operations that can be performed on formal sets are union, intersection, difference and symmetric difference, and element membership testing. / L* k% |9 m% K9 L* A) H- H$ W' ]! \ 1 Y( t$ K/ H% p% I! U3 s + ~" ~7 U3 v+ W0 k2 w2 I4 b/ M4 M
S := { 1 .. 5};. x1 U9 ]6 D2 N8 |/ s* u, ~. @$ w
> P := PowerSet(S);4 g# E5 J) G4 u
P;+ `, U, _5 h1 |. L& R% m' |5 ? C4 G
PFS:=PowerFormalSet(S);7 W9 g5 q9 c) f! q+ @8 S
PFS; 7 G5 K- O9 I: Y$ X* j3 lF := { 2, 4 }; 8 v5 n3 K$ @; C& u* kFF := { 2/3, 4 }; ( t. l0 H, u' U) ]% B ' p, m3 f6 N8 w F in P;% l+ R: y" T& x' l
FF in P; 3 Z" W( V) }3 ~. B' A5 o* [. s F in PFS;* m, i" x) v; ?
FF in PFS;% |: S6 Q8 f7 S- R3 [, h
Set of subsets of { 1 .. 5 }6 n( n# N( {, k; o' r
Set of formal subsets of { 1 .. 5 }0 m# T; A1 j% P2 g' T
true' z$ h. x2 W" N: O, A0 X) W3 d; G
false ( k6 k/ u6 J) r( x* T& Z8 n9 e2 [8 } 7 |# h, O& }" O) @# @3 }. q: n>> F in PFS; + D( n. f1 G# L7 M2 S7 A' T6 r ^ 6 k5 }$ I2 R( i( rRuntime error in 'in': Bad argument types - M( D) w; p1 [4 N* _0 \& R( H0 S+ ~9 G0 B
1 E; M: c9 G. e% ~2 [) P1 d- k
>> FF in PFS; * C% n. y0 w8 f H1 a7 C3 B ^ - s3 j4 U$ z4 v7 L# T! XRuntime error in 'in': Bad argument types