Partial sums of geometric series #
This file determines 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 : ℕ
.
Main definitions #
geom_sum
defines for each $x$ in a semiring and each natural number $n$ the partial sum $\sum_{i=0}^{n-1} x^i$ of the geometric series.geom_sum₂
defines for each $x,y$ in a semiring and each natural number $n$ the partial sum $\sum_{i=0}^{n-1} x^i y^{n-1-i}$ of the geometric series.
Main statements #
geom_sum_Ico
proves that $\sum_{i=m}^{n-1} x^i=\frac{x^n-x^m}{x-1}$ in a division ring.geom_sum₂_Ico
proves that $\sum_{i=m}^{n-1} x^i=\frac{x^n-y^{n-m}x^m}{x-y}$ in a field.
Several variants are recorded, generalising in particular to the case of a noncommutative ring in
which x
and y
commute. Even versions not using division or subtraction, valid in each semiring,
are recorded.
theorem
geom_sum_def
{α : Type u}
[semiring α]
(x : α)
(n : ℕ) :
geom_sum x n = ∑ (i : ℕ) in finset.range n, x ^ i
@[simp]
theorem
op_geom_sum
{α : Type u}
[semiring α]
(x : α)
(n : ℕ) :
mul_opposite.op (geom_sum x n) = geom_sum (mul_opposite.op x) n
@[simp]
theorem
op_geom_sum₂
{α : Type u}
[semiring α]
(x y : α)
(n : ℕ) :
mul_opposite.op (geom_sum₂ x y n) = geom_sum₂ (mul_opposite.op y) (mul_opposite.op x) n