A6:
( 0 < F4() & F4() < F3() )
by A1, A2;
deffunc H1( Nat, set ) -> Element of NAT = IFEQ $2,0 ,0 ,F2($1);
consider q being Function of NAT ,NAT such that
A7:
q . 0 = F3()
and
A8:
for i being Nat holds q . (i + 1) = H1(i,q . i)
from NAT_1:sch 12();
deffunc H2( Element of NAT ) -> Element of NAT = q . $1;
q . (0 + 1) =
IFEQ (q . 0 ),0 ,0 ,F2(0 )
by A8
.=
F2(0 )
by A2, A7, FUNCOP_1:def 8
;
then A9:
( H2( 0 ) = F3() & H2(1) = F4() )
by A4, A7;
A10:
for k being Element of NAT st q . k > 0 holds
q . k = F1(k)
A15:
for k being Element of NAT holds H2(k + 2) = H2(k) mod H2(k + 1)
proof
let k be
Element of
NAT ;
:: thesis: H2(k + 2) = H2(k) mod H2(k + 1)
now per cases
( q . (k + 1) <> 0 or q . (k + 1) = 0 )
;
case A16:
q . (k + 1) <> 0
;
:: thesis: H2(k + 2) = H2(k) mod H2(k + 1)then A19:
F2(
k)
> 0
;
A20:
q . (k + (1 + 1)) =
q . ((k + 1) + 1)
.=
IFEQ (q . (k + 1)),
0 ,
0 ,
F2(
(k + 1))
by A8
.=
F2(
(k + 1))
by A16, FUNCOP_1:def 8
.=
F1(
k)
mod F2(
k)
by A5, A19
;
then A23:
q . k > 0
;
q . (k + 1) =
IFEQ (q . k),
0 ,
0 ,
F2(
k)
by A8
.=
F2(
k)
by A21, FUNCOP_1:def 8
;
hence
H2(
k + 2)
= H2(
k)
mod H2(
k + 1)
by A10, A20, A23;
:: thesis: verum end; end; end;
hence
H2(
k + 2)
= H2(
k)
mod H2(
k + 1)
;
:: thesis: verum
end;
consider k being Element of NAT such that
A25:
( H2(k) = F3() gcd F4() & H2(k + 1) = 0 )
from NAT_D:sch 1(A6, A9, A15);
take
k
; :: thesis: ( F1(k) = F3() gcd F4() & F2(k) = 0 )
A26:
F3() gcd F4() > 0
by A1, Th71;
thus
F1(k) = F3() gcd F4()
by A1, A10, A25, Th71; :: thesis: F2(k) = 0
thus F2(k) =
IFEQ (q . k),0 ,0 ,F2(k)
by A25, A26, FUNCOP_1:def 8
.=
0
by A8, A25
; :: thesis: verum