AGM evaluation of the complete elliptic integral of the second kind #
Landen's transformation gives a telescoping series for E / K along Mathlib's AGM
sequence. The terms are weighted differences of squares of the arithmetic and geometric
means. Since one AGM step turns this difference into a squared gap, Mathlib's geometric
gap bound suffices to show that the remainder tends to zero.
References #
- NIST DLMF §19.8(i), https://dlmf.nist.gov/19.8.
- B. C. Carlson, Special Functions of Applied Mathematics, §9.5, Exercises 3–4.
- Bastiaan J Braams,
lean-codes,Carlson/Elliptic/AGMSecondKind.lean, commit2b8cba1(Apache-2.0), specificallyCarlson.hasSum_agmA_zeroandCarlson.carlsonRE_eq_agm, for the telescoping proof plan. Here we use the real Legendre Landen identities and Mathlib'sNNReal.agmSequences, not Carlson's general R-function.
The weighted squared differences of the AGM means sum to
(a² + b²)/2 - a² E(√(1 - (b/a)²))/K(√(1 - (b/a)²)).
Mathlib's index zero is already one AGM step. In particular, the series is summable.
The squared AGM corrections form a convergent series evaluating E(k) / K(k).
The sequence starts after one step: its difference of squares is cₙ₊₁² in the
classical convention c₀ = k, cₙ₊₁ = (aₙ - gₙ) / 2.
AGM evaluation of the complete second kind (DLMF 19.8.6).
The initial correction is k² / 2; the remaining corrections use Mathlib's
AGM sequence, whose index zero is already one step after (1, √(1 - k²)).