Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit d293822

Browse files
committed
feat(topology/algebra/infinite_sum, topology/instances/ennreal): extend tsum API (#6017)
Lemma `tsum_lt_of_nonneg` shows that if a sequence `f` with non-negative terms is dominated by a sequence `g` with summable series and at least one term of `f` is strictly smaller than the corresponding term in `g`, then the series of `f` is strictly smaller than the series of `g`. Besides this lemma, I also added the relevant API in topology.algebra.infinite_sum.
1 parent 1ee00c8 commit d293822

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

src/topology/algebra/infinite_sum.lean

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,10 @@ begin
757757
{ simp [tsum_eq_zero_of_not_summable hf] }
758758
end
759759

760+
lemma tsum_congr {f g : ℕ → ℝ} (hfg : ∀ n, f n = g n) :
761+
∑' n, f n = ∑' n, g n :=
762+
congr_arg tsum (funext hfg)
763+
760764
end order_topology
761765

762766
section canonically_ordered
@@ -887,6 +891,30 @@ lemma tsum_comm [regular_space α] {f : β → γ → α} (h : summable (functio
887891
∑' c b, f b c = ∑' b c, f b c :=
888892
tsum_comm' h h.prod_factor h.prod_symm.prod_factor
889893

894+
/-- Let `f : ℕ → ℝ` be a sequence with summable series and let `i ∈ ℕ` be an index.
895+
Lemma `tsum_ite_eq_extract` writes `Σ f n` as the sum of `f i` plus the series of the
896+
remaining terms. -/
897+
lemma tsum_ite_eq_extract {f : ℕ → ℝ} (hf : summable f) (i : ℕ) :
898+
∑' n, f n = f i + ∑' n, ite (n = i) 0 (f n) :=
899+
begin
900+
refine ((tsum_congr _).trans $ tsum_add (hf.summable_of_eq_zero_or_self _) $
901+
hf.summable_of_eq_zero_or_self _).trans (add_right_cancel_iff.mpr (tsum_ite_eq i (f i)));
902+
exact λ j, by { by_cases ji : j = i; simp [ji] }
903+
end
904+
905+
/-- Let `f, g : ℕ → ℝ` be two sequences with summable series. If `f` is dominated by `g` and
906+
at least one term of `f` is strictly smaller than the corresponding term in `g`, then the series
907+
of `f` is strictly smaller than the series of `g`. -/
908+
lemma tsum_lt_tsum {i : ℕ} {f g : ℕ → ℝ} (h : ∀ (b : ℕ), f b ≤ g b) (hi : f i < g i)
909+
(hf : summable f) (hg : summable g) :
910+
∑' n, f n < ∑' n, g n :=
911+
begin
912+
rw [tsum_ite_eq_extract hf i, tsum_ite_eq_extract hg i],
913+
refine add_lt_add_of_lt_of_le hi _,
914+
refine tsum_le_tsum _ (hf.summable_of_eq_zero_or_self _) (hg.summable_of_eq_zero_or_self _);
915+
exact λ j, by { by_cases ji : j = i; simp [ji, h j] },
916+
end
917+
890918
end uniform_group
891919

892920
section topological_group

src/topology/instances/ennreal.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,14 @@ lemma tsum_le_of_sum_range_le {f : ℕ → ℝ} {c : ℝ} (hf : ∀ n, 0 ≤ f n
762762
le_of_tendsto' ((has_sum_iff_tendsto_nat_of_nonneg hf _).1
763763
(summable_of_sum_range_le hf h).has_sum) h
764764

765+
/-- If a sequence `f` with non-negative terms is dominated by a sequence `g` with summable
766+
series and at least one term of `f` is strictly smaller than the corresponding term in `g`,
767+
then the series of `f` is strictly smaller than the series of `g`. -/
768+
lemma tsum_lt_tsum_of_nonneg {i : ℕ} {f g : ℕ → ℝ}
769+
(h0 : ∀ (b : ℕ), 0 ≤ f b) (h : ∀ (b : ℕ), f b ≤ g b) (hi : f i < g i) (hg : summable g) :
770+
∑' n, f n < ∑' n, g n :=
771+
tsum_lt_tsum h hi (summable_of_nonneg_of_le h0 h hg) hg
772+
765773
section
766774
variables [emetric_space β]
767775
open ennreal filter emetric

0 commit comments

Comments
 (0)