Article MBOOLEAN, MML version 4.99.1005

:: MBOOLEAN:funcnot 1 => MBOOLEAN:func 1
definition
  let a1 be set;
  let a2 be ManySortedSet of a1;
  func bool A2 -> ManySortedSet of a1 means
    for b1 being set
          st b1 in a1
       holds it . b1 = bool (a2 . b1);
end;

:: MBOOLEAN:def 1
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
   b3 = bool b2
iff
   for b4 being set
         st b4 in b1
      holds b3 . b4 = bool (b2 . b4);

:: MBOOLEAN:funcreg 1
registration
  let a1 be set;
  let a2 be ManySortedSet of a1;
  cluster bool a2 -> non-empty;
end;

:: MBOOLEAN:th 1
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
   b2 = bool b3
iff
   for b4 being ManySortedSet of b1 holds
         b4 in b2
      iff
         b4 c= b3;

:: MBOOLEAN:th 2
theorem
for b1 being set holds
   bool [0] b1 = b1 --> {{}};

:: MBOOLEAN:th 3
theorem
for b1, b2 being set holds
bool (b1 --> b2) = b1 --> bool b2;

:: MBOOLEAN:th 4
theorem
for b1, b2 being set holds
bool (b1 --> {b2}) = b1 --> {{},{b2}};

:: MBOOLEAN:th 5
theorem
for b1 being set
for b2 being ManySortedSet of b1 holds
   [0] b1 c= b2;

:: MBOOLEAN:th 6
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1
      st b2 c= b3
   holds bool b2 c= bool b3;

:: MBOOLEAN:th 7
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
(bool b2) \/ bool b3 c= bool (b2 \/ b3);

:: MBOOLEAN:th 8
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1
   st (bool b2) \/ bool b3 = bool (b2 \/ b3)
for b4 being set
      st b4 in b1
   holds b2 . b4,b3 . b4 are_c=-comparable;

:: MBOOLEAN:th 9
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
bool (b2 /\ b3) = (bool b2) /\ bool b3;

:: MBOOLEAN:th 10
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
bool (b2 \ b3) c= (b1 --> {{}}) \/ ((bool b2) \ bool b3);

:: MBOOLEAN:th 11
theorem
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds
   b2 c= b3 \ b4
iff
   b2 c= b3 & b2 misses b4;

:: MBOOLEAN:th 12
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
(bool (b2 \ b3)) \/ bool (b3 \ b2) c= bool (b2 \+\ b3);

:: MBOOLEAN:th 13
theorem
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds
   b2 c= b3 \+\ b4
iff
   b2 c= b3 \/ b4 & b2 misses b3 /\ b4;

:: MBOOLEAN:th 15
theorem
for b1 being set
for b2, b3, b4 being ManySortedSet of b1
      st (b2 c= b3 or b4 c= b3)
   holds b2 /\ b4 c= b3;

:: MBOOLEAN:th 16
theorem
for b1 being set
for b2, b3, b4 being ManySortedSet of b1
      st b2 c= b3
   holds b2 \ b4 c= b3;

:: MBOOLEAN:th 17
theorem
for b1 being set
for b2, b3, b4 being ManySortedSet of b1
      st b2 c= b3 & b4 c= b3
   holds b2 \+\ b4 c= b3;

:: MBOOLEAN:th 18
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
[|b2,b3|] c= bool bool (b2 \/ b3);

:: MBOOLEAN:th 19
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
   b2 c= b3
iff
   b2 in bool b3;

:: MBOOLEAN:th 20
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
MSFuncs(b2,b3) c= bool [|b2,b3|];

:: MBOOLEAN:funcnot 2 => MBOOLEAN:func 2
definition
  let a1 be set;
  let a2 be ManySortedSet of a1;
  func union A2 -> ManySortedSet of a1 means
    for b1 being set
          st b1 in a1
       holds it . b1 = union (a2 . b1);
end;

:: MBOOLEAN:def 2
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
   b3 = union b2
iff
   for b4 being set
         st b4 in b1
      holds b3 . b4 = union (b2 . b4);

:: MBOOLEAN:funcreg 2
registration
  let a1 be set;
  cluster union [0] a1 -> empty-yielding;
end;

:: MBOOLEAN:th 21
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
   b2 in union b3
iff
   ex b4 being ManySortedSet of b1 st
      b2 in b4 & b4 in b3;

:: MBOOLEAN:th 22
theorem
for b1 being set holds
   union [0] b1 = [0] b1;

:: MBOOLEAN:th 23
theorem
for b1, b2 being set holds
union (b1 --> b2) = b1 --> union b2;

:: MBOOLEAN:th 24
theorem
for b1, b2 being set holds
union (b1 --> {b2}) = b1 --> b2;

:: MBOOLEAN:th 25
theorem
for b1, b2, b3 being set holds
union (b1 --> {{b2},{b3}}) = b1 --> {b2,b3};

:: MBOOLEAN:th 26
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1
      st b2 in b3
   holds b2 c= union b3;

:: MBOOLEAN:th 27
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1
      st b2 c= b3
   holds union b2 c= union b3;

:: MBOOLEAN:th 28
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
union (b2 \/ b3) = (union b2) \/ union b3;

:: MBOOLEAN:th 29
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
union (b2 /\ b3) c= (union b2) /\ union b3;

:: MBOOLEAN:th 30
theorem
for b1 being set
for b2 being ManySortedSet of b1 holds
   union bool b2 = b2;

:: MBOOLEAN:th 31
theorem
for b1 being set
for b2 being ManySortedSet of b1 holds
   b2 c= bool union b2;

:: MBOOLEAN:th 32
theorem
for b1 being set
for b2, b3, b4 being ManySortedSet of b1
      st union b2 c= b3 & b4 in b2
   holds b4 c= b3;

:: MBOOLEAN:th 33
theorem
for b1 being set
for b2 being ManySortedSet of b1
for b3 being non-empty ManySortedSet of b1
      st for b4 being ManySortedSet of b1
              st b4 in b3
           holds b4 c= b2
   holds union b3 c= b2;

:: MBOOLEAN:th 34
theorem
for b1 being set
for b2 being ManySortedSet of b1
for b3 being non-empty ManySortedSet of b1
      st for b4 being ManySortedSet of b1
              st b4 in b3
           holds b4 /\ b2 = [0] b1
   holds (union b3) /\ b2 = [0] b1;

:: MBOOLEAN:th 35
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1
      st b2 \/ b3 is non-empty &
         (for b4, b5 being ManySortedSet of b1
               st b4 <> b5 & b4 in b2 \/ b3 & b5 in b2 \/ b3
            holds b4 /\ b5 = [0] b1)
   holds union (b2 /\ b3) = (union b2) /\ union b3;

:: MBOOLEAN:th 36
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1
for b4 being non-empty ManySortedSet of b1
      st b3 c= union (b2 \/ b4) &
         (for b5 being ManySortedSet of b1
               st b5 in b4
            holds b5 /\ b3 = [0] b1)
   holds b3 c= union b2;

:: MBOOLEAN:th 37
theorem
for b1 being set
for b2 being non-empty finite-yielding ManySortedSet of b1
      st for b3, b4 being ManySortedSet of b1
              st b3 in b2 & b4 in b2 & not b3 c= b4
           holds b4 c= b3
   holds union b2 in b2;