Skip to content

Commit

Permalink
feat(topology/instances/ennreal): ennreal.to_nnreal applied to a `t…
Browse files Browse the repository at this point in the history
…sum` (#16320)

If a function is finite for all inputs, then `to_nnreal` applied to the sum is the sum of `to_nnreal` applied to the values.
  • Loading branch information
dtumad committed Aug 31, 2022
1 parent b35461b commit 17ff82d
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/topology/instances/ennreal.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1127,17 +1127,14 @@ end nnreal

namespace ennreal

lemma tsum_to_real_eq
{f : α → ℝ≥0∞} (hf : ∀ a, f a ≠ ∞) :
lemma tsum_to_nnreal_eq {f : α → ℝ≥0∞} (hf : ∀ a, f a ≠ ∞) :
(∑' a, f a).to_nnreal = ∑' a, (f a).to_nnreal :=
(congr_arg ennreal.to_nnreal (tsum_congr $ λ x, (coe_to_nnreal (hf x)).symm)).trans
nnreal.tsum_eq_to_nnreal_tsum.symm

lemma tsum_to_real_eq {f : α → ℝ≥0∞} (hf : ∀ a, f a ≠ ∞) :
(∑' a, f a).to_real = ∑' a, (f a).to_real :=
begin
lift f to α → ℝ≥0 using hf,
have : (∑' (a : α), (f a : ℝ≥0∞)).to_real =
((∑' (a : α), (f a : ℝ≥0∞)).to_nnreal : ℝ≥0∞).to_real,
{ rw [ennreal.coe_to_real], refl },
rw [this, ← nnreal.tsum_eq_to_nnreal_tsum, ennreal.coe_to_real],
exact nnreal.coe_tsum
end
by simp only [ennreal.to_real, tsum_to_nnreal_eq hf, nnreal.coe_tsum]

lemma tendsto_sum_nat_add (f : ℕ → ℝ≥0∞) (hf : ∑' i, f i ≠ ∞) :
tendsto (λ i, ∑' k, f (k + i)) at_top (𝓝 0) :=
Expand Down

0 comments on commit 17ff82d

Please sign in to comment.