Documentation

ToMathlib.Data.ENNReal.Gauss

Heavy ENNReal Arithmetic Lemmas #

Extended-nonnegative-real arithmetic identities whose proofs bridge through ENNReal.toReal and invoke push_cast, ring, nlinarith, or aesop. These proofs are several times more expensive to elaborate than the general-purpose helpers in ToMathlib.General, so they live in a separate module that only the files that need them pull in.

Contents #

theorem ENNReal.one_sub_one_sub_mul_one_sub {x y : ENNReal} (hx : x 1) (hy : y 1) :
1 - (1 - x) * (1 - y) = x + y - x * y

Real bridge for truncated ENNReal subtraction: (a - b).toReal is bounded by |a.toReal - b.toReal|.

theorem ENNReal.gauss_sum_inv_le (n : ) (N : ENNReal) (_hN : 0 < N) :
kFinset.range n, k * N⁻¹ n ^ 2 / (2 * N)

The Gauss sum ∑_{k=0}^{n-1} k/N ≤ n²/(2N), the arithmetic core of the birthday bound.

theorem ENNReal.gauss_sum_inv_eq (n : ) (N : ENNReal) :
kFinset.range n, k * N⁻¹ = ↑(n * (n - 1)) / (2 * N)

Tight Gauss sum: ∑_{k=0}^{n-1} k/N = n*(n-1)/(2N).

theorem ENNReal.add_div_two_mul_nat (a b N : ) :
a / (2 * N) + b * (↑N)⁻¹ = ↑(a + 2 * b) / (2 * N)

a/(2N) + b/N = (a + 2b)/(2N) for natural-number casts to ℝ≥0∞.