Documentation

Mathlib.Analysis.SpecialFunctions.ArithmeticGeometricMean

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 #

theorem NNReal.sqrt_mul_le_half_add (x y : NNReal) :
sqrt (x * y) ≀ (x + y) / 2

The AM–GM inequality for two NNReals, with means in canonical form.

theorem NNReal.sqrt_mul_lt_half_add_of_ne {x y : NNReal} (h : x β‰  y) :
sqrt (x * y) < (x + y) / 2

The strict AM–GM inequality for two NNReals, with means in canonical form.

noncomputable def NNReal.agmSequences (x y : NNReal) :

agmSequences x y is the sequence of (geometric, arithmetic) means converging to the arithmetic-geometric mean starting from x and y.

Equations
    Instances For
      @[simp]
      theorem NNReal.agmSequences_zero {x y : NNReal} :
      x.agmSequences y 0 = (sqrt (x * y), (x + y) / 2)
      theorem NNReal.agmSequences_succ {x y : NNReal} {n : β„•} :
      x.agmSequences y (n + 1) = (sqrt (x * y)).agmSequences ((x + y) / 2) n
      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.dist_gm_am_le {x y : NNReal} :
      dist (sqrt (x * y)) ((x + y) / 2) ≀ dist x y / 2
      noncomputable def NNReal.agm (x y : NNReal) :

      The arithmetic-geometric mean of two NNReals, defined as the infimum of arithmetic means.

      Equations
        Instances For
          theorem NNReal.agm_eq_ciInf {x y : NNReal} :
          x.agm y = β¨… (n : β„•), (x.agmSequences y n).2
          theorem NNReal.agm_eq_ciSup {x y : NNReal} :
          x.agm y = ⨆ (n : β„•), (x.agmSequences y n).1

          The AGM is also the supremum of the geometric means.

          @[simp]
          theorem NNReal.agm_self {x : NNReal} :
          x.agm x = x
          theorem NNReal.agm_pos {x y : NNReal} (hx : 0 < x) (hy : 0 < y) :
          0 < x.agm y
          theorem NNReal.agm_eq_agm_gm_am {x y : NNReal} :
          x.agm y = (sqrt (x * y)).agm ((x + y) / 2)
          theorem NNReal.agmSequences_fst_lt_agm_of_pos_of_ne {x y : NNReal} (hx : 0 < x) (hy : 0 < y) (hn : x β‰  y) (n : β„•) :
          (x.agmSequences y n).1 < x.agm y
          theorem NNReal.min_lt_agm_of_pos_of_ne {x y : NNReal} (hx : 0 < x) (hy : 0 < y) (hn : x β‰  y) :
          min x y < x.agm y
          theorem NNReal.agm_mul_distrib {x y k : NNReal} :
          (k * x).agm (k * y) = k * x.agm y

          The AGM distributes over multiplication.