reserve S for non void non empty ManySortedSign,
  U1 for MSAlgebra over S,
  o for OperSymbol of S,
  s for SortSymbol of S;

theorem
  for U1 be non-empty MSAlgebra over S, R be MSCongruence of U1 holds
  MSNat_Hom(U1,R) is_epimorphism U1, QuotMSAlg (U1,R)
proof
  let U1 be non-empty MSAlgebra over S, R be MSCongruence of U1;
  set F = MSNat_Hom(U1,R), QA = QuotMSAlg (U1,R), S1 = the Sorts of U1;
  for o be OperSymbol of S st Args (o,U1) <> {} for x be Element of Args(o
  ,U1) holds (F.(the_result_sort_of o)).(Den(o,U1).x) = Den(o,QA).(F#x)
  proof
    let o be OperSymbol of S such that
    Args (o,U1) <> {};
    let x be Element of Args(o,U1);
    set ro = the_result_sort_of o, ar = the_arity_of o;
    (the Arity of S).o = ar by MSUALG_1:def 1;
    then
A1: ((Class R)# * the Arity of S).o = product ((Class R) * ar) by MSAFREE:1;
A2: dom x = dom ar by MSUALG_3:6;
A3: for a be object st a in dom ar holds (F#x).a = (R#x).a
    proof
      let a be object;
      assume
A4:   a in dom ar;
      then reconsider n = a as Nat by ORDINAL1:def 12;
      set Fo = MSNat_Hom(U1,R,ar/.n), s = (ar/.n);
A5:   n in dom ((the Sorts of U1) * ar) by A4,PARTFUN1:def 2;
      then ((the Sorts of U1) * ar).n = (the Sorts of U1).(ar.n) by FUNCT_1:12
        .= S1.s by A4,PARTFUN1:def 6;
      then reconsider xn = x.n as Element of S1.s by A5,MSUALG_3:6;
      thus (F#x).a = (F.(ar/.n)).(x.n) by A2,A4,MSUALG_3:def 6
        .= Fo.xn by Def16
        .= Class(R.s,x.n) by Def15
        .= (R#x).a by A4,Def7;
    end;
    dom (the Sorts of U1) = the carrier of S by PARTFUN1:def 2;
    then rng (the ResultSort of S) c= dom (the Sorts of U1);
    then
    dom (the ResultSort of S) = the carrier' of S & dom ((the Sorts of U1
    ) * the ResultSort of S) = dom (the ResultSort of S) by FUNCT_2:def 1
,RELAT_1:27;
    then
A6: ((the Sorts of U1) * the ResultSort of S).o = (the Sorts of U1).((the
    ResultSort of S).o) by FUNCT_1:12
      .= (the Sorts of U1).ro by MSUALG_1:def 2;
    then reconsider dx = (Den(o,U1)).x as Element of S1.ro by MSUALG_1:def 5;
    rng Den(o,U1) c= Result(o,U1) & Result(o,U1) = S1.ro by A6,MSUALG_1:def 5;
    then rng Den(o,U1) c= dom QuotRes(R,o) by A6,FUNCT_2:def 1;
    then
A7: dom Den(o,U1) = Args(o,U1) & dom ((QuotRes(R,o)) * Den(o,U1)) = dom
    Den(o,U1 ) by FUNCT_2:def 1,RELAT_1:27;
    dom (Class R) = the carrier of S by PARTFUN1:def 2;
    then dom (R # x) = dom ((Class R) * (the_arity_of o)) & rng ar c= dom (
    Class R) by CARD_3:9;
    then dom (F#x) = dom ar & dom (R#x) = dom ar by MSUALG_3:6,RELAT_1:27;
    then
A8: F # x = R # x by A3,FUNCT_1:2;
    Den(o,QA) = (QuotCharact R).o by MSUALG_1:def 6
      .= QuotCharact(R,o) by Def13;
    then Den(o,QA).(F#x) = ((QuotRes(R,o)) * (Den(o,U1))).x by A1,A8,Def12
      .= (QuotRes(R,o)) . dx by A7,FUNCT_1:12
      .= Class (R, dx) by Def8
      .= (MSNat_Hom(U1,R,ro)).dx by Def15
      .= (F.ro).((Den(o,U1)).x) by Def16;
    hence thesis;
  end;
  hence F is_homomorphism U1,QA;
  for i be set st i in the carrier of S holds rng (F.i) = (the Sorts of QA).i
  proof
    let i be set;
    assume i in the carrier of S;
    then reconsider s = i as Element of S;
    reconsider f = F.i as Function of S1.s, (the Sorts of QA).s by
PBOOLE:def 15;
A9: dom f = S1.s by FUNCT_2:def 1;
A10: (the Sorts of QA).s = Class (R.s) by Def6;
    for x be object st x in (the Sorts of QA).i holds x in rng f
    proof
      let x be object;
A11:  f = MSNat_Hom(U1,R,s) by Def16;
      assume x in (the Sorts of QA).i;
      then consider a1 be object such that
A12:  a1 in S1.s and
A13:  x = Class(R.s,a1) by A10,EQREL_1:def 3;
      f.a1 in rng f by A9,A12,FUNCT_1:def 3;
      hence thesis by A12,A13,A11,Def15;
    end;
    then (the Sorts of QA).i c= rng f;
    hence thesis;
  end;
  hence thesis;
end;
