-- Mathlib/MeasureTheory/Measure/Restrict.lean
theorem mem_map_indicator_ae_iff_mem_map_restrict_ae_of_zero_mem [Zero β] {t : Set β}
    (ht : (0 : β) ∈ t) (hs : MeasurableSet s) :
    t ∈ Filter.map (s.indicator f) (ae μ) ↔ t ∈ Filter.map f (ae <| μ.restrict s)

Proof state:
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
μ : Measure α
s : Set α
f : α → β
inst✝ : Zero β
t : Set β
ht : 0 ∈ t
hs : MeasurableSet s
⊢ t ∈ Filter.map (s.indicator f) (ae μ) ↔ t ∈ Filter.map f (ae (μ.restrict s))

Tactic:
classical
simp_rw [mem_map, mem_ae_iff]
rw [Measure.restrict_apply' hs, Set.indicator_preimage, Set.ite]
simp_rw [Set.compl_union, Set.compl_inter]
change μ (((f ⁻¹' t)ᶜ ∪ sᶜ) ∩ ((fun _ => (0 : β)) ⁻¹' t \ s)ᶜ) = 0 ↔ μ ((f ⁻¹' t)ᶜ ∩ s) = 0
simp only [ht, ← Set.compl_eq_univ_diff, compl_compl, Set.compl_union, if_true,
  Set.preimage_const]
simp_rw [Set.union_inter_distrib_right, Set.compl_inter_self s, Set.union_empty]

Result:
no goals

Proof state:
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
μ : Measure α
s : Set α
f : α → β
inst✝ : Zero β
t : Set β
ht : 0 ∈ t
hs : MeasurableSet s
⊢ μ (((f ⁻¹' t)ᶜ ∪ sᶜ) ∩ (0 ⁻¹' t \ s)ᶜ) = 0 ↔ μ ((f ⁻¹' t)ᶜ ∩ s) = 0

Tactic:
change μ (((f ⁻¹' t)ᶜ ∪ sᶜ) ∩ ((fun _ => (0 : β)) ⁻¹' t \ s)ᶜ) = 0 ↔ μ ((f ⁻¹' t)ᶜ ∩ s) = 0

Result:
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
μ : Measure α
s : Set α
f : α → β
inst✝ : Zero β
t : Set β
ht : 0 ∈ t
hs : MeasurableSet s
⊢ μ (((f ⁻¹' t)ᶜ ∪ sᶜ) ∩ ((fun x => 0) ⁻¹' t \ s)ᶜ) = 0 ↔ μ ((f ⁻¹' t)ᶜ ∩ s) = 0

Proof state:
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
μ : Measure α
s : Set α
f : α → β
inst✝ : Zero β
t : Set β
ht : 0 ∈ t
hs : MeasurableSet s
⊢ μ (((f ⁻¹' t)ᶜ ∪ sᶜ) ∩ ((fun x => 0) ⁻¹' t \ s)ᶜ) = 0 ↔ μ ((f ⁻¹' t)ᶜ ∩ s) = 0

Tactic:
simp only [ht, ← Set.compl_eq_univ_diff, compl_compl, Set.compl_union, if_true,
  Set.preimage_const]

Result:
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
μ : Measure α
s : Set α
f : α → β
inst✝ : Zero β
t : Set β
ht : 0 ∈ t
hs : MeasurableSet s
⊢ μ (((f ⁻¹' t)ᶜ ∪ sᶜ) ∩ s) = 0 ↔ μ ((f ⁻¹' t)ᶜ ∩ s) = 0

Proof state:
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
μ : Measure α
s : Set α
f : α → β
inst✝ : Zero β
t : Set β
ht : 0 ∈ t
hs : MeasurableSet s
⊢ μ (((f ⁻¹' t)ᶜ ∪ sᶜ) ∩ s) = 0 ↔ μ ((f ⁻¹' t)ᶜ ∩ s) = 0

Tactic:
simp_rw [Set.union_inter_distrib_right, Set.compl_inter_self s, Set.union_empty]

Result:
no goals

Proof state:
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
μ : Measure α
s : Set α
f : α → β
inst✝ : Zero β
t : Set β
ht : 0 ∈ t
hs : MeasurableSet s
⊢ μ (s.indicator f ⁻¹' t)ᶜ = 0 ↔ (μ.restrict s) (f ⁻¹' t)ᶜ = 0

Tactic:
rw [Measure.restrict_apply' hs, Set.indicator_preimage, Set.ite]

Result:
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
μ : Measure α
s : Set α
f : α → β
inst✝ : Zero β
t : Set β
ht : 0 ∈ t
hs : MeasurableSet s
⊢ μ (f ⁻¹' t ∩ s ∪ 0 ⁻¹' t \ s)ᶜ = 0 ↔ μ ((f ⁻¹' t)ᶜ ∩ s) = 0

Proof state:
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
μ : Measure α
s : Set α
f : α → β
inst✝ : Zero β
t : Set β
ht : 0 ∈ t
hs : MeasurableSet s
⊢ t ∈ Filter.map (s.indicator f) (ae μ) ↔ t ∈ Filter.map f (ae (μ.restrict s))

Tactic:
simp_rw [mem_map, mem_ae_iff]

Result:
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
μ : Measure α
s : Set α
f : α → β
inst✝ : Zero β
t : Set β
ht : 0 ∈ t
hs : MeasurableSet s
⊢ μ (s.indicator f ⁻¹' t)ᶜ = 0 ↔ (μ.restrict s) (f ⁻¹' t)ᶜ = 0

Proof state:
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
μ : Measure α
s : Set α
f : α → β
inst✝ : Zero β
t : Set β
ht : 0 ∈ t
hs : MeasurableSet s
⊢ μ (f ⁻¹' t ∩ s ∪ 0 ⁻¹' t \ s)ᶜ = 0 ↔ μ ((f ⁻¹' t)ᶜ ∩ s) = 0

Tactic:
simp_rw [Set.compl_union, Set.compl_inter]

Result:
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
μ : Measure α
s : Set α
f : α → β
inst✝ : Zero β
t : Set β
ht : 0 ∈ t
hs : MeasurableSet s
⊢ μ (((f ⁻¹' t)ᶜ ∪ sᶜ) ∩ (0 ⁻¹' t \ s)ᶜ) = 0 ↔ μ ((f ⁻¹' t)ᶜ ∩ s) = 0