lemmaaemeasurable_of_ae_continuousAt {XY : Type*} [TopologicalSpaceX]
[MeasurableSpaceX] [OpensMeasurableSpaceX] [TopologicalSpaceY]
[MeasurableSpaceY] [BorelSpaceY] {μ : MeasureX} {f : X→Y}
(h : ∀ᵐ x ∂μ, ContinuousAt f x) : AEMeasurable f μ :=by
proof · 6
lines
let s := {x | ContinuousAt f x}
havehs : NullMeasurableSet s μ := .of_compl (.of_null (ae_iff.mp h))
havehc : ContinuousOn f s :=fun x hx => hx.continuousWithinAt
haveH:= hc.aemeasurable₀ hs
rw [Measure.restrict_eq_self_of_ae_mem (s := s) h] at H
exact H