reserve x,y,z for set;

theorem Th17:
  for S being non void Signature for Y being non-empty
ManySortedSet of the carrier of S for X being ManySortedSet of the carrier of S
  for t being Term of S, Y for s being SortSymbol of S st t in S-Terms(X,Y).s
  holds the_sort_of t = s & variables_in t c= X
proof
  let S be non void Signature;
  let Y be non-empty ManySortedSet of the carrier of S;
  let X be ManySortedSet of the carrier of S;
  let q be Term of S,Y, s be SortSymbol of S such that
A1: q in S-Terms(X,Y).s;
  S-Terms(X,Y).s = {t where t is Term of S,Y: the_sort_of t = s &
  variables_in t c= X} by Def5;
  then
  ex t being Term of S,Y st q = t & the_sort_of t = s & variables_in t c=
  X by A1;
  hence thesis;
end;
