Article RELSET_2, MML version 4.99.1005

:: RELSET_2:funcnot 1 => EQREL_1:func 10
notation
  let a1 be set;
  synonym {_{a1}_} for SmallestPartition a1;
end;

:: RELSET_2:th 1
theorem
for b1, b2 being set holds
   b1 in SmallestPartition b2
iff
   ex b3 being set st
      b1 = {b3} & b3 in b2;

:: RELSET_2:th 2
theorem
for b1 being set holds
      b1 = {}
   iff
      SmallestPartition b1 = {};

:: RELSET_2:th 3
theorem
for b1, b2 being set holds
SmallestPartition (b1 \/ b2) = (SmallestPartition b1) \/ SmallestPartition b2;

:: RELSET_2:th 4
theorem
for b1, b2 being set holds
SmallestPartition (b1 /\ b2) = (SmallestPartition b1) /\ SmallestPartition b2;

:: RELSET_2:th 5
theorem
for b1, b2 being set holds
SmallestPartition (b1 \ b2) = (SmallestPartition b1) \ SmallestPartition b2;

:: RELSET_2:th 6
theorem
for b1, b2 being set holds
   b1 c= b2
iff
   SmallestPartition b1 c= SmallestPartition b2;

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

:: RELSET_2:th 8
theorem
for b1, b2, b3 being Relation-like set holds
(b1 /\ b2) * b3 c= (b1 * b3) /\ (b2 * b3);

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

:: RELSET_2:th 10
theorem
for b1 being set
for b2, b3 being Relation-like set holds
Im(b2 \/ b3,b1) = (Im(b2,b1)) \/ Im(b3,b1);

:: RELSET_2:th 11
theorem
for b1 being set
for b2, b3 being Relation-like set holds
Im(b2 /\ b3,b1) = (Im(b2,b1)) /\ Im(b3,b1);

:: RELSET_2:th 12
theorem
for b1 being set
for b2, b3 being Relation-like set holds
Im(b2 \ b3,b1) = (Im(b2,b1)) \ Im(b3,b1);

:: RELSET_2:th 13
theorem
for b1 being set
for b2, b3 being Relation-like set holds
(b2 /\ b3) .: SmallestPartition b1 c= (b2 .: SmallestPartition b1) /\ (b3 .: SmallestPartition b1);

:: RELSET_2:funcnot 2 => RELSET_2:func 1
definition
  let a1, a2 be set;
  let a3 be Relation of a1,a2;
  let a4 be Element of a1;
  func A3 " A4 -> Element of bool a1 equals
    a3 " {a4};
end;

:: RELSET_2:def 2
theorem
for b1, b2 being set
for b3 being Relation of b1,b2
for b4 being Element of b1 holds
   b3 " b4 = b3 " {b4};

:: RELSET_2:th 14
theorem
for b1 being set
for b2 being Element of bool bool b1
for b3 being Relation-like set holds
   b3 .: union b2 = union {b3 .: b4 where b4 is Element of bool b1: b4 in b2};

:: RELSET_2:th 15
theorem
for b1 being non empty set
for b2 being Element of bool b1 holds
   b2 = union {{b3} where b3 is Element of b1: b3 in b2};

:: RELSET_2:th 16
theorem
for b1 being non empty set
for b2 being Element of bool b1 holds
   {{b3} where b3 is Element of b1: b3 in b2} is Element of bool bool b1;

:: RELSET_2:th 17
theorem
for b1 being non empty set
for b2 being set
for b3 being Element of bool b1
for b4 being Relation of b1,b2 holds
   b4 .: b3 = union {Class(b4,b5) where b5 is Element of b1: b5 in b3};

:: RELSET_2:th 18
theorem
for b1 being non empty set
for b2 being set
for b3 being Element of bool b1
for b4 being Relation of b1,b2 holds
   {b4 .: b5 where b5 is Element of b1: b5 in b3} is Element of bool bool b2;

:: RELSET_2:funcnot 3 => RELSET_2:func 2
definition
  let a1 be set;
  let a2 be Relation-like set;
  func .:(A2,A1) -> Relation-like Function-like set means
    proj1 it = bool a1 &
     (for b1 being set
           st b1 c= a1
        holds it . b1 = a2 .: b1);
end;

:: RELSET_2:def 3
theorem
for b1 being set
for b2 being Relation-like set
for b3 being Relation-like Function-like set holds
      b3 = .:(b2,b1)
   iff
      proj1 b3 = bool b1 &
       (for b4 being set
             st b4 c= b1
          holds b3 . b4 = b2 .: b4);

:: RELSET_2:funcnot 4 => RELSET_2:func 2
notation
  let a1, a2 be set;
  let a3 be Element of bool [:a2,a1:];
  synonym .: a3 for .:(a2,a1);
end;

:: RELSET_2:th 19
theorem
for b1, b2, b3 being set
for b4 being Element of bool [:b2,b3:]
      st b1 in proj1 .:(b4,b2)
   holds (.:(b4,b2)) . b1 = b4 .: b1;

:: RELSET_2:th 20
theorem
for b1, b2 being set
for b3 being Element of bool [:b1,b2:] holds
   proj2 .:(b3,b1) c= bool proj2 b3;

:: RELSET_2:th 21
theorem
for b1, b2 being set
for b3 being Element of bool [:b1,b2:] holds
   .:(b3,b1) is Function-like quasi_total Relation of bool b1,bool proj2 b3;

:: RELSET_2:funcnot 5 => RELSET_2:func 3
definition
  let a1, a2 be set;
  let a3 be Element of bool [:a2,a1:];
  redefine func .: a3 -> Function-like quasi_total Relation of bool a2,bool a1;
end;

:: RELSET_2:th 22
theorem
for b1, b2 being set
for b3 being Element of bool [:b1,b2:] holds
   union ((.: b3) .: b1) c= b3 .: union b1;

:: RELSET_2:funcnot 6 => RELSET_2:func 4
definition
  let a1, a2 be set;
  let a3 be Element of bool a1;
  let a4 be Element of bool [:a1,a2:];
  func A4 .:^ A3 -> set equals
    Intersect ((.: a4) .: SmallestPartition a3);
end;

:: RELSET_2:def 4
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4 being Element of bool [:b1,b2:] holds
   b4 .:^ b3 = Intersect ((.: b4) .: SmallestPartition b3);

:: RELSET_2:funcnot 7 => RELSET_2:func 5
definition
  let a1, a2 be set;
  let a3 be Element of bool a1;
  let a4 be Element of bool [:a1,a2:];
  redefine func a4 .:^ a3 -> Element of bool a2;
end;

:: RELSET_2:th 23
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4 being Element of bool [:b1,b2:] holds
      (.: b4) .: SmallestPartition b3 = {}
   iff
      b3 = {};

:: RELSET_2:th 24
theorem
for b1, b2, b3 being set
for b4 being Element of bool b1
for b5 being Element of bool [:b1,b2:]
   st b3 in b5 .:^ b4
for b6 being set
      st b6 in b4
   holds b3 in Im(b5,b6);

:: RELSET_2:th 25
theorem
for b1 being non empty set
for b2 being set
for b3 being Element of bool b2
for b4 being Element of b1
for b5 being Element of bool [:b2,b1:] holds
      b4 in b5 .:^ b3
   iff
      for b6 being set
            st b6 in b3
         holds b4 in Im(b5,b6);

:: RELSET_2:th 26
theorem
for b1, b2 being set
for b3, b4 being Element of bool b1
for b5 being Element of bool [:b1,b2:]
      st (.: b5) .: SmallestPartition b3 = {}
   holds b5 .:^ (b3 \/ b4) = b5 .:^ b4;

:: RELSET_2:th 27
theorem
for b1, b2 being set
for b3, b4 being Element of bool b1
for b5 being Element of bool [:b1,b2:] holds
   b5 .:^ (b3 \/ b4) = (b5 .:^ b3) /\ (b5 .:^ b4);

:: RELSET_2:th 28
theorem
for b1 being non empty set
for b2 being set
for b3 being Element of bool bool b1
for b4 being Relation of b1,b2 holds
   {b4 .:^ b5 where b5 is Element of bool b1: b5 in b3} is Element of bool bool b2;

:: RELSET_2:th 29
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4 being Element of bool [:b1,b2:]
      st b3 = {}
   holds b4 .:^ b3 = b2;

:: RELSET_2:th 30
theorem
for b1 being set
for b2 being Element of bool bool b1 holds
      union b2 = {}
   iff
      for b3 being set
            st b3 in b2
         holds b3 = {};

:: RELSET_2:th 31
theorem
for b1 being set
for b2 being non empty set
for b3 being Relation of b1,b2
for b4 being Element of bool bool b1
for b5 being Element of bool bool b2
      st b5 = {b3 .:^ b6 where b6 is Element of bool b1: b6 in b4}
   holds b3 .:^ union b4 = Intersect b5;

:: RELSET_2:th 32
theorem
for b1, b2 being set
for b3, b4 being Element of bool b1
for b5 being Element of bool [:b1,b2:]
      st b3 c= b4
   holds b5 .:^ b4 c= b5 .:^ b3;

:: RELSET_2:th 33
theorem
for b1, b2 being set
for b3, b4 being Element of bool b1
for b5 being Element of bool [:b1,b2:] holds
   (b5 .:^ b3) \/ (b5 .:^ b4) c= b5 .:^ (b3 /\ b4);

:: RELSET_2:th 34
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4, b5 being Element of bool [:b1,b2:] holds
(b4 /\ b5) .:^ b3 = (b4 .:^ b3) /\ (b5 .:^ b3);

:: RELSET_2:th 35
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4 being Element of bool bool [:b1,b2:] holds
   (union b4) .: b3 = union {b5 .: b3 where b5 is Element of bool [:b1,b2:]: b5 in b4};

:: RELSET_2:th 36
theorem
for b1, b2 being set
for b3 being Element of bool bool [:b1,b2:]
for b4, b5 being set
for b6 being Element of bool b4 holds
   {b7 .:^ b6 where b7 is Element of bool [:b4,b5:]: b7 in b3} is Element of bool bool b5;

:: RELSET_2:th 37
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4 being Element of bool [:b1,b2:]
      st b4 = {} & b3 <> {}
   holds b4 .:^ b3 = {};

:: RELSET_2:th 38
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4 being Element of bool [:b1,b2:]
      st b4 = [:b1,b2:]
   holds b4 .:^ b3 = b2;

:: RELSET_2:th 39
theorem
for b1, b2 being set
for b3 being Element of bool b2
for b4 being Element of bool bool [:b2,b1:]
for b5 being Element of bool bool b1
      st b5 = {b6 .:^ b3 where b6 is Element of bool [:b2,b1:]: b6 in b4}
   holds (Intersect b4) .:^ b3 = Intersect b5;

:: RELSET_2:th 40
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4, b5 being Element of bool [:b1,b2:]
      st b4 c= b5
   holds b4 .:^ b3 c= b5 .:^ b3;

:: RELSET_2:th 41
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4, b5 being Element of bool [:b1,b2:] holds
(b4 .:^ b3) \/ (b5 .:^ b3) c= (b4 \/ b5) .:^ b3;

:: RELSET_2:th 42
theorem
for b1, b2, b3, b4 being set
for b5 being Element of bool [:b3,b4:] holds
      b1 in Im(b5 `,b2)
   iff
      not [b2,b1] in b5 & b2 in b3 & b1 in b4;

:: RELSET_2:th 43
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4 being Element of bool [:b1,b2:]
      st b3 <> {}
   holds b4 .:^ b3 c= b4 .: b3;

:: RELSET_2:th 44
theorem
for b1, b2 being set
for b3 being Element of bool [:b1,b2:]
for b4, b5 being set holds
   b4 meets b3 ~ .: b5
iff
   ex b6, b7 being set st
      b6 in b4 & b7 in b5 & b6 in Im(b3 ~,b7);

:: RELSET_2:th 45
theorem
for b1, b2 being set
for b3 being Element of bool [:b1,b2:]
for b4, b5 being set holds
   ex b6, b7 being set st
      b6 in b4 & b7 in b5 & b6 in Im(b3 ~,b7)
iff
   b5 meets b3 .: b4;

:: RELSET_2:th 46
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4 being Element of bool b2
for b5 being Element of bool [:b1,b2:] holds
      b3 misses b5 ~ .: b4
   iff
      b4 misses b5 .: b3;

:: RELSET_2:th 47
theorem
for b1, b2 being set
for b3 being Element of bool [:b1,b2:]
for b4 being set holds
   b3 .: b4 = b3 .: (b4 /\ proj1 b3);

:: RELSET_2:th 48
theorem
for b1, b2 being set
for b3 being Element of bool [:b1,b2:]
for b4 being set holds
   b3 ~ .: b4 = b3 ~ .: (b4 /\ proj2 b3);

:: RELSET_2:th 49
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4 being Element of bool [:b1,b2:] holds
   (b4 .:^ b3) ` = b4 ` .: b3;

:: RELSET_2:funcnot 8 => RELSET_2:func 6
definition
  let a1, a2, a3 be set;
  let a4 be Element of bool [:a1,a2:];
  let a5 be Element of bool [:a2,a3:];
  redefine func a4 * a5 -> Relation of a1,a3;
end;

:: RELSET_2:th 50
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4 being Relation of b1,b2 holds
   (b4 .: b3) ` = b4 ` .:^ b3;

:: RELSET_2:th 51
theorem
for b1, b2 being set
for b3 being Relation of b2,b1 holds
   proj1 b3 = b3 ~ .: b1 & proj2 b3 = b3 .: b2;

:: RELSET_2:th 52
theorem
for b1, b2, b3 being set
for b4 being Relation of b1,b2
for b5 being Relation of b2,b3 holds
   proj1 (b4 * b5) = b4 ~ .: proj1 b5 &
    proj1 (b4 * b5) c= proj1 b4;

:: RELSET_2:th 53
theorem
for b1, b2, b3 being set
for b4 being Relation of b1,b2
for b5 being Relation of b2,b3 holds
   proj2 (b4 * b5) = b5 .: proj2 b4 & proj2 (b4 * b5) c= proj2 b5;

:: RELSET_2:th 54
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4 being Relation of b1,b2 holds
      b3 c= proj1 b4
   iff
      b3 c= (b4 * (b4 ~)) .: b3;

:: RELSET_2:th 55
theorem
for b1, b2 being set
for b3 being Element of bool b2
for b4 being Relation of b1,b2 holds
      b3 c= proj2 b4
   iff
      b3 c= (b4 ~ * b4) .: b3;

:: RELSET_2:th 56
theorem
for b1, b2 being set
for b3 being Relation of b2,b1 holds
   proj1 b3 = b3 ~ .: b1 &
    b3 ~ .: (b3 .: b2) = b3 ~ .: proj2 b3;

:: RELSET_2:th 57
theorem
for b1, b2 being set
for b3 being Relation of b2,b1 holds
   b3 ~ .: b1 = (b3 * (b3 ~)) .: b2;

:: RELSET_2:th 58
theorem
for b1, b2 being set
for b3 being Relation of b1,b2 holds
   b3 .: b1 = (b3 ~ * b3) .: b2;

:: RELSET_2:th 59
theorem
for b1, b2, b3 being set
for b4 being Element of bool b1
for b5 being Relation of b1,b2
for b6 being Relation of b2,b3 holds
   b6 .:^ (b5 .: b4) = (b5 * (b6 `)) ` .:^ b4;

:: RELSET_2:th 60
theorem
for b1, b2 being set
for b3 being Relation of b1,b2 holds
   b3 ` ~ = b3 ~ `;

:: RELSET_2:th 61
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4 being Element of bool b2
for b5 being Relation of b1,b2 holds
      b3 c= b5 ~ .:^ b4
   iff
      b4 c= b5 .:^ b3;

:: RELSET_2:th 62
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4 being Element of bool b2
for b5 being Relation of b1,b2 holds
      b5 .: (b3 `) c= b4 `
   iff
      b5 ~ .: b4 c= b3;

:: RELSET_2:th 63
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4 being Element of bool b2
for b5 being Relation of b1,b2 holds
   b3 c= b5 ~ .:^ (b5 .:^ b3) & b4 c= b5 .:^ (b5 ~ .:^ b4);

:: RELSET_2:th 64
theorem
for b1, b2 being set
for b3 being Element of bool b1
for b4 being Element of bool b2
for b5 being Relation of b1,b2 holds
   b5 .:^ b3 = b5 .:^ (b5 ~ .:^ (b5 .:^ b3)) &
    b5 ~ .:^ b4 = b5 ~ .:^ (b5 .:^ (b5 ~ .:^ b4));

:: RELSET_2:th 65
theorem
for b1, b2 being set
for b3 being Relation of b1,b2 holds
   (id b1) * b3 = b3 * id b2;