:: by Piotr Wojtecki and Adam Grabowski

::

:: Received May 24, 2004

:: Copyright (c) 2004-2021 Association of Mizar Users

theorem Th6: :: FIB_NUM3:6

for n being Element of NAT

for a being non zero Real holds (a to_power n) to_power 2 = a to_power (2 * n)

for a being non zero Real holds (a to_power n) to_power 2 = a to_power (2 * n)

proof end;

theorem Th8: :: FIB_NUM3:8

for n being Element of NAT

for a, b being non zero Real holds (a * b) to_power n = (a to_power n) * (b to_power n)

for a, b being non zero Real holds (a * b) to_power n = (a to_power n) * (b to_power n)

proof end;

registration
end;

deffunc H

definition

ex b_{1} being sequence of [:NAT,NAT:] st

( b_{1} . 0 = [2,1] & ( for n being Nat holds b_{1} . (n + 1) = [((b_{1} . n) `2),(((b_{1} . n) `1) + ((b_{1} . n) `2))] ) )

for b_{1}, b_{2} being sequence of [:NAT,NAT:] st b_{1} . 0 = [2,1] & ( for n being Nat holds b_{1} . (n + 1) = [((b_{1} . n) `2),(((b_{1} . n) `1) + ((b_{1} . n) `2))] ) & b_{2} . 0 = [2,1] & ( for n being Nat holds b_{2} . (n + 1) = [((b_{2} . n) `2),(((b_{2} . n) `1) + ((b_{2} . n) `2))] ) holds

b_{1} = b_{2}
end;

func Lucas -> sequence of [:NAT,NAT:] means :Def1: :: FIB_NUM3:def 1

( it . 0 = [2,1] & ( for n being Nat holds it . (n + 1) = [((it . n) `2),(((it . n) `1) + ((it . n) `2))] ) );

existence ( it . 0 = [2,1] & ( for n being Nat holds it . (n + 1) = [((it . n) `2),(((it . n) `1) + ((it . n) `2))] ) );

ex b

( b

proof end;

uniqueness for b

b

proof end;

:: deftheorem Def1 defines Lucas FIB_NUM3:def 1 :

for b_{1} being sequence of [:NAT,NAT:] holds

( b_{1} = Lucas iff ( b_{1} . 0 = [2,1] & ( for n being Nat holds b_{1} . (n + 1) = [((b_{1} . n) `2),(((b_{1} . n) `1) + ((b_{1} . n) `2))] ) ) );

for b

( b

theorem Th11: :: FIB_NUM3:11

( Lucas 0 = 2 & Lucas 1 = 1 & ( for n being Nat holds Lucas ((n + 1) + 1) = (Lucas n) + (Lucas (n + 1)) ) )

proof end;

registration
end;

theorem :: FIB_NUM3:26

for n, m being Element of NAT holds 2 * (Lucas (n + m)) = ((Lucas n) * (Lucas m)) + ((5 * (Fib n)) * (Fib m))

proof end;

theorem :: FIB_NUM3:27

for n being Element of NAT holds (Lucas (n + 3)) * (Lucas n) = ((Lucas (n + 2)) |^ 2) - ((Lucas (n + 1)) |^ 2)

proof end;

theorem :: FIB_NUM3:29

for n being Element of NAT holds 2 * (Fib ((2 * n) + 1)) = ((Lucas (n + 1)) * (Fib n)) + ((Lucas n) * (Fib (n + 1)))

proof end;

theorem :: FIB_NUM3:30

for n being Element of NAT holds (5 * ((Fib n) |^ 2)) - ((Lucas n) |^ 2) = 4 * ((- 1) to_power (n + 1))

proof end;

theorem :: FIB_NUM3:31

for n being Element of NAT holds Fib ((2 * n) + 1) = ((Fib (n + 1)) * (Lucas (n + 1))) - ((Fib n) * (Lucas n))

proof end;

definition

let a, b be Nat;

:: original: [

redefine func [a,b] -> Element of [:NAT,NAT:];

coherence

[a,b] is Element of [:NAT,NAT:]

end;
:: original: [

redefine func [a,b] -> Element of [:NAT,NAT:];

coherence

[a,b] is Element of [:NAT,NAT:]

proof end;

definition

let a, b be Nat;

deffunc H_{2}( set , Element of [:NAT,NAT:]) -> Element of [:NAT,NAT:] = [($2 `2),(($2 `1) + ($2 `2))];

ex b_{1} being sequence of [:NAT,NAT:] st

( b_{1} . 0 = [a,b] & ( for n being Nat holds b_{1} . (n + 1) = [((b_{1} . n) `2),(((b_{1} . n) `1) + ((b_{1} . n) `2))] ) )

for b_{1}, b_{2} being sequence of [:NAT,NAT:] st b_{1} . 0 = [a,b] & ( for n being Nat holds b_{1} . (n + 1) = [((b_{1} . n) `2),(((b_{1} . n) `1) + ((b_{1} . n) `2))] ) & b_{2} . 0 = [a,b] & ( for n being Nat holds b_{2} . (n + 1) = [((b_{2} . n) `2),(((b_{2} . n) `1) + ((b_{2} . n) `2))] ) holds

b_{1} = b_{2}

end;
deffunc H

func GenFib (a,b) -> sequence of [:NAT,NAT:] means :Def2: :: FIB_NUM3:def 3

( it . 0 = [a,b] & ( for n being Nat holds it . (n + 1) = [((it . n) `2),(((it . n) `1) + ((it . n) `2))] ) );

existence ( it . 0 = [a,b] & ( for n being Nat holds it . (n + 1) = [((it . n) `2),(((it . n) `1) + ((it . n) `2))] ) );

ex b

( b

proof end;

uniqueness for b

b

proof end;

:: deftheorem Def2 defines GenFib FIB_NUM3:def 3 :

for a, b being Nat

for b_{3} being sequence of [:NAT,NAT:] holds

( b_{3} = GenFib (a,b) iff ( b_{3} . 0 = [a,b] & ( for n being Nat holds b_{3} . (n + 1) = [((b_{3} . n) `2),(((b_{3} . n) `1) + ((b_{3} . n) `2))] ) ) );

for a, b being Nat

for b

( b

:: deftheorem defines GenFib FIB_NUM3:def 4 :

for a, b, n being Nat holds GenFib (a,b,n) = ((GenFib (a,b)) . n) `1 ;

for a, b, n being Nat holds GenFib (a,b,n) = ((GenFib (a,b)) . n) `1 ;

theorem Th32: :: FIB_NUM3:32

for a, b being Nat holds

( GenFib (a,b,0) = a & GenFib (a,b,1) = b & ( for n being Nat holds GenFib (a,b,((n + 1) + 1)) = (GenFib (a,b,n)) + (GenFib (a,b,(n + 1))) ) )

( GenFib (a,b,0) = a & GenFib (a,b,1) = b & ( for n being Nat holds GenFib (a,b,((n + 1) + 1)) = (GenFib (a,b,n)) + (GenFib (a,b,(n + 1))) ) )

proof end;

theorem Th33: :: FIB_NUM3:33

for a, b being Element of NAT

for k being Nat holds ((GenFib (a,b,(k + 1))) + (GenFib (a,b,((k + 1) + 1)))) |^ 2 = (((GenFib (a,b,(k + 1))) |^ 2) + ((2 * (GenFib (a,b,(k + 1)))) * (GenFib (a,b,((k + 1) + 1))))) + ((GenFib (a,b,((k + 1) + 1))) |^ 2)

for k being Nat holds ((GenFib (a,b,(k + 1))) + (GenFib (a,b,((k + 1) + 1)))) |^ 2 = (((GenFib (a,b,(k + 1))) |^ 2) + ((2 * (GenFib (a,b,(k + 1)))) * (GenFib (a,b,((k + 1) + 1))))) + ((GenFib (a,b,((k + 1) + 1))) |^ 2)

proof end;

theorem Th36: :: FIB_NUM3:36

for a, b, n being Element of NAT holds (GenFib (a,b,(n + 2))) + (GenFib (a,b,(n + 3))) = GenFib (a,b,(n + 4))

proof end;

theorem Th39: :: FIB_NUM3:39

for a, b, n being Element of NAT holds (GenFib (a,b,n)) + (GenFib (a,b,(n + 3))) = 2 * (GenFib (a,b,(n + 2)))

proof end;

theorem :: FIB_NUM3:40

for a, b, n being Element of NAT holds (GenFib (a,b,n)) + (GenFib (a,b,(n + 4))) = 3 * (GenFib (a,b,(n + 2)))

proof end;

theorem :: FIB_NUM3:41

for a, b, n being Element of NAT holds (GenFib (a,b,(n + 3))) - (GenFib (a,b,n)) = 2 * (GenFib (a,b,(n + 1)))

proof end;

theorem :: FIB_NUM3:42

for a, b, n being non zero Element of NAT holds GenFib (a,b,n) = ((GenFib (a,b,0)) * (Fib (n -' 1))) + ((GenFib (a,b,1)) * (Fib n))

proof end;

theorem :: FIB_NUM3:43

for n, m being Nat holds ((Fib m) * (Lucas n)) + ((Lucas m) * (Fib n)) = GenFib ((Fib 0),(Lucas 0),(n + m))

proof end;

theorem :: FIB_NUM3:47

for a, b, n being Element of NAT holds ((GenFib (a,b,(n + 2))) * (GenFib (a,b,n))) - ((GenFib (a,b,(n + 1))) |^ 2) = ((- 1) to_power n) * (((GenFib (a,b,2)) |^ 2) - ((GenFib (a,b,1)) * (GenFib (a,b,3))))

proof end;

theorem :: FIB_NUM3:48

for a, b, k, n being Element of NAT holds GenFib ((GenFib (a,b,k)),(GenFib (a,b,(k + 1))),n) = GenFib (a,b,(n + k))

proof end;

theorem :: FIB_NUM3:52

for a, b, c, d, n being Element of NAT holds (GenFib (a,b,n)) + (GenFib (c,d,n)) = GenFib ((a + c),(b + d),n)

proof end;

theorem :: FIB_NUM3:54

for a, b, n being Element of NAT holds GenFib (a,b,n) = ((((a * (- tau_bar)) + b) * (tau to_power n)) + (((a * tau) - b) * (tau_bar to_power n))) / (sqrt 5)

proof end;

theorem :: FIB_NUM3:55

for a, n being Element of NAT holds GenFib (((2 * a) + 1),((2 * a) + 1),(n + 1)) = ((2 * a) + 1) * (Fib (n + 2))

proof end;