Article SETFAM_1, MML version 4.99.1005

:: SETFAM_1:funcnot 1 => SETFAM_1:func 1
definition
  let a1 be set;
  func meet A1 -> set means
    for b1 being set holds
          b1 in it
       iff
          for b2 being set
                st b2 in a1
             holds b1 in b2
    if a1 <> {}
    otherwise it = {};
end;

:: SETFAM_1:def 1
theorem
for b1, b2 being set holds
(b1 = {} or    (b2 = meet b1
 iff
    for b3 being set holds
          b3 in b2
       iff
          for b4 being set
                st b4 in b1
             holds b3 in b4)) &
 (b1 = {} implies    (b2 = meet b1
 iff
    b2 = {}));

:: SETFAM_1:th 2
theorem
meet {} = {};

:: SETFAM_1:th 3
theorem
for b1 being set holds
   meet b1 c= union b1;

:: SETFAM_1:th 4
theorem
for b1, b2 being set
      st b1 in b2
   holds meet b2 c= b1;

:: SETFAM_1:th 5
theorem
for b1 being set
      st {} in b1
   holds meet b1 = {};

:: SETFAM_1:th 6
theorem
for b1, b2 being set
      st b1 <> {} &
         (for b3 being set
               st b3 in b1
            holds b2 c= b3)
   holds b2 c= meet b1;

:: SETFAM_1:th 7
theorem
for b1, b2 being set
      st b1 <> {} & b1 c= b2
   holds meet b2 c= meet b1;

:: SETFAM_1:th 8
theorem
for b1, b2, b3 being set
      st b1 in b2 & b1 c= b3
   holds meet b2 c= b3;

:: SETFAM_1:th 9
theorem
for b1, b2, b3 being set
      st b1 in b2 & b1 misses b3
   holds meet b2 misses b3;

:: SETFAM_1:th 10
theorem
for b1, b2 being set
      st b1 <> {} & b2 <> {}
   holds meet (b1 \/ b2) = (meet b1) /\ meet b2;

:: SETFAM_1:th 11
theorem
for b1 being set holds
   meet {b1} = b1;

:: SETFAM_1:th 12
theorem
for b1, b2 being set holds
meet {b1,b2} = b1 /\ b2;

:: SETFAM_1:prednot 1 => SETFAM_1:pred 1
definition
  let a1, a2 be set;
  pred A1 is_finer_than A2 means
    for b1 being set
          st b1 in a1
       holds ex b2 being set st
          b2 in a2 & b1 c= b2;
  reflexivity;
::  for a1 being set holds
::     a1 is_finer_than a1;
end;

:: SETFAM_1:dfs 2
definiens
  let a1, a2 be set;
To prove
     a1 is_finer_than a2
it is sufficient to prove
  thus for b1 being set
          st b1 in a1
       holds ex b2 being set st
          b2 in a2 & b1 c= b2;

:: SETFAM_1:def 2
theorem
for b1, b2 being set holds
   b1 is_finer_than b2
iff
   for b3 being set
         st b3 in b1
      holds ex b4 being set st
         b4 in b2 & b3 c= b4;

:: SETFAM_1:prednot 2 => SETFAM_1:pred 2
definition
  let a1, a2 be set;
  pred A2 is_coarser_than A1 means
    for b1 being set
          st b1 in a2
       holds ex b2 being set st
          b2 in a1 & b2 c= b1;
  reflexivity;
::  for a1 being set holds
::     a1 is_coarser_than a1;
end;

:: SETFAM_1:dfs 3
definiens
  let a1, a2 be set;
To prove
     a2 is_coarser_than a1
it is sufficient to prove
  thus for b1 being set
          st b1 in a2
       holds ex b2 being set st
          b2 in a1 & b2 c= b1;

:: SETFAM_1:def 3
theorem
for b1, b2 being set holds
   b2 is_coarser_than b1
iff
   for b3 being set
         st b3 in b2
      holds ex b4 being set st
         b4 in b1 & b4 c= b3;

:: SETFAM_1:th 17
theorem
for b1, b2 being set
      st b1 c= b2
   holds b1 is_finer_than b2;

:: SETFAM_1:th 18
theorem
for b1, b2 being set
      st b1 is_finer_than b2
   holds union b1 c= union b2;

:: SETFAM_1:th 19
theorem
for b1, b2 being set
      st b1 <> {} & b1 is_coarser_than b2
   holds meet b2 c= meet b1;

:: SETFAM_1:th 20
theorem
for b1 being set holds
   {} is_finer_than b1;

:: SETFAM_1:th 21
theorem
for b1 being set
      st b1 is_finer_than {}
   holds b1 = {};

:: SETFAM_1:th 23
theorem
for b1, b2, b3 being set
      st b1 is_finer_than b2 & b2 is_finer_than b3
   holds b1 is_finer_than b3;

:: SETFAM_1:th 24
theorem
for b1, b2 being set
   st b2 is_finer_than {b1}
for b3 being set
      st b3 in b2
   holds b3 c= b1;

:: SETFAM_1:th 25
theorem
for b1, b2, b3 being set
   st b3 is_finer_than {b1,b2}
for b4 being set
      st b4 in b3 & not b4 c= b1
   holds b4 c= b2;

:: SETFAM_1:funcnot 2 => SETFAM_1:func 2
definition
  let a1, a2 be set;
  func UNION(A1,A2) -> set means
    for b1 being set holds
          b1 in it
       iff
          ex b2, b3 being set st
             b2 in a1 & b3 in a2 & b1 = b2 \/ b3;
  commutativity;
::  for a1, a2 being set holds
::  UNION(a1,a2) = UNION(a2,a1);
end;

:: SETFAM_1:def 4
theorem
for b1, b2, b3 being set holds
   b3 = UNION(b1,b2)
iff
   for b4 being set holds
         b4 in b3
      iff
         ex b5, b6 being set st
            b5 in b1 & b6 in b2 & b4 = b5 \/ b6;

:: SETFAM_1:funcnot 3 => SETFAM_1:func 3
definition
  let a1, a2 be set;
  func INTERSECTION(A1,A2) -> set means
    for b1 being set holds
          b1 in it
       iff
          ex b2, b3 being set st
             b2 in a1 & b3 in a2 & b1 = b2 /\ b3;
  commutativity;
::  for a1, a2 being set holds
::  INTERSECTION(a1,a2) = INTERSECTION(a2,a1);
end;

:: SETFAM_1:def 5
theorem
for b1, b2, b3 being set holds
   b3 = INTERSECTION(b1,b2)
iff
   for b4 being set holds
         b4 in b3
      iff
         ex b5, b6 being set st
            b5 in b1 & b6 in b2 & b4 = b5 /\ b6;

:: SETFAM_1:funcnot 4 => SETFAM_1:func 4
definition
  let a1, a2 be set;
  func DIFFERENCE(A1,A2) -> set means
    for b1 being set holds
          b1 in it
       iff
          ex b2, b3 being set st
             b2 in a1 & b3 in a2 & b1 = b2 \ b3;
end;

:: SETFAM_1:def 6
theorem
for b1, b2, b3 being set holds
   b3 = DIFFERENCE(b1,b2)
iff
   for b4 being set holds
         b4 in b3
      iff
         ex b5, b6 being set st
            b5 in b1 & b6 in b2 & b4 = b5 \ b6;

:: SETFAM_1:th 29
theorem
for b1 being set holds
   b1 is_finer_than UNION(b1,b1);

:: SETFAM_1:th 30
theorem
for b1 being set holds
   INTERSECTION(b1,b1) is_finer_than b1;

:: SETFAM_1:th 31
theorem
for b1 being set holds
   DIFFERENCE(b1,b1) is_finer_than b1;

:: SETFAM_1:th 34
theorem
for b1, b2 being set
      st b1 meets b2
   holds (meet b1) /\ meet b2 = meet INTERSECTION(b1,b2);

:: SETFAM_1:th 35
theorem
for b1, b2 being set
      st b2 <> {}
   holds b1 \/ meet b2 = meet UNION({b1},b2);

:: SETFAM_1:th 36
theorem
for b1, b2 being set holds
b1 /\ union b2 = union INTERSECTION({b1},b2);

:: SETFAM_1:th 37
theorem
for b1, b2 being set
      st b2 <> {}
   holds b1 \ union b2 = meet DIFFERENCE({b1},b2);

:: SETFAM_1:th 38
theorem
for b1, b2 being set
      st b2 <> {}
   holds b1 \ meet b2 = union DIFFERENCE({b1},b2);

:: SETFAM_1:th 39
theorem
for b1, b2 being set holds
union INTERSECTION(b1,b2) = (union b1) /\ union b2;

:: SETFAM_1:th 40
theorem
for b1, b2 being set
      st b1 <> {} & b2 <> {}
   holds (meet b1) \/ meet b2 c= meet UNION(b1,b2);

:: SETFAM_1:th 41
theorem
for b1, b2 being set holds
meet DIFFERENCE(b1,b2) c= (meet b1) \ meet b2;

:: SETFAM_1:modenot 1
definition
  let a1 be set;
  mode Subset-Family of a1 is Element of bool bool a1;
end;

:: SETFAM_1:funcnot 5 => SETFAM_1:func 5
definition
  let a1 be set;
  let a2 be Element of bool bool a1;
  redefine func union a2 -> Element of bool a1;
end;

:: SETFAM_1:funcnot 6 => SETFAM_1:func 6
definition
  let a1 be set;
  let a2 be Element of bool bool a1;
  redefine func meet a2 -> Element of bool a1;
end;

:: SETFAM_1:th 44
theorem
for b1 being set
for b2, b3 being Element of bool bool b1
      st for b4 being Element of bool b1 holds
              b4 in b2
           iff
              b4 in b3
   holds b2 = b3;

:: SETFAM_1:funcnot 7 => SETFAM_1:func 7
definition
  let a1 be set;
  let a2 be Element of bool bool a1;
  func COMPLEMENT A2 -> Element of bool bool a1 means
    for b1 being Element of bool a1 holds
          b1 in it
       iff
          b1 ` in a2;
  involutiveness;
::  for a1 being set
::  for a2 being Element of bool bool a1 holds
::     COMPLEMENT COMPLEMENT a2 = a2;
end;

:: SETFAM_1:def 8
theorem
for b1 being set
for b2, b3 being Element of bool bool b1 holds
   b3 = COMPLEMENT b2
iff
   for b4 being Element of bool b1 holds
         b4 in b3
      iff
         b4 ` in b2;

:: SETFAM_1:th 46
theorem
for b1 being set
for b2 being Element of bool bool b1
      st b2 <> {}
   holds COMPLEMENT b2 <> {};

:: SETFAM_1:th 47
theorem
for b1 being set
for b2 being Element of bool bool b1
      st b2 <> {}
   holds ([#] b1) \ union b2 = meet COMPLEMENT b2;

:: SETFAM_1:th 48
theorem
for b1 being set
for b2 being Element of bool bool b1
      st b2 <> {}
   holds union COMPLEMENT b2 = ([#] b1) \ meet b2;

:: SETFAM_1:th 49
theorem
for b1 being set
for b2 being Element of bool bool b1
for b3 being Element of bool b1 holds
      b3 ` in COMPLEMENT b2
   iff
      b3 in b2;

:: SETFAM_1:th 51
theorem
for b1 being set
for b2, b3 being Element of bool bool b1
      st COMPLEMENT b2 c= COMPLEMENT b3
   holds b2 c= b3;

:: SETFAM_1:th 52
theorem
for b1 being set
for b2, b3 being Element of bool bool b1 holds
   COMPLEMENT b2 c= b3
iff
   b2 c= COMPLEMENT b3;

:: SETFAM_1:th 53
theorem
for b1 being set
for b2, b3 being Element of bool bool b1
      st COMPLEMENT b2 = COMPLEMENT b3
   holds b2 = b3;

:: SETFAM_1:th 54
theorem
for b1 being set
for b2, b3 being Element of bool bool b1 holds
COMPLEMENT (b2 \/ b3) = (COMPLEMENT b2) \/ COMPLEMENT b3;

:: SETFAM_1:th 55
theorem
for b1 being set
for b2 being Element of bool bool b1
      st b2 = {b1}
   holds COMPLEMENT b2 = {{}};

:: SETFAM_1:funcreg 1
registration
  let a1 be set;
  let a2 be empty Element of bool bool a1;
  cluster COMPLEMENT a2 -> empty;
end;

:: SETFAM_1:attrnot 1 => SETFAM_1:attr 1
definition
  let a1 be set;
  attr a1 is with_non-empty_elements means
    not {} in a1;
end;

:: SETFAM_1:dfs 8
definiens
  let a1 be set;
To prove
     a1 is with_non-empty_elements
it is sufficient to prove
  thus not {} in a1;

:: SETFAM_1:def 9
theorem
for b1 being set holds
      b1 is with_non-empty_elements
   iff
      not {} in b1;

:: SETFAM_1:exreg 1
registration
  cluster non empty with_non-empty_elements set;
end;

:: SETFAM_1:funcreg 2
registration
  let a1 be non empty set;
  cluster {a1} -> with_non-empty_elements;
end;

:: SETFAM_1:funcreg 3
registration
  let a1, a2 be non empty set;
  cluster {a1,a2} -> with_non-empty_elements;
end;

:: SETFAM_1:funcreg 4
registration
  let a1, a2, a3 be non empty set;
  cluster {a1,a2,a3} -> with_non-empty_elements;
end;

:: SETFAM_1:funcreg 5
registration
  let a1, a2, a3, a4 be non empty set;
  cluster {a1,a2,a3,a4} -> with_non-empty_elements;
end;

:: SETFAM_1:funcreg 6
registration
  let a1, a2, a3, a4, a5 be non empty set;
  cluster {a1,a2,a3,a4,a5} -> with_non-empty_elements;
end;

:: SETFAM_1:funcreg 7
registration
  let a1, a2, a3, a4, a5, a6 be non empty set;
  cluster {a1,a2,a3,a4,a5,a6} -> with_non-empty_elements;
end;

:: SETFAM_1:funcreg 8
registration
  let a1, a2, a3, a4, a5, a6, a7 be non empty set;
  cluster {a1,a2,a3,a4,a5,a6,a7} -> with_non-empty_elements;
end;

:: SETFAM_1:funcreg 9
registration
  let a1, a2, a3, a4, a5, a6, a7, a8 be non empty set;
  cluster {a1,a2,a3,a4,a5,a6,a7,a8} -> with_non-empty_elements;
end;

:: SETFAM_1:funcreg 10
registration
  let a1, a2, a3, a4, a5, a6, a7, a8, a9 be non empty set;
  cluster {a1,a2,a3,a4,a5,a6,a7,a8,a9} -> with_non-empty_elements;
end;

:: SETFAM_1:funcreg 11
registration
  let a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 be non empty set;
  cluster {a1,a2,a3,a4,a5,a6,a7,a8,a9,a10} -> with_non-empty_elements;
end;

:: SETFAM_1:funcreg 12
registration
  let a1, a2 be with_non-empty_elements set;
  cluster a1 \/ a2 -> with_non-empty_elements;
end;

:: SETFAM_1:th 56
theorem
for b1, b2, b3 being set
      st union b1 c= b2 & b3 in b1
   holds b3 c= b2;

:: SETFAM_1:th 57
theorem
for b1, b2, b3 being set
      st b3 c= union (b1 \/ b2) &
         (for b4 being set
               st b4 in b2
            holds b4 misses b3)
   holds b3 c= union b1;

:: SETFAM_1:funcnot 8 => SETFAM_1:func 8
definition
  let a1 be set;
  let a2 be Element of bool bool a1;
  func Intersect A2 -> Element of bool a1 equals
    meet a2
    if a2 <> {}
    otherwise a1;
end;

:: SETFAM_1:def 10
theorem
for b1 being set
for b2 being Element of bool bool b1 holds
   (b2 = {} or Intersect b2 = meet b2) & (b2 = {} implies Intersect b2 = b1);

:: SETFAM_1:th 58
theorem
for b1, b2 being set
for b3 being Element of bool bool b1
      st b2 in b1
   holds    b2 in Intersect b3
   iff
      for b4 being set
            st b4 in b3
         holds b2 in b4;

:: SETFAM_1:th 59
theorem
for b1 being set
for b2, b3 being Element of bool bool b1
      st b2 c= b3
   holds Intersect b3 c= Intersect b2;

:: SETFAM_1:condreg 1
registration
  let a1 be non empty with_non-empty_elements set;
  cluster -> non empty (Element of a1);
end;

:: SETFAM_1:attrnot 2 => SETFAM_1:attr 2
definition
  let a1 be set;
  attr a1 is empty-membered means
    for b1 being non empty set holds
       not b1 in a1;
end;

:: SETFAM_1:dfs 10
definiens
  let a1 be set;
To prove
     a1 is empty-membered
it is sufficient to prove
  thus for b1 being non empty set holds
       not b1 in a1;

:: SETFAM_1:def 11
theorem
for b1 being set holds
      b1 is empty-membered
   iff
      for b2 being non empty set holds
         not b2 in b1;

:: SETFAM_1:attrnot 3 => SETFAM_1:attr 2
notation
  let a1 be set;
  antonym with_non-empty_element for empty-membered;
end;

:: SETFAM_1:exreg 2
registration
  cluster with_non-empty_element set;
end;

:: SETFAM_1:condreg 2
registration
  cluster with_non-empty_element -> non empty (set);
end;

:: SETFAM_1:exreg 3
registration
  let a1 be with_non-empty_element set;
  cluster non empty Element of a1;
end;

:: SETFAM_1:funcreg 13
registration
  let a1 be non empty with_non-empty_elements set;
  cluster union a1 -> non empty;
end;

:: SETFAM_1:condreg 3
registration
  cluster non empty with_non-empty_elements -> with_non-empty_element (set);
end;