reserve x,y,z for object, X,Y for set,
  i,k,n for Nat,
  p,q,r,s for FinSequence,
  w for FinSequence of NAT,
  f for Function;

theorem Th49:
  p is Tree-yielding implies tree(p)-level 1 = {<*n*>: n < len p} &
  for n being Element of NAT st n < len p holds (tree(p))|<*n*> = p.(n+1)
proof
  set T = tree(p);
  assume
A1: p is Tree-yielding;
  then
A2: rng p is constituted-Trees;
  thus T-level 1 = {<*n*>: n < len p}
  proof
    thus T-level 1 c= {<*n*>: n < len p}
    proof
      let x be object;
      assume x in T-level 1;
      then consider t being Element of T such that
A3:   x = t and
A4:   len t = 1;
A5:   t = <*t.1*> by A4,FINSEQ_1:40;
      then consider n, q such that
A6:   n < len p and q in p.(n+1) and
A7:   t = <*n*>^q by A1,Def15;
      t = <*n*> by A5,A7,FINSEQ_1:88;
      hence thesis by A3,A6;
    end;
    let x be object;
    assume x in {<*n*>: n < len p};
    then consider n such that
A8: x = <*n*> and
A9: n < len p;
    p.(n+1) in rng p by A9,Lm3;
    then
A10: {} in p.(n+1) by A2,TREES_1:22;
    <*n*>^{} = <*n*> by FINSEQ_1:34;
    then reconsider t = <*n*> as Element of T by A1,A9,A10,Def15;
    len t = 1 by FINSEQ_1:39;
    hence thesis by A8;
  end;
  let n be Element of NAT;
  assume
A11: n < len p;
  then p.(n+1) in rng p by Lm3;
  then reconsider S = p.(n+1) as Tree by A2;
A12: {} in S by TREES_1:22;
  <*n*>^{} = <*n*> by FINSEQ_1:34;
  then
A13: <*n*> in T by A1,A11,A12,Def15;
  T|<*n*> = S
  proof
    let r be FinSequence of NAT;
    thus r in T|<*n*> implies r in S
    proof
      assume r in T|<*n*>;
      then <*n*>^r in T by A13,TREES_1:def 6;
      then consider m being Nat, q such that
      m < len p and
A14:  q in p.(m+1) and
A15:  <*n*>^r = <*m*>^q by A1,Def15;
A16:  (<*n*>^r).1 = n by FINSEQ_1:41;
      (<*m*>^q).1 = m by FINSEQ_1:41;
      hence thesis by A14,A15,A16,FINSEQ_1:33;
    end;
    assume r in S;
    then
A17: <*n*>^r in T by A1,A11,Def15;
    then <*n*> in T by TREES_1:21;
    hence thesis by A17,TREES_1:def 6;
  end;
  hence thesis;
end;
