
theorem Th28:
  for S1,S2,S3 being ManySortedSign for f1,f2, g1,g2 being Function st
  f1, g1 form_morphism_between S1,S2 & f2, g2 form_morphism_between S2,S3
  holds f2*f1, g2*g1 form_morphism_between S1,S3
proof
  let S1,S2,S3 be ManySortedSign;
  let f1,f2, g1,g2 be Function such that
A1: dom f1 = the carrier of S1 and
A2: dom g1 = the carrier' of S1 and
A3: rng f1 c= the carrier of S2 and
A4: rng g1 c= the carrier' of S2 and
A5: f1*the ResultSort of S1 = (the ResultSort of S2)*g1 and
A6: for o being set, p being Function
  st o in the carrier' of S1 & p = (the Arity of S1).o
  holds f1*p = (the Arity of S2).(g1.o) and
A7: dom f2 = the carrier of S2 and
A8: dom g2 = the carrier' of S2 and
A9: rng f2 c= the carrier of S3 and
A10: rng g2 c= the carrier' of S3 and
A11: f2*the ResultSort of S2 = (the ResultSort of S3)*g2 and
A12: for o being set, p being Function
  st o in the carrier' of S2 & p = (the Arity of S2).o
  holds f2*p = (the Arity of S3).(g2.o);
  set f = f2*f1, g = g2*g1;
  thus dom f = the carrier of S1 & dom g = the carrier' of S1
  by A1,A2,A3,A4,A7,A8,RELAT_1:27;
A13: rng f c= rng f2 by RELAT_1:26;
  rng g c= rng g2 by RELAT_1:26;
  hence rng f c= the carrier of S3 & rng g c= the carrier' of S3
  by A9,A10,A13;
  thus f*the ResultSort of S1 = f2*((the ResultSort of S2)*g1) by A5,RELAT_1:36
    .= f2*(the ResultSort of S2)*g1 by RELAT_1:36
    .= (the ResultSort of S3)*g by A11,RELAT_1:36;
  let o be set, p be Function;
  assume that
A14: o in the carrier' of S1 and
A15: p = (the Arity of S1).o;
A16: f1*p = (the Arity of S2).(g1.o) by A6,A14,A15;
A17: g1.o in rng g1 by A2,A14,FUNCT_1:def 3;
A18: f*p = f2*(f1*p) by RELAT_1:36;
  g.o = g2.(g1.o) by A2,A14,FUNCT_1:13;
  hence thesis by A4,A12,A16,A17,A18;
end;
