Documentation

Mathlib.NumberTheory.Real.GoldenRatio

The golden ratio and its conjugate #

This file defines the golden ratio φ := (1 + √5)/2 and its conjugate ψ := (1 - √5)/2, which are the two real roots of X² - X - 1.

Along with various computational facts about them, we prove their irrationality, and we link them to the Fibonacci sequence by proving Binet's formula.

@[reducible, inline]
noncomputable abbrev Real.goldenRatio :

The golden ratio φ := (1 + √5)/2.

Instances For
    @[reducible, inline]
    noncomputable abbrev Real.goldenConj :

    The conjugate of the golden ratio ψ := (1 - √5)/2.

    Instances For
      def goldenRatio.termφ :
      Lean.ParserDescr

      The golden ratio φ := (1 + √5)/2.

      Instances For
        def goldenRatio.termψ :
        Lean.ParserDescr

        The conjugate of the golden ratio ψ := (1 - √5)/2.

        Instances For

          The inverse of the golden ratio is the opposite of its conjugate.

          The opposite of the golden ratio is the inverse of its conjugate.

          Irrationality #

          The conjugate of the golden ratio is irrational.

          The recurrence relation satisfied by the Fibonacci sequence.

          Instances For

            The characteristic polynomial of fibRec is X² - (X + 1).

            theorem Real.fib_isSol_fibRec {α : Type u_1} [CommSemiring α] :
            fibRec.IsSolution fun (x : ) => (Nat.fib x)

            As expected, the Fibonacci sequence is a solution of fibRec.

            The geometric sequence fun n ↦ φ^n is a solution of fibRec.

            The geometric sequence fun n ↦ ψ^n is a solution of fibRec.

            theorem Real.coe_fib_eq' :
            (fun (n : ) => (Nat.fib n)) = fun (n : ) => (goldenRatio ^ n - goldenConj ^ n) / 5

            Binet's formula as a function equality.

            theorem Real.coe_fib_eq (n : ) :
            (Nat.fib n) = (goldenRatio ^ n - goldenConj ^ n) / 5

            Binet's formula as a dependent equality.

            theorem Real.coe_intFib_eq (n : ) :
            (Int.fib n) = (goldenRatio ^ n - goldenConj ^ n) / 5

            Binet's formula for integer values.

            theorem Real.fib_succ_sub_goldenRatio_mul_fib (n : ) :
            (Nat.fib (n + 1)) - goldenRatio * (Nat.fib n) = goldenConj ^ n

            Relationship between the Fibonacci Sequence, the golden ratio, and its conjugate's exponents.

            theorem Real.goldenConj_mul_fib_succ_add_fib (n : ) :
            goldenConj * (Nat.fib (n + 1)) + (Nat.fib n) = goldenConj ^ (n + 1)

            Relationship between the Fibonacci Sequence, the conjugate of the golden ratio, and its exponents.

            theorem Real.goldenRatio_mul_fib_succ_add_fib (n : ) :
            goldenRatio * (Nat.fib (n + 1)) + (Nat.fib n) = goldenRatio ^ (n + 1)

            Relationship between the Fibonacci Sequence, the golden ratio, and its exponents.

            theorem Real.fib_succ_sub_goldenConj_mul_fib (n : ) :
            (Nat.fib (n + 1)) - goldenConj * (Nat.fib n) = goldenRatio ^ n

            Relationship between the Fibonacci Sequence, exponents of the golden ratio, and its conjugate.