The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V06. Rings, fields and ordered algebra

Mathlib.Algebra.ContinuedFractions.ContinuantsRecurrence

5 declarations. Mathlib docs · Source

Recurrence Lemmas for the Continuants (conts) Function of Continued Fractions

Summary

Given a generalized continued fraction g, for all n ≥ 1, we prove that the continuants (conts) function indeed satisfies the following recurrences:

  • Aₙ = bₙ * Aₙ₋₁ + aₙ * Aₙ₋₂, and
  • Bₙ = bₙ * Bₙ₋₁ + aₙ * Bₙ₋₂.

theorem GenContFract.contsAux_recurrence E1 #

∀ {K : Type u_1} {g : GenContFract K} {n : ℕ} [inst : DivisionRing K] {gp ppred pred : GenContFract.Pair K},
  g.s.get? n = some gp →
    g.contsAux n = ppred →
      g.contsAux (n + 1) = pred →
        g.contsAux (n + 2) = { a := gp.b * pred.a + gp.a * ppred.a, b := gp.b * pred.b + gp.a * ppred.b }

theorem GenContFract.conts_recurrenceAux E0 #

∀ {K : Type u_1} {g : GenContFract K} {n : ℕ} [inst : DivisionRing K] {gp ppred pred : GenContFract.Pair K},
  g.s.get? n = some gp →
    g.contsAux n = ppred →
      g.contsAux (n + 1) = pred →
        g.conts (n + 1) = { a := gp.b * pred.a + gp.a * ppred.a, b := gp.b * pred.b + gp.a * ppred.b }

theorem GenContFract.conts_recurrence E1 #

∀ {K : Type u_1} {g : GenContFract K} {n : ℕ} [inst : DivisionRing K] {gp ppred pred : GenContFract.Pair K},
  g.s.get? (n + 1) = some gp →
    g.conts n = ppred →
      g.conts (n + 1) = pred →
        g.conts (n + 2) = { a := gp.b * pred.a + gp.a * ppred.a, b := gp.b * pred.b + gp.a * ppred.b }

Shows that Aₙ = bₙ * Aₙ₋₁ + aₙ * Aₙ₋₂ and Bₙ = bₙ * Bₙ₋₁ + aₙ * Bₙ₋₂.

theorem GenContFract.nums_recurrence E1 #

∀ {K : Type u_1} {g : GenContFract K} {n : ℕ} [inst : DivisionRing K] {gp : GenContFract.Pair K} {ppredA predA : K},
  g.s.get? (n + 1) = some gp →
    g.nums n = ppredA → g.nums (n + 1) = predA → g.nums (n + 2) = gp.b * predA + gp.a * ppredA

Shows that Aₙ = bₙ * Aₙ₋₁ + aₙ * Aₙ₋₂.

theorem GenContFract.dens_recurrence E1 #

∀ {K : Type u_1} {g : GenContFract K} {n : ℕ} [inst : DivisionRing K] {gp : GenContFract.Pair K} {ppredB predB : K},
  g.s.get? (n + 1) = some gp →
    g.dens n = ppredB → g.dens (n + 1) = predB → g.dens (n + 2) = gp.b * predB + gp.a * ppredB

Shows that Bₙ = bₙ * Bₙ₋₁ + aₙ * Bₙ₋₂.