set D = F2() ^omega ;
reconsider s0 = F3() as Element of F2() by A0;
reconsider f0 = <%s0%> as Element of F2() ^omega by AFINSQ_1:42;
defpred S9[ set , Element of F2() ^omega , Element of F2() ^omega ] means ( ( ( $2 = {} or F1((last $2)) = {} ) implies $2 = $3 ) & ( $2 <> {} & F1((last $2)) <> {} implies ex y being Element of F2() st
( P1[ last $2,y] & F1(y) c< F1((last $2)) & $2 ^ <%y%> = $3 ) ) );
A3: for a being Element of NAT
for x being Element of F2() ^omega ex y being Element of F2() ^omega st S9[a,x,y]
proof
let a be Element of NAT ; :: thesis: for x being Element of F2() ^omega ex y being Element of F2() ^omega st S9[a,x,y]
let x be Element of F2() ^omega ; :: thesis: ex y being Element of F2() ^omega st S9[a,x,y]
per cases ( x = {} or F1((last x)) = {} or ( x <> {} & F1((last x)) <> {} ) ) ;
suppose C1: ( x = {} or F1((last x)) = {} ) ; :: thesis: ex y being Element of F2() ^omega st S9[a,x,y]
take y = x; :: thesis: S9[a,x,y]
thus S9[a,x,y] by C1; :: thesis: verum
end;
suppose C2: ( x <> {} & F1((last x)) <> {} ) ; :: thesis: ex y being Element of F2() ^omega st S9[a,x,y]
then last x in F2() by Lem3;
then consider y being Element of F2() such that
C3: ( P1[ last x,y] & F1(y) c< F1((last x)) ) by A2, C2;
reconsider z = x ^ <%y%> as Element of F2() ^omega by AFINSQ_1:42;
take z ; :: thesis: S9[a,x,z]
thus S9[a,x,z] by C2, C3; :: thesis: verum
end;
end;
end;
consider F being Function of NAT,(F2() ^omega) such that
B1: ( F . 0 = f0 & ( for a being Element of NAT holds S9[a,F . a,F . (a + 1)] ) ) from RECDEF_1:sch 2(A3);
defpred S10[ Nat] means F . $1 <> {} ;
B8: S10[ 0 ] by B1;
B9: for m being natural number st S10[m] holds
S10[m + 1]
proof
let m be natural number ; :: thesis: ( S10[m] implies S10[m + 1] )
assume S10[m] ; :: thesis: S10[m + 1]
then reconsider f = F . m as non empty T-Sequence ;
m in NAT by ORDINAL1:def 12;
then S9[m,F . m,F . (m + 1)] by B1;
then ( F . (m + 1) = f or ex x being set st F . (m + 1) = f ^ <%x%> ) ;
hence S10[m + 1] ; :: thesis: verum
end;
N0: for m being natural number holds S10[m] from NAT_1:sch 2(B8, B9);
defpred S11[ Function] means ( $1 . 0 = F3() & ( for a being ordinal number st succ a in dom $1 holds
ex x, y being Element of F2() st
( x = $1 . a & y = $1 . (succ a) & P1[x,y] ) ) );
defpred S12[ Nat] means S11[F . $1];
D1: S12[ 0 ]
proof
thus (F . 0) . 0 = F3() by B1, AFINSQ_1:def 4; :: thesis: for a being ordinal number st succ a in dom (F . 0) holds
ex x, y being Element of F2() st
( x = (F . 0) . a & y = (F . 0) . (succ a) & P1[x,y] )

let a be ordinal number ; :: thesis: ( succ a in dom (F . 0) implies ex x, y being Element of F2() st
( x = (F . 0) . a & y = (F . 0) . (succ a) & P1[x,y] ) )

assume succ a in dom (F . 0) ; :: thesis: ex x, y being Element of F2() st
( x = (F . 0) . a & y = (F . 0) . (succ a) & P1[x,y] )

then succ a in 1 by B1, AFINSQ_1:def 4;
hence ex x, y being Element of F2() st
( x = (F . 0) . a & y = (F . 0) . (succ a) & P1[x,y] ) by CARD_1:49, TARSKI:def 1; :: thesis: verum
end;
D2: for m being natural number st S12[m] holds
S12[m + 1]
proof
let m be natural number ; :: thesis: ( S12[m] implies S12[m + 1] )
assume F1: S12[m] ; :: thesis: S12[m + 1]
F0: m in NAT by ORDINAL1:def 12;
then F2: S9[m,F . m,F . (m + 1)] by B1;
per cases ( F . m = {} or F1((last (F . m))) = {} or ( F . m <> {} & F1((last (F . m))) <> {} ) ) ;
suppose ( F . m = {} or F1((last (F . m))) = {} ) ; :: thesis: S12[m + 1]
hence S12[m + 1] by F1, F2; :: thesis: verum
end;
suppose F3: ( F . m <> {} & F1((last (F . m))) <> {} ) ; :: thesis: S12[m + 1]
reconsider fm = F . m as non empty finite T-Sequence of by F3;
reconsider fm1 = F . (m + 1) as finite T-Sequence of ;
consider y being Element of F2() such that
F4: ( P1[ last fm,y] & F1(y) c< F1((last fm)) & fm ^ <%y%> = F . (m + 1) ) by B1, F0, F3;
0 in dom fm by ORDINAL3:8;
hence (F . (m + 1)) . 0 = F3() by F1, F4, ORDINAL4:def 1; :: thesis: for a being ordinal number st succ a in dom (F . (m + 1)) holds
ex x, y being Element of F2() st
( x = (F . (m + 1)) . a & y = (F . (m + 1)) . (succ a) & P1[x,y] )

let a be ordinal number ; :: thesis: ( succ a in dom (F . (m + 1)) implies ex x, y being Element of F2() st
( x = (F . (m + 1)) . a & y = (F . (m + 1)) . (succ a) & P1[x,y] ) )

assume F5: succ a in dom (F . (m + 1)) ; :: thesis: ex x, y being Element of F2() st
( x = (F . (m + 1)) . a & y = (F . (m + 1)) . (succ a) & P1[x,y] )

F7: a in succ a by ORDINAL1:6;
then F6: a in dom fm1 by F5, ORDINAL1:10;
reconsider n = a as Nat by F5, F7;
reconsider x = fm1 . a, z = fm1 . (succ a) as Element of F2() by F5, F6, FUNCT_1:102;
F8: dom <%y%> = 1 by AFINSQ_1:def 4;
then dom fm1 = (dom fm) +^ 1 by F4, ORDINAL4:def 1
.= succ (dom fm) by ORDINAL2:31 ;
then F9: a in dom fm by F5, ORDINAL3:3;
take x ; :: thesis: ex y being Element of F2() st
( x = (F . (m + 1)) . a & y = (F . (m + 1)) . (succ a) & P1[x,y] )

take z ; :: thesis: ( x = (F . (m + 1)) . a & z = (F . (m + 1)) . (succ a) & P1[x,z] )
thus ( x = (F . (m + 1)) . a & z = (F . (m + 1)) . (succ a) ) ; :: thesis: P1[x,z]
end;
end;
end;
D3: for m being natural number holds S12[m] from NAT_1:sch 2(D1, D2);
defpred S13[ Nat] means ex n being natural number st card F1((last (F . n))) = $1;
B3: ex n being natural number st S13[n]
proof
last f0 = s0 by Lem4;
then reconsider n = card F1((last (F . 0))) as Nat by A1, B1;
take n ; :: thesis: S13[n]
thus S13[n] ; :: thesis: verum
end;
B4: for n being natural number st n <> 0 & S13[n] holds
ex m being natural number st
( m < n & S13[m] )
proof
let n be natural number ; :: thesis: ( n <> 0 & S13[n] implies ex m being natural number st
( m < n & S13[m] ) )

assume Z0: n <> 0 ; :: thesis: ( not S13[n] or ex m being natural number st
( m < n & S13[m] ) )

given k being Nat such that Z1: card F1((last (F . k))) = n ; :: thesis: ex m being natural number st
( m < n & S13[m] )

reconsider fk = F . k, fk1 = F . (k + 1) as Element of F2() ^omega ;
k in NAT by ORDINAL1:def 12;
then ( S9[k,fk,fk1] & fk <> {} ) by N0, B1;
then consider y being Element of F2() such that
H1: ( P1[ last fk,y] & F1(y) c< F1((last fk)) & fk ^ <%y%> = fk1 ) by Z0, Z1;
H4: ( F1((last fk)) is finite & F1(y) c= F1((last fk)) ) by Z1, H1, XBOOLE_0:def 8;
H3: last fk1 = y by H1, Lem5;
then reconsider m = card F1((last fk1)) as Nat by H4;
take m ; :: thesis: ( m < n & S13[m] )
thus m < n by Z1, H1, H4, H3, TREES_1:6; :: thesis: S13[m]
thus S13[m] ; :: thesis: verum
end;
S13[ 0 ] from NAT_1:sch 7(B3, B4);
then consider n being natural number such that
B6: card F1((last (F . n))) = 0 ;
reconsider f = F . n as non empty XFinSequence of by N0;
take f ; :: thesis: ex k being Element of F2() st
( k = last f & F1(k) = {} & f . 0 = F3() & ( for a being ordinal number st succ a in dom f holds
ex x, y being Element of F2() st
( x = f . a & y = f . (succ a) & P1[x,y] ) ) )

reconsider k = last f as Element of F2() by Lem3;
take k ; :: thesis: ( k = last f & F1(k) = {} & f . 0 = F3() & ( for a being ordinal number st succ a in dom f holds
ex x, y being Element of F2() st
( x = f . a & y = f . (succ a) & P1[x,y] ) ) )

thus ( k = last f & F1(k) = {} ) by B6; :: thesis: ( f . 0 = F3() & ( for a being ordinal number st succ a in dom f holds
ex x, y being Element of F2() st
( x = f . a & y = f . (succ a) & P1[x,y] ) ) )

thus S11[f] by D3; :: thesis: verum