Skip to content

Commit 3ada9d2

Browse files
committed
feat(Analysis/SpecificLimits/Fibonacci): prove that the ratio of consecutive Fibonacci numbers tends to the golden ratio
1 parent 6b0379c commit 3ada9d2

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,6 +1997,7 @@ import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series
19971997
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Sinc
19981998
import Mathlib.Analysis.SpecificLimits.ArithmeticGeometric
19991999
import Mathlib.Analysis.SpecificLimits.Basic
2000+
import Mathlib.Analysis.SpecificLimits.Fibonacci
20002001
import Mathlib.Analysis.SpecificLimits.FloorPow
20012002
import Mathlib.Analysis.SpecificLimits.Normed
20022003
import Mathlib.Analysis.SpecificLimits.RCLike
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/-
2+
Copyright (c) 2025 Snir Broshi. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Snir Broshi
5+
-/
6+
import Mathlib.Analysis.SpecificLimits.Normed
7+
import Mathlib.Data.Real.GoldenRatio
8+
9+
10+
open goldenRatio
11+
12+
/-- The limit of dividing consecutive Fibonacci numbers is the golden ratio. -/
13+
theorem tendsto_fib_succ_div_fib_atTop :
14+
Filter.Tendsto (fun n ↦ (Nat.fib (n + 1) / Nat.fib n : ℝ)) Filter.atTop <| nhds φ := by
15+
have h n (hn : n ≥ 1) : (Nat.fib n : ℝ)⁻¹ * ψ ^ n + φ = Nat.fib (n + 1) / Nat.fib n := by
16+
rw [← Real.fib_succ_sub_goldenRatio_mul_fib, mul_sub]
17+
nth_rw 2 [mul_comm]
18+
rw [mul_assoc, Field.mul_inv_cancel, mul_one, sub_add_cancel, inv_mul_eq_div]
19+
simp [Nat.fib_eq_zero]
20+
bound
21+
refine Filter.Tendsto.congr' (Filter.eventually_atTop.mpr ⟨_, h⟩) ?_
22+
have : ∀ᶠ n in Filter.atTop, |(Nat.fib n : ℝ)⁻¹| ≤ 1 :=
23+
Filter.Eventually.of_forall fun n ↦ by simp [Nat.cast_inv_le_one]
24+
convert Filter.Tendsto.add_const _ <| bdd_le_mul_tendsto_zero' _ this <|
25+
tendsto_pow_atTop_nhds_zero_of_abs_lt_one <|
26+
abs_lt.mpr ⟨Real.neg_one_lt_goldenConj, by linarith [Real.goldenConj_neg]⟩
27+
simp
28+
29+
/-- The limit of dividing consecutive Fibonacci numbers in reverse order
30+
is the negative conjugate of the golden ratio. -/
31+
theorem tendsto_fib_div_fib_succ_atTop :
32+
Filter.Tendsto (fun n ↦ (Nat.fib n / Nat.fib (n + 1) : ℝ)) Filter.atTop <| nhds (-ψ) := by
33+
rw [← Real.inv_goldenRatio, ← funext <| fun n ↦ inv_div ..]
34+
exact Filter.Tendsto.inv₀ tendsto_fib_succ_div_fib_atTop Real.goldenRatio_ne_zero

0 commit comments

Comments
 (0)