Article EQREL_1, MML version 4.99.1005

:: EQREL_1:funcnot 1 => EQREL_1:func 1
definition
  let a1 be set;
  func nabla A1 -> Relation of a1,a1 equals
    [:a1,a1:];
end;

:: EQREL_1:def 1
theorem
for b1 being set holds
   nabla b1 = [:b1,b1:];

:: EQREL_1:funcreg 1
registration
  let a1 be set;
  cluster nabla a1 -> reflexive total;
end;

:: EQREL_1:funcnot 2 => EQREL_1:func 2
definition
  let a1 be set;
  let a2, a3 be Relation of a1,a1;
  redefine func a2 /\ a3 -> Relation of a1,a1;
  commutativity;
::  for a1 being set
::  for a2, a3 being Relation of a1,a1 holds
::  a2 /\ a3 = a3 /\ a2;
  idempotence;
::  for a1 being set
::  for a2 being Relation of a1,a1 holds
::     a2 /\ a2 = a2;
end;

:: EQREL_1:funcnot 3 => EQREL_1:func 3
definition
  let a1 be set;
  let a2, a3 be Relation of a1,a1;
  redefine func a2 \/ a3 -> Relation of a1,a1;
  commutativity;
::  for a1 being set
::  for a2, a3 being Relation of a1,a1 holds
::  a2 \/ a3 = a3 \/ a2;
  idempotence;
::  for a1 being set
::  for a2 being Relation of a1,a1 holds
::     a2 \/ a2 = a2;
end;

:: EQREL_1:th 1
theorem
for b1 being set
for b2 being Relation of b1,b1 holds
   (nabla b1) \/ b2 = nabla b1;

:: EQREL_1:th 4
theorem
for b1 being set holds
   id b1 is_reflexive_in b1 & id b1 is_symmetric_in b1 & id b1 is_transitive_in b1;

:: EQREL_1:modenot 1
definition
  let a1 be set;
  mode Tolerance of a1 is reflexive symmetric total Relation of a1,a1;
end;

:: EQREL_1:modenot 2
definition
  let a1 be set;
  mode Equivalence_Relation of a1 is symmetric transitive total Relation of a1,a1;
end;

:: EQREL_1:th 6
theorem
for b1 being set holds
   id b1 is symmetric transitive total Relation of b1,b1;

:: EQREL_1:th 7
theorem
for b1 being set holds
   nabla b1 is symmetric transitive total Relation of b1,b1;

:: EQREL_1:funcreg 2
registration
  let a1 be set;
  cluster nabla a1 -> symmetric transitive total;
end;

:: EQREL_1:th 11
theorem
for b1, b2 being set
for b3 being reflexive total Relation of b1,b1
      st b2 in b1
   holds [b2,b2] in b3;

:: EQREL_1:th 12
theorem
for b1, b2, b3 being set
for b4 being symmetric total Relation of b1,b1
      st [b2,b3] in b4
   holds [b3,b2] in b4;

:: EQREL_1:th 13
theorem
for b1, b2, b3, b4 being set
for b5 being transitive total Relation of b1,b1
      st [b2,b3] in b5 & [b3,b4] in b5
   holds [b2,b4] in b5;

:: EQREL_1:th 14
theorem
for b1 being set
for b2 being reflexive total Relation of b1,b1
      st ex b3 being set st
           b3 in b1
   holds b2 <> {};

:: EQREL_1:th 16
theorem
for b1 being set
for b2 being Relation of b1,b1 holds
      b2 is symmetric transitive total Relation of b1,b1
   iff
      b2 is reflexive & b2 is symmetric & b2 is transitive & field b2 = b1;

:: EQREL_1:funcnot 4 => EQREL_1:func 4
definition
  let a1 be set;
  let a2, a3 be symmetric transitive total Relation of a1,a1;
  redefine func a2 /\ a3 -> symmetric transitive total Relation of a1,a1;
  commutativity;
::  for a1 being set
::  for a2, a3 being symmetric transitive total Relation of a1,a1 holds
::  a2 /\ a3 = a3 /\ a2;
  idempotence;
::  for a1 being set
::  for a2 being symmetric transitive total Relation of a1,a1 holds
::     a2 /\ a2 = a2;
end;

:: EQREL_1:th 17
theorem
for b1 being set
for b2 being symmetric transitive total Relation of b1,b1 holds
   (id b1) /\ b2 = id b1;

:: EQREL_1:th 19
theorem
for b1 being set
for b2 being Element of bool bool [:b1,b1:]
      st b2 <> {} &
         (for b3 being set
               st b3 in b2
            holds b3 is symmetric transitive total Relation of b1,b1)
   holds meet b2 is symmetric transitive total Relation of b1,b1;

:: EQREL_1:th 20
theorem
for b1 being set
for b2 being Relation of b1,b1 holds
   ex b3 being symmetric transitive total Relation of b1,b1 st
      b2 c= b3 &
       (for b4 being symmetric transitive total Relation of b1,b1
             st b2 c= b4
          holds b3 c= b4);

:: EQREL_1:funcnot 5 => EQREL_1:func 5
definition
  let a1 be set;
  let a2, a3 be symmetric transitive total Relation of a1,a1;
  func A2 "\/" A3 -> symmetric transitive total Relation of a1,a1 means
    a2 \/ a3 c= it &
     (for b1 being symmetric transitive total Relation of a1,a1
           st a2 \/ a3 c= b1
        holds it c= b1);
  commutativity;
::  for a1 being set
::  for a2, a3 being symmetric transitive total Relation of a1,a1 holds
::  a2 "\/" a3 = a3 "\/" a2;
  idempotence;
::  for a1 being set
::  for a2 being symmetric transitive total Relation of a1,a1 holds
::     a2 "\/" a2 = a2;
end;

:: EQREL_1:def 3
theorem
for b1 being set
for b2, b3, b4 being symmetric transitive total Relation of b1,b1 holds
   b4 = b2 "\/" b3
iff
   b2 \/ b3 c= b4 &
    (for b5 being symmetric transitive total Relation of b1,b1
          st b2 \/ b3 c= b5
       holds b4 c= b5);

:: EQREL_1:th 21
theorem
for b1 being set
for b2, b3, b4 being symmetric transitive total Relation of b1,b1 holds
(b2 "\/" b3) "\/" b4 = b2 "\/" (b3 "\/" b4);

:: EQREL_1:th 22
theorem
for b1 being set
for b2 being symmetric transitive total Relation of b1,b1 holds
   b2 "\/" b2 = b2;

:: EQREL_1:th 23
theorem
for b1 being set
for b2, b3 being symmetric transitive total Relation of b1,b1 holds
b2 "\/" b3 = b3 "\/" b2;

:: EQREL_1:th 24
theorem
for b1 being set
for b2, b3 being symmetric transitive total Relation of b1,b1 holds
b2 /\ (b2 "\/" b3) = b2;

:: EQREL_1:th 25
theorem
for b1 being set
for b2, b3 being symmetric transitive total Relation of b1,b1 holds
b2 "\/" (b2 /\ b3) = b2;

:: EQREL_1:sch 1
scheme EQREL_1:sch 1
{F1 -> set}:
ex b1 being symmetric transitive total Relation of F1(),F1() st
   for b2, b3 being set holds
      [b2,b3] in b1
   iff
      b2 in F1() & b3 in F1() & P1[b2, b3]
provided
   for b1 being set
         st b1 in F1()
      holds P1[b1, b1]
and
   for b1, b2 being set
         st P1[b1, b2]
      holds P1[b2, b1]
and
   for b1, b2, b3 being set
         st P1[b1, b2] & P1[b2, b3]
      holds P1[b1, b3];


:: EQREL_1:funcnot 6 => RELAT_1:func 11
notation
  let a1 be Relation-like set;
  let a2 be set;
  synonym Class(a1,a2) for Im(a1,a2);
end;

:: EQREL_1:funcnot 7 => EQREL_1:func 6
definition
  let a1, a2 be set;
  let a3 be Relation of a1,a2;
  let a4 be set;
  redefine func Class(a3,a4) -> Element of bool a2;
end;

:: EQREL_1:th 26
theorem
for b1, b2 being set
for b3 being Relation-like set holds
      b1 in Im(b3,b2)
   iff
      [b2,b1] in b3;

:: EQREL_1:th 27
theorem
for b1, b2, b3 being set
for b4 being symmetric total Relation of b1,b1 holds
      b2 in Class(b4,b3)
   iff
      [b2,b3] in b4;

:: EQREL_1:th 28
theorem
for b1 being set
for b2 being reflexive symmetric total Relation of b1,b1
for b3 being set
      st b3 in b1
   holds b3 in Class(b2,b3);

:: EQREL_1:th 29
theorem
for b1 being set
for b2 being reflexive symmetric total Relation of b1,b1
for b3 being set
      st b3 in b1
   holds ex b4 being set st
      b3 in Class(b2,b4);

:: EQREL_1:th 30
theorem
for b1, b2, b3, b4 being set
for b5 being reflexive symmetric transitive total Relation of b1,b1
      st b2 in Class(b5,b3) & b4 in Class(b5,b3)
   holds [b2,b4] in b5;

:: EQREL_1:th 31
theorem
for b1, b2 being set
for b3 being symmetric transitive total Relation of b1,b1
for b4 being set
      st b4 in b1
   holds    b2 in Class(b3,b4)
   iff
      Class(b3,b4) = Class(b3,b2);

:: EQREL_1:th 32
theorem
for b1 being set
for b2 being symmetric transitive total Relation of b1,b1
for b3, b4 being set
      st b3 in b1 & b4 in b1 & Class(b2,b3) <> Class(b2,b4)
   holds Class(b2,b3) misses Class(b2,b4);

:: EQREL_1:th 33
theorem
for b1, b2 being set
      st b2 in b1
   holds Class(id b1,b2) = {b2};

:: EQREL_1:th 34
theorem
for b1, b2 being set
      st b2 in b1
   holds Class(nabla b1,b2) = b1;

:: EQREL_1:th 35
theorem
for b1 being set
for b2 being symmetric transitive total Relation of b1,b1
      st ex b3 being set st
           Class(b2,b3) = b1
   holds b2 = nabla b1;

:: EQREL_1:th 36
theorem
for b1, b2, b3 being set
for b4, b5 being symmetric transitive total Relation of b2,b2
      st b1 in b2
   holds    [b1,b3] in b4 "\/" b5
   iff
      ex b6 being Relation-like Function-like FinSequence-like set st
         1 <= len b6 &
          b1 = b6 . 1 &
          b3 = b6 . len b6 &
          (for b7 being Element of NAT
                st 1 <= b7 & b7 < len b6
             holds [b6 . b7,b6 . (b7 + 1)] in b4 \/ b5);

:: EQREL_1:th 37
theorem
for b1 being set
for b2, b3, b4 being symmetric transitive total Relation of b1,b1
   st b4 = b2 \/ b3
for b5 being set
      st b5 in b1 & Class(b4,b5) <> Class(b2,b5)
   holds Class(b4,b5) = Class(b3,b5);

:: EQREL_1:th 38
theorem
for b1 being set
for b2, b3 being symmetric transitive total Relation of b1,b1
      st b2 \/ b3 = nabla b1 & not b2 = nabla b1
   holds b3 = nabla b1;

:: EQREL_1:funcnot 8 => EQREL_1:func 7
definition
  let a1 be set;
  let a2 be symmetric transitive total Relation of a1,a1;
  func Class A2 -> Element of bool bool a1 means
    for b1 being Element of bool a1 holds
          b1 in it
       iff
          ex b2 being set st
             b2 in a1 & b1 = Class(a2,b2);
end;

:: EQREL_1:def 5
theorem
for b1 being set
for b2 being symmetric transitive total Relation of b1,b1
for b3 being Element of bool bool b1 holds
      b3 = Class b2
   iff
      for b4 being Element of bool b1 holds
            b4 in b3
         iff
            ex b5 being set st
               b5 in b1 & b4 = Class(b2,b5);

:: EQREL_1:th 40
theorem
for b1 being set
for b2 being symmetric transitive total Relation of b1,b1
      st b1 = {}
   holds Class b2 = {};

:: EQREL_1:modenot 3 => EQREL_1:mode 1
definition
  let a1 be set;
  mode a_partition of A1 -> Element of bool bool a1 means
    union it = a1 &
     (for b1 being Element of bool a1
           st b1 in it
        holds b1 <> {} &
         (for b2 being Element of bool a1
               st b2 in it & b1 <> b2
            holds b1 misses b2));
end;

:: EQREL_1:dfs 4
definiens
  let a1 be set;
  let a2 be Element of bool bool a1;
To prove
     a2 is a_partition of a1
it is sufficient to prove
  thus union a2 = a1 &
     (for b1 being Element of bool a1
           st b1 in a2
        holds b1 <> {} &
         (for b2 being Element of bool a1
               st b2 in a2 & b1 <> b2
            holds b1 misses b2));

:: EQREL_1:def 6
theorem
for b1 being set
for b2 being Element of bool bool b1 holds
      b2 is a_partition of b1
   iff
      union b2 = b1 &
       (for b3 being Element of bool b1
             st b3 in b2
          holds b3 <> {} &
           (for b4 being Element of bool b1
                 st b4 in b2 & b3 <> b4
              holds b3 misses b4));

:: EQREL_1:th 41
theorem
for b1 being a_partition of {} holds
   b1 = {};

:: EQREL_1:th 42
theorem
for b1 being set
for b2 being symmetric transitive total Relation of b1,b1 holds
   Class b2 is a_partition of b1;

:: EQREL_1:th 43
theorem
for b1 being set
for b2 being a_partition of b1 holds
   ex b3 being symmetric transitive total Relation of b1,b1 st
      b2 = Class b3;

:: EQREL_1:th 44
theorem
for b1, b2 being set
for b3 being symmetric transitive total Relation of b1,b1
for b4 being set
      st b4 in b1
   holds    [b4,b2] in b3
   iff
      Class(b3,b4) = Class(b3,b2);

:: EQREL_1:th 45
theorem
for b1, b2 being set
for b3 being symmetric transitive total Relation of b2,b2
      st b1 in Class b3
   holds ex b4 being Element of b2 st
      b1 = Class(b3,b4);

:: EQREL_1:condreg 1
registration
  let a1 be non empty set;
  cluster -> non empty (a_partition of a1);
end;

:: EQREL_1:condreg 2
registration
  let a1 be set;
  cluster -> with_non-empty_elements (a_partition of a1);
end;

:: EQREL_1:funcnot 9 => EQREL_1:func 8
definition
  let a1 be set;
  let a2 be symmetric transitive total Relation of a1,a1;
  redefine func Class a2 -> a_partition of a1;
end;

:: EQREL_1:funcreg 3
registration
  let a1 be non empty set;
  let a2 be symmetric transitive total Relation of a1,a1;
  cluster Class a2 -> non empty;
end;

:: EQREL_1:funcreg 4
registration
  let a1 be non empty set;
  let a2 be symmetric transitive total Relation of a1,a1;
  cluster Class a2 -> with_non-empty_elements;
end;

:: EQREL_1:funcnot 10 => RELAT_1:func 11
notation
  let a1 be non empty set;
  let a2 be symmetric transitive total Relation of a1,a1;
  let a3 be Element of a1;
  synonym EqClass(a2,a3) for Im(a1,a2);
end;

:: EQREL_1:funcnot 11 => EQREL_1:func 9
definition
  let a1 be non empty set;
  let a2 be symmetric transitive total Relation of a1,a1;
  let a3 be Element of a1;
  redefine func EqClass(a2,a3) -> Element of Class a2;
end;

:: EQREL_1:funcnot 12 => EQREL_1:func 10
definition
  let a1 be set;
  func SmallestPartition A1 -> a_partition of a1 equals
    Class id a1;
end;

:: EQREL_1:def 7
theorem
for b1 being set holds
   SmallestPartition b1 = Class id b1;

:: EQREL_1:th 46
theorem
for b1 being non empty set holds
   SmallestPartition b1 = {{b2} where b2 is Element of b1: TRUE};

:: EQREL_1:funcnot 13 => EQREL_1:func 11
definition
  let a1 be non empty set;
  let a2 be Element of a1;
  let a3 be a_partition of a1;
  func EqClass(A2,A3) -> Element of bool a1 means
    a2 in it & it in a3;
end;

:: EQREL_1:def 8
theorem
for b1 being non empty set
for b2 being Element of b1
for b3 being a_partition of b1
for b4 being Element of bool b1 holds
      b4 = EqClass(b2,b3)
   iff
      b2 in b4 & b4 in b3;

:: EQREL_1:th 47
theorem
for b1 being non empty set
for b2, b3 being a_partition of b1
      st for b4 being Element of b1 holds
           EqClass(b4,b2) = EqClass(b4,b3)
   holds b2 = b3;

:: EQREL_1:th 48
theorem
for b1 being non empty set holds
   {b1} is a_partition of b1;

:: EQREL_1:modenot 4 => EQREL_1:mode 2
definition
  let a1 be set;
  mode Family-Class of A1 means
    it c= bool bool a1;
end;

:: EQREL_1:dfs 7
definiens
  let a1, a2 be set;
To prove
     a2 is Family-Class of a1
it is sufficient to prove
  thus a2 c= bool bool a1;

:: EQREL_1:def 9
theorem
for b1, b2 being set holds
   b2 is Family-Class of b1
iff
   b2 c= bool bool b1;

:: EQREL_1:attrnot 1 => EQREL_1:attr 1
definition
  let a1 be set;
  let a2 be Family-Class of a1;
  attr a2 is partition-membered means
    for b1 being set
          st b1 in a2
       holds b1 is a_partition of a1;
end;

:: EQREL_1:dfs 8
definiens
  let a1 be set;
  let a2 be Family-Class of a1;
To prove
     a2 is partition-membered
it is sufficient to prove
  thus for b1 being set
          st b1 in a2
       holds b1 is a_partition of a1;

:: EQREL_1:def 10
theorem
for b1 being set
for b2 being Family-Class of b1 holds
      b2 is partition-membered(b1)
   iff
      for b3 being set
            st b3 in b2
         holds b3 is a_partition of b1;

:: EQREL_1:exreg 1
registration
  let a1 be set;
  cluster partition-membered Family-Class of a1;
end;

:: EQREL_1:modenot 5
definition
  let a1 be set;
  mode Part-Family of a1 is partition-membered Family-Class of a1;
end;

:: EQREL_1:exreg 2
registration
  let a1 be non empty set;
  cluster non empty with_non-empty_elements a_partition of a1;
end;

:: EQREL_1:th 49
theorem
for b1 being set
for b2 being a_partition of b1 holds
   {b2} is partition-membered Family-Class of b1;

:: EQREL_1:exreg 3
registration
  let a1 be set;
  cluster non empty partition-membered Family-Class of a1;
end;

:: EQREL_1:th 50
theorem
for b1 being non empty set
for b2 being a_partition of b1
for b3, b4 being Element of b1
      st EqClass(b3,b2) meets EqClass(b4,b2)
   holds EqClass(b3,b2) = EqClass(b4,b2);

:: EQREL_1:th 51
theorem
for b1 being set
for b2 being non empty set
for b3 being a_partition of b2
      st b1 in b3
   holds ex b4 being Element of b2 st
      b1 = EqClass(b4,b3);

:: EQREL_1:funcnot 14 => EQREL_1:func 12
definition
  let a1 be non empty set;
  let a2 be non empty partition-membered Family-Class of a1;
  func Intersection A2 -> non empty a_partition of a1 means
    for b1 being Element of a1 holds
       EqClass(b1,it) = meet {EqClass(b1,b2) where b2 is a_partition of a1: b2 in a2};
end;

:: EQREL_1:def 11
theorem
for b1 being non empty set
for b2 being non empty partition-membered Family-Class of b1
for b3 being non empty a_partition of b1 holds
      b3 = Intersection b2
   iff
      for b4 being Element of b1 holds
         EqClass(b4,b3) = meet {EqClass(b4,b5) where b5 is a_partition of b1: b5 in b2};

:: EQREL_1:th 52
theorem
for b1 being non empty set
for b2 being a_partition of b1
for b3 being Element of bool b2 holds
   (union b2) \ union b3 = union (b2 \ b3);

:: EQREL_1:th 53
theorem
for b1 being non empty set
for b2 being Element of bool b1
for b3 being a_partition of b1
      st b2 in b3
   holds union (b3 \ {b2}) = b1 \ b2;

:: EQREL_1:th 54
theorem
{} is a_partition of {};