
theorem Th1:
  for S being non empty non void ManySortedSign for A being
  non-empty MSAlgebra over S for X being non-empty ManySortedSet of the carrier
of S for F being ManySortedFunction of X, the Sorts of A holds rngs F c= rngs (
  F-hash)
proof
  let S be non empty non void ManySortedSign, A be non-empty MSAlgebra over S,
X be non-empty ManySortedSet of the carrier of S, F be ManySortedFunction of X,
  the Sorts of A;
  set R = Reverse X;
  let i be object;
  assume i in the carrier of S;
  then reconsider s = i as SortSymbol of S;
  let y be object;
A1: dom (R.s) = (FreeGen X).s by FUNCT_2:def 1;
  FreeGen X c= the Sorts of FreeMSA X by PBOOLE:def 18;
  then
A2: (FreeGen X).s c= (the Sorts of FreeMSA X).s;
  assume y in (rngs F).i;
  then y in rng (F.s) by MSSUBFAM:13;
  then consider x being object such that
A3: x in dom (F.s) and
A4: y = F.s.x by FUNCT_1:def 3;
  rngs R = X by EXTENS_1:10;
  then R is "onto" by EXTENS_1:9;
  then rng (R.s) = X.s by MSUALG_3:def 3;
  then consider a being object such that
A5: a in dom (R.s) and
A6: x = R.s.a by A3,FUNCT_1:def 3;
A7: dom ((F-hash).s) = (the Sorts of FreeMSA X).s by FUNCT_2:def 1;
  y = (F.s*R.s).a by A4,A5,A6,FUNCT_1:13
    .= (F**R).s.a by MSUALG_3:2
    .= (F-hash || FreeGen X).s.a by Def1
    .= (((F-hash).s) | ((FreeGen X).s)).a by MSAFREE:def 1
    .= (F-hash).s.a by A5,FUNCT_1:49;
  then y in rng ((F-hash).s) by A5,A1,A7,A2,FUNCT_1:def 3;
  hence thesis by MSSUBFAM:13;
end;
