reserve S for OrderSortedSign;
reserve S for OrderSortedSign,
  X for ManySortedSet of S,
  o for OperSymbol of S ,
  b for Element of ([:the carrier' of S,{the carrier of S}:] \/ Union (coprod X
  ))*;
reserve x for set;

theorem Th9:
  for S being OrderSortedSign, X being non-empty ManySortedSet of S
, s being Element of S holds (the Sorts of ParsedTermsOSA(X)).s = {a where a is
Element of TS(DTConOSA(X)):
(ex s1 being Element of S, x be object st s1 <= s & x
in X.s1 & a = root-tree [x,s1]) or ex o be OperSymbol of S st [o,the carrier of
  S] = a.{} & the_result_sort_of o <= s}
proof
  let S being OrderSortedSign, X being non-empty ManySortedSet of S, s being
  Element of S;
  set PTA = ParsedTermsOSA(X);
  {a where a is Element of TS(DTConOSA(X)):
   (ex s1 being Element of S, x be object
   st s1 <= s & x in X.s1 & a = root-tree [x,s1]) or ex o be OperSymbol of
S st [o,the carrier of S] = a.{} & the_result_sort_of o <= s} = ParsedTerms(X,s
  )
    .= (the Sorts of PTA).s by Def8;
  hence thesis;
end;
