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 Th10:
  for S being OrderSortedSign, X being non-empty ManySortedSet of
  S, s,s1 being Element of S, x being set st x in X.s holds root-tree [x,s] is
  Element of TS DTConOSA(X) & ( for z being set holds [z,the carrier of S] <> (
root-tree [x,s]).{} ) & ( root-tree [x,s] in (the Sorts of ParsedTermsOSA(X)).
  s1 iff s <= s1 )
proof
  let S be OrderSortedSign, X be non-empty ManySortedSet of S, s,s1 be Element
  of S, x be set such that
A1: x in X.s;
  set PTA = ParsedTermsOSA(X), D = DTConOSA(X);
  reconsider t = [x,s] as Terminal of D by A1,Th4;
  reconsider s0 = s, s11 = s1 as Element of S;
  reconsider SPTA = the Sorts of PTA as OrderSortedSet of S;
  root-tree t is Element of TS D;
  hence root-tree [x,s] is Element of TS D;
  thus
A2: for z being set holds [z,the carrier of S] <> (root-tree [x,s]).{}
  proof
    let z be set;
    assume
A3: [z,the carrier of S] = (root-tree [x,s]).{};
    (root-tree [x,s]).{} = [x,s] by TREES_4:3;
    then s = the carrier of S by A3,XTUPLE_0:1;
    then s in s;
    hence contradiction;
  end;
  hereby
    assume root-tree [x,s] in (the Sorts of PTA).s1;
    then root-tree [x,s] in {a where a is Element of TS(DTConOSA(X)): (ex s2
being Element of S, x be object
st s2 <= s1 & x in X.s2 & a = root-tree [x,s2]) or
ex o be OperSymbol of S st [o,the carrier of S] = a.{} & the_result_sort_of o
    <= s1} by Th9;
    then consider a being Element of TS D such that
A4: a = root-tree [x,s] and
A5: (ex s2 being Element of S, x be object
st s2 <= s1 & x in X.s2 & a =
root-tree [x,s2]) or ex o be OperSymbol of S st [o,the carrier of S] = a.{} &
    the_result_sort_of o <= s1;
    consider s2 being Element of S,x1 be set such that
A6: s2 <= s1 and
    x1 in X.s2 and
A7: a = root-tree [x1,s2] by A2,A4,A5;
    [x1,s2] = [x,s] by A4,A7,TREES_4:4;
    hence s <= s1 by A6,XTUPLE_0:1;
  end;
  assume s <= s1;
  then
A8: SPTA.s0 c= SPTA.s11 by OSALG_1:def 16;
  root-tree t in {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}
  by A1;
  then root-tree [x,s] in SPTA.s0 by Th9;
  hence thesis by A8;
end;
