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;
reserve w for FinTree-yielding FinSequence;

theorem Th77:
  for w st for t being finite Tree st t in rng w holds height t <= n holds
  height tree(w) <= n+1
proof
  let w such that
A1: for t being finite Tree st t in rng w holds height t <= n;
  consider p being FinSequence of NAT such that
A2: p in tree(w) and
A3: len p = height tree(w) by TREES_1:def 12;
A4: p = {} & len {} = 0 or ex n,q st n < len w & q in w.(n+1) & p = <*n*>^q
  by A2,Def15;
  now
    given k,q such that
A5: k < len w and
A6: q in w.(k+1) and
A7: p = <*k*>^q;
A8: w.(k+1) in rng w by A5,Lm3;
    rng w is constituted-FinTrees by Def10;
    then reconsider t = w.(k+1) as finite Tree by A8;
    reconsider q as FinSequence of NAT by A7,FINSEQ_1:36;
A9: len q <= height t by A6,TREES_1:def 12;
A10: height t <= n by A1,A5,Lm3;
A11: len <*k*> = 1 by FINSEQ_1:40;
A12: len q <= n by A9,A10,XXREAL_0:2;
    len p = 1+len q by A7,A11,FINSEQ_1:22;
    hence thesis by A3,A12,XREAL_1:7;
  end;
  hence thesis by A3,A4;
end;
