let Z1 be Tree; :: thesis: for p being FinSequence of NAT st p in Z1 holds
for v being Element of Z1
for w being Element of Z1 | p st v = p ^ w holds
succ v, succ w are_equipotent

let p be FinSequence of NAT ; :: thesis: ( p in Z1 implies for v being Element of Z1
for w being Element of Z1 | p st v = p ^ w holds
succ v, succ w are_equipotent )

assume A1: p in Z1 ; :: thesis: for v being Element of Z1
for w being Element of Z1 | p st v = p ^ w holds
succ v, succ w are_equipotent

set T = Z1 | p;
let t be Element of Z1; :: thesis: for w being Element of Z1 | p st t = p ^ w holds
succ t, succ w are_equipotent

let t2 be Element of Z1 | p; :: thesis: ( t = p ^ t2 implies succ t, succ t2 are_equipotent )
assume A2: t = p ^ t2 ; :: thesis: succ t, succ t2 are_equipotent
A3: for n being Nat holds
( t ^ <*n*> in Z1 iff t2 ^ <*n*> in Z1 | p )
proof
let n be Nat; :: thesis: ( t ^ <*n*> in Z1 iff t2 ^ <*n*> in Z1 | p )
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 Z1 | p ) by A1, TREES_1:def 6; :: thesis: ( t2 ^ <*n*> in Z1 | p implies t ^ <*n*> in Z1 )
assume t2 ^ <*n*> in Z1 | p ; :: thesis: t ^ <*n*> in Z1
hence t ^ <*n*> in Z1 by A1, A4, TREES_1:def 6; :: thesis: verum
end;
defpred S1[ object , object ] means for n being Nat st $1 = t ^ <*n*> holds
$2 = t2 ^ <*n*>;
A5: for x being object st x in succ t holds
ex y being object st S1[x,y]
proof
let x be object ; :: thesis: ( x in succ t implies ex y being object st S1[x,y] )
assume x in succ t ; :: thesis: ex y being object st S1[x,y]
then x in { (t ^ <*n*>) where n is Nat : t ^ <*n*> in Z1 } by TREES_2:def 5;
then consider n being Nat such that
A6: x = t ^ <*n*> and
t ^ <*n*> in Z1 ;
take t2 ^ <*n*> ; :: thesis: S1[x,t2 ^ <*n*>]
let m be Nat; :: thesis: ( x = t ^ <*m*> implies t2 ^ <*n*> = t2 ^ <*m*> )
assume x = t ^ <*m*> ; :: thesis: t2 ^ <*n*> = t2 ^ <*m*>
hence t2 ^ <*n*> = t2 ^ <*m*> by A6, FINSEQ_1:33; :: thesis: verum
end;
consider f being Function such that
A7: ( dom f = succ t & ( for x being object st x in succ t holds
S1[x,f . x] ) ) from CLASSES1:sch 1(A5);
now :: thesis: for x being object holds
( ( x in rng f implies x in succ t2 ) & ( x in succ t2 implies x in rng f ) )
let x be object ; :: thesis: ( ( x in rng f implies x in succ t2 ) & ( x in succ t2 implies x in rng f ) )
thus ( x in rng f implies x in succ t2 ) :: thesis: ( x in succ t2 implies x in rng f )
proof
assume x in rng f ; :: thesis: x in succ t2
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*>) where n is Nat : t ^ <*n*> in Z1 } by A7, A8, TREES_2:def 5;
then consider n being Nat such that
A10: y = t ^ <*n*> and
A11: t ^ <*n*> in Z1 ;
A12: t2 ^ <*n*> in Z1 | p by A3, A11;
x = t2 ^ <*n*> by A7, A8, A9, A10;
then x in { (t2 ^ <*m*>) where m is Nat : t2 ^ <*m*> in Z1 | p } by A12;
hence x in succ t2 by TREES_2:def 5; :: thesis: verum
end;
assume x in succ t2 ; :: thesis: x in rng f
then x in { (t2 ^ <*n*>) where n is Nat : t2 ^ <*n*> in Z1 | p } by TREES_2:def 5;
then consider n being Nat such that
A13: x = t2 ^ <*n*> and
A14: t2 ^ <*n*> in Z1 | p ;
t ^ <*n*> in Z1 by A3, A14;
then t ^ <*n*> in { (t ^ <*m*>) where m is Nat : 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; :: thesis: verum
end;
then A16: rng f = succ t2 by TARSKI:2;
now :: thesis: for x1, x2 being object st x1 in dom f & x2 in dom f & f . x1 = f . x2 holds
x1 = x2
let x1, x2 be object ; :: thesis: ( x1 in dom f & x2 in dom f & f . x1 = f . x2 implies x1 = x2 )
assume that
A17: x1 in dom f and
A18: x2 in dom f and
A19: f . x1 = f . x2 ; :: thesis: x1 = x2
x2 in { (t ^ <*n*>) where n is Nat : t ^ <*n*> in Z1 } by A7, A18, TREES_2:def 5;
then consider k being Nat such that
A20: x2 = t ^ <*k*> and
t ^ <*k*> in Z1 ;
x1 in { (t ^ <*n*>) where n is Nat : t ^ <*n*> in Z1 } by A7, A17, TREES_2:def 5;
then consider m being Nat 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; :: thesis: verum
end;
then f is one-to-one by FUNCT_1:def 4;
hence succ t, succ t2 are_equipotent by A7, A16, WELLORD2:def 4; :: thesis: verum