reserve x,y,x1,x2,z for set,
  n,m,k for Nat,
  t1 for (DecoratedTree of [: NAT,NAT :]),
  w,s,t,u for FinSequence of NAT,
  D for non empty set;

theorem Th11:
  for Z1 being Tree,p being FinSequence of NAT st p in Z1 holds
for v being Element of Z1,w being Element of Z1|p st v = p^w holds succ v,succ
  w are_equipotent
proof
  let Z1 be Tree,p be FinSequence of NAT such that
A1: p in Z1;
  set T = Z1|p;
  let t be Element of Z1,t2 be Element of Z1|p such that
A2: t = p^t2;
A3: for n holds t^<*n*> in Z1 iff t2^<*n*> in T
  proof
    let n;
      reconsider nn=n as Element of NAT by ORDINAL1:def 12;
A4: t^<*nn*> = p^(t2^<*nn*>) by A2,FINSEQ_1:32;
    hence t^<*n*> in Z1 implies t2^<*n*> in T by A1,TREES_1:def 6;
    assume t2^<*n*> in T;
    hence thesis by A1,A4,TREES_1:def 6;
  end;
  defpred P[object,object] means
for n st $1 = t^<*n*> holds $2 = t2^<*n*>;
A5: for x being object st x in succ t ex y being object st P[x,y]
  proof
    let x be object;
    assume x in succ t;
    then x in { t^<*n*> : t^<*n*> in Z1 } by TREES_2:def 5;
    then consider n such that
A6: x = t^<*n*> and
    t^<*n*> in Z1;
    take t2^<*n*>;
    let m;
    assume x = t^<*m*>;
    hence thesis by A6,FINSEQ_1:33;
  end;
  consider f being Function such that
A7: dom f = succ t &
for x being object st x in succ t holds P[x,f.x] from CLASSES1:
  sch 1 (A5);
  now
    let x be object;
    thus x in rng f implies x in succ t2
    proof
      assume x in rng f;
      then consider y being object such that
A8:   y in dom f and
A9:   x = f.y by FUNCT_1:def 3;
      y in { t^<*n*> : t^<*n*> in Z1 } by A7,A8,TREES_2:def 5;
      then consider n such that
A10:  y = t^<*n*> and
A11:  t^<*n*> in Z1;
A12:  t2^<*n*> in T by A3,A11;
      x = t2^<*n*> by A7,A8,A9,A10;
      then x in { t2^<*m*> : t2^<*m*> in T } by A12;
      hence thesis by TREES_2:def 5;
    end;
    assume x in succ t2;
    then x in { t2^<*n*> : t2^<*n*> in T } by TREES_2:def 5;
    then consider n such that
A13: x = t2^<*n*> and
A14: t2^<*n*> in T;
    t^<*n*> in Z1 by A3,A14;
    then t^<*n*> in { t^<*m*> : t^<*m*> in Z1 };
    then
A15: t^<*n*> in dom f by A7,TREES_2:def 5;
    then f.(t^<*n*>) = x by A7,A13;
    hence x in rng f by A15,FUNCT_1:def 3;
  end;
  then
A16: rng f = succ t2 by TARSKI:2;
  now
    let x1,x2 be object;
    assume that
A17: x1 in dom f and
A18: x2 in dom f and
A19: f.x1 = f.x2;
    x2 in { t^<*n*> : t^<*n*> in Z1 } by A7,A18,TREES_2:def 5;
    then consider k such that
A20: x2 = t^<*k*> and
    t^<*k*> in Z1;
    x1 in { t^<*n*> : t^<*n*> in Z1 } by A7,A17,TREES_2:def 5;
    then consider m such that
A21: x1 = t^<*m*> and
    t^<*m*> in Z1;
    t2^<*m*> = f.x1 by A7,A17,A21
      .= t2^<*k*> by A7,A18,A19,A20;
    hence x1 = x2 by A21,A20,FINSEQ_1:33;
  end;
  then f is one-to-one by FUNCT_1:def 4;
  hence thesis by A7,A16,WELLORD2:def 4;
end;
