reserve x for set,
  t,t1,t2 for DecoratedTree;
reserve C for set;
reserve X,Y for non empty constituted-DTrees set;
reserve T for DecoratedTree,
  p for FinSequence of NAT;
reserve T for finite-branching DecoratedTree,
  t for Element of dom T,
  x for FinSequence,
  n, m for Nat;
reserve x, x9 for Element of dom T,
  y9 for set;
reserve n,k1,k2,l,k,m for Nat,
  x,y for set;

theorem Th45:
  for T being Tree holds T-level (n+1) = union { succ w where w is
  Element of T : len w = n }
proof
  let T be Tree;
  thus T-level (n+1) c= union { succ w where w is Element of T : len w = n }
  proof
    let x be object;
    assume
A1: x in T-level (n+1);
    then reconsider t = x as Element of T;
    t|Seg n is FinSequence of NAT by FINSEQ_1:18;
    then consider s being FinSequence of NAT such that
A2: s = t|Seg n;
    s is_a_prefix_of t by A2,TREES_1:def 1;
    then reconsider s as Element of T by TREES_1:20;
A3: ex w9 being Element of T st t = w9 & len w9 = n+1 by A1;
    n+0 <= n+1 by XREAL_1:6;
    then len s = n by A3,A2,FINSEQ_1:17;
    then
A4: succ s in { succ w where w is Element of T : len w = n };
    Seg (n+1) = dom t by A3,FINSEQ_1:def 3;
    then t = t|Seg (n+1);
    then ex m being Element of NAT st t = s^<*m*> by A3,A2,Th33;
    then t in succ s;
    hence thesis by A4,TARSKI:def 4;
  end;
  thus union { succ w where w is Element of T : len w = n } c= T-level (n+1)
  proof
    set X = { succ w where w is Element of T : len w = n };
    let x be object;
    assume x in union X;
    then consider Y being set such that
A5: x in Y and
A6: Y in X by TARSKI:def 4;
    consider w being Element of T such that
A7: Y = succ w and
A8: len w = n by A6;
    reconsider t = x as Element of T by A5,A7;
    consider k such that
A9: t = w^<*k*> and
    w^<*k*> in T by A5,A7;
    len <*k*> = 1 by FINSEQ_1:40;
    then len t = n+1 by A8,A9,FINSEQ_1:22;
    hence thesis;
  end;
end;
