:: Definitions and Basic Properties of Boolean & Union of Many Sorted Sets :: by Artur Korni{\l}owicz :: :: Received April 27, 1995 :: Copyright (c) 1995-2012 Association of Mizar Users begin definition let I be set ; let A be ManySortedSet of I; func bool A -> ManySortedSet of I means :Def1: :: MBOOLEAN:def 1 for i being set st i in I holds it . i = bool (A . i); existence ex b1 being ManySortedSet of I st for i being set st i in I holds b1 . i = bool (A . i) proofend; uniqueness for b1, b2 being ManySortedSet of I st ( for i being set st i in I holds b1 . i = bool (A . i) ) & ( for i being set st i in I holds b2 . i = bool (A . i) ) holds b1 = b2 proofend; end; :: deftheorem Def1 defines bool MBOOLEAN:def_1_:_ for I being set for A, b3 being ManySortedSet of I holds ( b3 = bool A iff for i being set st i in I holds b3 . i = bool (A . i) ); registration let I be set ; let A be ManySortedSet of I; cluster bool A -> V2() ; coherence bool A is non-empty proofend; end; Lm1: for i, I, X being set for M being ManySortedSet of I st i in I holds dom (M +* (i .--> X)) = I proofend; Lm2: for I being set for A, B being ManySortedSet of I for i being set st i in I holds (bool (A \/ B)) . i = bool ((A . i) \/ (B . i)) proofend; Lm3: for I being set for A, B being ManySortedSet of I for i being set st i in I holds (bool (A /\ B)) . i = bool ((A . i) /\ (B . i)) proofend; Lm4: for I being set for A, B being ManySortedSet of I for i being set st i in I holds (bool (A \ B)) . i = bool ((A . i) \ (B . i)) proofend; Lm5: for I being set for A, B being ManySortedSet of I for i being set st i in I holds (bool (A \+\ B)) . i = bool ((A . i) \+\ (B . i)) proofend; theorem Th1: :: MBOOLEAN:1 for I being set for X, Y being ManySortedSet of I holds ( X = bool Y iff for A being ManySortedSet of I holds ( A in X iff A c= Y ) ) proofend; theorem :: MBOOLEAN:2 for I being set holds bool ([[0]] I) = I --> {{}} proofend; theorem :: MBOOLEAN:3 for I, x being set holds bool (I --> x) = I --> (bool x) proofend; theorem :: MBOOLEAN:4 for I, x being set holds bool (I --> {x}) = I --> {{},{x}} proofend; theorem :: MBOOLEAN:5 for I being set for A being ManySortedSet of I holds [[0]] I c= A proofend; theorem :: MBOOLEAN:6 for I being set for A, B being ManySortedSet of I st A c= B holds bool A c= bool B proofend; theorem :: MBOOLEAN:7 for I being set for A, B being ManySortedSet of I holds (bool A) \/ (bool B) c= bool (A \/ B) proofend; theorem :: MBOOLEAN:8 for I being set for A, B being ManySortedSet of I st (bool A) \/ (bool B) = bool (A \/ B) holds for i being set st i in I holds A . i,B . i are_c=-comparable proofend; theorem :: MBOOLEAN:9 for I being set for A, B being ManySortedSet of I holds bool (A /\ B) = (bool A) /\ (bool B) proofend; theorem :: MBOOLEAN:10 for I being set for A, B being ManySortedSet of I holds bool (A \ B) c= (I --> {{}}) \/ ((bool A) \ (bool B)) proofend; theorem :: MBOOLEAN:11 for I being set for X, A, B being ManySortedSet of I holds ( X c= A \ B iff ( X c= A & X misses B ) ) proofend; theorem :: MBOOLEAN:12 for I being set for A, B being ManySortedSet of I holds (bool (A \ B)) \/ (bool (B \ A)) c= bool (A \+\ B) proofend; theorem :: MBOOLEAN:13 for I being set for X, A, B being ManySortedSet of I holds ( X c= A \+\ B iff ( X c= A \/ B & X misses A /\ B ) ) proofend; theorem :: MBOOLEAN:14 for I being set for X, A, Y being ManySortedSet of I st ( X c= A or Y c= A ) holds X /\ Y c= A proofend; theorem :: MBOOLEAN:15 for I being set for X, A, Y being ManySortedSet of I st X c= A holds X \ Y c= A proofend; theorem :: MBOOLEAN:16 for I being set for X, A, Y being ManySortedSet of I st X c= A & Y c= A holds X \+\ Y c= A proofend; theorem :: MBOOLEAN:17 for I being set for X, Y being ManySortedSet of I holds [|X,Y|] c= bool (bool (X \/ Y)) proofend; theorem :: MBOOLEAN:18 for I being set for X, A being ManySortedSet of I holds ( X c= A iff X in bool A ) proofend; theorem :: MBOOLEAN:19 for I being set for A, B being ManySortedSet of I holds (Funcs) (A,B) c= bool [|A,B|] proofend; begin definition let I be set ; let A be ManySortedSet of I; func union A -> ManySortedSet of I means :Def2: :: MBOOLEAN:def 2 for i being set st i in I holds it . i = union (A . i); existence ex b1 being ManySortedSet of I st for i being set st i in I holds b1 . i = union (A . i) proofend; uniqueness for b1, b2 being ManySortedSet of I st ( for i being set st i in I holds b1 . i = union (A . i) ) & ( for i being set st i in I holds b2 . i = union (A . i) ) holds b1 = b2 proofend; end; :: deftheorem Def2 defines union MBOOLEAN:def_2_:_ for I being set for A, b3 being ManySortedSet of I holds ( b3 = union A iff for i being set st i in I holds b3 . i = union (A . i) ); registration let I be set ; cluster union ([[0]] I) -> V3() ; coherence union ([[0]] I) is empty-yielding proofend; end; Lm6: for I being set for A, B being ManySortedSet of I for i being set st i in I holds (union (A \/ B)) . i = union ((A . i) \/ (B . i)) proofend; Lm7: for I being set for A, B being ManySortedSet of I for i being set st i in I holds (union (A /\ B)) . i = union ((A . i) /\ (B . i)) proofend; theorem :: MBOOLEAN:20 for I being set for A, X being ManySortedSet of I holds ( A in union X iff ex Y being ManySortedSet of I st ( A in Y & Y in X ) ) proofend; theorem :: MBOOLEAN:21 for I being set holds union ([[0]] I) = [[0]] I proofend; theorem :: MBOOLEAN:22 for I, x being set holds union (I --> x) = I --> (union x) proofend; theorem :: MBOOLEAN:23 for I, x being set holds union (I --> {x}) = I --> x proofend; theorem :: MBOOLEAN:24 for I, x, y being set holds union (I --> {{x},{y}}) = I --> {x,y} proofend; theorem :: MBOOLEAN:25 for I being set for X, A being ManySortedSet of I st X in A holds X c= union A proofend; theorem :: MBOOLEAN:26 for I being set for A, B being ManySortedSet of I st A c= B holds union A c= union B proofend; theorem :: MBOOLEAN:27 for I being set for A, B being ManySortedSet of I holds union (A \/ B) = (union A) \/ (union B) proofend; theorem :: MBOOLEAN:28 for I being set for A, B being ManySortedSet of I holds union (A /\ B) c= (union A) /\ (union B) proofend; theorem :: MBOOLEAN:29 for I being set for A being ManySortedSet of I holds union (bool A) = A proofend; theorem :: MBOOLEAN:30 for I being set for A being ManySortedSet of I holds A c= bool (union A) proofend; theorem :: MBOOLEAN:31 for I being set for Y, A, X being ManySortedSet of I st union Y c= A & X in Y holds X c= A proofend; theorem :: MBOOLEAN:32 for I being set for Z being ManySortedSet of I for A being V2() ManySortedSet of I st ( for X being ManySortedSet of I st X in A holds X c= Z ) holds union A c= Z proofend; theorem :: MBOOLEAN:33 for I being set for B being ManySortedSet of I for A being V2() ManySortedSet of I st ( for X being ManySortedSet of I st X in A holds X /\ B = [[0]] I ) holds (union A) /\ B = [[0]] I proofend; theorem :: MBOOLEAN:34 for I being set for A, B being ManySortedSet of I st A \/ B is V2() & ( for X, Y being ManySortedSet of I st X <> Y & X in A \/ B & Y in A \/ B holds X /\ Y = [[0]] I ) holds union (A /\ B) = (union A) /\ (union B) proofend; theorem :: MBOOLEAN:35 for I being set for A, X being ManySortedSet of I for B being V2() ManySortedSet of I st X c= union (A \/ B) & ( for Y being ManySortedSet of I st Y in B holds Y /\ X = [[0]] I ) holds X c= union A proofend; theorem :: MBOOLEAN:36 for I being set for A being V2() V26() ManySortedSet of I st ( for X, Y being ManySortedSet of I st X in A & Y in A & not X c= Y holds Y c= X ) holds union A in A proofend;