Quelle fib_num3.miz
Sprache: Mizar
|
|
:: Lucas Numbers and Generalized {F}ibonacci Numbers
:: by Piotr Wojtecki and Adam Grabowski
::
:: Received May 24, 2004
:: Copyright (c) 2004-2026 Association of Mizar Users
:: (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.
environ
vocabularies NUMBERS, SUBSET_1, POWER, CARD_1, NEWTON, XXREAL_0, SQUARE_1,
RELAT_1, ARYTM_1, ABIAN, NAT_1, ARYTM_3, PREPOWER, FIB_NUM, FUNCT_1,
ZFMISC_1, MCART_1, PRE_FF, FIB_NUM3, REAL_1, XCMPLX_0;
notations TARSKI, XBOOLE_0, SUBSET_1, ZFMISC_1, SQUARE_1, ORDINAL1, NUMBERS,
XCMPLX_0, XXREAL_0, XREAL_0, NEWTON, NAT_1, MCART_1, DOMAIN_1, PREPOWER,
POWER, FUNCT_2, NAT_D, PRE_FF, FIB_NUM, ABIAN;
constructors DOMAIN_1, SQUARE_1, MEMBERED, NEWTON, PREPOWER, POWER, PRE_FF,
NAT_1, NAT_D, ABIAN, FIB_NUM, REAL_1, MCART_1;
registrations SUBSET_1, ORDINAL1, XXREAL_0, XREAL_0, SQUARE_1, NAT_1,
MEMBERED, XCMPLX_0, CARD_1, XTUPLE_0;
requirements REAL, NUMERALS, SUBSET, ARITHM;
equalities SQUARE_1;
theorems NAT_1, POWER, PREPOWER, XCMPLX_1, PRE_FF, FIB_NUM, SQUARE_1,
WSIERP_1, NAT_2, ABIAN, FIB_NUM2, XREAL_1, XXREAL_0, ORDINAL1, NAT_D;
schemes FIB_NUM, FIB_NUM2, NAT_1;
begin :: Preliminaries
reserve a,b,n for Element of NAT;
theorem
for a being Real, n being Element of NAT st a to_power n = 0
holds a = 0
proof
let a be Real, n be Element of NAT;
assume a to_power n = 0;
then
A1: a |^ n = 0 by POWER: 41;
assume a <> 0;
hence thesis by A1,PREPOWER: 5;
end;
theorem Th2:
for a being non negative Real holds (sqrt a) * (sqrt a) = a
proof
let a be non negative Real;
a = sqrt(a^ 2) by SQUARE_1: 22
.= (sqrt a)*(sqrt a) by SQUARE_1: 29;
hence thesis;
end;
theorem Th3:
for a being Real holds a to_power 2 = (-a) to_power 2
proof
let a be Real;
2 = 1* 2;
then 2 is even by ABIAN:def 2;
hence thesis by POWER: 47;
end;
theorem Th4:
for k being non zero Nat holds k-' 1+ 2 = k+ 2-' 1
proof
let k be non zero Nat;
k >= 1 by NAT_2: 19;
hence thesis by NAT_D: 38;
end;
theorem Th5:
(a+b) |^ 2 = a*a + a*b + a*b + b*b
proof
(a+b)|^ 2=(a+b)*(a+b) by WSIERP_1: 1
.=a*a+a*b+b*a+b*b;
hence thesis;
end;
theorem Th6:
for a being non zero Real holds (a to_power n) to_power 2
= a to_power ( 2*n)
proof
let a be non zero Real;
((a to_power n)to_power 2)=((a to_power n)to_power( 1+ 1))
.=((a to_power n)to_power 1)*((a to_power n)to_power 1) by FIB_NUM2: 5
.=(a to_power n)*((a to_power n)to_power 1) by POWER: 25
.=(a to_power n)*(a to_power n) by POWER: 25
.=a to_power (n+n) by FIB_NUM2: 5
.=a to_power ( 2*n);
hence thesis;
end;
theorem Th7:
for a, b being Real holds
(a + b)*(a - b) = a to_power 2 - b to_power 2
proof
let a, b be Real;
(a + b)*(a - b) = a^ 2 - b^ 2 .= a to_power 2 - b^ 2 by POWER: 46
.= a to_power 2 - b to_power 2 by POWER: 46;
hence thesis;
end;
theorem Th8:
for a, b be non zero Real holds
(a*b) to_power n = a to_power n * b to_power n
proof
let a, b be non zero Real;
A1: b #Z n = b to_power n by POWER: 43;
(a * b) #Z n = (a * b) to_power n & a #Z n = a to_power n by POWER: 43;
hence thesis by A1,PREPOWER: 40;
end;
registration
cluster tau -> positive;
coherence by FIB_NUM2: 33;
cluster tau_bar -> negative;
coherence by FIB_NUM2: 36;
end;
theorem Th9:
for n being Nat holds tau to_power n + tau to_power(n+ 1) = tau to_power(n+ 2)
proof
defpred P[Nat] means tau to_power $ 1 + tau to_power($ 1+ 1)= tau to_power($ 1+ 2
);
let n be Nat;
A1: tau to_power 0 + tau to_power( 0+ 1) = 1+tau to_power( 1) by POWER: 24
.= 1+( 1+sqrt 5)/ 2 by FIB_NUM:def 1,POWER: 25
.=( 1+sqrt 5+ sqrt 5 + 5)/ 4
.=( 1+sqrt 5+ sqrt 5 + sqrt( 5^ 2))/ 4 by SQUARE_1: 22
.=( 1+ 1*sqrt 5+(sqrt 5)* 1+(sqrt 5)*(sqrt 5))/ 4 by SQUARE_1: 29
.=tau*tau by FIB_NUM:def 1
.=(tau to_power 1)*(tau) by POWER: 25
.=(tau to_power 1)*(tau to_power 1) by POWER: 25
.=(tau)to_power( 1+ 1) by POWER: 27
.=tau to_power( 0+ 2);
A2: 1 + tau = 1 + tau to_power 1 by POWER: 25
.= tau to_power( 0+ 2) by A1,POWER: 24;
A3: for k being Nat st P[k] & P[k+ 1] holds P[k+ 2]
proof
let k be Nat;
assume that
P[k] and
P[k+ 1];
tau to_power(k+ 2) + tau to_power((k+ 2)+ 1) =tau to_power(k+ 2)+(tau
to_power(k+ 2)*tau to_power( 1)) by POWER: 27
.=tau to_power(k+ 2)*( 1+tau to_power( 1))
.= tau to_power(k+ 2)* tau to_power( 2) by A2,POWER: 25
.= tau to_power((k+ 2)+ 2) by POWER: 27;
hence thesis;
end;
tau to_power 1 + tau to_power( 1+ 1) =tau + (tau)to_power( 1+ 1) by POWER: 25
.=tau + (tau to_power 1)*(tau to_power 1) by POWER: 27
.=tau + (tau to_power 1)*(tau) by POWER: 25
.=tau + (tau)*(tau) by POWER: 25
.=tau*( 1+tau)
.=(tau to_power( 1))*(tau to_power( 2)) by A2,POWER: 25
.= tau to_power( 1+ 2) by POWER: 27;
then
A4: P[ 1];
A5: P[ 0] by A1;
for k being Nat holds P[k] from FIB_NUM:sch 1 (A5, A4, A3);
hence thesis;
end;
theorem Th10:
for n being Nat holds tau_bar to_power n + tau_bar to_power(n+ 1)
= tau_bar to_power(n+ 2)
proof
defpred P[Nat] means tau_bar to_power $ 1 + tau_bar to_power($ 1+ 1)= tau_bar
to_power($ 1+ 2);
let n be Nat;
A1: tau_bar to_power 0 + tau_bar to_power( 0+ 1) = 1+tau_bar to_power( 1) by
POWER: 24
.= 1+( 1-sqrt 5)/ 2 by FIB_NUM:def 2,POWER: 25
.=( 1-sqrt 5- sqrt 5 + 5)/ 4
.=( 1-sqrt 5- sqrt 5 + sqrt ( 5^ 2))/ 4 by SQUARE_1: 22
.=( 1- 1*sqrt 5-(sqrt 5)* 1+(sqrt 5)*(sqrt 5))/ 4 by SQUARE_1: 29
.=tau_bar*tau_bar by FIB_NUM:def 2
.=(tau_bar to_power 1)*tau_bar by POWER: 25
.=(tau_bar to_power 1)*(tau_bar to_power 1) by POWER: 25
.=(tau_bar)to_power( 1+ 1) by FIB_NUM2: 5
.=tau_bar to_power( 0+ 2);
A2: tau_bar+ 1= tau_bar + tau_bar to_power 0 by POWER: 24
.=tau_bar to_power( 2) by A1,POWER: 25;
A3: for k being Nat st P[k] & P[k+ 1] holds P[k+ 2]
proof
let k be Nat;
assume that
P[k] and
P[k+ 1];
tau_bar
2)+(tau_bar to_power(k+ 2)*tau_bar to_power( 1)) by FIB_NUM2: 5
.=tau_bar to_power(k+ 2)*( 1+tau_bar to_power( 1))
.= tau_bar to_power(k+ 2)* tau_bar to_power( 2) by A2,POWER: 25
.= tau_bar to_power((k+ 2)+ 2) by FIB_NUM2: 5;
hence thesis;
end;
tau_bar to_power 1 + tau_bar to_power( 1+ 1) = tau_bar+tau_bar to_power ( 1
+ 1) by POWER: 25
.=tau_bar+(tau_bar to_power 1)*(tau_bar to_power 1) by FIB_NUM2: 5
.=tau_bar+(tau_bar to_power 1)*(tau_bar) by POWER: 25
.=tau_bar+tau_bar*tau_bar by POWER: 25
.=tau_bar*( 1+tau_bar)
.=(tau_bar to_power( 1))*(tau_bar to_power( 2)) by A2,POWER: 25
.= tau_bar to_power( 1+ 2) by FIB_NUM2: 5;
then
A4: P[ 1];
A5: P[ 0] by A1;
for k being Nat holds P[k] from FIB_NUM:sch 1 (A5, A4, A3);
hence thesis;
end;
begin :: Lucas Numbers
deffunc F(set,Element of [: NAT, NAT :]) = [ $ 2` 2, $ 2` 1 + $ 2` 2 ];
definition
func Lucas -> sequence of [:NAT, NAT:] means :Def1:
it. 0 = [ 2, 1] &
for n being Nat holds it.(n+ 1) = [ (it.n)` 2, (it.n)` 1 + (it.n)` 2 ];
existence
proof
consider L being sequence of [: NAT, NAT :] such that
A1: L. 0 = [ 2, 1] & for n being Nat holds L.(n+ 1) = F(n,L.n) from NAT_1:sch 12;
take L;
thus thesis by A1;
end;
uniqueness
proof
let L1,L2 be sequence of [:NAT, NAT:] such that
A3: L1. 0 = [ 2, 1] and
A4: for n being Nat holds L1.(n+ 1) = F(n,(L1.n)) and
A6: L2. 0 = [ 2, 1] and
A7: for n being Nat holds L2.(n+ 1) = F(n,(L2.n));
thus L1 = L2 from NAT_1:sch 16(A3,A4,A6,A7);
end;
end;
definition
let n be Nat;
::$N Lucas numbers
func Lucas(n) -> Element of NAT equals
(Lucas.n)` 1;
coherence;
end;
theorem Th11:
Lucas( 0) = 2 & Lucas( 1) = 1 &
for n being Nat holds Lucas((n+ 1)+ 1) = Lucas(n) + Lucas(n+ 1)
proof
set L = Lucas;
A1: L. 0 = [ 2, 1] by Def1;
thus Lucas ( 0) = [ 2, 1]` 1 by Def1
.= 2;
thus Lucas ( 1) = (L.( 0+ 1))` 1
.= ([ (L. 0)` 2, (L. 0)` 1 + (L. 0)` 2 ])` 1 by Def1
.= 1 by A1;
let n be Nat;
A3: (L.(n+ 1))` 1 = [ (L.n)` 2, (L.n)` 1 + (L.n)` 2 ]` 1 by Def1
.= (L.n)` 2;
thus Lucas((n+ 1)+ 1) = [ (L.(n+ 1))` 2, (L.(n+ 1))` 1 + (L.(n+ 1))` 2 ]` 1 by Def1
.= [ (L.n)` 2, (L.n)` 1 + (L.n)` 2 ]` 2 by Def1
.= Lucas(n) + Lucas(n+ 1) by A3;
end;
theorem Th12:
for n being Nat Lucas(n + 2) =Lucas (n) + Lucas (n+ 1)
proof
let n be Nat;
thus Lucas(n+ 2) = Lucas((n+ 1)+ 1) .= Lucas(n) + Lucas(n+ 1) by Th11;
end;
theorem Th13:
for n being Nat holds Lucas(n+ 1) + Lucas(n+ 2) = Lucas(n+ 3)
proof
let n be Nat;
Lucas(n+ 1) beingElement of R holds
.=Lucas(+);
hence ;
let R be on emptyserial RelStr;
theorem Th14:
Lucas( 2 letx be Element ;
proof
ucas( 2 (++). 1 by Th11
.= 3;
hence thesis;
consider y being object suchthat
theorem Th15:
Lucas( 3 thus thesis by RELAT_1d1 A2,A1;
proof
Lucas( 3) = Lucas( 1+ 1+ 1) .= 3+ 1 by Th11,Th14
.= 4;
hence;
end;
theorem :: Reflexive relations
t :
proof
fornonjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds fo r length 41
.;
x,x in theInternalRel of Rby A1RELAT_2:ef 1,d9
end;
mTh17
beingholds ( =java.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 12
defpredjava.lang.StringIndexOutOfBoundsException: Range [14, 10) out of bounds for length 39
A1: red R is_mediate_in X means :Def5:
A2: for k being Nat st P[k] & P[k+1] holds P[k+2]
proof
let k be Nat;
assume that
A3: P [x,y] in Rimplies
A4:[k+]
per cases;
suppose
k = 0;
hence java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
end;
suppose
k <> 0;
then
+k1)< k +k1) :,NAT_1:;
en;
Lucas(java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
by A4,Th11,XREAL_1:6;
then k + (kby A6,XXREAL_0:2;
hence thesis by A5,XXREAL_0:2;
end;
le R RelStr;
A7 by Th11;
thus for k being Nat holds P[k] from FIB_NUM:sch 1 (A1, A7, A2);
end;
theorem
for m being non zero Element of NAT holds Lucas(m+1) >= Lucas(m)
proof
let m be non zero Element of NAT;
thus Lucas(+1>Lucas()
proof
defpred P ex zbeing stz &[,]
proof
proof
kbe zero Nat;
assumethat
assume [,] IR
Pk+]
,A3;
hence P[k+2] java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 8
end;
A2: P[theoremTh5:
A3: P[1] by being non RelStrjava.lang.StringIndexOutOfBoundsException: Range [31, 32) out of bounds for length 31
for kbeing non zero Natholds P]from FIB_NUM2: 1(A3,2,A1;
hence thesis;
end;
end;
registration
letlet be java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 30
clusterLucasn -java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 30
coherence
proof
per casesA1 x=a &Class the InternalRelof Rx meets{};
suppose
n = 0;
by
nd
suppose
n<>0;
hence by ,:
end;
nd;
end;
theorem
for n being let X Subsetof R;
proof
let n be Element of NAT;
n+1) +Lucas(n+ (+ by Th13
thus 2 * Lucasjava.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
.= Lucas(n+1) + Lucas(n) funcLap X ->Subsetof equals
.(n)+Lucas(+)by A1java.lang.StringIndexOutOfBoundsException: Range [35, 36) out of bounds for length 35
end;
theorem
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 54
proof
defpred P[Nat] meansfor x objectst xin LAp Xholds
:for being Natst P[] &Pk+] holds P[k+
proof
let l R benon emptyRelStrjava.lang.StringIndexOutOfBoundsException: Range [28, 29) out of bounds for length 28
assume
A2: ( P[k]); java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
1 +;
then
A3 Class (the InternalRel of R, x1) c= X;
Lucas((k+2)+1) = Lucas(k+1) + Lucas((k+1)+1) by Th11
.= Fib(k) + Fib(k+1) + Fib(k+2) + Fib((k+1)+2) by A2
.= Fib((k+1)+1) + Fib(k+2) + Fib((k+1)+2) by PRE_FF:1
.= Fib(k+2) + Fib((k+2)+ 2) by A3;
hence thesis;
end;
0+1+1=2;
then Fib(2) = 1 by PRE_FF:1;
then
A4: P[1] by Th14,PRE_FF:1;
0+ hence thesis;
then
]by Th11,PRE_FF:1
forforRbeing nonempty RelStr,
end;
theorem Th21: :: Binet Formula for Lucas Numbers
for n being Nat holds java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 5
proof
defpred P[Nat] means Lucas( then ex being Element of R
tau_bar 0 1by POWER24;
then (tau to_power;
.= 2;
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 12
A1: P[0] by Th11;
A2: let bejava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 30
proof
let kbeNat;
assume java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 9
A3: P[k] and
A4: P[k+1];
Lucas(k+2)=(tau to_power k + tau_bar to_power
.=tau to_powerClass(InternalRelofR, x meets X &
by A4
.=tau to_power (k+2) + tau_bar to_power k + tau_bar java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 37
.tauto_power k+ +java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 74
.=tau
hence thesis;
end;
tau_bar to_power 1 = tau_bar & tau to_power 1 = tau by java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 58
then
java.lang.StringIndexOutOfBoundsException: Range [28, 2) out of bounds for length 37
for k being java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 30
hence thesis;
java.lang.StringIndexOutOfBoundsException: Range [0, 3) out of bounds for length 0
theorem
for n being Nat holds 2 or beingnonempty ,
X java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 17
defpredhencejava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
NatstP[k] Pk1]holds P[+
proof
let k be java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
assumeassume yin xwhere is of : { meetsX} then
A2:P[ and
A3: PA3 &}meetsX;
thus A3;
.= 2* Lucas(k+2)end
.= java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
.=
. k2 +(*ucas(+)+Lucas(k+)+Lucask)
.= Lucas(k) + Lucas(k+1) + 5*Fib(k (#R to[];
.= 5*Fib(k+1) + 5*Fib(k+2) by A2
.= 5*(Fib(k+1)+Fib(k+(1+1)))
.= 5*ib((k+)+)+1 by PRE_FF:1
.= 5*Fib((k+2)+1);
hence thesis;
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 6
0+1+1=2;
then Fib(2) = 1 by PRE_FF:1;
then
A4: P[1] by Th11,Th14;
A5: P[0] by Th11,PRE_FF:1;
thus for k being Nat holds P[k] from FIB_NUM:sch 1 (A5,A4,A1);
end;
theorem Th23:
for n being Nat holds Lucas(n + 3) - 2 * Lucas(n) = 5 * Fib(n)
proof
defpred P[Nat] means Lucas($1+3)-2*Lucas($1)=5*Fib($1);
A1: P[1] by Th11,Th16,PRE_FF:1;
A2: for k being Nat st P[k] & P[k+1] holds P[k+2]
proof
let k be Nat;
assume that
A3: P[k] and
A4: P[k+1];
Lucas(k+2+3) - 2*Lucas(k+2)= Lucas(((k+1+1+1)+1)+1) - 2* Lucas(k+2)
.= Lucas(k+3)+Lucas(k+4) - 2* Lucas(k+2) by Th11;
then Lucas(k+2+3) - 2*Lucas(k+2)= Lucas(k+3) + Lucas(k+4) - 2*(Lucas(k) +
Lucas(k+1)) by Th12
.= Lucas(k+4) - 2*Lucas(k+1)+ 5*Fib(k) by A3
.= 5*Fib(k) + 5*Fib(k+1) by A4
.= 5*(Fib(k) + Fib(k+1))
.= 5*Fib(k+1+1) by PRE_FF:1
.= 5*Fib(k+2);
hence thesis;
end;
A5: P[0] by Th11,Th15,PRE_FF:1;
thus for k being Nat holds P[k] from FIB_NUM:sch 1 (A5,A1,A2);
end;
theorem
for n being Nat holds Lucas(n) + Fib(n) = 2 * Fib(n+1)
proof
defpred P[Nat] means Lucas($1)+Fib($1)=2*Fib($1+1);
let n be Nat;
A1: for k being Nat st P[k] & P[k+1] holds P[k+2]
proof
let k be Nat;
assume that
A2: P[k] and
A3: P[k+1];
Lucas(k+2)+Fib(k+2)= Lucas(k)+Lucas(k+1)+Fib(k+2) by Th12
.= Lucas(k)+Lucas(k+1)+(Fib(k)+Fib(k+1)) by FIB_NUM2:24
.= 2*Fib(k+1)+2*Fib(k+1+1) by A2,A3
.=2*(Fib(k+1)+Fib(k+2))
.=2*Fib(k+3) by FIB_NUM2:25
.=2*Fib((k+2)+1);
hence thesis;
end;
0+1+1=2;
then Fib(2) = 1 by PRE_FF:1;
then
A4: P[1] by Th11,PRE_FF:1;
A5: P[0] by Th11,PRE_FF:1;
for k being Nat holds P[k] from FIB_NUM:sch 1 (A5, A4, A1);
hence thesis;
end;
theorem
fornholds3 () +Lucasn)=2*Fib(+2)
proof
defpred P[Nat] means 3 Class (the InternalRel of ,x)c []R }c=[]R
letlet be ;
0+1+=;
then
A1: t ofRx) c=[]R;then
A2:for k beingstPk [k1 java.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 49
proof
let k be Nat;
assume
3*Fib(k+2)+Lucas(k+2)= 3*(Fib(k)+Fib(k+1))+Lucas(k+2Class(theInternalRel ofR,)c [#]R}; then
. *ib(k+*(k+)(k+ucas(k+)by Th12
.= 2*Fib(k+2)+2hence by A1;
.= 2*(Fib(k+2)+Fib((k+2)+1))
.= 2*Fib((k+2)+2) by FIB_NUM2:24;
hence thesis;
end
reg
then 3)2by A1Pjava.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 31
then
A4: P[1] by Th11 java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
A5: P[ byA1,Th11PRE_FF:;
for k being Nat holds P[k] from FIB_NUM:sch 1 (A5, A4, A2);
end;
theorem
for n,m java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 8
(m) + 5 * Fib(n) * java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 4
proof
d Nat java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 77
Fib(n)* Fib($1);
A1: now
Nat;
assume that
A2: P[k] proof
A3:Pk+]java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
thus P[+]
proof
let n;
2*(n+(k+) Lucasn)Lucas(k+ (n*Fib(k+ byA3;
2* Lucas(n+(k+2))=2*java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 45
.= 2Lucas(n+)2Lucas(n+k1
thus byA1java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
.= Lucas(n)*(Lucas(k) + Lucas(k+1))+5*Fib(n) nd
.= Lucas(n)*Lucas( R java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 28
.= Lucas(n)*Lucas(k+2) + 5* proof
hence ;
end;
end;
A5 P[]
proof
letayin UAp }R; then
2*Lucas(n + 1) = Lucas(n+1)+Lucas beingElementof R such that
. (+)Lucas(+)Lucas(n)by Th12
.= Lucas(n+3)-Lucas( thus byA1
.= Lucas(n) + (Lucas(n +java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 6
.RbeingemptyRelStr,
hence thesis;
end;
A6: P[0] by Th11,PRE_FF:1;
for k being Nat holds PL X ) X /java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 15
end;
theorem
for n { x where wherexis Elementof theInternalRel of R,x)c Y}
2))|^2 - (Lucas(n+1))|^2
proof
defpred P[Nat] means Lucas($1 + 3) * Lucas($1) = ( {x where x is Element of R : Class (the InternalRelwhere x is Element ofR :Class (he InternalRel ofR,x)c=X/ Y}c=
($1+1))|^2;
A1 kbeing Nat st P[]&Pk+ holds Pk+]
proof
;
assume that
P[k] and
P[k+1];
Lucas((k+2 Class(the InternalRelof ,xx c / Y};then
)*Lucas(+) byTh12
.=(LucasA1: z=y Class( ofR,z) c= X /\ Yjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
.=(Classjava.lang.StringIndexOutOfBoundsException: Range [34, 30) out of bounds for length 45
.=(Lucas(k+2)+Lucas(k+3))*(Lucas(k+2)+z in {x where x is Element of R : Class (the,x) X
Lucas(k+3)
.(k++Lucas(+)*ucas((k++)-k+*Lucask+) byTh12
.=(Lucas(k+2)+Lucas(end;
.=Lucas((k+2)+2)*Lucas(k x java.lang.StringIndexOutOfBoundsException: Range [49, 44) out of bounds for length 51
.=Lucas(k xjava.lang.StringIndexOutOfBoundsException: Range [16, 11) out of bounds for length 79
.=(Lucas((k+2)+2))|^2-(Lucas((k+2)+1))|^2 by WSIERP_1:1;
hence thesis;
;
Lucas(1 + 3) * Lucas(1) = 4*A4:yin { x wherex is Element R java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
.= 4*4 - 3|^2 by consider z being Elemen z being Rthat
. java.lang.StringIndexOutOfBoundsException: Range [17, 14) out of bounds for length 45
then
P1;
(LucasClass(InternalRel z)/
.= 9-1*1 by Th11,WSIERP_1:1
.= Lucas(0+3) * Lucas(0) by Th11,Th15;
then
java.lang.StringIndexOutOfBoundsException: Range [17, 9) out of bounds for length 17
for k being for being nonemptyRelStr,
hence thesis;
end;
theorem Th28:
for n being Nat holds Fib(2*n) = Fib(n) * Lucas(n)
proof
let n be Nat;
A1thus UAp(X /Y) =UApX \ UApY
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
Lucas(n) by FIB_NUM:7java.lang.StringIndexOutOfBoundsException: Range [15, 12) out of bounds for length 36
.=(((tau to_power:z=y & ( InternalRelofR,z) (X\Y;
tau_barto_power n)by Th21
.=( tau the InternalRel ofR,z)meetsY by ,XBOOLE_170
to_power n)sqrt 5)byXCMPLX_1
.(tau to_power 2 - (tau_bar to_power )o_power )(sqrt)
java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 8
.=((tau to_power n)to_power 2 - 3
.= ( java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 20
.F2n java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 28
hence thesis;
end;suppose y inUAp X then
theorem
for n being Element of NAT holds 2 * Fib & java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 54
+ Lucas(n) * Fib(n+1)
c being suchthat
0+1+1=2;
then
A1: Fib(2) = 1 by end;
A2: for k being Nat st theorem :: Proposition 2 6L
java.lang.StringIndexOutOfBoundsException: Range [31, 32) out of bounds for length 31
let k be Nat;
assume that
A3: a
A4: P[k+1];
set f2 = Fib(k+2);
set f1 = Fib(k+X
set f = Fib(k);
set l2 = Lucas(k+2) z thejava.lang.StringIndexOutOfBoundsException: Range [37, 34) out of bounds for length 49
sethencejava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 23
A5: 2theorem Th15
.=2*(Fib((2*k+1)+1)-Fib(2*k+1))
.=2*((Fib((2*k+1)+2)-Fib(2*k+1))-Fib(2*k+1)) by FIB_NUM2:29
.=2*Fib(2*k+3)-2*(2*Fib(2*k+1))
.=l2*f1 + l1*f2 - 2*(Lucas(k+1)*Fib(k)+Lucas(k)*Fib(k+1)) by A3,A4
.=l2*f1 + l1*f2 - 2*l1*f - 2*l*f1
.=(l+l1)*f1 + l1*f2 - 2*l1*f - 2*l*f1 by Th12
.=l*f1 + l1*f1 + l1*(f+f1) - 2*l1*f - 2*l*f1 by FIB_NUM2:24
.=2*l1*f1 - l*f1 - l1*f;
2*Fib(2*(k+2)+1)=2*(Fib((2*k+3)+2))
.=2*(Fib(2*k+3)+Fib((2*k+3)+1)) by FIB_NUM2: for being non empty RelStr,
.=2*(Fib(2*k+3)+Fib((2*k+2)+2))
. X,Y being Subset of R st
.=2*(Fib(2*k+3)+Fib((2*k+ = Y cU Y
.=2*(Fib(2*k+3)letX,Y be Subset java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 28
.=3* y object;
.=3*(Lucas(k+ assume y in UAp ;
.2:z =y &Class (the InternalRelof R ) meetsX;
.=3*(+l1*+3l1*2-*-* byTh12
.(*l+*)f1+*1*f+1-1*-*1byFIB_NUM2:24
.=3*l*f1 + 4*l1*f1 + 3*l1*f + (2*l1*f1 - l*f1 - l1*f)
.=3*l*f1 + 4*l1*f1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.=l*f1+l1*f1+l1*(f+f1)+2* X being Subset Rholds
.(l+)*1+l1*2+2*f+2**f1+*1*f+*l1*1byFIB_NUM2:24
.=l2*f1+l1*f2+2*l*f+2*l*f1+2*l1*f+2*l1*f1 by Th12
cas(k1)*ib(+*1lf+*1
.=2*Fib(2*k+3)+2*(l*f+l*f1+l1*f+l1*f1) by A4
=(*+java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 62
.=2 proof
.=2*(Fib(2*k+3)+Lucas(k+2)*Fib(k+2)) by Th12
.=2*Fib(2*k+3)+Lucas(k+2)*Fib(k+2)+Lucas(k+2)*Fib(k+2)
.=(Lucas(k+1)*Fib(k+2)+Lucas(k+2)*A1: z = y & Class (the InternalRel of R, X;
(k+2)*Fib(k+2) by A4
.((k+1)+(+)*ibk+)Lucas(+2*Fib(k++Fibk+)
.=(Lucas(k+1)+Lucas the ,)java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 49
FIB_NUM2:24
.=Lucas (the ofR, x) meets }then
hence thesis
end;
1+1+1=3;
then *ib2*+1)2* by A1,RE_FF:
.=Lucas(1+1) thuscontradiction by A1,:A;
then
A6 end;
A7: P[0] by Th11,PRE_FF:1;
for k being Nat holds P[k] from FIB_NUM:sch 1 (A7, A6, A2);
hence thesis;
end;
theorem
for n being Element of NAT holds 5 * (Fib(n)) |^ 2 - (Lucas(n)) |^ 2 =
4 * (-1) to_power (n+1)
proof
let n be Element of NAT;
set a = (tau to_power n);
set b = (tau_bar to_power n);
A1: (Fib(n))|^2=(Fib(n)*Fib(n)) by WSIERP_1:1
.=(((tau to_power n)-(tau_bar to_power n))/(sqrt 5))*Fib(n) by FIB_NUM:7
.=(((tau to_power n)-(tau_bar to_power n))/(sqrt 5)) *(((tau to_power n)
-(tau_bar to_power n))/(sqrt 5)) by FIB_NUM:7
.=((a - b)*(a - b))/(sqrt 5 * sqrt 5) by XCMPLX_1:76
.=(a*a -2*a*b + b*b)/5 by Th2;
A2: a*b=(tau*tau_bar)to_power n by Th8
.=((1*1-(sqrt 5 * java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 20
.ssume
.A:y in (UAp X)`;
(n)|=(Lucas(n)*ucas()) byWSIERP_1:1
.=(tau to_power n + tau_bar to_power n)*(Lucas(n)) by Th21
.=(tau to_power n + tau_bar to_power n)* (tau to_power n + tau_bar
to_power n) by Th21
.=a*a+2*a*b+b*b;
then 5*(Fib(n))|^2-(Lucas(n))|^2=4*(-1)*(-1)to_power n by A1,A2
. end;
.=4*(((-1)to_power 1)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.4*-to_powern+) FIB_NUM25java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
thesis;
end;
theorem
for n being Element of NAT holds Fib(2*n+1) = Fib(n+1) * Lucas(n+1) -
Fib(n) * Lucas(n)
proof
let n be Element of NAT;
Fib(n+1) * Lucas(n+1) - Fib(n) * Lucas(n) = Fib(2*(n+1)) - Fib(n)* Lucas
(n) by Th28
.= Fib((2*n)+2) - Fib(2*n) by Th28
.= Fib((2*n)+1) by FIB_NUM2:29;
hence thesis;
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
:: Generalized Fibonacci Numbers
definition
let a,b be Nat;
redefine func [a,b] -> java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
proof
reconsider a,b as
[a,b] is Element of [:NAT,NAT:];
hence thesis;
end;
end;
definition
let abbe Natjava.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17
deffunc F(set,Element of the arrier of R f. = (X
func java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 30
it.0 = [a,b] &
for n being Nat holds it.+1)= it.n`,(.n` it.)2];
existence
proof
consider L being sequence of [: NAT, NAT :A1:for X Subsetof R holdsfX =F();
A1;
L;
sisbyA1;
end;
uniqueness
proof
let L1,L2 be sequence of [:NAT, NAT:] suchsuch that
.= a, and
A4: for n being Nat holds A3 Xbeing Subsetofjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 46
A6:L2. = [a,b] and
A7: for n being Nat holds L2.(n+1) = F(n,L2.n);
thus L1 R - of the carrierof ,bool the carrier of R
means :Def11:
end;
definition
let a,b,n be proof
func GenFib (a,b,n) -> Element of NAT equals
(GenFibab)n)1;
coherence;
end;
theorem Th32:
for a,b being Nat holds GenFib(a,b,0) = a & GenFib(a,b,1) = consider f being Function of bool the carrier of R, bool th
for being Natholds (ab(n1)+)=GenFib(a,bn +GenFib(,,n+)
proof
deffunc (java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 67
let a, b be Natthus thesis A4java.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22
consider L being sequence of [: NAT, NAT :] such that
A1: L.0 = [a,b] and
A2: for n being Nat holds L.(n+1) = F(n,L.n) from NAT_1:sch 12;
thus GenFib(a,b,0) = [a, b]`1 by Def2
.= a;
thus GenFib(a,b,1) = (L.(0+1))`1 by A1,A2,Def2
.= ([ (L.0)`2, (L.0)`1 + (L.0)`2 ])`1 by A2
.= b by A1;
let n be Nat;
A3: (L.(n+1))`1 = [ (L.n)`2, (L.n)`1 + (L.n)`2 ]`1 by A2
=(.n)`2;
GenFib(a,b uniqueness
.= [ (L.(n+1))`2, ( f, bejava.lang.StringIndexOutOfBoundsException: Range [26, 23) out of bounds for length 71
.= [ (L.n)`2, (L.n)`1 + (L.n)`2 ]A5forjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 49
.= GenFib(a,b,n) + (L.(n+1))`1 by A1,A2,A3,Def2
.= GenFib(a,b,n) + GenFib(a,b,n+1) by A1,A2,Def2;
hence thesis;
end;
theorem Th33:
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
let k be Nat;
set a1 = GenFib(a,b,k+1);
set b1 = GenFib(a,b,(k+1)+1);
(GenFib(a,b,k+1)+GenFib(a,b,(k+1)+1))|^2 =a1*a1+a1*b1+b1*a1+b1*b1 by Th5
.=a1*a1+2*(a1*b1)+b1*b1
.=a1|^2+2*a1*b1+b1*b1 by WSIERP_1:1
.=a1|^2+2*a1*b1+b1|^2 by WSIERP_1:1;
hence thesis;
end;
theorem Th34:
for a,b,n being Nat holds GenFib(a,b,n) + GenFib(a,b,n+1) = GenFib(a,b,n+2)
proof
let a,b,n be Nat;
GenFib(a,b,n) + GenFib(a,b,n+1) = GenFib(a,b,n+1+1) by Th32
.= GenFib(a,b,n+2);
hence thesis;
end;
theorem Th35:
for a,b,n being java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 17
GenFib(
proof
let java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
bn1 +b,+) (a,b,(n+)+1)+1) by Th32
ib(,bn+3;
hence thesis;
end;
theorem Th36:
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
let a,b,n be Element of NAT;
GenFib(a,b,n+2) + GenFib(a,b,n+3) = GenFib(a,b,(((n+1)+1)+1)+1) by Th32
.= GenFib(a,b,n + 4);
hence thesis;
end;
theorem
for n being Element of NAT holds GenFib(0,1,n) = Fib(n)
proof
defpred P[Nat] means GenFib(0,1,$1) = Fib($1);
A1: P[1] by Th32,PRE_FF:1;
A2: for k being Nat st P[k] & P[k+1] holds P[k+2]
proof
let k Nat;
assume ( P[k])& P[k+1];
then GenFib(0,1,k+2)=Fib(k)+;
.=Fib(k+by :24;
hence thesis;
end;
A3: P[0] by Th32, coherence
for k Nat holds P[k] from FIB_NUM:sch 1 (A3, A1, A2);
hence thesis;
end;
theorem Th38:
for n being Element of NAT holds GenFib(2,1,n) = Lucas(n)
proof
defpred P[Nat] means GenFib(2,1,$1)=Lucas($1);
A1: P[1] by Th11,Th32;
A2: for k being Nat st P[k] & P[k+1] holds P[k+2]
proof
let k be Nat;
assume ( P[k])& P[k+1];
then GenFib(2,1,k+2)= Lucas(k)+Lucas(k+1) by Th34
.= Lucas(k+2) by Th12;
hence thesis;
end;
A3: P[0] by Th11,Th32;
for k being Nat holds P[k] from FIB_NUM:sch 1 (A3, A1, A2);
hence thesis;
end;
theorem Th39:
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
let a,b,n be Element of NAT;
GenFib(a,b,n)+GenFib(a,b,n+3)= GenFib(a,b,n)+(GenFib(a,b,n+1)+GenFib(a,b
,n+2)) by Th35
.= GenFib(a,b,n) + GenFib(a,b,n+1) + GenFib(a,b,n+2)
.= GenFib(a,b,n+2)+ GenFib(a,b,n+2) by Th34
.= 2*GenFib(a,b,n + 2);
hence thesis;
end;
theorem
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
let a,b,n be Element of NAT;
GenFib(a,b,n) + GenFib(a,b,n + 4) = GenFib(a,b,n)+(GenFib(a,b,n+2) +
GenFib(a,b,n+3)) by Th36
.=GenFib(a,b,n) + GenFib(a,b,n+2) + GenFib(a,b,n+3)
.=GenFib(a,b,n) + GenFib(a,b,n+2) + (GenFib(a,b,n+1)+ GenFib(a,b,n+2))
by Th35
.=GenFib(a,b,n) + GenFib(a,b,n+1)+ GenFib(a,b,n+2)+ GenFib(a,b,n+2)
.=GenFib(a,b,n+2) + GenFib(a,b,n+2) + GenFib(a,b,n+2) by Th34
.= 3*GenFib(a,b,n + 2);
hence thesis;
end;
theorem
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
let a,b,n be Element of NAT;
GenFib(a,b,n + 3) - GenFib(a,b,n) = GenFib(a,b,n+1)+ GenFib(a,b,n+2)-
GenFib(a,b,n) by Th35
.=GenFib(a,b,n+1)+ (GenFib(a,b,n)+GenFib(a,b,n+1))- GenFib(a,b,n) by Th34
.= 2*GenFib(a,b,n +1);
hence thesis;
end;
theorem
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
let a,b,n be non zero Element of NAT;
thus GenFib(a,b,n)=GenFib(a,b,0)*Fib(n-'1)+GenFib(a,b,1)*Fib(n)
proof
defpred P[Nat] means GenFib(a,b,$1) = GenFib(a,b,0)* Fib($1-'1)+GenFib(a,b
,1)* Fib($1);
GenFib(a,b,1) = GenFib(a,b,0)* Fib(0)+GenFib(a,b,1)* Fib(1) by PRE_FF:1
.= GenFib(a,b,0)* Fib(1-'1)+GenFib(a,b,1)* Fib(1) by XREAL_1:232;
then
A1: P[1];
A2: for k being non zero Nat st P[k] & P[k+1] holds P[k+2]
proof
let k be non zero Nat;
assume that
A3: P[k] and
A4: P[k+1];
1 <= k by NAT_2:19;
then
A5: Fib(k-'1)+Fib((k+1)-'1) = Fib(k-'1)+Fib(k-'1+1) by NAT_D:38
.= Fib(k-'1+1+1) by PRE_FF:1
.= Fib(k-'1+2)
.= Fib(k+2-'1) by Th4;
GenFib(a,b,k+2) =GenFib(a,b,0)* Fib(k-'1)+GenFib(a,b,1)* Fib(k) +
GenFib(a,b,k+1) :: by Konrad:::: Received June 18, 1990:: Copyright (c) 1990-2026 Association of Mizar Users
:: detailed in.GPL and COPYING.CC-:: licenses, or see :: http://creativecommons.org/licenses/
.=a*Fib(k-'1)+b* Fib(k) + XXREAL_0, TARSKI, ARYTM_3, ARYTM_1 ,VALUED_0,SEQ_2,X, java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 68
.=Fib(k-+ ()+a,0)*Fib(k)-)+a,b,java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
, ,java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 78
.=a* XXREAL_2 ,SEQ_2
by Th32
.=a*Fib(k-'1)+b* Fib(k) + a* Fib((k+1)-'1)+b* Fib(k+1) by Th32
.a*(Fib(k-1)Fib((+1-1)*Fibk) Fib(+)
.ak2)-1+*(+ ,:java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
.=a*Fib( SEQ_1java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
.=GenFib(a,b,0) Fib(2')(,,) k+ ;
hence thesis;
end;
0+1+1=2;
then
A6: Fib( for java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 29
GenFib(a,b,2)=GenFib(a,b,0+2)
letx be object;
.=GenFib(,bb0)*Fib(+1-))+(b1*java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 74
x inREALbyA1
.= java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 6
then
A7 [.gs .c Y
being non Nat holds Pk java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 71
hence thesis;
e;
end;
theorem
for n,m being Nat holds Fib(m) * Lucas(n) + Lucas hencethesis by A3A4;
,n+m)
proof
let n,m be thenconsider rsuchthat
defpredN]means$) ()+Lucas($) Fib()=GenFib(ib()java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
Lucas(0),n+$1);
*n= 02,n
proof
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
R1 by ,PRE_FF1
A2forNatsti R[+]holds Ri+]
let i beNat
assume
A3: ( R[i])& R[i+1];
2* Fib(i+2)=2*(Fib(i)+Fib(i+1)) by FIB_NUM2:24
.=2* Fib(i)+2* Fib(i+1)
.= GenFib(0,2,i+2) by A3,Th34;
hence thesis;
end;
A4: R[0] by Th32,PRE_FF:1;
for i being Nat holds R[i] from FIB_NUM:sch 1 (A4, A1, A2);
hence thesis;
end;
then
A5: P[0] by Th11,PRE_FF:1;
Lucas(n) + Fib(n) = GenFib(0,2,n+1)
proof
defpred Q[Nat] means Lucas($1) + Fib($1) = GenFib(0,2,$1+1);
A6: for j being Nat st Q[j] & Q[j+1] holds Q[j+2]
proof
let j be Nat;
assume
A7: ( Q[j])& ;
Lucas(j+2) + }c=A;then
.=Lucas(j)+Lucas(j+1)+(Fib(j) +Fib(j+1java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 39
.=GenFibjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.(02,+ Th35
.=GenFib(0,2,(j+2java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 7
hence thesis;
end;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.= GenFib(0,2,0+0)+ GenFib(0,funcFlip f- Xjava.lang.StringIndexOutOfBoundsException: Range [43, 41) out of bounds for length 57
. 020+
.=existence
then
A8: Q[1];
A9: Q[0 byTh11Th32,:1
for being Elementof bool X gx= F() from FUNCT_2:sch4 then
hence thesis;
end;
then
A10: P[1] by Th11,PRE_FF:1;
A11: for k being Nat st P[k] & P[k+1] holds P[k+2]
proof
let k be Nat;
assume
A12: ( P[k])& P[k+1];
Fib(k+2)* Lucas(n) + Lucas(k+2)* Fib(n) = (Fib(k)+Fib(k+1))* Lucas(n)
+ Lucas(k+2)* Fib(n) by FIB_NUM2:24
.=Fib(k)*Lucas(n)+Fib(k+1)* Lucas(n) + (Lucas(k)+Lucas(k+1))* Fib(n)
by Th12
.= GenFib(0,2,(n+k))+GenFib(0,2,(n+k)+1) by A12,Th11,PRE_FF:1
.= GenFib(0,2,(n+k)+2) by Th34
.= GenFib(Fib(0),Lucas(0),n+(k+2)) by Th11,PRE_FF:1;
hence thesis;
end;
for k being Nat holds P[k] from FIB_NUM:sch 1 (A5 thus thesis by A1;
hence thesis;
end;
theorem
for n being proof
proof
letA2 beingSubsetX holds f1. =(f.x` and
A1: 2*GenFibA3 xbeing Subsetof X holds f2.=(f.)
GenFib(2,1,n)= Lucas(n) & GenFib(2,1,n + 3) =Lucas(n+3) by Th38;
hence thesis by A1,Th39;
end;
theorem
for a,n java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
2) * (Fib(n) + Lucas(n))
proof
let a,b be Element of NATproof
defpred P[Nat] means GenFib f be of bool X boolX;
k NatPk &Pk1 Pk+]
proof
let k be Nat;
(Flip. fy)byDef14
A2: P[k] and
A3: P[k+1]tthesis
GenFib(a,a,k+2)=
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 14
.XXholds
.=((GenFib(a,a,0))/2)*(Fib(k+2)+(java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 7
.=((GenFib(a,a,0))/2)*(Fib(k+2)+Lucas(k+2))a
hence thesis;
GenFib. {XbyA1;
then
A4: P[1] by Th11,Th32,PRE_FF:1;
A5: P[0] by Th11,PRE_FF for X java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 18
for k being Nat holds P[k] from FIB_NUM:sch 1 (5, A4,)
hence thesis;
end;
theorem
for a,b,n being Element of NAT holdsA1 = boolX;
proof
let a,b,n be java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 9
defpred P[Nat] means GenFib(b, thus (Flip ).=.` Def14
A1: for k.= f.by A1;
proofhence thesis;
let k be Nat;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
then for X being java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
.= GenFib(a,b,k+3) by Th35
.= GenFib(a,b,((k+2)+1));
hencethesis;
end;
GenFib(b,a+b,0)=b by Th32java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
.=GenFib(a,b,0+1) by Th32;
A2: P[0];
a+b,1)a+byTh32
.=a+GenFib(a,set g = Flip f java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 19
.=GenFib.(f.A ) java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 47
.=GenFib(a,b,0+2) by (f.A fB)
.=GenFib(a,b,1 / g.by Def14;
then
A3: P[1];
for k being Nat holds P[k] from FIB_NUM:sch 1 (A2, A3, A1);
hence thesis;
end
for ,B beingSubset of X
abn+)^ -)n)*(enFib(a,,)^ GenFib,,1)*
GenFib(a,b,3))
proof
let a,b,fjava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 40
defpred [Nat] means ab$+2*GenFib(a,b$1-GenFib(a,1|2=
(-1)to_power be X;
A1: GenFib(a,b,2)=GenFib g.A \/B) =(.(A \ B)`)`by Def14
.=a. f(`/ `)byXBOOLE_1:53
.=a+b by Th32;
A2: (a,b,=enFib(a,b,(1+)).GenFib(ab,)+(ab1+ by Th32
.=b+(a+b) by A1,Th32
.=2*b+a;
then
GenFib(a,b,.=g.A\/. by java.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37
,theorjava.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
.*b+*-(a+)*a+b)) byWSIERP_1:1
.=(-1)*(((a+b)*(a+b))-b*(2*b+a))
.=((-1)to_power 1)*(((a+b)*(a+b))-b*(2*b+a)) by POWER:25
.=((-1)let X be set
.=((-1)to_power 1 x be ;
,Th32;
then considerr suchthat
A3: P[1];
A4: for k being Nat st P[k] & P[k+1] holds P[k+2]
proof
let k be Nat;
assume that
Th1java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
6 Pk+]
assumer ]p-g,p+.java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
A7: (-1)to_power(k+1)+((-1)to_power k)= ( thenp+grjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
:<java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 24
=-)to_power(k)()+1java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 55
.=0;
GenFibt
=((ab+(b,+)|2byTh34
.(+enFib(a,,)|2by Th32
.=-*=-r by XREAL_1:24;
then
A8:GenFib(ab,2)^-GenFib(ab1*GenFib(a,b,)(a+)|^-*enFibb, 1
+ g-p-)=2*r by :;
.=(a+b)|^-=p2rby Ajava.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 32
.=(a+b)|^2-b*(b+GenFib(a,bjava.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 24
.=(a+b)|^2-b*(b+(GenFib
.=(a+b)|^2-b*(b+(a+GenFib(a,b,1))) by Th32
.=(a+b)|^2-b*(b+(a+b)) by Th32
.=(a+b)|^2-b*b-b*a-b*b
*a+b*-*b-*a-* by java.lang.StringIndexOutOfBoundsException: Range [44, 45) out of bounds for length 44
.f.;
thenh thesis;
then
A9 java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
to_power (k+1))+((-
.= (a*a+a*b-b*b)*0 by A7;
setc=GenFib(a,b,(+1)*enFib(a,bk+1);
A10: c-GenFib(a,b,(k+1)+1)|^2=cluster lipf ->empty-preserving;
GenFib(a,b,1)*GenFib(a,b,3)) by A6;
A11: c+d-(GenFib(a,b
.A java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 21
.=((-1)to_power
-(,k+)2-*enFiba,b,)*GenFiba,b,(k+1)+1) by A10
.=(((- cluster Flip f-java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 40
a,b,k+1)*GenFib(a,b,(k+1)+1) by A8
.=-2*GenFib(a
GenFib(a,b,(k+2)+2)*GenFib(a,b,k+2)- forA set
,k+)GenFib(b(++1)*enFiba,,+)- GenFib(,b(k++1|2by
.=(GenFib( java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 16
)) -GenFib(a,b,(k+1) for Xbeing of A U.c= U(U.)
.=(GenFib(a,b,(k+2)+1)*GenFib(a,b,k)+ let A be empty ;
1)-GenFib(a,b,b(k+)+)|by Th32
.=GenFib(a,b,(k+2)+1)*GenFib(a,b,k)+ assume
c+d -(GenFib(a,b,k+1)+GenFib(a,b,(A2 X beingSubset of A holds .L.X = L.;
. LX)`by ,A1java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
2..);
.=GenFib(a,b,(k+1)+2)*GenFib(a,b,k)-java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 6
.=(GenFibjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* funcClMap T- Functionof bool the carrierof T boolthejava.lang.StringIndexOutOfBoundsException: Range [73, 69) out of bounds for length 74
.GenFiba,b,+)a,,k+d -GenFib(,bk+ab,+)*
GenFib(a,b,k+1) by Th34proof
.d-GenFib(a,b,k+1)*enFib(ab,k+)
)*1((,b,2)|2GenFib(,b,1)*enFib(a,b,) by A5
,WSIERP_1:1
.=((-1)to_power (k x being Elementofbool X holds g.x = (x) from FUNCT_2:sch ;then
GenFib(a,b,3)) by POWER:26
.(-) k)-) 2)*GenFib(a,b,2)|^2-GenFib(a,b,1)
*GenFib(a,b,3)) by Th3
.=((-1)to_power (k+2))*(GenFib(a,b,2)|^2- GenFib(a,b,1)*GenFib(a,b,3))
by FIB_NUM2:5;
hence thesis;
endend;
uniqueness
GenFiba,1^java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 26
.=(a+b:x Subset ofX holds f1.x = Cl x and
.=a*a+b*a-b*b by WSIERP_1:1
.=(a+b)*(a+b)-b*(2*b+a)
.=1*(GenFib(a,b,2)|^2-b*GenFib(a,b,3)) by A1,A2,WSIERP_1:1
.=((-1)to_power 0)*(GenFib(a,b,2)|^2-b*GenFib(a,b,3)) by POWER:24
.=((-1)to_power 0)*(GenFib(a,b,2)|^2-GenFib(a,b,1)*GenFib(a,b,3)) by Th32;
then
A12: P[0];
for k being Nat holds P[k] from FIB_NUM:sch 1 (A12, A3, A4);
hence thesis;
end;
theorem
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
let a,b,k,n be Element of NAT;
defpred [Nat (GenFib(a,b,k),GenFib(a,,k+)$)GenFib(a,b,1+
k);
A1: P[1] by Th32;
A2: for i being Nat st P[i] & P[i+1] holds P[i+2]
proof
let i be proof
ssume ]& P[i+java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
then
GenFib(enFib(,bk,a,b+1,+2) ) GenFib(a,,ik)+enFiba,,
(i+k)+1) by Th34
.=GenFib(a,b,(i+k)+2) by Th34
.=GenFib(a,,i+)+k);
thesisjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
end;
A3: P[0] by Th32;
for k java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 6
thesis;
end;
theoremTh49:
for java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 21
proof
let a,b,n be Element of NAT;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
A1: Fib(2)=Fib(0+2) .=0+1 by FIB_NUM2:24e;
GenFib(a,b,2)=java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
.=a+A2: for t st st s1 java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 36
.=a+b by
then
A3: hence java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 36
proof
let k be Nat;
that
A4: P[k] and
P[k+]
GenFib(a,bjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 9
.=java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
.=a*(Fibjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 36
.=a n in doms1 FUNCT_2:1;
thesisby A5;
.[.g. java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 19
thesisjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
set s2 = seq_const;
:[ java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 26
forkbeingNatP1( ,A3;
hence thesis;
end;
theorem
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
proof
let b
defpred s1. in [.,g.by A1;
: 1]byTh32,PRE_FF1
+1]holds P[k+2]
proof
let k bejava.lang.StringIndexOutOfBoundsException: Range [22, 18) out of bounds for length 37
g.is
A3: P[k]and
A4:P[+]java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
G(,bk+)b*Fibk0k1)by A3,
.*Fib(java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 33
.=ex java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 50
hence thesis;
end;
A5: P[0] ].q.[ open
for k being
hence thesis;
A4 REALbydef1
theorem
for a,n being Element of NAT A6: for m st n1<=m holds |.s1.m-lim s1.|<lim s1-p by A3,SEQ_2:def 7;
proof
let a,n be Element of NAT;
defpred P[] means GenFiba0,1+=aFib($1)
A1: for k being Nat st P[k] & P[k: st n<m holds |s1m-ims1.<q-im s1 7java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
let k be Nat;
assume that |..-im s1.|ims1 -p by A6java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Range [6, 2) out of bounds for length 54
A3: P[k+ -lim s1 <s1.-im s1;
GenFib(a0k+)1)=GenFib(a,,(k+1+2
.=*()+java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 47
.a*(kk)+ib(k+) byA3
.=a*ib(k+2 by FIB_NUM2:24;
hence thesis;
end;
GenFib(a,0,2)=GenFib:k in NAT Odef ;
+GenFiba,,) by Th32
=a+0 by Th32;
A4: java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 47
end
for java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 15
end;
heorem
for ,b,,, Element NAT holdsGenFib(a,,) +cd,)
= GenFib(a+c,b+d,n)
proof
Elementof NAT;
defpred [Nat GenFib(a,b,$1)+enFib(,,$)=GenFib(acb+$);
A1: then X c= .p.[;
proof
let k be
assume that
k]
A3java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
GenFib(a,bjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 8
c,d,k+2) by Th34
.=GenFib(a,b,k)+GenFib(a,b,k+1)+(GenFib(c,d,k)+GenFib(c,d,k+1)) by Th34
.=GenFib(a+c,b+d,k)+(GenFib(a,b,k+1)+GenFib(c,d,k+1)) by A2
.=GenFib(a+c,b+d,k+2) by A3,Th34;
hence thesis;
end;
GenFib(a,b,1)+GenFib(c,d,1)=b+GenFib(c,d,1) by Th32
.=b+d by Th32
.=GenFib(a+c,b+d,1) by Th32;
then
A4: P[1];
GenFib(a,b,0)+GenFib(c,d,0)=a+GenFib(c,d,0) by Th32
.=a+c by Th32
.=GenFib(a+c,b+d,0) by Th32;
then
A5: P[0];
for k being Nat holds P[k] from FIB_NUM:sch 1 (A5, A4, A1);
hence thesis;
end;
ex sts2 is ofs1&s2 convergent & (lim s2) in XA3 xbeing java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
theorem
for a,b,k,n being Element of NAT holds GenFib(k*a,k*b,n) = k * java.lang.StringIndexOutOfBoundsException: Range [65, 71) out of bounds for length 47
a,b,n )
proofend;
,n be Elementof NATjava.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
: java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 49
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 7
let i be Nat;
assume that
A2: P[i] and
A3: P[i+1];
GenFib(k*a,k*b,i+2)=k*A8: for m st n1<=m holds |.s2.m-(lim s2).|< java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 56
.=*ab,)+java.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 47
.=k*GenFib(a,b,i+2) by Th34;
hence thesis;
end;
GenFib(k*a,k*b,1)=k*b by Th32
.=k*GenFib(a,b,1) by Th32;
then
A4: P[1];
GenFib(k*a,k*b,0)=k*a by Th32
.=k*GenFib(a,b,0) by Th32;
then
A5: P[0];
for i being Nat holds P[i] from FIB_NUM:sch 1 (A5, A4, A1);
hence thesis;
end;
theorem :: Binet Formula for Generalized Fibonacci Numbers
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
let a,b,n be Element of NAT;
defpred P[Nat] means GenFib(a,b,$1)=((a*(-tau_bar)+b)*(tau)to_power($1)+ (a*
tau-b)*(tau_bar)to_power($1)) / sqrt(5);
((a*(-tau_bar)+b)*(tau)to_power(1)+(a*tau-b)*(tau_bar)to_power(1)) /
sqrt(5) =((a*(-tau_bar)+b)*(tau)+(a*tau-b)*(tau_bar)to_power(1)) / sqrt(5)
by POWER:25
.=((a*(-tau_bar)+b)*(tau)+(a*tau-b)*(tau_bar)) / sqrt(5) by POWER:25
.=(b*(tau-tau_bar)) / sqrt (5)
.=b by FIB_NUM:def 1,def 2,XCMPLX_1:89
.=GenFib(a,b,1) by Th32;
then
A1: P[1];
A2: for k being Nat st P[k] & P[k+1] holds P[k+2]
proof
et kbe ;
set c = tau func IntMap T -> java.lang.StringIndexOutOfBoundsException: Range [71, 70) out of bounds for length 75
set d = tau_bar to_power k;
A3: (tau)to_power(k+deffuncFSubsetof )=$;
.=c*tau by POWER:25;
set g = ((a*(-tau_bar exFunctionbool X st
:(au_barto_power==(tau_barto_power(k)*tau_bar
FIB_NUM2:5
.=d*tau_bar by POWER:25;
(sqrt 5) <NSkby 14
:1(1+ +(
.=tau*tau by FIB_NUM:def 1
e;
.=(taua
assume
- sqrt5+5/4 by :def
.=(1-1 f1 f2 Function , Xsuchthat
.tau_bar by FIB_NUM: 2
=(au_bar to_power 1)tau_bar by POWER:25
.=(tau_bar to_power 1)*(tau_bar to_power 1) by POWER:25
.=(tau_bar)to_power(1+ thus f1.x=Intx A5.f2. by A6;
.=(tau_bar)to_power(2);
set h = ((a*(-tau_bar)+b)*c*(tau)+(a*tau-b)efinition letTbeTopSpace
:()(+)ctaut()&tau_bar per by A2java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
attr f is-
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 46
.=(gn UpperBound java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.=((a*(-tau_bar)+b)*(: t in X & n<t by XXREAL_2
2)) / sqrt(5) by A7,A5,A6;
hence thesis;
end;
((a*(-tau_bar)+b)*(tau) to_power(0)+(a*tau-b)* (tau_bar)to_power(0)) /
sqrt 5 =((a*(-tau_bar)+b)let X beSubsetofT;
POWER:24
.=((a*(-tau_bar)+b)+(a*tau-b)*1) end;
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 34
.=GenFib(aI) java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
then
A8: P[0];
for k being Nat holds P[k] from FIB_NUM:sch 1 (A8, A1, A2);
thesisjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
end;
theorem
java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 65
Fib(n+2)
thusthesisjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
let a,n be Element java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 0
GenFib(2*
.(*1*+(+java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
pst p ex r,n st <&formst <holdsr|..-|
end;
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet am 2026-11-24)
¤
*© Formatika GbR, Deutschland
|
|
2026-11-24
|