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 Th11:
  for S being OrderSortedSign, X being non-empty ManySortedSet of
S, t being Element of TS (DTConOSA X), o being OperSymbol of S st t.{} = [o,the
carrier of S] holds (ex p being SubtreeSeq of OSSym(o,X) st t = OSSym(o,X)-tree
  p & OSSym(o,X) ==> roots p & p in Args(o,ParsedTermsOSA(X)) & t = Den(o,
  ParsedTermsOSA(X)).p ) & ( for s2 being Element of S, x being set holds t <>
  root-tree [x,s2] ) & for s1 being Element of S holds t in (the Sorts of
  ParsedTermsOSA(X)).s1 iff the_result_sort_of o <= s1
proof
  let S be OrderSortedSign, X be non-empty ManySortedSet of S, t be Element of
  TS (DTConOSA X), o be OperSymbol of S such that
A1: t.{} = [o,the carrier of S];
  set G = DTConOSA X, PTA = ParsedTermsOSA(X);
  consider p being FinSequence of TS G such that
A2: t = OSSym(o,X)-tree p and
A3: OSSym(o,X) ==> roots p by A1,DTCONSTR:10;
  reconsider p as SubtreeSeq of OSSym(o,X) by A3,DTCONSTR:def 6;
  p in ((ParsedTerms X)# * (the Arity of S)).o by A3,Th7;
  then
A4: p in Args(o,ParsedTermsOSA(X)) by MSUALG_1:def 4;
  Den(o,PTA).p = ((the Charact of PTA).o).p by MSUALG_1:def 6
    .= PTDenOp(o,X).p by Def10
    .= t by A2,A3,Def9;
  hence
  ex p being SubtreeSeq of OSSym(o,X) st t = OSSym(o,X)-tree p & OSSym(o,
X) ==> roots p & p in Args(o,ParsedTermsOSA(X)) & t = Den(o,ParsedTermsOSA(X)).
  p by A2,A3,A4;
  thus
A5: for s2 being Element of S, x being set holds t <> root-tree [x,s2]
  proof
    let s2 be Element of S, x be set;
    assume t = root-tree [x,s2];
    then [x,s2] = [o, the carrier of S] by A1,TREES_4:3;
    then s2 = the carrier of S by XTUPLE_0:1;
    then s2 in s2;
    hence contradiction;
  end;
  set s = the_result_sort_of o;
  let s1 be Element of S;
  hereby
    assume t in (the Sorts of PTA).s1;
    then t 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 DTConOSA(X) such that
A6: a = t and
A7: (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;
    thus s <= s1 by A1,A5,A6,A7,XTUPLE_0:1;
  end;
  reconsider s0 = s, s11 = s1 as Element of S;
  reconsider SPTA = the Sorts of PTA as OrderSortedSet of S;
  assume the_result_sort_of o <= s1;
  then
A8: SPTA.s0 c= SPTA.s11 by OSALG_1:def 16;
  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 t in SPTA.s by Th9;
  hence thesis by A8;
end;
