Skip to content

Commit

Permalink
chore(Measure/AEMeasurable): golf a proof (#8837)
Browse files Browse the repository at this point in the history
Use recently added `map_apply₀` to golf `map_map_of_aemeasurable`.
  • Loading branch information
urkud committed Dec 6, 2023
1 parent a357dd5 commit ae28400
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions Mathlib/MeasureTheory/Measure/AEMeasurable.lean
Expand Up @@ -51,6 +51,11 @@ lemma aemeasurable_of_map_neZero {mβ : MeasurableSpace β} {μ : Measure α}

namespace AEMeasurable

protected theorem nullMeasurable (h : AEMeasurable f μ) : NullMeasurable f μ :=
let ⟨_g, hgm, hg⟩ := h
hgm.nullMeasurable.congr hg.symm
#align ae_measurable.null_measurable AEMeasurable.nullMeasurable

lemma mono_ac (hf : AEMeasurable f ν) (hμν : μ ≪ ν) : AEMeasurable f μ :=
⟨hf.mk f, hf.measurable_mk, hμν.ae_le hf.ae_eq_mk⟩

Expand Down Expand Up @@ -179,16 +184,8 @@ theorem comp_quasiMeasurePreserving {ν : Measure δ} {f : α → δ} {g : δ
theorem map_map_of_aemeasurable {g : β → γ} {f : α → β} (hg : AEMeasurable g (Measure.map f μ))
(hf : AEMeasurable f μ) : (μ.map f).map g = μ.map (g ∘ f) := by
ext1 s hs
let g' := hg.mk g
have A : map g (map f μ) = map g' (map f μ) := by
apply MeasureTheory.Measure.map_congr
exact hg.ae_eq_mk
have B : map (g ∘ f) μ = map (g' ∘ f) μ := by
apply MeasureTheory.Measure.map_congr
exact ae_of_ae_map hf hg.ae_eq_mk
simp only [A, B, hs, hg.measurable_mk.aemeasurable.comp_aemeasurable hf, hg.measurable_mk,
hg.measurable_mk hs, hf, map_apply, map_apply_of_aemeasurable]
rfl
rw [map_apply_of_aemeasurable hg hs, map_apply₀ hf (hg.nullMeasurable hs),
map_apply_of_aemeasurable (hg.comp_aemeasurable hf) hs, preimage_comp]
#align ae_measurable.map_map_of_ae_measurable AEMeasurable.map_map_of_aemeasurable

@[measurability]
Expand Down Expand Up @@ -239,11 +236,6 @@ theorem subtype_mk (h : AEMeasurable f μ) {s : Set β} {hfs : ∀ x, f x ∈ s}
simpa [Subtype.ext_iff]
#align ae_measurable.subtype_mk AEMeasurable.subtype_mk

protected theorem nullMeasurable (h : AEMeasurable f μ) : NullMeasurable f μ :=
let ⟨_g, hgm, hg⟩ := h
hgm.nullMeasurable.congr hg.symm
#align ae_measurable.null_measurable AEMeasurable.nullMeasurable

end AEMeasurable

theorem aemeasurable_const' (h : ∀ᵐ (x) (y) ∂μ, f x = f y) : AEMeasurable f μ := by
Expand Down

0 comments on commit ae28400

Please sign in to comment.