reserve U1,U2,U3 for Universal_Algebra,
  m,n for Nat,
  a for set,
  A for non empty set,
  h for Function of U1,U2;

theorem Th22:
  for U1,U2,h st U1, U2 are_similar holds MSAlg h is_epimorphism
  MSAlg U1, (MSAlg U2 Over MSSign U1) implies h is_epimorphism
proof
  let U1, U2, h;
  set B = the Sorts of (MSAlg U2 Over MSSign U1);
  set I = the carrier of MSSign U1;
A1: 0 in {0} by TARSKI:def 1;
  MSSorts U2 = 0 .--> the carrier of U2 by MSUALG_1:def 9;
  then
A2: (MSSorts U2).0 = the carrier of U2 by A1,FUNCOP_1:7;
A3: I = {0} & MSAlg U2 = MSAlgebra (#MSSorts U2, MSCharact U2#) by
MSUALG_1:def 8,def 11;
  assume
A4: U1, U2 are_similar;
  then MSSign U1 = MSSign U2 by Th10;
  then
A5: B = the Sorts of MSAlg U2 by Th9;
  assume
A6: MSAlg h is_epimorphism MSAlg U1, (MSAlg U2 Over MSSign U1);
  then
A7: MSAlg h is "onto";
  MSAlg h is_homomorphism MSAlg U1, (MSAlg U2 Over MSSign U1) by A6;
  then
A8: h is_homomorphism by A4,Th21;
  (MSAlg h).0 = (0.--> h).0 by A4,Def3,Th10
    .= h by A1,FUNCOP_1:7;
  then rng h = the carrier of U2 by A7,A1,A2,A5,A3;
  hence h is_epimorphism by A8;
end;
