:: PRE_FF semantic presentation
definition
let c1 be
Nat;
func Fib c1 -> Nat means :
Def1:
:: PRE_FF:def 1
ex
b1 being
Function of
NAT ,
[:NAT ,NAT :] st
(
a2 = (b1 . a1) `1 &
b1 . 0
= [0,1] & ( for
b2 being
Nat holds
b1 . (b2 + 1) = [((b1 . b2) `2 ),(((b1 . b2) `1 ) + ((b1 . b2) `2 ))] ) );
existence
ex b1 being Natex b2 being Function of NAT ,[:NAT ,NAT :] st
( b1 = (b2 . c1) `1 & b2 . 0 = [0,1] & ( for b3 being Nat holds b2 . (b3 + 1) = [((b2 . b3) `2 ),(((b2 . b3) `1 ) + ((b2 . b3) `2 ))] ) )
uniqueness
for b1, b2 being Nat st ex b3 being Function of NAT ,[:NAT ,NAT :] st
( b1 = (b3 . c1) `1 & b3 . 0 = [0,1] & ( for b4 being Nat holds b3 . (b4 + 1) = [((b3 . b4) `2 ),(((b3 . b4) `1 ) + ((b3 . b4) `2 ))] ) ) & ex b3 being Function of NAT ,[:NAT ,NAT :] st
( b2 = (b3 . c1) `1 & b3 . 0 = [0,1] & ( for b4 being Nat holds b3 . (b4 + 1) = [((b3 . b4) `2 ),(((b3 . b4) `1 ) + ((b3 . b4) `2 ))] ) ) holds
b1 = b2
end;
:: deftheorem Def1 defines Fib PRE_FF:def 1 :
theorem Th1: :: PRE_FF:1
theorem Th2: :: PRE_FF:2
theorem Th3: :: PRE_FF:3
theorem Th4: :: PRE_FF:4
theorem Th5: :: PRE_FF:5
theorem Th6: :: PRE_FF:6
theorem Th7: :: PRE_FF:7
theorem Th8: :: PRE_FF:8
canceled;
theorem Th9: :: PRE_FF:9
canceled;
theorem Th10: :: PRE_FF:10
theorem Th11: :: PRE_FF:11
theorem Th12: :: PRE_FF:12
theorem Th13: :: PRE_FF:13
theorem Th14: :: PRE_FF:14
theorem Th15: :: PRE_FF:15
theorem Th16: :: PRE_FF:16
defpred S1[ Nat, FinSequence of NAT , set ] means ( ( for b1 being Nat st a1 + 2 = 2 * b1 holds
a3 = a2 ^ <*(a2 /. b1)*> ) & ( for b1 being Nat st a1 + 2 = (2 * b1) + 1 holds
a3 = a2 ^ <*((a2 /. b1) + (a2 /. (b1 + 1)))*> ) );
Lemma8:
for b1 being Nat
for b2 being Element of NAT * ex b3 being Element of NAT * st S1[b1,b2,b3]
defpred S2[ Nat, FinSequence of NAT , set ] means ( ( for b1 being Nat st a1 + 2 = 2 * b1 holds
a3 = a2 ^ <*(a2 /. b1)*> ) & ( for b1 being Nat st a1 + 2 = (2 * b1) + 1 holds
a3 = a2 ^ <*((a2 /. b1) + (a2 /. (b1 + 1)))*> ) );
Lemma9:
for b1 being Nat
for b2, b3, b4 being Element of NAT * st S2[b1,b2,b3] & S2[b1,b2,b4] holds
b3 = b4
reconsider c1 = <*1*> as Element of NAT * by FINSEQ_1:def 11;
consider c2 being Function of NAT ,NAT * such that
Lemma10:
c2 . 0 = c1
and
Lemma11:
for b1 being Nat holds S1[b1,c2 . b1,c2 . (b1 + 1)]
from RECDEF_1:sch 2(Lemma8);
:: deftheorem Def2 defines Fusc PRE_FF:def 2 :
for
b1,
b2 being
Nat holds
( (
b1 = 0 implies (
b2 = Fusc b1 iff
b2 = 0 ) ) & ( not
b1 = 0 implies (
b2 = Fusc b1 iff ex
b3 being
Natex
b4 being
Function of
NAT ,
NAT * st
(
b3 + 1
= b1 &
b2 = (b4 . b3) /. b1 &
b4 . 0
= <*1*> & ( for
b5 being
Nat holds
( ( for
b6 being
Nat st
b5 + 2
= 2
* b6 holds
b4 . (b5 + 1) = (b4 . b5) ^ <*((b4 . b5) /. b6)*> ) & ( for
b6 being
Nat st
b5 + 2
= (2 * b6) + 1 holds
b4 . (b5 + 1) = (b4 . b5) ^ <*(((b4 . b5) /. b6) + ((b4 . b5) /. (b6 + 1)))*> ) ) ) ) ) ) );
theorem Th17: :: PRE_FF:17
theorem Th18: :: PRE_FF:18
for
b1,
b2 being
Nat st
b1 <> 0 &
b1 = 2
* b2 holds
b2 < b1
theorem Th19: :: PRE_FF:19
for
b1,
b2 being
Nat st
b1 = (2 * b2) + 1 holds
b2 < b1
theorem Th20: :: PRE_FF:20
theorem Th21: :: PRE_FF:21
theorem Th22: :: PRE_FF:22