feat(MeasureTheory/Integral/IntervalIntegral/Fubini): Fubini swap for two iterated interval integrals#37942
Conversation
Welcome new contributor!Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests. We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR. Thank you again for joining our community. |
PR summary b43655dfe2Import changes for modified filesNo significant changes to the import graph Import changes for all files
Declarations diff
You can run this locally as follows## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>The doc-module for No changes to technical debt.You can run this locally as
|
| = \int_a^b \int_c^d f(x, y) \, dy \, dx. | ||
| $$ -/ | ||
| lemma intervalIntegral_swap_continuous | ||
| {f : ℝ → ℝ → ℝ} (hf : Continuous (Function.uncurry f)) (a b c d : ℝ) : |
There was a problem hiding this comment.
Continuous seems too strong. The underlying lemma MeasureTheory.setIntegral_prod only requires integrability. I haven't read the code carefully yet, but this looks longer than I expected given interval integral isn't far away from set integral. Have you tried golfing it a bit?
|
I guess It is still fine to have a version for continuous functions (but you should use Also I don't think it is worth to add a new file for this lemma. You should put it somewhere in Mathlib.MeasureTheory.Integral.Prod or a file about intervalIntegral. Note that we also have MeasureTheory.integral_integral_swap_of_hasCompactSupport, which possibly can be used to simplify the proof. |
…val integrals Adds `MeasureTheory.intervalIntegral_intervalIntegral_swap`: swaps two iterated `intervalIntegral`s over ℝ under an `IntegrableOn` hypothesis on the product rectangle. Also adds a `ContinuousOn` corollary. The lemmas are placed in `Mathlib.MeasureTheory.Integral.Prod` next to the existing `intervalIntegral_integral_swap` which swaps one interval integral with one full integral.
6df84b8 to
9f21363
Compare
Summary
Adds
MeasureTheory.intervalIntegral_swap_continuous: Fubini's theorem for two iteratedintervalIntegrals onℝunder joint continuity of the integrand.Motivation
Mathlib already provides:
MeasureTheory.integral_integral_swap— swaps two full integrals under product integrabilityMeasureTheory.intervalIntegral_integral_swap— swaps one interval integral with one full integralNeither directly swaps two iterated interval integrals, which is a common idiom when reducing two-dimensional integrals to iterated one-dimensional ones (for example when reducing a double integral over a rectangle to iterated 1D integrals in calculus proofs). This PR fills that gap.
Proof
The proof handles all four orientation combinations (
a ≤ bvsb ≤ a,c ≤ dvsd ≤ c). It reduces to the ordered case viaintervalIntegral.integral_symm/intervalIntegral.integral_neg, then converts both interval integrals to a singlesetIntegraloverSet.Icc a b ×ˢ Set.Icc c dviasetIntegral_prodandsetIntegral_prod_swap. Integrability on the compact product rectangle comes fromContinuousOn.integrableOn_compact.AI assistance disclosure
This PR was prepared with help from Claude Code (Anthropic's Claude Opus 4.6). Specifically, Claude Code:
setIntegral_prod,setIntegral_prod_swap,ContinuousOn.integrableOn_compact,Ioc_ae_eq_Icc) and wired them together;lake build,lake exe shake, andlake exe lint-style.All mathematical content was reviewed by me before committing, and I verified the final version builds cleanly in a fresh Mathlib tree. I am responsible for the correctness and style of this PR and will handle any review feedback myself.
Happy to discuss the workflow with maintainers if there's interest or concern.
Zulip
I posted in `#mathlib4 > general` asking if this was duplicate work — no responses yet, proceeding since it's a small standalone helper. Happy to close if this conflicts with anyone's in-flight branch.