0 c7 `! H7 c! A3 x$ wFormal Sets 9 J* D( P' `* F. fA formal set consists of the subset of elements of some carrier set (structure) on which a certain predicate assumes the value `true'. ( ]: g: J' o6 f 3 {( O/ P1 ]8 ?: S+ \; l9 X' uThe only set-theoretic operations that can be performed on formal sets are union, intersection, difference and symmetric difference, and element membership testing. & J$ O! d" w( m$ j; t* C& B, ^: f. R3 g& g/ N
F1 e4 G( K, M
/ C' c, z+ d1 v- P- p- H4 n6 cS := { 1 .. 5};9 T6 J% H; M# ?: w/ ?9 S
> P := PowerSet(S);6 h) R# u3 i- U! N. N; C
P;6 G9 F* r, s/ A: h3 s1 |/ A
PFS:=PowerFormalSet(S); ' f0 j ?$ n. Q! V$ O1 P0 y6 dPFS;. B& {3 ^+ Y; e# D
F := { 2, 4 };3 e; s2 t1 B# U7 x
FF := { 2/3, 4 };6 O7 u) t. Z+ l
: r$ |8 U0 h- T+ p9 _0 h* Q( z F in P; 2 V4 v" @6 U, a$ X" w+ ]: TFF in P;. `; O0 s2 {7 @& @' J: y0 i
F in PFS; ! m. f. U& N. u6 @" } ^( GFF in PFS;7 L# k5 F; J5 R, l* m
Set of subsets of { 1 .. 5 } % F, s' j6 M" l- u4 y" ^1 lSet of formal subsets of { 1 .. 5 }2 T; g3 T" U8 r; f; m* e
true \' s) }0 S l! Bfalse ) u6 `7 x, x# Q3 m0 _" a. a3 `& s# L2 _
>> F in PFS;: T8 T% q3 T4 W6 V: |
^ * @6 u6 o* U" i2 PRuntime error in 'in': Bad argument types 8 h4 f! d6 [" V, l! `; h) n8 ]8 ]5 O6 T/ v, f
7 C# q5 {- d6 J# v" }: r# ~>> FF in PFS;6 i0 V g3 ?: k f3 B6 Z8 ]. L
^ 5 U& W; v/ ^& a2 i$ S- nRuntime error in 'in': Bad argument types