- e4 G; w* u% @5 gFormal Sets$ f" a6 v- ]$ J" K* L9 A
A formal set consists of the subset of elements of some carrier set (structure) on which a certain predicate assumes the value `true'. 9 l$ t. b' m' m, L2 t' H: Y+ u
2 i/ y- ~; V; `9 r* M+ L& I) ]) YThe only set-theoretic operations that can be performed on formal sets are union, intersection, difference and symmetric difference, and element membership testing. 5 x6 @! }5 d l* a! F) ^8 G, g
' h" Y$ P% Z H
" @6 [5 b% r+ s& ^: r- L! r 1 C8 A9 Y3 E6 l" ?3 O1 qS := { 1 .. 5};1 q8 ~% v- {& T' D# S8 P9 x1 z' }
> P := PowerSet(S);; J! x) i/ g* `& ^
P; 4 @* u }1 T, `4 n7 i( x. B3 ]7 \# GPFS:=PowerFormalSet(S);$ j- k1 Z |( F0 J4 N1 p* y4 \/ O
PFS; y. R3 T' b; @; e |4 ]F := { 2, 4 }; 5 A1 C' w% E& `FF := { 2/3, 4 }; ( e/ V9 j! u) c2 B# r( Q0 H * y% w3 t, [# [8 L& w F in P; ( G& i1 o1 r1 T* uFF in P; 9 j. Y0 i. N& E8 x F in PFS;! N* \* U2 {2 w* }9 o) Y
FF in PFS; & Z/ Q% b+ Y' ?Set of subsets of { 1 .. 5 } & h2 ~" N9 O9 @* a0 A, a! |Set of formal subsets of { 1 .. 5 }2 a9 Y& o* e* g7 w, s
true * ?/ @- o& p0 }+ W( X! U6 Q4 W' Lfalse - N4 C1 [* w8 K8 ]' f6 Q9 v3 g6 U4 h" o, G% M6 U
>> F in PFS;8 f; k% A( A' [$ X8 H5 p u* [
^ " z) X6 R3 `7 W/ K& W/ y5 wRuntime error in 'in': Bad argument types1 @: \7 M3 F3 x( m0 e' m
* t9 ^3 t4 P: Y: t# h7 D, P1 O/ N% \& R4 l: V
>> FF in PFS;" ~: i9 ~+ F5 S- |9 F2 Q# q
^3 k1 R1 e! |5 R" m; ?3 C
Runtime error in 'in': Bad argument types