consider 00 being Element of F1();
defpred S1[ Element of NAT , set , set ] means ( ( $1 < F3() - 1 implies P1[$1 + 1,$2,$3] ) & ( not $1 < F3() - 1 implies $3 = 00 ) );
A2:
for n being Element of NAT
for x being Element of F1() ex y being Element of F1() st S1[n,x,y]
consider f being Function of NAT ,F1() such that
A5:
( f . 0 = F2() & ( for n being Element of NAT holds S1[n,f . n,f . (n + 1)] ) )
from RECDEF_1:sch 2(A2);
defpred S2[ set , set ] means for r being Real st r = $1 holds
$2 = f . (r - 1);
A6:
for x being set st x in REAL holds
ex y being set st S2[x,y]
consider g being Function such that
A7:
( dom g = REAL & ( for x being set st x in REAL holds
S2[x,g . x] ) )
from CLASSES1:sch 1(A6);
A8:
dom (g | (Seg F3())) = Seg F3()
by A7, RELAT_1:91, XBOOLE_1:1;
then reconsider p = g | (Seg F3()) as FinSequence by FINSEQ_1:def 2;
rng p c= F1()
then reconsider p = p as FinSequence of F1() by FINSEQ_1:def 4;
take
p
; :: thesis: ( len p = F3() & ( p . 1 = F2() or F3() = 0 ) & ( for n being Element of NAT st 1 <= n & n < F3() holds
P1[n,p . n,p . (n + 1)] ) )
F3() in NAT
by ORDINAL1:def 13;
hence
len p = F3()
by A8, FINSEQ_1:def 3; :: thesis: ( ( p . 1 = F2() or F3() = 0 ) & ( for n being Element of NAT st 1 <= n & n < F3() holds
P1[n,p . n,p . (n + 1)] ) )
( not F3() <> 0 or p . 1 = F2() or F3() = 0 )
hence
( p . 1 = F2() or F3() = 0 )
; :: thesis: for n being Element of NAT st 1 <= n & n < F3() holds
P1[n,p . n,p . (n + 1)]
let n be Element of NAT ; :: thesis: ( 1 <= n & n < F3() implies P1[n,p . n,p . (n + 1)] )
assume that
A14:
1 <= n
and
A15:
n < F3()
; :: thesis: P1[n,p . n,p . (n + 1)]
0 <> n
by A14;
then consider k being Nat such that
A16:
n = k + 1
by NAT_1:6;
A17:
for n being Element of NAT st n < F3() holds
p . (n + 1) = f . n
reconsider k = k as Element of NAT by ORDINAL1:def 13;
k <= k + 1
by NAT_1:11;
then A19:
k < F3()
by A15, A16, XXREAL_0:2;
k < F3() - 1
by A15, A16, XREAL_1:22;
then
P1[k + 1,f . k,f . (k + 1)]
by A5;
then
P1[k + 1,f . k,p . ((k + 1) + 1)]
by A17, A15, A16;
hence
P1[n,p . n,p . (n + 1)]
by A17, A16, A19; :: thesis: verum