Theorem: MeasureTheory.ae_withDensity_iff_ae_restrict'
File: Mathlib/MeasureTheory/Measure/WithDensity.lean

tactic: rw [ae_withDensity_iff' hf, ae_restrict_iff'₀]
state_before: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
p : α → Prop
f : α → ℝ≥0∞
hf : AEMeasurable f μ
⊢ (∀ᵐ (x : α) ∂μ.withDensity f, p x) ↔ ∀ᵐ (x : α) ∂μ.restrict {x | f x ≠ 0}, p x
state_after: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
p : α → Prop
f : α → ℝ≥0∞
hf : AEMeasurable f μ
⊢ (∀ᵐ (x : α) ∂μ, f x ≠ 0 → p x) ↔ ∀ᵐ (x : α) ∂μ, x ∈ {x | f x ≠ 0} → p x

α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
p : α → Prop
f : α → ℝ≥0∞
hf : AEMeasurable f μ
⊢ NullMeasurableSet {x | f x ≠ 0} μ

tactic: simp only [mem_setOf]
state_before: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
p : α → Prop
f : α → ℝ≥0∞
hf : AEMeasurable f μ
⊢ (∀ᵐ (x : α) ∂μ, f x ≠ 0 → p x) ↔ ∀ᵐ (x : α) ∂μ, x ∈ {x | f x ≠ 0} → p x
state_after: no goals

tactic: rcases hf with ⟨g, hg, hfg⟩
state_before: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
p : α → Prop
f : α → ℝ≥0∞
hf : AEMeasurable f μ
⊢ NullMeasurableSet {x | f x ≠ 0} μ
state_after: case intro.intro
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
p : α → Prop
f g : α → ℝ≥0∞
hg : Measurable g
hfg : f =ᶠ[ae μ] g
⊢ NullMeasurableSet {x | f x ≠ 0} μ

tactic: have nonneg_eq_ae : {x | g x ≠ 0} =ᵐ[μ] {x | f x ≠ 0} := by
  filter_upwards [hfg] with a ha
  simp only [eq_iff_iff]
  exact ⟨fun (h : g a ≠ 0) ↦ by rwa [← ha] at h,
         fun (h : f a ≠ 0) ↦ by rwa [ha] at h⟩
state_before: case intro.intro
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
p : α → Prop
f g : α → ℝ≥0∞
hg : Measurable g
hfg : f =ᶠ[ae μ] g
⊢ NullMeasurableSet {x | f x ≠ 0} μ
state_after: case intro.intro
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
p : α → Prop
f g : α → ℝ≥0∞
hg : Measurable g
hfg : f =ᶠ[ae μ] g
nonneg_eq_ae : {x | g x ≠ 0} =ᶠ[ae μ] {x | f x ≠ 0}
⊢ NullMeasurableSet {x | f x ≠ 0} μ

tactic: exact NullMeasurableSet.congr
  (MeasurableSet.nullMeasurableSet
    <| hg (measurableSet_singleton _)).compl
  nonneg_eq_ae
state_before: case intro.intro
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
p : α → Prop
f g : α → ℝ≥0∞
hg : Measurable g
hfg : f =ᶠ[ae μ] g
nonneg_eq_ae : {x | g x ≠ 0} =ᶠ[ae μ] {x | f x ≠ 0}
⊢ NullMeasurableSet {x | f x ≠ 0} μ
state_after: no goals

tactic: filter_upwards [hfg] with a ha
state_before: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
p : α → Prop
f g : α → ℝ≥0∞
hg : Measurable g
hfg : f =ᶠ[ae μ] g
⊢ {x | g x ≠ 0} =ᶠ[ae μ] {x | f x ≠ 0}
state_after: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
p : α → Prop
f g : α → ℝ≥0∞
hg : Measurable g
hfg : f =ᶠ[ae μ] g
a : α
ha : f a = g a
⊢ {x | g x ≠ 0} a = {x | f x ≠ 0} a

tactic: simp only [eq_iff_iff]
state_before: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
p : α → Prop
f g : α → ℝ≥0∞
hg : Measurable g
hfg : f =ᶠ[ae μ] g
a : α
ha : f a = g a
⊢ {x | g x ≠ 0} a = {x | f x ≠ 0} a
state_after: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
p : α → Prop
f g : α → ℝ≥0∞
hg : Measurable g
hfg : f =ᶠ[ae μ] g
a : α
ha : f a = g a
⊢ {x | g x ≠ 0} a ↔ {x | f x ≠ 0} a

tactic: exact ⟨fun (h : g a ≠ 0) ↦ by rwa [← ha] at h,
       fun (h : f a ≠ 0) ↦ by rwa [ha] at h⟩
state_before: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
p : α → Prop
f g : α → ℝ≥0∞
hg : Measurable g
hfg : f =ᶠ[ae μ] g
a : α
ha : f a = g a
⊢ {x | g x ≠ 0} a ↔ {x | f x ≠ 0} a
state_after: no goals

tactic: rwa [← ha] at h
state_before: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
p : α → Prop
f g : α → ℝ≥0∞
hg : Measurable g
hfg : f =ᶠ[ae μ] g
a : α
ha : f a = g a
h : g a ≠ 0
⊢ {x | f x ≠ 0} a
state_after: no goals

tactic: rwa [ha] at h
state_before: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
p : α → Prop
f g : α → ℝ≥0∞
hg : Measurable g
hfg : f =ᶠ[ae μ] g
a : α
ha : f a = g a
h : f a ≠ 0
⊢ {x | g x ≠ 0} a
state_after: no goals