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 Ω\Omega be a measure space, and (fi)iN(f_i)_{i \in \mathbb{N}} functions on Ω\Omega (valued in a Banach space). Suppose iNfi(x)\sum_{i \in \mathbb{N}} f_i(x) converges almost everywhere, and the sum iΩfi(x)dx<\sum_i \int_{\Omega} \|f_i(x)\|\, \mathrm{d}x < \infty. Then Ω(ifi(x))dx=iΩfi(x)dx\int_\Omega (\sum_i f_i(x)) \mathrm{d}x = \sum_i \int_\Omega f_i(x) \, \mathrm{d}x.

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