reserve S for locally_directed OrderSortedSign;
reserve o for Element of the carrier' of S;

theorem Th18:
  for U1,U2 be non-empty OSAlgebra of S, F be ManySortedFunction
  of U1,U2 st F is_epimorphism U1,U2 & F is order-sorted holds OSHomQuot(F)
  is_isomorphism QuotOSAlg (U1,OSCng F),U2
proof
  let U1,U2 be non-empty OSAlgebra of S, F be ManySortedFunction of U1,U2;
  set mc = OSCng(F), qa = QuotOSAlg (U1,mc), qh = OSHomQuot(F);
  assume that
A1: F is_epimorphism U1,U2 and
A2: F is order-sorted;
  set Sq = the Sorts of qa, S1 = the Sorts of U1, S2 = the Sorts of U2;
A3: F is_homomorphism U1,U2 by A1;
A4: F is "onto" by A1;
  for i be set st i in the carrier of S holds rng (qh.i) = S2.i
  proof
    let i be set;
    set f = qh.i;
    assume i in the carrier of S;
    then reconsider s = i as SortSymbol of S;
A5: rng (F.s) = S2.s by A4;
A6: qh.i = OSHomQuot(F,s) by Def25;
    then
A7: dom f = Sq.s by FUNCT_2:def 1;
    thus rng f c= S2.i by A6,RELAT_1:def 19;
    let x be object;
    assume x in S2.i;
    then consider a be object such that
A8: a in dom (F.s) and
A9: (F.s).a = x by A5,FUNCT_1:def 3;
A10: Sq.s = OSClass (OSCng(F),s) by Def11;
    reconsider a as Element of S1.s by A8;
    f.(OSClass(OSCng(F),a)) = x by A2,A3,A6,A9,Def24;
    hence thesis by A7,A10,FUNCT_1:def 3;
  end;
  then
A11: qh is "onto";
  qh is_monomorphism qa,U2 by A2,A3,Th17;
  then qh is_homomorphism qa,U2 & qh is "1-1";
  hence thesis by A11,MSUALG_3:13;
end;
