Theorem: MeasureTheory.withDensity_apply_eq_zero
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: constructor
state_before: α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
⊢ ↑↑(withDensity μ f) s = 0 ↔ ↑↑μ ({x | f x ≠ 0} ∩ s) = 0

tactic: intro hs
state_before: case mp
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
⊢ ↑↑(withDensity μ f) s = 0 → ↑↑μ ({x | f x ≠ 0} ∩ s) = 0

tactic: let t := toMeasurable (μ.withDensity f) s
state_before: case mp
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑(withDensity μ f) s = 0
⊢ ↑↑μ ({x | f x ≠ 0} ∩ s) = 0

tactic: apply measure_mono_null (inter_subset_inter_right _ (subset_toMeasurable (μ.withDensity f) s))
state_before: case mp
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑(withDensity μ f) s = 0
t : Set α := toMeasurable (withDensity μ f) s
⊢ ↑↑μ ({x | f x ≠ 0} ∩ s) = 0

tactic: have A : μ.withDensity f t = 0 := by rw [measure_toMeasurable, hs]
state_before: case mp
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑(withDensity μ f) s = 0
t : Set α := toMeasurable (withDensity μ f) s
⊢ ↑↑μ ({x | f x ≠ 0} ∩ toMeasurable (withDensity μ f) s) = 0

tactic: rw [withDensity_apply f (measurableSet_toMeasurable _ s), lintegral_eq_zero_iff hf,
  EventuallyEq, ae_restrict_iff, ae_iff] at A
state_before: case mp
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑(withDensity μ f) s = 0
t : Set α := toMeasurable (withDensity μ f) s
A : ↑↑(withDensity μ f) t = 0
⊢ ↑↑μ ({x | f x ≠ 0} ∩ toMeasurable (withDensity μ f) s) = 0

tactic: swap
state_before: case mp
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑(withDensity μ f) s = 0
t : Set α := toMeasurable (withDensity μ f) s
A : ↑↑μ {a | ¬(a ∈ toMeasurable (withDensity μ f) s → f a = OfNat.ofNat 0 a)} = 0
⊢ ↑↑μ ({x | f x ≠ 0} ∩ toMeasurable (withDensity μ f) s) = 0

case mp
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑(withDensity μ f) s = 0
t : Set α := toMeasurable (withDensity μ f) s
A : ∀ᵐ (x : α) ∂Measure.restrict μ (toMeasurable (withDensity μ f) s), f x = OfNat.ofNat 0 x
⊢ MeasurableSet {x | f x = OfNat.ofNat 0 x}

tactic: simp only [Pi.zero_apply, mem_setOf_eq, Filter.mem_mk] at A
state_before: case mp
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑(withDensity μ f) s = 0
t : Set α := toMeasurable (withDensity μ f) s
A : ↑↑μ {a | ¬(a ∈ toMeasurable (withDensity μ f) s → f a = OfNat.ofNat 0 a)} = 0
⊢ ↑↑μ ({x | f x ≠ 0} ∩ toMeasurable (withDensity μ f) s) = 0

tactic: convert A using 2
state_before: case mp
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑(withDensity μ f) s = 0
t : Set α := toMeasurable (withDensity μ f) s
A : ↑↑μ {a | ¬(a ∈ toMeasurable (withDensity μ f) s → f a = 0)} = 0
⊢ ↑↑μ ({x | f x ≠ 0} ∩ toMeasurable (withDensity μ f) s) = 0

tactic: ext x
state_before: case h.e'_2.h.e'_3
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑(withDensity μ f) s = 0
t : Set α := toMeasurable (withDensity μ f) s
A : ↑↑μ {a | ¬(a ∈ toMeasurable (withDensity μ f) s → f a = 0)} = 0
⊢ {x | f x ≠ 0} ∩ toMeasurable (withDensity μ f) s = {a | ¬(a ∈ toMeasurable (withDensity μ f) s → f a = 0)}

tactic: simp only [and_comm, exists_prop, mem_inter_iff, iff_self_iff, mem_setOf_eq, mem_compl_iff,
  not_forall]
state_before: case h.e'_2.h.e'_3.h
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑(withDensity μ f) s = 0
t : Set α := toMeasurable (withDensity μ f) s
A : ↑↑μ {a | ¬(a ∈ toMeasurable (withDensity μ f) s → f a = 0)} = 0
x : α
⊢ x ∈ {x | f x ≠ 0} ∩ toMeasurable (withDensity μ f) s ↔ x ∈ {a | ¬(a ∈ toMeasurable (withDensity μ f) s → f a = 0)}

tactic: rw [measure_toMeasurable, hs]
state_before: α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑(withDensity μ f) s = 0
t : Set α := toMeasurable (withDensity μ f) s
⊢ ↑↑(withDensity μ f) t = 0

tactic: exact hf (measurableSet_singleton 0)
state_before: case mp
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑(withDensity μ f) s = 0
t : Set α := toMeasurable (withDensity μ f) s
A : ∀ᵐ (x : α) ∂Measure.restrict μ (toMeasurable (withDensity μ f) s), f x = OfNat.ofNat 0 x
⊢ MeasurableSet {x | f x = OfNat.ofNat 0 x}

tactic: intro hs
state_before: case mpr
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
⊢ ↑↑μ ({x | f x ≠ 0} ∩ s) = 0 → ↑↑(withDensity μ f) s = 0

tactic: let t := toMeasurable μ ({ x | f x ≠ 0 } ∩ s)
state_before: case mpr
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑μ ({x | f x ≠ 0} ∩ s) = 0
⊢ ↑↑(withDensity μ f) s = 0

tactic: apply measure_mono_null A (measure_union_null _ _)
state_before: case mpr
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑μ ({x | f x ≠ 0} ∩ s) = 0
t : Set α := toMeasurable μ ({x | f x ≠ 0} ∩ s)
A : s ⊆ t ∪ {x | f x = 0}
⊢ ↑↑(withDensity μ f) s = 0

tactic: intro x hx
state_before: α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑μ ({x | f x ≠ 0} ∩ s) = 0
t : Set α := toMeasurable μ ({x | f x ≠ 0} ∩ s)
⊢ s ⊆ t ∪ {x | f x = 0}

tactic: rcases eq_or_ne (f x) 0 with (fx | fx)
state_before: α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑μ ({x | f x ≠ 0} ∩ s) = 0
t : Set α := toMeasurable μ ({x | f x ≠ 0} ∩ s)
x : α
hx : x ∈ s
⊢ x ∈ t ∪ {x | f x = 0}

tactic: simp only [fx, mem_union, mem_setOf_eq, eq_self_iff_true, or_true_iff]
state_before: case inl
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑μ ({x | f x ≠ 0} ∩ s) = 0
t : Set α := toMeasurable μ ({x | f x ≠ 0} ∩ s)
x : α
hx : x ∈ s
fx : f x = 0
⊢ x ∈ t ∪ {x | f x = 0}

tactic: left
state_before: case inr
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑μ ({x | f x ≠ 0} ∩ s) = 0
t : Set α := toMeasurable μ ({x | f x ≠ 0} ∩ s)
x : α
hx : x ∈ s
fx : f x ≠ 0
⊢ x ∈ t ∪ {x | f x = 0}

tactic: apply subset_toMeasurable _ _
state_before: case inr.h
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑μ ({x | f x ≠ 0} ∩ s) = 0
t : Set α := toMeasurable μ ({x | f x ≠ 0} ∩ s)
x : α
hx : x ∈ s
fx : f x ≠ 0
⊢ x ∈ t

tactic: exact ⟨fx, hx⟩
state_before: case inr.h.a
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑μ ({x | f x ≠ 0} ∩ s) = 0
t : Set α := toMeasurable μ ({x | f x ≠ 0} ∩ s)
x : α
hx : x ∈ s
fx : f x ≠ 0
⊢ x ∈ {x | f x ≠ 0} ∩ s

tactic: apply withDensity_absolutelyContinuous
state_before: α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑μ ({x | f x ≠ 0} ∩ s) = 0
t : Set α := toMeasurable μ ({x | f x ≠ 0} ∩ s)
A : s ⊆ t ∪ {x | f x = 0}
⊢ ↑↑(withDensity μ f) t = 0

tactic: rwa [measure_toMeasurable]
state_before: case a
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑μ ({x | f x ≠ 0} ∩ s) = 0
t : Set α := toMeasurable μ ({x | f x ≠ 0} ∩ s)
A : s ⊆ t ∪ {x | f x = 0}
⊢ ↑↑μ t = 0

tactic: have M : MeasurableSet { x : α | f x = 0 } := hf (measurableSet_singleton _)
state_before: α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑μ ({x | f x ≠ 0} ∩ s) = 0
t : Set α := toMeasurable μ ({x | f x ≠ 0} ∩ s)
A : s ⊆ t ∪ {x | f x = 0}
⊢ ↑↑(withDensity μ f) {x | f x = 0} = 0

tactic: rw [withDensity_apply _ M, lintegral_eq_zero_iff hf]
state_before: α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑μ ({x | f x ≠ 0} ∩ s) = 0
t : Set α := toMeasurable μ ({x | f x ≠ 0} ∩ s)
A : s ⊆ t ∪ {x | f x = 0}
M : MeasurableSet {x | f x = 0}
⊢ ↑↑(withDensity μ f) {x | f x = 0} = 0

tactic: filter_upwards [ae_restrict_mem M]
state_before: α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑μ ({x | f x ≠ 0} ∩ s) = 0
t : Set α := toMeasurable μ ({x | f x ≠ 0} ∩ s)
A : s ⊆ t ∪ {x | f x = 0}
M : MeasurableSet {x | f x = 0}
⊢ f =ᶠ[ae (Measure.restrict μ {x | f x = 0})] 0

tactic: simp only [imp_self, Pi.zero_apply, imp_true_iff]
state_before: case h
α : Type u_1
β : Type ?u.1772759
γ : Type ?u.1772762
δ : Type ?u.1772765
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : Measurable f
hs : ↑↑μ ({x | f x ≠ 0} ∩ s) = 0
t : Set α := toMeasurable μ ({x | f x ≠ 0} ∩ s)
A : s ⊆ t ∪ {x | f x = 0}
M : MeasurableSet {x | f x = 0}
⊢ ∀ (a : α), f a = 0 → f a = OfNat.ofNat 0 a