reserve S for non empty non void ManySortedSign;
reserve X for non-empty ManySortedSet of S;
reserve x,y,z for set, i,j for Nat;

theorem Th7:
  for p being DTree-yielding FinSequence st p is finite-yielding
  for t being DecoratedTree st x in Subtrees t & t in rng p
  holds x <> y-tree p
  proof
    let p be DTree-yielding FinSequence such that
A1: p is finite-yielding;
    let t be DecoratedTree; assume
A2: x in Subtrees t & t in rng p;
    reconsider t as finite DecoratedTree
    by A1,A2;
    x is Element of Subtrees t by A2;
    then reconsider x as finite DecoratedTree;
    reconsider p as finite-yielding DTree-yielding FinSequence by A1;
    consider z being object such that
A3: z in dom p & t = p.z by A2,FUNCT_1:def 3;
    reconsider z as Nat by A3;
    consider i such that
A4: z = 1+i by A3,FINSEQ_3:25,NAT_1:10;
    reconsider i as Element of NAT by ORDINAL1:def 12;
    z <= len p by A3,FINSEQ_3:25;
    then
A5: i < len p by A4,NAT_1:13;
A6: dom (y-tree p) = tree doms p by TREES_4:10;
A7: len doms p = len p by TREES_3:38;
A8: dom t = (doms p).z by A3,FUNCT_6:22;
    consider h being FinSequence of NAT such that
A9: h in dom t & len h = height dom t by TREES_1:def 12;
    <*i*>^h in dom (y-tree p) by A4,A5,A6,A7,A8,A9,TREES_3:48;
    then len (<*i*>^h) <= height dom (y-tree p) by TREES_1:def 12;
    then len <*i*> + len h <= height dom (y-tree p) & len <*i*> = 1
    by FINSEQ_1:22,40;
    hence thesis by A2,Th6,A9,NAT_1:13;
end;
