The arithmetic-geometric mean #
Starting with two nonnegative real numbers, repeatedly replace them with their arithmetic and geometric means. By the AM-GM inequality, the smaller number (geometric mean) will monotonically increase and the larger number (arithmetic mean) will monotonically decrease.
The two monotone sequences converge to the same limit – the arithmetic-geometric mean (AGM).
This file defines the AGM in the NNReal namespace and proves some of its basic properties.
References #
- https://en.wikipedia.org/wiki/Arithmetic–geometric_mean
agmSequences x y is the sequence of (geometric, arithmetic) means
converging to the arithmetic-geometric mean starting from x and y.
Equations
Instances For
theorem
NNReal.agmSequences_succ'
{x y : NNReal}
{n : ℕ}
:
x.agmSequences y (n + 1) = (sqrt ((x.agmSequences y n).1 * (x.agmSequences y n).2), ((x.agmSequences y n).1 + (x.agmSequences y n).2) / 2)
theorem
NNReal.agmSequences_fst_monotone
{x y : NNReal}
:
Monotone fun (n : ℕ) => (x.agmSequences y n).1
theorem
NNReal.agmSequences_snd_antitone
{x y : NNReal}
:
Antitone fun (n : ℕ) => (x.agmSequences y n).2
theorem
NNReal.tendsto_dist_agmSequences_atTop_zero
{x y : NNReal}
:
Filter.Tendsto (fun (n : ℕ) => dist (x.agmSequences y n).1 (x.agmSequences y n).2) Filter.atTop (nhds 0)
The arithmetic-geometric mean of two NNReals, defined as the infimum of arithmetic means.
Equations
- x.agm y = ⨅ (n : ℕ), (x.agmSequences y n).2
Instances For
theorem
NNReal.tendsto_agmSequences_snd_agm
{x y : NNReal}
:
Filter.Tendsto (fun (n : ℕ) => (x.agmSequences y n).2) Filter.atTop (nhds (x.agm y))
theorem
NNReal.bddAbove_range_agmSequences_fst
{x y : NNReal}
:
BddAbove (Set.range fun (n : ℕ) => (x.agmSequences y n).1)
The AGM is also the supremum of the geometric means.
theorem
NNReal.tendsto_agmSequences_fst_agm
{x y : NNReal}
:
Filter.Tendsto (fun (n : ℕ) => (x.agmSequences y n).1) Filter.atTop (nhds (x.agm y))