:: PRE_FF semantic presentation :: Showing IDV graph ... (Click the Palm Trees again to close it)
definition
let n be
Nat;
func Fib n -> Nat means :
Def1:
:: PRE_FF:def 1
ex
fib being
Function of
NAT ,
[:NAT ,NAT :] st
(
it = (fib . n) `1 &
fib . 0
= [0,1] & ( for
n being
Nat holds
fib . (n + 1) = [((fib . n) `2 ),(((fib . n) `1 ) + ((fib . n) `2 ))] ) );
existence
ex b1 being Nat ex fib being Function of NAT ,[:NAT ,NAT :] st
( b1 = (fib . n) `1 & fib . 0 = [0,1] & ( for n being Nat holds fib . (n + 1) = [((fib . n) `2 ),(((fib . n) `1 ) + ((fib . n) `2 ))] ) )
uniqueness
for b1, b2 being Nat st ex fib being Function of NAT ,[:NAT ,NAT :] st
( b1 = (fib . n) `1 & fib . 0 = [0,1] & ( for n being Nat holds fib . (n + 1) = [((fib . n) `2 ),(((fib . n) `1 ) + ((fib . n) `2 ))] ) ) & ex fib being Function of NAT ,[:NAT ,NAT :] st
( b2 = (fib . n) `1 & fib . 0 = [0,1] & ( for n being Nat holds fib . (n + 1) = [((fib . n) `2 ),(((fib . n) `1 ) + ((fib . n) `2 ))] ) ) holds
b1 = b2
end;
:: deftheorem Def1 defines Fib PRE_FF:def 1 :
theorem :: PRE_FF:1 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem :: PRE_FF:2 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem :: PRE_FF:3 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem :: PRE_FF:4 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem :: PRE_FF:5 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem :: PRE_FF:6 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem :: PRE_FF:7 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem :: PRE_FF:8 :: Showing IDV graph ... (Click the Palm Tree again to close it)
canceled;
theorem :: PRE_FF:9 :: Showing IDV graph ... (Click the Palm Tree again to close it)
canceled;
theorem Th10: :: PRE_FF:10 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th11: :: PRE_FF:11 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th12: :: PRE_FF:12 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th13: :: PRE_FF:13 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th14: :: PRE_FF:14 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th15: :: PRE_FF:15 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem :: PRE_FF:16 :: Showing IDV graph ... (Click the Palm Tree again to close it)
defpred S1[ Nat, FinSequence of NAT , set ] means ( ( for k being Nat st $1 + 2 = 2 * k holds
$3 = $2 ^ <*($2 /. k)*> ) & ( for k being Nat st $1 + 2 = (2 * k) + 1 holds
$3 = $2 ^ <*(($2 /. k) + ($2 /. (k + 1)))*> ) );
Lm1:
for n being Nat
for x being Element of NAT * ex y being Element of NAT * st S1[n,x,y]
defpred S2[ Nat, FinSequence of NAT , set ] means ( ( for k being Nat st $1 + 2 = 2 * k holds
$3 = $2 ^ <*($2 /. k)*> ) & ( for k being Nat st $1 + 2 = (2 * k) + 1 holds
$3 = $2 ^ <*(($2 /. k) + ($2 /. (k + 1)))*> ) );
Lm2:
for n being Nat
for x, y1, y2 being Element of NAT * st S2[n,x,y1] & S2[n,x,y2] holds
y1 = y2
reconsider single1 = <*1*> as Element of NAT * by FINSEQ_1:def 11;
consider fusc being Function of NAT ,NAT * such that
Lm3:
fusc . 0 = single1
and
Lm4:
for n being Nat holds S1[n,fusc . n,fusc . (n + 1)]
from RECDEF_1:sch 2(
NAT *
single1
, Lm1);
:: deftheorem Def2 defines Fusc PRE_FF:def 2 :
for
n,
b2 being
Nat holds
( (
n = 0 implies (
b2 = Fusc n iff
b2 = 0 ) ) & ( not
n = 0 implies (
b2 = Fusc n iff ex
l being
Nat ex
fusc being
Function of
NAT ,
NAT * st
(
l + 1
= n &
b2 = (fusc . l) /. n &
fusc . 0
= <*1*> & ( for
n being
Nat holds
( ( for
k being
Nat st
n + 2
= 2
* k holds
fusc . (n + 1) = (fusc . n) ^ <*((fusc . n) /. k)*> ) & ( for
k being
Nat st
n + 2
= (2 * k) + 1 holds
fusc . (n + 1) = (fusc . n) ^ <*(((fusc . n) /. k) + ((fusc . n) /. (k + 1)))*> ) ) ) ) ) ) );
theorem Th17: :: PRE_FF:17 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem :: PRE_FF:18 :: Showing IDV graph ... (Click the Palm Tree again to close it)
for
nn,
nn' being
Nat st
nn <> 0 &
nn = 2
* nn' holds
nn' < nn
theorem :: PRE_FF:19 :: Showing IDV graph ... (Click the Palm Tree again to close it)
for
nn,
nn' being
Nat st
nn = (2 * nn') + 1 holds
nn' < nn
theorem :: PRE_FF:20 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem :: PRE_FF:21 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem :: PRE_FF:22 :: Showing IDV graph ... (Click the Palm Tree again to close it)