The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V06. Rings, fields and ordered algebra

Mathlib.Algebra.Order.Ring.GeomSum

14 declarations. Mathlib docs · Source

Partial sums of geometric series in an ordered ring

This file upper- and lower-bounds the values of the geometric series $\sum_{i=0}^{n-1} x^i$ and $\sum_{i=0}^{n-1} x^i y^{n-1-i}$ and variants thereof. We also provide some bounds on the "geometric" sum of a/b^i where a b : ℕ.

Geometric sum with ℕ-division

theorem geom_sum_pos E1 #

∀ {R : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [IsStrictOrderedRing R] {n : ℕ} {x : R},
  0 ≤ x → n ≠ 0 → 0 < ∑ i ∈ Finset.range n, x ^ i

theorem geom_sum_alternating_of_le_neg_one E1 #

∀ {R : Type u_1} [inst : Ring R] [inst_1 : PartialOrder R] [IsOrderedRing R] {x : R},
  x + 1 ≤ 0 → ∀ (n : ℕ), if Even n then ∑ i ∈ Finset.range n, x ^ i ≤ 0 else 1 ≤ ∑ i ∈ Finset.range n, x ^ i

theorem geom_sum_pos_and_lt_one E1 #

∀ {R : Type u_1} [inst : Ring R] [inst_1 : PartialOrder R] [IsStrictOrderedRing R] {n : ℕ} {x : R},
  x < 0 → 0 < x + 1 → 1 < n → 0 < ∑ i ∈ Finset.range n, x ^ i ∧ ∑ i ∈ Finset.range n, x ^ i < 1

theorem geom_sum_alternating_of_lt_neg_one E1 #

∀ {R : Type u_1} [inst : Ring R] [inst_1 : PartialOrder R] [IsStrictOrderedRing R] {n : ℕ} {x : R},
  x + 1 < 0 → 1 < n → if Even n then ∑ i ∈ Finset.range n, x ^ i < 0 else 1 < ∑ i ∈ Finset.range n, x ^ i

theorem geom_sum_pos' E1 #

∀ {R : Type u_1} [inst : Ring R] [inst_1 : LinearOrder R] [IsStrictOrderedRing R] {n : ℕ} {x : R},
  0 < x + 1 → n ≠ 0 → 0 < ∑ i ∈ Finset.range n, x ^ i

theorem Odd.geom_sum_pos E1 #

∀ {R : Type u_1} [inst : Ring R] [inst_1 : LinearOrder R] [IsStrictOrderedRing R] {n : ℕ} {x : R},
  Odd n → 0 < ∑ i ∈ Finset.range n, x ^ i

theorem geom_sum_pos_iff E0 #

∀ {R : Type u_1} [inst : Ring R] [inst_1 : LinearOrder R] [IsStrictOrderedRing R] {n : ℕ} {x : R},
  n ≠ 0 → (0 < ∑ i ∈ Finset.range n, x ^ i ↔ Odd n ∨ 0 < x + 1)

theorem geom_sum_ne_zero E1 #

∀ {R : Type u_1} [inst : Ring R] [inst_1 : LinearOrder R] [IsStrictOrderedRing R] {n : ℕ} {x : R},
  x ≠ -1 → n ≠ 0 → ∑ i ∈ Finset.range n, x ^ i ≠ 0

theorem geom_sum_eq_zero_iff_neg_one E1 #

∀ {R : Type u_1} [inst : Ring R] [inst_1 : LinearOrder R] [IsStrictOrderedRing R] {n : ℕ} {x : R},
  n ≠ 0 → (∑ i ∈ Finset.range n, x ^ i = 0 ↔ x = -1 ∧ Even n)

theorem geom_sum_neg_iff E0 #

∀ {R : Type u_1} [inst : Ring R] [inst_1 : LinearOrder R] [IsStrictOrderedRing R] {n : ℕ} {x : R},
  n ≠ 0 → (∑ i ∈ Finset.range n, x ^ i < 0 ↔ Even n ∧ x + 1 < 0)

theorem Nat.pred_mul_geom_sum_le E1 #

∀ (a b n : ℕ), (b - 1) * ∑ i ∈ Finset.range n.succ, a / b ^ i ≤ a * b - a / b ^ n

theorem Nat.geom_sum_le E1 #

∀ {b : ℕ}, 2 ≤ b → ∀ (a n : ℕ), ∑ i ∈ Finset.range n, a / b ^ i ≤ a * b / (b - 1)

theorem Nat.geom_sum_Ico_le E1 #

∀ {b : ℕ}, 2 ≤ b → ∀ (a n : ℕ), ∑ i ∈ Finset.Ico 1 n, a / b ^ i ≤ a / (b - 1)

theorem Nat.geomSum_lt E1 #

∀ {m n : ℕ} {s : Finset ℕ}, 2 ≤ m → (∀ k ∈ s, k < n) → ∑ k ∈ s, m ^ k < m ^ n

If all the elements of a finset of naturals are less than n, then the sum of their powers of m ≥ 2 is less than m ^ n.