Skip to content

Commit acada00

Browse files
committed
refactor(MeasureTheory/Integral/DominatedConvergence): golf and format
1 parent 455228b commit acada00

1 file changed

Lines changed: 13 additions & 18 deletions

File tree

Mathlib/MeasureTheory/Integral/DominatedConvergence.lean

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,7 @@ theorem continuousOn_primitive (h_int : IntegrableOn f (Icc a b) μ) :
472472
rw [continuousOn_congr this]
473473
intro x₀ _
474474
refine continuousWithinAt_primitive (measure_singleton x₀) ?_
475-
simp only [intervalIntegrable_iff_integrableOn_Ioc_of_le, max_eq_right, h,
476-
min_self]
475+
simp only [intervalIntegrable_iff_integrableOn_Ioc_of_le, max_eq_right, h, min_self]
477476
exact h_int.mono Ioc_subset_Icc_self le_rfl
478477
· rw [Icc_eq_empty h]
479478
exact continuousOn_empty _
@@ -645,8 +644,8 @@ open intervalIntegral
645644

646645
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {μ : Measure ℝ} {f : ℝ → E}
647646

648-
theorem continuousWithinAt_Ici_primitive_Ioi {a₀ : ℝ} (hf : IntegrableOn f (Ioi a₀) μ)
649-
: ContinuousWithinAt (fun b ↦ ∫ x in Ioi b, f x ∂μ) (Ici a₀) a₀ := by
647+
theorem continuousWithinAt_Ici_primitive_Ioi {a₀ : ℝ} (hf : IntegrableOn f (Ioi a₀) μ) :
648+
ContinuousWithinAt (fun b ↦ ∫ x in Ioi b, f x ∂μ) (Ici a₀) a₀ := by
650649
simp_rw [← integral_indicator measurableSet_Ioi]
651650
apply tendsto_integral_filter_of_dominated_convergence ((Ioi a₀).indicator (norm ∘ f))
652651
· filter_upwards [self_mem_nhdsWithin] with a ha
@@ -665,14 +664,12 @@ theorem continuousWithinAt_Ici_primitive_Ioi {a₀ : ℝ} (hf : IntegrableOn f (
665664

666665
theorem continuousOn_Ici_primitive_Ioi [NoAtoms μ] {a₀ : ℝ} (hf : IntegrableOn f (Ioi a₀) μ) :
667666
ContinuousOn (fun b ↦ ∫ x in Ioi b, f x ∂μ) (Ici a₀) := by
668-
intro a ha
669-
rw [mem_Ici] at ha
667+
intro a (ha : a₀ ≤ a)
670668
rw [continuousWithinAt_iff_continuous_left_right]
671669
constructor
672670
· rw [Ici_inter_Iic]
673-
have h_int : IntervalIntegrable f μ a₀ a := by
674-
rw [intervalIntegrable_iff_integrableOn_Ioc_of_le ha]
675-
exact hf.mono_set Ioc_subset_Ioi_self
671+
have h_int : IntervalIntegrable f μ a₀ a :=
672+
(intervalIntegrable_iff_integrableOn_Ioc_of_le ha).2 <| hf.mono_set Ioc_subset_Ioi_self
676673
have h_split : ∀ b ∈ Icc a₀ a, ∫ x in Ioi b, f x ∂μ =
677674
(∫ x in Ioi a₀, f x ∂μ) - ∫ x in a₀..b, f x ∂μ := by
678675
intro b hb
@@ -682,8 +679,8 @@ theorem continuousOn_Ici_primitive_Ioi [NoAtoms μ] {a₀ : ℝ} (hf : Integrabl
682679
exact (continuousWithinAt_const.sub h_cwa).congr h_split (h_split a (right_mem_Icc.2 ha))
683680
· simpa [ha] using (hf.mono_set (Ioi_subset_Ioi ha)).continuousWithinAt_Ici_primitive_Ioi
684681

685-
theorem continuousWithinAt_Iic_primitive_Iio {a₀ : ℝ} (hf : IntegrableOn f (Iio a₀) μ)
686-
: ContinuousWithinAt (fun b ↦ ∫ x in Iio b, f x ∂μ) (Iic a₀) a₀ := by
682+
theorem continuousWithinAt_Iic_primitive_Iio {a₀ : ℝ} (hf : IntegrableOn f (Iio a₀) μ) :
683+
ContinuousWithinAt (fun b ↦ ∫ x in Iio b, f x ∂μ) (Iic a₀) a₀ := by
687684
simp_rw [← integral_indicator measurableSet_Iio]
688685
apply tendsto_integral_filter_of_dominated_convergence ((Iio a₀).indicator (norm ∘ f))
689686
· filter_upwards [self_mem_nhdsWithin] with a ha
@@ -702,21 +699,19 @@ theorem continuousWithinAt_Iic_primitive_Iio {a₀ : ℝ} (hf : IntegrableOn f (
702699

703700
theorem continuousOn_Iic_primitive_Iio [NoAtoms μ] {a₀ : ℝ} (hf : IntegrableOn f (Iio a₀) μ) :
704701
ContinuousOn (fun b ↦ ∫ x in Iio b, f x ∂μ) (Iic a₀) := by
705-
intro a ha
706-
rw [mem_Iic] at ha
702+
intro a (ha : a ≤ a₀)
707703
rw [continuousWithinAt_iff_continuous_left_right]
708704
constructor
709705
· simpa [ha] using (hf.mono_set (Iio_subset_Iio ha)).continuousWithinAt_Iic_primitive_Iio
710706
· rw [Iic_inter_Ici]
711-
have h_int : IntervalIntegrable f μ a a₀ := by
712-
rw [intervalIntegrable_iff_integrableOn_Ico_of_le ha]
713-
exact hf.mono_set Ico_subset_Iio_self
707+
have h_int : IntervalIntegrable f μ a a₀ :=
708+
(intervalIntegrable_iff_integrableOn_Ico_of_le ha).2 <| hf.mono_set Ico_subset_Iio_self
714709
have h_split : ∀ b ∈ Icc a a₀, ∫ x in Iio b, f x ∂μ =
715710
(∫ x in Iio a₀, f x ∂μ) + ∫ x in a₀..b, f x ∂μ := by
716711
intro b hb
717712
simp [integral_symm b a₀, ← integral_Iio_sub_Iio' hf (hf.mono_set (Iio_subset_Iio hb.2))]
718-
have h_cwa : ContinuousWithinAt (fun b ↦ ∫ x in a₀..b, f x ∂μ) (Icc a a₀) a := by
719-
exact continuousWithinAt_primitive (measure_singleton a) (by simpa [ha])
713+
have h_cwa : ContinuousWithinAt (fun b ↦ ∫ x in a₀..b, f x ∂μ) (Icc a a₀) a :=
714+
continuousWithinAt_primitive (measure_singleton a) (by simpa [ha])
720715
exact (continuousWithinAt_const.add h_cwa).congr h_split (h_split a (left_mem_Icc.2 ha))
721716

722717
theorem continuousOn_Ici_primitive_Ici [NoAtoms μ] {a₀ : ℝ} (hf : IntegrableOn f (Ici a₀) μ) :

0 commit comments

Comments
 (0)