Binet's formula for Fibonacci numbers
ProvedFamousTheorems.binet_formula_fibBinet's formula. For every the -th Fibonacci number is
The formula comes from diagonalising the linear recurrence , whose characteristic roots are and . Since , it shows that is the integer nearest to and that . It is the standard example of solving a linear recurrence in closed form.
Formalization note. Mathlib's Real.coe_fib_eq. Nat.fib is the Fibonacci sequence with , , cast to ℝ. Real.goldenRatio and Real.goldenConj are and .
Preamble
import Mathlib
Formal statement
namespace FamousTheorems
theorem binet_formula_fib (n : ℕ) :
(Nat.fib n : ℝ) = (Real.goldenRatio ^ n - Real.goldenConj ^ n) / Real.sqrt 5 := by sorry
end FamousTheoremsSource
Listed in Mathlib's curated theorem manifests (docs/1000.yaml); formalized in Mathlib as `Real.coe_fib_eq`. Proof here reduces to that Mathlib result.