Article MSUALG_3, MML version 4.99.1005

:: MSUALG_3:funcnot 1 => MSUALG_3:func 1
definition
  let a1 be non empty set;
  let a2, a3 be ManySortedSet of a1;
  let a4 be ManySortedFunction of a2,a3;
  let a5 be Element of a1;
  redefine func a4 . a5 -> Function-like quasi_total Relation of a2 . a5,a3 . a5;
end;

:: MSUALG_3:modenot 1
definition
  let a1 be non empty non void ManySortedSign;
  let a2, a3 be MSAlgebra over a1;
  mode ManySortedFunction of a2,a3 is ManySortedFunction of the Sorts of a2,the Sorts of a3;
end;

:: MSUALG_3:funcnot 2 => MSUALG_3:func 2
definition
  let a1 be set;
  let a2 be ManySortedSet of a1;
  func id A2 -> ManySortedFunction of a2,a2 means
    for b1 being set
          st b1 in a1
       holds it . b1 = id (a2 . b1);
end;

:: MSUALG_3:def 1
theorem
for b1 being set
for b2 being ManySortedSet of b1
for b3 being ManySortedFunction of b2,b2 holds
      b3 = id b2
   iff
      for b4 being set
            st b4 in b1
         holds b3 . b4 = id (b2 . b4);

:: MSUALG_3:attrnot 1 => MSUALG_3:attr 1
definition
  let a1 be Relation-like Function-like set;
  attr a1 is "1-1" means
    for b1 being set
    for b2 being Relation-like Function-like set
          st b1 in proj1 a1 & a1 . b1 = b2
       holds b2 is one-to-one;
end;

:: MSUALG_3:dfs 2
definiens
  let a1 be Relation-like Function-like set;
To prove
     a1 is "1-1"
it is sufficient to prove
  thus for b1 being set
    for b2 being Relation-like Function-like set
          st b1 in proj1 a1 & a1 . b1 = b2
       holds b2 is one-to-one;

:: MSUALG_3:def 2
theorem
for b1 being Relation-like Function-like set holds
      b1 is "1-1"
   iff
      for b2 being set
      for b3 being Relation-like Function-like set
            st b2 in proj1 b1 & b1 . b2 = b3
         holds b3 is one-to-one;

:: MSUALG_3:exreg 1
registration
  let a1 be set;
  cluster Relation-like Function-like Function-yielding "1-1" ManySortedSet of a1;
end;

:: MSUALG_3:th 1
theorem
for b1 being set
for b2 being Function-yielding ManySortedSet of b1 holds
      b2 is "1-1"
   iff
      for b3 being set
            st b3 in b1
         holds b2 . b3 is one-to-one;

:: MSUALG_3:attrnot 2 => MSUALG_3:attr 2
definition
  let a1 be set;
  let a2, a3 be ManySortedSet of a1;
  let a4 be ManySortedFunction of a2,a3;
  attr a4 is "onto" means
    for b1 being set
          st b1 in a1
       holds proj2 (a4 . b1) = a3 . b1;
end;

:: MSUALG_3:dfs 3
definiens
  let a1 be set;
  let a2, a3 be ManySortedSet of a1;
  let a4 be ManySortedFunction of a2,a3;
To prove
     a4 is "onto"
it is sufficient to prove
  thus for b1 being set
          st b1 in a1
       holds proj2 (a4 . b1) = a3 . b1;

:: MSUALG_3:def 3
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1
for b4 being ManySortedFunction of b2,b3 holds
      b4 is "onto"(b1, b2, b3)
   iff
      for b5 being set
            st b5 in b1
         holds proj2 (b4 . b5) = b3 . b5;

:: MSUALG_3:th 2
theorem
for b1 being set
for b2, b3, b4 being ManySortedSet of b1
for b5 being ManySortedFunction of b2,b3
for b6 being ManySortedFunction of b3,b4 holds
   proj1 (b6 ** b5) = b1 &
    (for b7 being set
          st b7 in b1
       holds (b6 ** b5) . b7 = (b5 . b7) * (b6 . b7));

:: MSUALG_3:funcnot 3 => MSUALG_3:func 3
definition
  let a1 be set;
  let a2 be ManySortedSet of a1;
  let a3, a4 be non-empty ManySortedSet of a1;
  let a5 be ManySortedFunction of a2,a3;
  let a6 be ManySortedFunction of a3,a4;
  redefine func a6 ** a5 -> ManySortedFunction of a2,a4;
end;

:: MSUALG_3:th 3
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1
for b4 being ManySortedFunction of b2,b3 holds
   b4 ** id b2 = b4;

:: MSUALG_3:th 4
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1
for b4 being ManySortedFunction of b2,b3 holds
   (id b3) ** b4 = b4;

:: MSUALG_3:funcnot 4 => MSUALG_3:func 4
definition
  let a1 be set;
  let a2, a3 be ManySortedSet of a1;
  let a4 be ManySortedFunction of a2,a3;
  assume a4 is "1-1" & a4 is "onto"(a1, a2, a3);
  func A4 "" -> ManySortedFunction of a3,a2 means
    for b1 being set
          st b1 in a1
       holds it . b1 = (a4 . b1) ";
end;

:: MSUALG_3:def 5
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1
for b4 being ManySortedFunction of b2,b3
   st b4 is "1-1" & b4 is "onto"(b1, b2, b3)
for b5 being ManySortedFunction of b3,b2 holds
      b5 = b4 ""
   iff
      for b6 being set
            st b6 in b1
         holds b5 . b6 = (b4 . b6) ";

:: MSUALG_3:th 5
theorem
for b1 being set
for b2, b3 being non-empty ManySortedSet of b1
for b4 being ManySortedFunction of b2,b3
for b5 being ManySortedFunction of b3,b2
      st b4 is "1-1" & b4 is "onto"(b1, b2, b3) & b5 = b4 ""
   holds b4 ** b5 = id b3 & b5 ** b4 = id b2;

:: MSUALG_3:funcreg 1
registration
  let a1 be non empty non void ManySortedSign;
  let a2 be non-empty MSAlgebra over a1;
  let a3 be Element of the OperSymbols of a1;
  cluster Args(a3,a2) -> functional;
end;

:: MSUALG_3:th 6
theorem
for b1 being non empty non void ManySortedSign
for b2 being Element of the OperSymbols of b1
for b3 being MSAlgebra over b1
for b4 being Relation-like Function-like set
      st b4 in Args(b2,b3)
   holds proj1 b4 = dom the_arity_of b2 &
    (for b5 being set
          st b5 in proj1 ((the_arity_of b2) * the Sorts of b3)
       holds b4 . b5 in ((the_arity_of b2) * the Sorts of b3) . b5);

:: MSUALG_3:funcnot 5 => MSUALG_3:func 5
definition
  let a1 be non empty non void ManySortedSign;
  let a2, a3 be MSAlgebra over a1;
  let a4 be Element of the OperSymbols of a1;
  let a5 be ManySortedFunction of the Sorts of a2,the Sorts of a3;
  let a6 be Element of Args(a4,a2);
  assume Args(a4,a2) <> {} & Args(a4,a3) <> {};
  func A5 # A6 -> Element of Args(a4,a3) equals
    (Frege ((the_arity_of a4) * a5)) . a6;
end;

:: MSUALG_3:def 7
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 ManySortedFunction of the Sorts of b2,the Sorts of b3
for b6 being Element of Args(b4,b2)
      st Args(b4,b2) <> {} & Args(b4,b3) <> {}
   holds b5 # b6 = (Frege ((the_arity_of b4) * b5)) . b6;

:: MSUALG_3:funcnot 6 => MSUALG_3:func 6
definition
  let a1 be non empty non void ManySortedSign;
  let a2, a3 be non-empty MSAlgebra over a1;
  let a4 be Element of the OperSymbols of a1;
  let a5 be ManySortedFunction of the Sorts of a2,the Sorts of a3;
  let a6 be Element of Args(a4,a2);
  redefine func A5 # A6 -> Element of Args(a4,a3) means
    for b1 being natural set
          st b1 in proj1 a6
       holds it . b1 = (a5 . ((the_arity_of a4) /. b1)) . (a6 . b1);
end;

:: MSUALG_3:def 8
theorem
for b1 being non empty non void ManySortedSign
for b2, b3 being non-empty MSAlgebra over b1
for b4 being Element of the OperSymbols of b1
for b5 being ManySortedFunction of the Sorts of b2,the Sorts of b3
for b6 being Element of Args(b4,b2)
for b7 being Element of Args(b4,b3) holds
      b7 = b5 # b6
   iff
      for b8 being natural set
            st b8 in proj1 b6
         holds b7 . b8 = (b5 . ((the_arity_of b4) /. b8)) . (b6 . b8);

:: MSUALG_3:th 7
theorem
for b1 being non empty non void ManySortedSign
for b2 being Element of the OperSymbols of b1
for b3 being MSAlgebra over b1
   st Args(b2,b3) <> {}
for b4 being Element of Args(b2,b3) holds
   b4 = (id the Sorts of b3) # b4;

:: MSUALG_3:th 8
theorem
for b1 being non empty non void ManySortedSign
for b2 being Element of the OperSymbols of b1
for b3, b4, b5 being non-empty MSAlgebra over b1
for b6 being ManySortedFunction of the Sorts of b3,the Sorts of b4
for b7 being ManySortedFunction of the Sorts of b4,the Sorts of b5
for b8 being Element of Args(b2,b3) holds
   (b7 ** b6) # b8 = b7 # (b6 # b8);

:: MSUALG_3:prednot 1 => MSUALG_3:pred 1
definition
  let a1 be non empty non void ManySortedSign;
  let a2, a3 be MSAlgebra over a1;
  let a4 be ManySortedFunction of the Sorts of a2,the Sorts of a3;
  pred A4 is_homomorphism A2,A3 means
    for b1 being Element of the OperSymbols of a1
       st Args(b1,a2) <> {}
    for b2 being Element of Args(b1,a2) holds
       (a4 . the_result_sort_of b1) . ((Den(b1,a2)) . b2) = (Den(b1,a3)) . (a4 # b2);
end;

:: MSUALG_3:dfs 7
definiens
  let a1 be non empty non void ManySortedSign;
  let a2, a3 be MSAlgebra over a1;
  let a4 be ManySortedFunction of the Sorts of a2,the Sorts of a3;
To prove
     a4 is_homomorphism a2,a3
it is sufficient to prove
  thus for b1 being Element of the OperSymbols of a1
       st Args(b1,a2) <> {}
    for b2 being Element of Args(b1,a2) holds
       (a4 . the_result_sort_of b1) . ((Den(b1,a2)) . b2) = (Den(b1,a3)) . (a4 # b2);

:: MSUALG_3:def 9
theorem
for b1 being non empty non void ManySortedSign
for b2, b3 being MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3 holds
      b4 is_homomorphism b2,b3
   iff
      for b5 being Element of the OperSymbols of b1
         st Args(b5,b2) <> {}
      for b6 being Element of Args(b5,b2) holds
         (b4 . the_result_sort_of b5) . ((Den(b5,b2)) . b6) = (Den(b5,b3)) . (b4 # b6);

:: MSUALG_3:th 9
theorem
for b1 being non empty non void ManySortedSign
for b2 being MSAlgebra over b1 holds
   id the Sorts of b2 is_homomorphism b2,b2;

:: MSUALG_3:th 10
theorem
for b1 being non empty non void ManySortedSign
for b2, b3, b4 being non-empty MSAlgebra over b1
for b5 being ManySortedFunction of the Sorts of b2,the Sorts of b3
for b6 being ManySortedFunction of the Sorts of b3,the Sorts of b4
      st b5 is_homomorphism b2,b3 & b6 is_homomorphism b3,b4
   holds b6 ** b5 is_homomorphism b2,b4;

:: MSUALG_3:prednot 2 => MSUALG_3:pred 2
definition
  let a1 be non empty non void ManySortedSign;
  let a2, a3 be MSAlgebra over a1;
  let a4 be ManySortedFunction of the Sorts of a2,the Sorts of a3;
  pred A4 is_epimorphism A2,A3 means
    a4 is_homomorphism a2,a3 & a4 is "onto"(the carrier of a1, the Sorts of a2, the Sorts of a3);
end;

:: MSUALG_3:dfs 8
definiens
  let a1 be non empty non void ManySortedSign;
  let a2, a3 be MSAlgebra over a1;
  let a4 be ManySortedFunction of the Sorts of a2,the Sorts of a3;
To prove
     a4 is_epimorphism a2,a3
it is sufficient to prove
  thus a4 is_homomorphism a2,a3 & a4 is "onto"(the carrier of a1, the Sorts of a2, the Sorts of a3);

:: MSUALG_3:def 10
theorem
for b1 being non empty non void ManySortedSign
for b2, b3 being MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3 holds
      b4 is_epimorphism b2,b3
   iff
      b4 is_homomorphism b2,b3 & b4 is "onto"(the carrier of b1, the Sorts of b2, the Sorts of b3);

:: MSUALG_3:th 11
theorem
for b1 being non empty non void ManySortedSign
for b2, b3, b4 being non-empty MSAlgebra over b1
for b5 being ManySortedFunction of the Sorts of b2,the Sorts of b3
for b6 being ManySortedFunction of the Sorts of b3,the Sorts of b4
      st b5 is_epimorphism b2,b3 & b6 is_epimorphism b3,b4
   holds b6 ** b5 is_epimorphism b2,b4;

:: MSUALG_3:prednot 3 => MSUALG_3:pred 3
definition
  let a1 be non empty non void ManySortedSign;
  let a2, a3 be MSAlgebra over a1;
  let a4 be ManySortedFunction of the Sorts of a2,the Sorts of a3;
  pred A4 is_monomorphism A2,A3 means
    a4 is_homomorphism a2,a3 & a4 is "1-1";
end;

:: MSUALG_3:dfs 9
definiens
  let a1 be non empty non void ManySortedSign;
  let a2, a3 be MSAlgebra over a1;
  let a4 be ManySortedFunction of the Sorts of a2,the Sorts of a3;
To prove
     a4 is_monomorphism a2,a3
it is sufficient to prove
  thus a4 is_homomorphism a2,a3 & a4 is "1-1";

:: MSUALG_3:def 11
theorem
for b1 being non empty non void ManySortedSign
for b2, b3 being MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3 holds
      b4 is_monomorphism b2,b3
   iff
      b4 is_homomorphism b2,b3 & b4 is "1-1";

:: MSUALG_3:th 12
theorem
for b1 being non empty non void ManySortedSign
for b2, b3, b4 being non-empty MSAlgebra over b1
for b5 being ManySortedFunction of the Sorts of b2,the Sorts of b3
for b6 being ManySortedFunction of the Sorts of b3,the Sorts of b4
      st b5 is_monomorphism b2,b3 & b6 is_monomorphism b3,b4
   holds b6 ** b5 is_monomorphism b2,b4;

:: MSUALG_3:prednot 4 => MSUALG_3:pred 4
definition
  let a1 be non empty non void ManySortedSign;
  let a2, a3 be MSAlgebra over a1;
  let a4 be ManySortedFunction of the Sorts of a2,the Sorts of a3;
  pred A4 is_isomorphism A2,A3 means
    a4 is_epimorphism a2,a3 & a4 is_monomorphism a2,a3;
end;

:: MSUALG_3:dfs 10
definiens
  let a1 be non empty non void ManySortedSign;
  let a2, a3 be MSAlgebra over a1;
  let a4 be ManySortedFunction of the Sorts of a2,the Sorts of a3;
To prove
     a4 is_isomorphism a2,a3
it is sufficient to prove
  thus a4 is_epimorphism a2,a3 & a4 is_monomorphism a2,a3;

:: MSUALG_3:def 12
theorem
for b1 being non empty non void ManySortedSign
for b2, b3 being MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3 holds
      b4 is_isomorphism b2,b3
   iff
      b4 is_epimorphism b2,b3 & b4 is_monomorphism b2,b3;

:: MSUALG_3:th 13
theorem
for b1 being non empty non void ManySortedSign
for b2, b3 being MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3 holds
      b4 is_isomorphism b2,b3
   iff
      b4 is_homomorphism b2,b3 & b4 is "onto"(the carrier of b1, the Sorts of b2, the Sorts of b3) & b4 is "1-1";

:: MSUALG_3:th 14
theorem
for b1 being non empty non void ManySortedSign
for b2, b3 being non-empty MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
for b5 being ManySortedFunction of the Sorts of b3,the Sorts of b2
      st b4 is_isomorphism b2,b3 & b5 = b4 ""
   holds b5 is_isomorphism b3,b2;

:: MSUALG_3:th 15
theorem
for b1 being non empty non void ManySortedSign
for b2, b3, b4 being non-empty MSAlgebra over b1
for b5 being ManySortedFunction of the Sorts of b2,the Sorts of b3
for b6 being ManySortedFunction of the Sorts of b3,the Sorts of b4
      st b5 is_isomorphism b2,b3 & b6 is_isomorphism b3,b4
   holds b6 ** b5 is_isomorphism b2,b4;

:: MSUALG_3:prednot 5 => MSUALG_3:pred 5
definition
  let a1 be non empty non void ManySortedSign;
  let a2, a3 be MSAlgebra over a1;
  pred A2,A3 are_isomorphic means
    ex b1 being ManySortedFunction of the Sorts of a2,the Sorts of a3 st
       b1 is_isomorphism a2,a3;
end;

:: MSUALG_3:dfs 11
definiens
  let a1 be non empty non void ManySortedSign;
  let a2, a3 be MSAlgebra over a1;
To prove
     a2,a3 are_isomorphic
it is sufficient to prove
  thus ex b1 being ManySortedFunction of the Sorts of a2,the Sorts of a3 st
       b1 is_isomorphism a2,a3;

:: MSUALG_3:def 13
theorem
for b1 being non empty non void ManySortedSign
for b2, b3 being MSAlgebra over b1 holds
   b2,b3 are_isomorphic
iff
   ex b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3 st
      b4 is_isomorphism b2,b3;

:: MSUALG_3:th 16
theorem
for b1 being non empty non void ManySortedSign
for b2 being MSAlgebra over b1 holds
   id the Sorts of b2 is_isomorphism b2,b2 & b2,b2 are_isomorphic;

:: MSUALG_3:prednot 6 => MSUALG_3:pred 6
definition
  let a1 be non empty non void ManySortedSign;
  let a2, a3 be MSAlgebra over a1;
  redefine pred a2,a3 are_isomorphic;
  reflexivity;
::  for a1 being non empty non void ManySortedSign
::  for a2 being MSAlgebra over a1 holds
::     a2,a2 are_isomorphic;
end;

:: MSUALG_3:th 17
theorem
for b1 being non empty non void ManySortedSign
for b2, b3 being non-empty MSAlgebra over b1
      st b2,b3 are_isomorphic
   holds b3,b2 are_isomorphic;

:: MSUALG_3:th 18
theorem
for b1 being non empty non void ManySortedSign
for b2, b3, b4 being non-empty MSAlgebra over b1
      st b2,b3 are_isomorphic & b3,b4 are_isomorphic
   holds b2,b4 are_isomorphic;

:: MSUALG_3:funcnot 7 => MSUALG_3:func 7
definition
  let a1 be non empty non void ManySortedSign;
  let a2, a3 be non-empty MSAlgebra over a1;
  let a4 be ManySortedFunction of the Sorts of a2,the Sorts of a3;
  assume a4 is_homomorphism a2,a3;
  func Image A4 -> strict non-empty MSSubAlgebra of a3 means
    the Sorts of it = a4 .:.: the Sorts of a2;
end;

:: MSUALG_3:def 14
theorem
for b1 being non empty non void ManySortedSign
for b2, b3 being non-empty MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
   st b4 is_homomorphism b2,b3
for b5 being strict non-empty MSSubAlgebra of b3 holds
      b5 = Image b4
   iff
      the Sorts of b5 = b4 .:.: the Sorts of b2;

:: MSUALG_3:th 19
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3 being strict non-empty MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
      st b4 is_homomorphism b2,b3
   holds    b4 is_epimorphism b2,b3
   iff
      Image b4 = b3;

:: MSUALG_3:th 20
theorem
for b1 being non empty non void ManySortedSign
for b2, b3 being non-empty MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
for b5 being ManySortedFunction of the Sorts of b2,the Sorts of Image b4
      st b4 = b5 & b4 is_homomorphism b2,b3
   holds b5 is_epimorphism b2,Image b4;

:: MSUALG_3:th 21
theorem
for b1 being non empty non void ManySortedSign
for b2, b3 being non-empty MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
      st b4 is_homomorphism b2,b3
   holds ex b5 being ManySortedFunction of the Sorts of b2,the Sorts of Image b4 st
      b4 = b5 & b5 is_epimorphism b2,Image b4;

:: MSUALG_3:th 22
theorem
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra over b1
for b3 being non-empty MSSubAlgebra of b2
for b4 being ManySortedFunction of the Sorts of b3,the Sorts of b2
      st b4 = id the Sorts of b3
   holds b4 is_monomorphism b3,b2;

:: MSUALG_3:th 23
theorem
for b1 being non empty non void ManySortedSign
for b2, b3 being non-empty MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
      st b4 is_homomorphism b2,b3
   holds ex b5 being ManySortedFunction of the Sorts of b2,the Sorts of Image b4 st
      ex b6 being ManySortedFunction of the Sorts of Image b4,the Sorts of b3 st
         b5 is_epimorphism b2,Image b4 & b6 is_monomorphism Image b4,b3 & b4 = b6 ** b5;

:: MSUALG_3:th 24
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 ManySortedFunction of the Sorts of b2,the Sorts of b3
for b6 being Element of Args(b4,b2)
for b7, b8 being Relation-like Function-like set
      st b6 = b7 & b6 in Args(b4,b2) & b8 in Args(b4,b3)
   holds    b8 = b5 # b6
   iff
      for b9 being natural set
            st b9 in proj1 b7
         holds b8 . b9 = (b5 . ((the_arity_of b4) /. b9)) . (b7 . b9);