The areas / V06. Rings, fields and ordered algebra
Mathlib.Algebra.ContinuedFractions.Determinant
2 declarations. Mathlib docs · Source
Determinant Formula for Generalized Continued Fraction
We derive the so-called determinant formula for GenContFract:
Aₙ * Bₙ₊₁ - Bₙ * Aₙ₊₁ = (-a₀) * (-a₁) * .. * (-aₙ).
References
- https://en.wikipedia.org/wiki/Generalized_continued_fraction#The_determinant_formula
theorem GenContFract.determinant E1 #
∀ {K : Type u_1} [inst : Field K] {g : GenContFract K} {n : ℕ},
g.nums n * g.dens (n + 1) - g.dens n * g.nums (n + 1) = ∏ i ∈ Finset.range (n + 1), -(g.partNums.get? i).getD 0
The determinant formula Aₙ * Bₙ₊₁ - Bₙ * Aₙ₊₁ = (-a₀) * (-a₁) * .. * (-aₙ).
theorem SimpContFract.determinant E1 #
∀ {K : Type u_1} [inst : Field K] {s : SimpContFract K} {n : ℕ},
¬(↑s).TerminatedAt n → (↑s).nums n * (↑s).dens (n + 1) - (↑s).dens n * (↑s).nums (n + 1) = (-1) ^ (n + 1)
The determinant formula Aₙ * Bₙ₊₁ - Bₙ * Aₙ₊₁ = (-1) ^ (n + 1) for SimpContFract.