Article MSUALG_5, MML version 4.99.1005

:: MSUALG_5:funcnot 1 => MSUALG_5:func 1
definition
  let a1 be set;
  let a2 be Relation of a1,a1;
  func EqCl A2 -> symmetric transitive total Relation of a1,a1 means
    a2 c= it &
     (for b1 being symmetric transitive total Relation of a1,a1
           st a2 c= b1
        holds it c= b1);
end;

:: MSUALG_5:def 1
theorem
for b1 being set
for b2 being Relation of b1,b1
for b3 being symmetric transitive total Relation of b1,b1 holds
      b3 = EqCl b2
   iff
      b2 c= b3 &
       (for b4 being symmetric transitive total Relation of b1,b1
             st b2 c= b4
          holds b3 c= b4);

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

:: MSUALG_5:th 3
theorem
for b1 being set
for b2 being symmetric transitive total Relation of b1,b1 holds
   EqCl b2 = b2;

:: MSUALG_5:funcnot 2 => MSUALG_5:func 2
definition
  let a1 be set;
  func EqRelLatt A1 -> non empty strict Lattice-like LattStr means
    the carrier of it = {b1 where b1 is Relation of a1,a1: b1 is symmetric transitive total Relation of a1,a1} &
     (for b1, b2 being symmetric transitive total Relation of a1,a1 holds
     (the L_meet of it) .(b1,b2) = b1 /\ b2 & (the L_join of it) .(b1,b2) = b1 "\/" b2);
end;

:: MSUALG_5:def 2
theorem
for b1 being set
for b2 being non empty strict Lattice-like LattStr holds
      b2 = EqRelLatt b1
   iff
      the carrier of b2 = {b3 where b3 is Relation of b1,b1: b3 is symmetric transitive total Relation of b1,b1} &
       (for b3, b4 being symmetric transitive total Relation of b1,b1 holds
       (the L_meet of b2) .(b3,b4) = b3 /\ b4 & (the L_join of b2) .(b3,b4) = b3 "\/" b4);

:: MSUALG_5:exreg 1
registration
  let a1 be set;
  let a2 be ManySortedSet of a1;
  cluster Relation-like Function-like Relation-yielding MSEquivalence_Relation-like ManySortedRelation of a2,a2;
end;

:: MSUALG_5:modenot 1
definition
  let a1 be set;
  let a2 be ManySortedSet of a1;
  mode Equivalence_Relation of a2 is MSEquivalence_Relation-like ManySortedRelation of a2,a2;
end;

:: MSUALG_5:funcnot 3 => MSUALG_5:func 3
definition
  let a1 be non empty set;
  let a2 be ManySortedSet of a1;
  let a3 be ManySortedRelation of a2,a2;
  func EqCl A3 -> MSEquivalence_Relation-like ManySortedRelation of a2,a2 means
    for b1 being Element of a1 holds
       it . b1 = EqCl (a3 . b1);
end;

:: MSUALG_5:def 3
theorem
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3 being ManySortedRelation of b2,b2
for b4 being MSEquivalence_Relation-like ManySortedRelation of b2,b2 holds
      b4 = EqCl b3
   iff
      for b5 being Element of b1 holds
         b4 . b5 = EqCl (b3 . b5);

:: MSUALG_5:th 5
theorem
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3 being MSEquivalence_Relation-like ManySortedRelation of b2,b2 holds
   EqCl b3 = b3;

:: MSUALG_5:funcnot 4 => MSUALG_5:func 4
definition
  let a1 be non empty set;
  let a2 be ManySortedSet of a1;
  let a3, a4 be MSEquivalence_Relation-like ManySortedRelation of a2,a2;
  func A3 "\/" A4 -> MSEquivalence_Relation-like ManySortedRelation of a2,a2 means
    ex b1 being ManySortedRelation of a2,a2 st
       b1 = a3 \/ a4 & it = EqCl b1;
  commutativity;
::  for a1 being non empty set
::  for a2 being ManySortedSet of a1
::  for a3, a4 being MSEquivalence_Relation-like ManySortedRelation of a2,a2 holds
::  a3 "\/" a4 = a4 "\/" a3;
end;

:: MSUALG_5:def 4
theorem
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3, b4, b5 being MSEquivalence_Relation-like ManySortedRelation of b2,b2 holds
   b5 = b3 "\/" b4
iff
   ex b6 being ManySortedRelation of b2,b2 st
      b6 = b3 \/ b4 & b5 = EqCl b6;

:: MSUALG_5:th 6
theorem
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3, b4 being MSEquivalence_Relation-like ManySortedRelation of b2,b2 holds
b3 \/ b4 c= b3 "\/" b4;

:: MSUALG_5:th 7
theorem
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3, b4, b5 being MSEquivalence_Relation-like ManySortedRelation of b2,b2
      st b3 \/ b4 c= b5
   holds b3 "\/" b4 c= b5;

:: MSUALG_5:th 8
theorem
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3, b4, b5 being MSEquivalence_Relation-like ManySortedRelation of b2,b2
      st b3 \/ b4 c= b5 &
         (for b6 being MSEquivalence_Relation-like ManySortedRelation of b2,b2
               st b3 \/ b4 c= b6
            holds b5 c= b6)
   holds b5 = b3 "\/" b4;

:: MSUALG_5:th 9
theorem
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3 being MSEquivalence_Relation-like ManySortedRelation of b2,b2 holds
   b3 "\/" b3 = b3;

:: MSUALG_5:th 10
theorem
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3, b4, b5 being MSEquivalence_Relation-like ManySortedRelation of b2,b2 holds
(b3 "\/" b4) "\/" b5 = b3 "\/" (b4 "\/" b5);

:: MSUALG_5:th 11
theorem
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3, b4 being MSEquivalence_Relation-like ManySortedRelation of b2,b2 holds
b3 /\ (b3 "\/" b4) = b3;

:: MSUALG_5:th 12
theorem
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3, b4, b5 being MSEquivalence_Relation-like ManySortedRelation of b2,b2
      st b5 = b3 /\ b4
   holds b3 "\/" b5 = b3;

:: MSUALG_5:th 13
theorem
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3, b4 being MSEquivalence_Relation-like ManySortedRelation of b2,b2 holds
b3 /\ b4 is MSEquivalence_Relation-like ManySortedRelation of b2,b2;

:: MSUALG_5:funcnot 5 => MSUALG_5:func 5
definition
  let a1 be non empty set;
  let a2 be ManySortedSet of a1;
  func EqRelLatt A2 -> non empty strict Lattice-like LattStr means
    (for b1 being set holds
           b1 in the carrier of it
        iff
           b1 is MSEquivalence_Relation-like ManySortedRelation of a2,a2) &
     (for b1, b2 being MSEquivalence_Relation-like ManySortedRelation of a2,a2 holds
     (the L_meet of it) .(b1,b2) = b1 /\ b2 & (the L_join of it) .(b1,b2) = b1 "\/" b2);
end;

:: MSUALG_5:def 5
theorem
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3 being non empty strict Lattice-like LattStr holds
      b3 = EqRelLatt b2
   iff
      (for b4 being set holds
             b4 in the carrier of b3
          iff
             b4 is MSEquivalence_Relation-like ManySortedRelation of b2,b2) &
       (for b4, b5 being MSEquivalence_Relation-like ManySortedRelation of b2,b2 holds
       (the L_meet of b3) .(b4,b5) = b4 /\ b5 & (the L_join of b3) .(b4,b5) = b4 "\/" b5);

:: MSUALG_5:condreg 1
registration
  let a1 be non empty ManySortedSign;
  let a2 be MSAlgebra over a1;
  cluster MSEquivalence-like -> MSEquivalence_Relation-like (ManySortedRelation of the Sorts of a2,the Sorts of a2);
end;

:: MSUALG_5:th 14
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3 being Element of the OperSymbols of b1
for b4, b5 being MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of b2,the Sorts of b2
for b6, b7 being set
for b8, b9 being Relation-like Function-like FinSequence-like set
   st [b6,b7] in (b4 . ((the_arity_of b3) /. ((len b8) + 1))) \/ (b5 . ((the_arity_of b3) /. ((len b8) + 1)))
for b10, b11 being Element of Args(b3,b2)
      st b10 = (b8 ^ <*b6*>) ^ b9 & b11 = (b8 ^ <*b7*>) ^ b9
   holds [(Den(b3,b2)) . b10,(Den(b3,b2)) . b11] in (b4 . the_result_sort_of b3) \/ (b5 . the_result_sort_of b3);

:: MSUALG_5:th 15
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3 being Element of the OperSymbols of b1
for b4, b5 being MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of b2,the Sorts of b2
for b6 being MSEquivalence-like ManySortedRelation of the Sorts of b2,the Sorts of b2
   st b6 = b4 "\/" b5
for b7, b8 being set
for b9 being Element of NAT
for b10, b11, b12 being Relation-like Function-like FinSequence-like set
   st len b10 = b9 &
      len b10 = len b11 &
      (for b13 being Element of NAT
            st b13 in dom b10
         holds [b10 . b13,b11 . b13] in b6 . ((the_arity_of b3) /. b13)) &
      [(Den(b3,b2)) . ((b10 ^ <*b7*>) ^ b12),(Den(b3,b2)) . ((b11 ^ <*b7*>) ^ b12)] in b6 . the_result_sort_of b3 &
      [b7,b8] in b6 . ((the_arity_of b3) /. (b9 + 1))
for b13 being Element of Args(b3,b2)
      st b13 = (b10 ^ <*b7*>) ^ b12
   holds [(Den(b3,b2)) . b13,(Den(b3,b2)) . ((b11 ^ <*b8*>) ^ b12)] in b6 . the_result_sort_of b3;

:: MSUALG_5:th 16
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3 being Element of the OperSymbols of b1
for b4, b5 being MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of b2,the Sorts of b2
for b6 being MSEquivalence-like ManySortedRelation of the Sorts of b2,the Sorts of b2
   st b6 = b4 "\/" b5
for b7, b8 being Element of Args(b3,b2)
      st for b9 being natural set
              st b9 in proj1 b7
           holds [b7 . b9,b8 . b9] in b6 . ((the_arity_of b3) /. b9)
   holds [(Den(b3,b2)) . b7,(Den(b3,b2)) . b8] in b6 . the_result_sort_of b3;

:: MSUALG_5:th 17
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3, b4 being MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of b2,the Sorts of b2 holds
b3 "\/" b4 is MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of b2,the Sorts of b2;

:: MSUALG_5:th 18
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3, b4 being MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of b2,the Sorts of b2 holds
b3 /\ b4 is MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of b2,the Sorts of b2;

:: MSUALG_5:funcnot 6 => MSUALG_5:func 6
definition
  let a1 be non empty non void ManySortedSign;
  let a2 be non-empty MSAlgebra over a1;
  func CongrLatt A2 -> strict SubLattice of EqRelLatt the Sorts of a2 means
    for b1 being set holds
          b1 in the carrier of it
       iff
          b1 is MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of a2,the Sorts of a2;
end;

:: MSUALG_5:def 6
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3 being strict SubLattice of EqRelLatt the Sorts of b2 holds
      b3 = CongrLatt b2
   iff
      for b4 being set holds
            b4 in the carrier of b3
         iff
            b4 is MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of b2,the Sorts of b2;

:: MSUALG_5:th 19
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1 holds
   id the Sorts of b2 is MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of b2,the Sorts of b2;

:: MSUALG_5:th 20
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1 holds
   [|the Sorts of b2,the Sorts of b2|] is MSEquivalence-like MSCongruence-like ManySortedRelation of the Sorts of b2,the Sorts of b2;

:: MSUALG_5:funcreg 1
registration
  let a1 be non empty non void ManySortedSign;
  let a2 be non-empty MSAlgebra over a1;
  cluster CongrLatt a2 -> strict bounded;
end;

:: MSUALG_5:th 21
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1 holds
   Bottom CongrLatt b2 = id the Sorts of b2;

:: MSUALG_5:th 22
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1 holds
   Top CongrLatt b2 = [|the Sorts of b2,the Sorts of b2|];