Article PRALG_3, MML version 4.99.1005

:: PRALG_3:funcreg 1
registration
  let a1 be set;
  let a2 be non empty non void ManySortedSign;
  let a3 be MSAlgebra-Family of a1,a2;
  cluster product a3 -> non-empty;
end;

:: PRALG_3:funcnot 1 => PRALG_3:func 1
definition
  let a1 be set;
  redefine func id a1 -> ManySortedSet of a1;
end;

:: PRALG_3:funcreg 2
registration
  let a1 be with_non-empty_elements set;
  cluster id a1 -> Relation-like non-empty;
end;

:: PRALG_3:th 1
theorem
for b1, b2 being Relation-like Function-like set
for b3 being set
      st b1 in product b2
   holds b1 | b3 in product (b2 | b3);

:: PRALG_3:th 2
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of the carrier of b2
for b5 being non empty Element of bool b1
for b6 being MSAlgebra-Family of b5,b2
      st b3 | b5 = b6
   holds Carrier(b6,b4) = (Carrier(b3,b4)) | b5;

:: PRALG_3:th 3
theorem
for b1 being set
for b2 being non empty set
for b3 being symmetric transitive total Relation of b2,b2
for b4, b5 being Element of Class b3
      st b1 in b4 & b1 in b5
   holds b4 = b5;

:: PRALG_3:th 5
theorem
for b1 being non empty set
for b2 being Function-yielding ManySortedSet of b1
for b3 being non empty functional with_common_domain set
   st b3 = proj2 b2
for b4 being Element of b1
for b5 being set
      st b4 in proj1 b2 & b5 in DOM b3
   holds (b2 . b4) . b5 = ((commute b2) . b5) . b4;

:: PRALG_3:funcnot 2 => PRALG_3:func 2
definition
  let a1 be non empty non void ManySortedSign;
  let a2 be MSAlgebra over a1;
  let a3 be Element of the OperSymbols of a1;
  func const(A3,A2) -> set equals
    (Den(a3,a2)) . {};
end;

:: PRALG_3:def 1
theorem
for b1 being non empty non void ManySortedSign
for b2 being MSAlgebra over b1
for b3 being Element of the OperSymbols of b1 holds
   const(b3,b2) = (Den(b3,b2)) . {};

:: PRALG_3:th 6
theorem
for b1 being non empty non void ManySortedSign
for b2 being MSAlgebra over b1
for b3 being Element of the OperSymbols of b1
      st the_arity_of b3 = {} & Result(b3,b2) <> {}
   holds const(b3,b2) in Result(b3,b2);

:: PRALG_3:th 7
theorem
for b1 being non empty non void ManySortedSign
for b2 being MSAlgebra over b1
for b3 being Element of the carrier of b1
      st (the Sorts of b2) . b3 <> {}
   holds Constants(b2,b3) = {const(b4,b2) where b4 is Element of the OperSymbols of b1: the_result_sort_of b4 = b3 & the_arity_of b4 = {}};

:: PRALG_3:th 8
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of the OperSymbols of b2
      st the_arity_of b4 = {}
   holds (commute OPER b3) . b4 in Funcs(b1,Funcs({{}},union {Result(b4,b3 . b5) where b5 is Element of b1: TRUE}));

:: PRALG_3:th 9
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of the OperSymbols of b2
      st the_arity_of b4 = {}
   holds const(b4,product b3) in Funcs(b1,union {Result(b4,b3 . b5) where b5 is Element of b1: TRUE});

:: PRALG_3:funcreg 3
registration
  let a1 be non empty non void ManySortedSign;
  let a2 be non empty set;
  let a3 be Element of the OperSymbols of a1;
  let a4 be MSAlgebra-Family of a2,a1;
  cluster const(a3,product a4) -> Relation-like Function-like;
end;

:: PRALG_3:th 10
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being Element of b1
for b4 being MSAlgebra-Family of b1,b2
for b5 being Element of the OperSymbols of b2
      st the_arity_of b5 = {}
   holds (const(b5,product b4)) . b3 = const(b5,b4 . b3);

:: PRALG_3:th 11
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of the OperSymbols of b2
for b5 being Relation-like Function-like set
      st the_arity_of b4 = {} &
         proj1 b5 = b1 &
         (for b6 being Element of b1 holds
            b5 . b6 = const(b4,b3 . b6))
   holds b5 = const(b4,product b3);

:: PRALG_3:th 12
theorem
for b1 being non empty non void ManySortedSign
for b2, b3 being MSAlgebra over b1
for b4 being Element of the OperSymbols of b1
for b5 being Element of Args(b4,b2)
   st b5 = {} & the_arity_of b4 = {} & Args(b4,b2) <> {} & Args(b4,b3) <> {}
for b6 being ManySortedFunction of the Sorts of b2,the Sorts of b3 holds
   b6 # b5 = {};

:: PRALG_3:th 13
theorem
for b1 being non empty non void ManySortedSign
for b2 being Element of the OperSymbols of b1
for b3, b4 being non-empty MSAlgebra over b1
for b5 being ManySortedFunction of the Sorts of b3,the Sorts of b4
for b6 being Element of Args(b2,b3) holds
   b6 in product doms ((the_arity_of b2) * b5);

:: PRALG_3:th 14
theorem
for b1 being non empty non void ManySortedSign
for b2 being Element of the OperSymbols of b1
for b3, b4 being non-empty MSAlgebra over b1
for b5 being ManySortedFunction of the Sorts of b3,the Sorts of b4
for b6 being Element of Args(b2,b3)
for b7 being set
      st b7 in dom the_arity_of b2
   holds (b5 # b6) . b7 = (b5 . ((the_arity_of b2) /. b7)) . (b6 . b7);

:: PRALG_3:th 15
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of the OperSymbols of b2
for b5 being Element of Args(b4,product b3) holds
   b5 in Funcs(dom the_arity_of b4,Funcs(b1,union {(the Sorts of b3 . b6) . b7 where b6 is Element of b1, b7 is Element of the carrier of b2: TRUE}));

:: PRALG_3:th 16
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of the OperSymbols of b2
for b5 being Element of Args(b4,product b3)
for b6 being set
      st b6 in dom the_arity_of b4
   holds b5 . b6 in product Carrier(b3,(the_arity_of b4) /. b6);

:: PRALG_3:th 17
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of the OperSymbols of b2
for b5 being Element of b1
for b6 being set
   st b6 in dom the_arity_of b4
for b7 being Element of the carrier of b2
   st b7 = (the_arity_of b4) . b6
for b8 being Element of Args(b4,product b3)
for b9 being Relation-like Function-like set
      st b9 = b8 . b6
   holds b9 . b5 in (the Sorts of b3 . b5) . b7;

:: PRALG_3:th 18
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of the OperSymbols of b2
for b5 being Element of Args(b4,product b3)
      st the_arity_of b4 <> {}
   holds commute b5 in product doms (b3 ?. b4);

:: PRALG_3:th 19
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of the OperSymbols of b2
for b5 being Element of Args(b4,product b3)
      st the_arity_of b4 <> {}
   holds b5 in proj1 Commute Frege (b3 ?. b4);

:: PRALG_3:th 20
theorem
for b1 being set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of the OperSymbols of b2
for b5 being Element of Args(b4,product b3) holds
   (Den(b4,product b3)) . b5 in product Carrier(b3,the_result_sort_of b4);

:: PRALG_3:th 21
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of b1
for b5 being Element of the OperSymbols of b2
   st the_arity_of b5 <> {}
for b6 being non-empty MSAlgebra over b2
for b7 being Element of Args(b5,product b3) holds
   (commute b7) . b4 is Element of Args(b5,b3 . b4);

:: PRALG_3:th 22
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of b1
for b5 being Element of the OperSymbols of b2
for b6 being Element of Args(b5,product b3)
for b7 being set
   st b7 in dom the_arity_of b5
for b8 being Relation-like Function-like set
      st b8 = b6 . b7
   holds ((commute b6) . b4) . b7 = b8 . b4;

:: PRALG_3:th 23
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of the OperSymbols of b2
   st the_arity_of b4 <> {}
for b5 being Element of Args(b4,product b3)
for b6 being Element of b1
for b7 being Relation-like Function-like set
      st b7 = (Den(b4,product b3)) . b5
   holds b7 . b6 = (Den(b4,b3 . b6)) . ((commute b5) . b6);

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

:: PRALG_3:def 2
theorem
for b1 being Relation-like Function-like set
for b2 being set
for b3 being Relation-like Function-like set holds
      b3 = proj(b1,b2)
   iff
      proj1 b3 = product b1 &
       (for b4 being Relation-like Function-like set
             st b4 in proj1 b3
          holds b3 . b4 = b4 . b2);

:: PRALG_3:funcnot 4 => PRALG_3:func 4
definition
  let a1 be non empty set;
  let a2 be non empty non void ManySortedSign;
  let a3 be MSAlgebra-Family of a1,a2;
  let a4 be Element of a1;
  func proj(A3,A4) -> ManySortedFunction of the Sorts of product a3,the Sorts of a3 . a4 means
    for b1 being Element of the carrier of a2 holds
       it . b1 = proj(Carrier(a3,b1),a4);
end;

:: PRALG_3:def 3
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of b1
for b5 being ManySortedFunction of the Sorts of product b3,the Sorts of b3 . b4 holds
      b5 = proj(b3,b4)
   iff
      for b6 being Element of the carrier of b2 holds
         b5 . b6 = proj(Carrier(b3,b6),b4);

:: PRALG_3:th 24
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of the OperSymbols of b2
for b5 being Element of Args(b4,product b3)
   st Args(b4,product b3) <> {} & the_arity_of b4 <> {}
for b6 being Element of b1 holds
   (proj(b3,b6)) # b5 = (commute b5) . b6;

:: PRALG_3:th 25
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being Element of b1
for b4 being MSAlgebra-Family of b1,b2 holds
   proj(b4,b3) is_homomorphism product b4,b4 . b3;

:: PRALG_3:th 26
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being Element of b1
for b4 being MSAlgebra-Family of b1,b2
for b5 being Element of the carrier of b2
for b6 being non-empty MSAlgebra over b2
for b7 being Function-yielding ManySortedSet of b1
      st for b8 being Element of b1 holds
           ex b9 being ManySortedFunction of the Sorts of b6,the Sorts of b4 . b8 st
              b9 = b7 . b8 & b9 is_homomorphism b6,b4 . b8
   holds b7 in Funcs(b1,Funcs(the carrier of b2,{(b7 . b9) . b8 where b8 is Element of the carrier of b2, b9 is Element of b1: TRUE})) &
    ((commute b7) . b5) . b3 = (b7 . b3) . b5;

:: PRALG_3:th 27
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of the carrier of b2
for b5 being non-empty MSAlgebra over b2
for b6 being Function-yielding ManySortedSet of b1
      st for b7 being Element of b1 holds
           ex b8 being ManySortedFunction of the Sorts of b5,the Sorts of b3 . b7 st
              b8 = b6 . b7 & b8 is_homomorphism b5,b3 . b7
   holds (commute b6) . b4 in Funcs(b1,Funcs((the Sorts of b5) . b4,union {(the Sorts of b3 . b7) . b8 where b7 is Element of b1, b8 is Element of the carrier of b2: TRUE}));

:: PRALG_3:th 28
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being Element of b1
for b4 being MSAlgebra-Family of b1,b2
for b5 being Element of the carrier of b2
for b6 being non-empty MSAlgebra over b2
for b7 being Function-yielding ManySortedSet of b1
   st for b8 being Element of b1 holds
        ex b9 being ManySortedFunction of the Sorts of b6,the Sorts of b4 . b8 st
           b9 = b7 . b8 & b9 is_homomorphism b6,b4 . b8
for b8 being ManySortedFunction of the Sorts of b6,the Sorts of b4 . b3
   st b8 = b7 . b3
for b9 being set
   st b9 in (the Sorts of b6) . b5
for b10 being Relation-like Function-like set
      st b10 = (commute ((commute b7) . b5)) . b9
   holds b10 . b3 = (b8 . b5) . b9;

:: PRALG_3:th 29
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being Element of the carrier of b2
for b5 being non-empty MSAlgebra over b2
for b6 being Function-yielding ManySortedSet of b1
   st for b7 being Element of b1 holds
        ex b8 being ManySortedFunction of the Sorts of b5,the Sorts of b3 . b7 st
           b8 = b6 . b7 & b8 is_homomorphism b5,b3 . b7
for b7 being set
      st b7 in (the Sorts of b5) . b4
   holds (commute ((commute b6) . b4)) . b7 in product Carrier(b3,b4);

:: PRALG_3:th 30
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being non-empty MSAlgebra over b2
for b5 being Function-yielding ManySortedSet of b1
      st for b6 being Element of b1 holds
           ex b7 being ManySortedFunction of the Sorts of b4,the Sorts of b3 . b6 st
              b7 = b5 . b6 & b7 is_homomorphism b4,b3 . b6
   holds ex b6 being ManySortedFunction of the Sorts of b4,the Sorts of product b3 st
      b6 is_homomorphism b4,product b3 &
       (for b7 being Element of b1 holds
          (proj(b3,b7)) ** b6 = b5 . b7);

:: PRALG_3:modenot 1 => PRALG_3:mode 1
definition
  let a1 be non empty set;
  let a2 be ManySortedSet of a1;
  let a3 be non empty non void ManySortedSign;
  mode MSAlgebra-Class of A3,A2 -> ManySortedSet of a1 means
    for b1 being set
          st b1 in a1
       holds it . b1 is MSAlgebra-Family of a2 . b1,a3;
end;

:: PRALG_3:dfs 4
definiens
  let a1 be non empty set;
  let a2 be ManySortedSet of a1;
  let a3 be non empty non void ManySortedSign;
  let a4 be ManySortedSet of a1;
To prove
     a4 is MSAlgebra-Class of a3,a2
it is sufficient to prove
  thus for b1 being set
          st b1 in a1
       holds a4 . b1 is MSAlgebra-Family of a2 . b1,a3;

:: PRALG_3:def 4
theorem
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3 being non empty non void ManySortedSign
for b4 being ManySortedSet of b1 holds
      b4 is MSAlgebra-Class of b3,b2
   iff
      for b5 being set
            st b5 in b1
         holds b4 . b5 is MSAlgebra-Family of b2 . b5,b3;

:: PRALG_3:funcnot 5 => PRALG_3:func 5
definition
  let a1 be non empty set;
  let a2 be non empty non void ManySortedSign;
  let a3 be MSAlgebra-Family of a1,a2;
  let a4 be symmetric transitive total Relation of a1,a1;
  func A3 / A4 -> MSAlgebra-Class of a2,id Class a4 means
    for b1 being set
          st b1 in Class a4
       holds it . b1 = a3 | b1;
end;

:: PRALG_3:def 5
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being symmetric transitive total Relation of b1,b1
for b5 being MSAlgebra-Class of b2,id Class b4 holds
      b5 = b3 / b4
   iff
      for b6 being set
            st b6 in Class b4
         holds b5 . b6 = b3 | b6;

:: PRALG_3:funcnot 6 => PRALG_3:func 6
definition
  let a1 be non empty set;
  let a2 be non empty non void ManySortedSign;
  let a3 be non-empty ManySortedSet of a1;
  let a4 be MSAlgebra-Class of a2,a3;
  func product A4 -> MSAlgebra-Family of a1,a2 means
    for b1 being Element of a1
          st b1 in a1
       holds ex b2 being non empty set st
          ex b3 being MSAlgebra-Family of b2,a2 st
             b2 = a3 . b1 & b3 = a4 . b1 & it . b1 = product b3;
end;

:: PRALG_3:def 6
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being non-empty ManySortedSet of b1
for b4 being MSAlgebra-Class of b2,b3
for b5 being MSAlgebra-Family of b1,b2 holds
      b5 = product b4
   iff
      for b6 being Element of b1
            st b6 in b1
         holds ex b7 being non empty set st
            ex b8 being MSAlgebra-Family of b7,b2 st
               b7 = b3 . b6 & b8 = b4 . b6 & b5 . b6 = product b8;

:: PRALG_3:th 31
theorem
for b1 being non empty set
for b2 being non empty non void ManySortedSign
for b3 being MSAlgebra-Family of b1,b2
for b4 being symmetric transitive total Relation of b1,b1 holds
   product b3,product product (b3 / b4) are_isomorphic;