@@ -580,6 +580,53 @@ theorem integral_fun_fst (f : α → E) : ∫ z, f z.1 ∂μ.prod ν = ν.real u
580580 rw [← integral_prod_swap]
581581 apply integral_fun_snd
582582
583+ /-- Change the order of integration of two `intervalIntegral`s over `ℝ`, under an integrability
584+ hypothesis on the product rectangle. This is the two-interval-integral version of
585+ `intervalIntegral_integral_swap`. -/
586+ lemma intervalIntegral_intervalIntegral_swap {a b c d : ℝ} {f : ℝ → ℝ → E}
587+ (hf : IntegrableOn (uncurry f) (Set.uIcc a b ×ˢ Set.uIcc c d) (volume.prod volume)) :
588+ (∫ y in c..d, ∫ x in a..b, f x y)
589+ = (∫ x in a..b, ∫ y in c..d, f x y) := by
590+ have hmain : ∀ ⦃a b c d : ℝ⦄, a ≤ b → c ≤ d →
591+ IntegrableOn (uncurry f) (Set.Icc a b ×ˢ Set.Icc c d) (volume.prod volume) →
592+ (∫ y in c..d, ∫ x in a..b, f x y) = (∫ x in a..b, ∫ y in c..d, f x y) := by
593+ intro a b c d hab hcd hfi
594+ simp only [intervalIntegral.integral_of_le hab, intervalIntegral.integral_of_le hcd,
595+ setIntegral_congr_set (Ioc_ae_eq_Icc (α := ℝ) (μ := volume))]
596+ calc ∫ y in Set.Icc c d, ∫ x in Set.Icc a b, f x y
597+ = ∫ z : ℝ × ℝ in Set.Icc c d ×ˢ Set.Icc a b, f z.2 z.1 :=
598+ (setIntegral_prod (fun z : ℝ × ℝ => f z.2 z.1 ) hfi.swap).symm
599+ _ = ∫ z : ℝ × ℝ in Set.Icc a b ×ˢ Set.Icc c d, f z.1 z.2 := by
600+ simpa using setIntegral_prod_swap (s := Set.Icc a b) (t := Set.Icc c d)
601+ (f := uncurry f)
602+ _ = ∫ x in Set.Icc a b, ∫ y in Set.Icc c d, f x y :=
603+ setIntegral_prod (uncurry f) hfi
604+ rcases le_total a b with hab | hab
605+ · rcases le_total c d with hcd | hcd
606+ · exact hmain hab hcd (by rwa [Set.uIcc_of_le hab, Set.uIcc_of_le hcd] at hf)
607+ · apply neg_injective
608+ simpa only [intervalIntegral.integral_symm c d, intervalIntegral.integral_neg] using
609+ hmain hab hcd (by rwa [Set.uIcc_of_le hab, Set.uIcc_comm c d,
610+ Set.uIcc_of_le hcd] at hf)
611+ · rcases le_total c d with hcd | hcd
612+ · apply neg_injective
613+ simpa only [intervalIntegral.integral_symm a b, intervalIntegral.integral_neg] using
614+ hmain hab hcd (by rwa [Set.uIcc_comm a b, Set.uIcc_of_le hab,
615+ Set.uIcc_of_le hcd] at hf)
616+ · simpa only [intervalIntegral.integral_symm a b, intervalIntegral.integral_symm c d,
617+ intervalIntegral.integral_neg, neg_neg] using
618+ hmain hab hcd (by rwa [Set.uIcc_comm a b, Set.uIcc_of_le hab,
619+ Set.uIcc_comm c d, Set.uIcc_of_le hcd] at hf)
620+
621+ /-- Corollary of `intervalIntegral_intervalIntegral_swap` for functions that are continuous on the
622+ product rectangle. -/
623+ lemma intervalIntegral_intervalIntegral_swap_of_continuousOn {a b c d : ℝ} {f : ℝ → ℝ → E}
624+ (hf : ContinuousOn (uncurry f) (Set.uIcc a b ×ˢ Set.uIcc c d)) :
625+ (∫ y in c..d, ∫ x in a..b, f x y)
626+ = (∫ x in a..b, ∫ y in c..d, f x y) :=
627+ intervalIntegral_intervalIntegral_swap
628+ (hf.integrableOn_compact (isCompact_uIcc.prod isCompact_uIcc))
629+
583630section ContinuousLinearMap
584631
585632variable {E F G : Type *} [NormedAddCommGroup E] [NormedSpace ℝ E] {mE : MeasurableSpace E}
0 commit comments