reserve x,y,z for set;

theorem Th8:
  for S being non void Signature for X being non empty-yielding
ManySortedSet of the carrier of S for x being Element of Free(S, X) holds x is
  Term of S, X (\/) ((the carrier of S) --> {0})
proof
  let S be non void Signature;
  let X be non empty-yielding ManySortedSet of the carrier of S;
  set Y = X (\/) ((the carrier of S) --> {0});
  let x be Element of Free(S, X);
A1: S -Terms Y = TS DTConMSA Y by MSATERM:def 1
    .= union rng FreeSort Y by MSAFREE:11
    .= Union FreeSort Y by CARD_3:def 4;
A2: FreeMSA Y = MSAlgebra(# FreeSort Y, FreeOper Y #) & dom the Sorts of
  FreeMSA Y = the carrier of S by MSAFREE:def 14,PARTFUN1:def 2;
  consider y being object such that
A3: y in dom the Sorts of Free(S, X) and
A4: x in (the Sorts of Free(S,X)).y by CARD_5:2;
  ex A being MSSubset of FreeMSA Y st Free(S, X) = GenMSAlg A & A = (
  Reverse Y)""X by Def1;
  then the Sorts of Free(S, X) is MSSubset of FreeMSA Y by MSUALG_2:def 9;
  then the Sorts of Free(S, X) c= the Sorts of FreeMSA Y by PBOOLE:def 18;
  then (the Sorts of Free(S,X)).y c= (the Sorts of FreeMSA Y).y by A3;
  hence thesis by A1,A3,A4,A2,CARD_5:2;
end;
