
theorem Th40:
  for S1,S2 being non void non empty ManySortedSign for X being
  non-empty ManySortedSet of the carrier of S2 for f being Function of the
  carrier of S1, the carrier of S2 for g being Function st f,g
  form_morphism_between S1,S2 for o being OperSymbol of S1, p being Element of
Args(o,FreeMSA(X*f)) for q being FinSequence st q = hom(f,g,X,S1,S2)#p holds (
  hom(f,g,X,S1,S2).the_result_sort_of o).([o,the carrier of S1]-tree p) = [g.o,
  the carrier of S2]-tree q
proof
  let S1,S2 be non void non empty ManySortedSign;
  let X be non-empty ManySortedSet of the carrier of S2;
  let f be Function of the carrier of S1, the carrier of S2;
  let g be Function;
  set F = hom(f,g,X,S1,S2);
  assume
A1: f,g form_morphism_between S1,S2;
  then reconsider
  h = g as Function of the carrier' of S1, the carrier' of S2 by Th9;
  let o be OperSymbol of S1, p be Element of Args(o,FreeMSA(X*f));
  let q be FinSequence;
  assume
A2: q = F#p;
  then
A3: q is Element of Args(h.o,FreeMSA X) by A1,Th24;
  F is_homomorphism FreeMSA(X*f), (FreeMSA X)|(S1,f,g) by A1,Def5;
  then
  (F.(the_result_sort_of o)).(Den(o,FreeMSA(X*f)).p) = Den(o,(FreeMSA X)|(
  S1,f,g)).q by A2;
  hence (F.the_result_sort_of o).([o,the carrier of S1]-tree p) = Den(o,(
  FreeMSA X)|(S1,f,g)).q by Th3
    .= Den(h.o, FreeMSA X).q by A1,Th23
    .= [g.o, the carrier of S2]-tree q by A3,Th3;
end;
