Article MSUALG_8, MML version 4.99.1005

:: MSUALG_8:th 1
theorem
for b1 being Element of NAT
for b2 being Relation-like Function-like FinSequence-like set holds
      1 <= b1 & b1 < len b2
   iff
      b1 in dom b2 & b1 + 1 in dom b2;

:: MSUALG_8:sch 1
scheme MSUALG_8:sch 1
{F1 -> Element of NAT}:
ex b1 being Relation-like Function-like FinSequence-like set st
   dom b1 = Seg F1() &
    (for b2 being Element of NAT
          st b2 in Seg F1()
       holds P1[b2, b1 . b2])
provided
   for b1 being Element of NAT
         st b1 in Seg F1()
      holds ex b2 being set st
         P1[b1, b2];


:: MSUALG_8:th 2
theorem
for b1 being set
for b2, b3 being Element of the carrier of EqRelLatt b1
for b4, b5 being symmetric transitive total Relation of b1,b1
      st b2 = b4 & b3 = b5
   holds    b2 [= b3
   iff
      b4 c= b5;

:: MSUALG_8:funcreg 1
registration
  let a1 be set;
  cluster EqRelLatt a1 -> non empty strict Lattice-like bounded;
end;

:: MSUALG_8:th 3
theorem
for b1 being set holds
   Bottom EqRelLatt b1 = id b1;

:: MSUALG_8:th 4
theorem
for b1 being set holds
   Top EqRelLatt b1 = nabla b1;

:: MSUALG_8:th 5
theorem
for b1 being set holds
   EqRelLatt b1 is complete;

:: MSUALG_8:funcreg 2
registration
  let a1 be set;
  cluster EqRelLatt a1 -> non empty strict Lattice-like complete;
end;

:: MSUALG_8:th 6
theorem
for b1 being set
for b2 being Element of bool the carrier of EqRelLatt b1 holds
   union b2 is Relation of b1,b1;

:: MSUALG_8:th 7
theorem
for b1 being set
for b2 being Element of bool the carrier of EqRelLatt b1 holds
   union b2 c= "\/"(b2,EqRelLatt b1);

:: MSUALG_8:th 8
theorem
for b1 being set
for b2 being Element of bool the carrier of EqRelLatt b1
for b3 being Relation of b1,b1
      st b3 = union b2
   holds "\/"(b2,EqRelLatt b1) = EqCl b3;

:: MSUALG_8:th 9
theorem
for b1 being set
for b2 being Element of bool the carrier of EqRelLatt b1
for b3 being Relation-like set
      st b3 = union b2
   holds b3 = b3 ~;

:: MSUALG_8:th 10
theorem
for b1, b2, b3 being set
for b4 being Element of bool the carrier of EqRelLatt b3
      st b1 in b3 & b2 in b3
   holds    [b1,b2] in "\/"(b4,EqRelLatt b3)
   iff
      ex b5 being Relation-like Function-like FinSequence-like set st
         1 <= len b5 &
          b1 = b5 . 1 &
          b2 = b5 . len b5 &
          (for b6 being Element of NAT
                st 1 <= b6 & b6 < len b5
             holds [b5 . b6,b5 . (b6 + 1)] in union b4);

:: MSUALG_8:th 11
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3 being Element of bool the carrier of CongrLatt b2 holds
   "/\"(b3,EqRelLatt the Sorts of b2) is MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of b2,the Sorts of b2;

:: MSUALG_8:funcnot 1 => MSUALG_8:func 1
definition
  let a1 be non empty non void ManySortedSign;
  let a2 be non-empty MSAlgebra over a1;
  let a3 be Element of the carrier of EqRelLatt the Sorts of a2;
  func CongrCl A3 -> MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of a2,the Sorts of a2 equals
    "/\"({b1 where b1 is Element of the carrier of EqRelLatt the Sorts of a2: b1 is MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of a2,the Sorts of a2 &
     a3 [= b1},EqRelLatt the Sorts of a2);
end;

:: MSUALG_8:def 1
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3 being Element of the carrier of EqRelLatt the Sorts of b2 holds
   CongrCl b3 = "/\"({b4 where b4 is Element of the carrier of EqRelLatt the Sorts of b2: b4 is MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of b2,the Sorts of b2 &
    b3 [= b4},EqRelLatt the Sorts of b2);

:: MSUALG_8:funcnot 2 => MSUALG_8:func 2
definition
  let a1 be non empty non void ManySortedSign;
  let a2 be non-empty MSAlgebra over a1;
  let a3 be Element of bool the carrier of EqRelLatt the Sorts of a2;
  func CongrCl A3 -> MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of a2,the Sorts of a2 equals
    "/\"({b1 where b1 is Element of the carrier of EqRelLatt the Sorts of a2: b1 is MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of a2,the Sorts of a2 &
     a3 is_less_than b1},EqRelLatt the Sorts of a2);
end;

:: MSUALG_8:def 2
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3 being Element of bool the carrier of EqRelLatt the Sorts of b2 holds
   CongrCl b3 = "/\"({b4 where b4 is Element of the carrier of EqRelLatt the Sorts of b2: b4 is MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of b2,the Sorts of b2 &
    b3 is_less_than b4},EqRelLatt the Sorts of b2);

:: MSUALG_8:th 12
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3 being Element of the carrier of EqRelLatt the Sorts of b2
      st b3 is MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of b2,the Sorts of b2
   holds CongrCl b3 = b3;

:: MSUALG_8:th 13
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3 being Element of bool the carrier of EqRelLatt the Sorts of b2 holds
   CongrCl "\/"(b3,EqRelLatt the Sorts of b2) = CongrCl b3;

:: MSUALG_8:th 14
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3, b4 being Element of bool the carrier of CongrLatt b2
for b5, b6 being MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of b2,the Sorts of b2
      st b5 = "\/"(b3,EqRelLatt the Sorts of b2) & b6 = "\/"(b4,EqRelLatt the Sorts of b2)
   holds b5 "\/" b6 = "\/"(b3 \/ b4,EqRelLatt the Sorts of b2);

:: MSUALG_8:th 15
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3 being Element of bool the carrier of CongrLatt b2 holds
   "\/"(b3,EqRelLatt the Sorts of b2) = "\/"({"\/"(b4,EqRelLatt the Sorts of b2) where b4 is Element of bool the carrier of EqRelLatt the Sorts of b2: b4 is finite Element of bool b3},EqRelLatt the Sorts of b2);

:: MSUALG_8:th 16
theorem
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3 being Element of b1
for b4 being symmetric transitive total Relation of b2 . b3,b2 . b3 holds
   ex b5 being MSEquivalence_Relation-like ManySortedRelation of b2,b2 st
      b5 . b3 = b4 &
       (for b6 being Element of b1
             st b6 <> b3
          holds b5 . b6 = nabla (b2 . b6));

:: MSUALG_8:funcnot 3 => CARD_3:func 5
notation
  let a1 be non empty set;
  let a2 be ManySortedSet of a1;
  let a3 be Element of a1;
  let a4 be Element of bool the carrier of EqRelLatt a2;
  synonym EqRelSet(a4,a3) for pi(a2,a1);
end;

:: MSUALG_8:funcnot 4 => MSUALG_8:func 3
definition
  let a1 be non empty set;
  let a2 be ManySortedSet of a1;
  let a3 be Element of a1;
  let a4 be Element of bool the carrier of EqRelLatt a2;
  redefine func EqRelSet(A4,A3) -> Element of bool the carrier of EqRelLatt (a2 . a3) means
    for b1 being set holds
          b1 in it
       iff
          ex b2 being MSEquivalence_Relation-like ManySortedRelation of a2,a2 st
             b1 = b2 . a3 & b2 in a4;
end;

:: MSUALG_8:def 3
theorem
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3 being Element of b1
for b4 being Element of bool the carrier of EqRelLatt b2
for b5 being Element of bool the carrier of EqRelLatt (b2 . b3) holds
      b5 = EqRelSet(b4,b3)
   iff
      for b6 being set holds
            b6 in b5
         iff
            ex b7 being MSEquivalence_Relation-like ManySortedRelation of b2,b2 st
               b6 = b7 . b3 & b7 in b4;

:: MSUALG_8:th 17
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3 being Element of the carrier of b1
for b4 being Element of bool the carrier of EqRelLatt the Sorts of b2
for b5 being MSEquivalence_Relation-like ManySortedRelation of the Sorts of b2,the Sorts of b2
      st b5 = "\/"(b4,EqRelLatt the Sorts of b2)
   holds b5 . b3 = "\/"(EqRelSet(b4,b3),EqRelLatt ((the Sorts of b2) . b3));

:: MSUALG_8:th 18
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3 being Element of bool the carrier of CongrLatt b2 holds
   "\/"(b3,EqRelLatt the Sorts of b2) is MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of b2,the Sorts of b2;

:: MSUALG_8:th 19
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1 holds
   CongrLatt b2 is /\-inheriting(EqRelLatt the Sorts of b2);

:: MSUALG_8:th 20
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1 holds
   CongrLatt b2 is \/-inheriting(EqRelLatt the Sorts of b2);

:: MSUALG_8:funcreg 3
registration
  let a1 be non empty non void ManySortedSign;
  let a2 be non-empty MSAlgebra over a1;
  cluster CongrLatt a2 -> strict /\-inheriting \/-inheriting;
end;