reserve S for non void non empty ManySortedSign,
  V for non-empty ManySortedSet of the carrier of S;
reserve A for MSAlgebra over S,
  t for Term of S,V;

theorem Th14:
  for s being SortSymbol of S, v be Element of V.s st t =
  root-tree [v,s] holds the_sort_of t = s
proof
  let s be SortSymbol of S, x be Element of V.s;
  set X = V, G = DTConMSA X;
  set tst = the_sort_of t;
A1: FreeSort (X, tst) = {a where a is Element of TS G: (ex x be set st x in
X.tst & a = root-tree [x,tst]) or ex o be OperSymbol of S st [o,the carrier of
  S] = a.{} & the_result_sort_of o = tst} by MSAFREE:def 10;
  t in FreeSort (V, the_sort_of t) by Def5;
  then consider a being Element of TS G such that
A2: t = a and
A3: (ex x be set st x in X.tst & a = root-tree [x,tst]) or ex o be
OperSymbol of S st [o,the carrier of S] = a.{} & the_result_sort_of o = tst by
A1;
A4: [x,s] in Terminals G by Lm3;
  assume
A5: t = root-tree [x,s];
  then t.{} = [x,s] by TREES_4:3;
  then t.{} is not NonTerminal of G by A4,Lm6;
  then
A6: not t.{} in [:the carrier' of S,{the carrier of S}:] by Lm5;
  the carrier of S in {the carrier of S} by TARSKI:def 1;
  then consider y being set such that
  y in X.tst and
A7: a = root-tree [y,tst] by A2,A3,A6,ZFMISC_1:87;
  [y,tst] = [x,s] by A2,A5,A7,TREES_4:4;
  hence thesis by XTUPLE_0:1;
end;
