|
| 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