Zulip Chat Archive
Stream: Is there code for X?
Topic: Interchanging sums and integrals
David Loeffler (Feb 15 2024 at 20:33):
Is the following in mathlib?
Let be a measure space, and functions on (valued in a Banach space). Suppose converges almost everywhere, and the sum . Then .
It can be deduced from the more general Lebesgue dominated convergence theorem (docs#hasSum_integral_of_dominated_convergence) but the deduction isn't totally straightforward, so I'm wondering if we have this as a separate lemma.
Eric Wieser (Feb 15 2024 at 20:43):
I needed but couldn't find this in #9487
David Loeffler (Feb 15 2024 at 20:53):
Eric Wieser said:
I needed but couldn't find this in #9487
That sounds like a vote in favour of adding it. The statement I have formalised is
hasSum_integral_of_summable_norm {E ι α : Type*} [NormedAddCommGroup E]
[NormedSpace ℝ E] [CompleteSpace E] [MeasurableSpace α]
{μ : Measure α} [Countable ι] (F : ι → α → E) (hF_int : ∀ (i : ι), Integrable (F i))
(hF_sum : ∀ᵐ (a : α) ∂μ, Summable fun x ↦ ‖F x a‖) (hF_sum' : Summable fun i ↦ ∫ (a : α), ‖F i a‖ ∂μ) :
HasSum (fun n ↦ ∫ (a : α), F n a ∂μ) (∫ (a : α), ∑' (i : ι), F i a ∂μ) := sorry
Does that fit what you needed for #9487?
David Loeffler (Feb 15 2024 at 21:26):
Hang on, some version of this is there already: the innocuously named docs#integral_tsum. I'm still going to PR this version because I think it's more user-friendly to have formulations which don't explicitly involve ENNReal
, lintegral
etc.
Igor Khavkine (Feb 15 2024 at 23:02):
In principle, one could also cobble this result together from Fubini's theorem in docs#MeasureTheory.integral_integral_swap and this missing counter-part to docs#MeasureTheory.lintegral_count
import Mathlib
open BigOperators ENNReal MeasureTheory
open Measure
theorem integral_count {α : Type*} {m : MeasurableSpace α} {μ : Measure α}
[Countable α] [MeasurableSingletonClass α]
[NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F]
(f : α → F) (hf : Integrable f count) :
∫ a, f a ∂count = ∑' a, f a := by
convert integral_countable' hf
rw [count_singleton]
simp only [one_toReal, one_smul]
Sébastien Gouëzel (Feb 16 2024 at 06:12):
@David Loeffler, you shouldn't need hF_sum
, it can de deduced from the other assumptions. (If it were not summable ae, then the sum of the integrals would be infinite, which contradicts hF_sum'
).
David Loeffler (Feb 16 2024 at 06:33):
Yes, you're right! I have posted a PR #10614 (without the pointwise summability assumption).
Last updated: May 02 2025 at 03:31 UTC