Theorem: MeasurableEmbedding.map_apply
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
μ✝ ν : Measure α
hf : MeasurableEmbedding f
μ : Measure α
s : Set β
⊢ (Measure.map f μ) s = μ (f ⁻¹' s)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
μ✝ ν : Measure α
hf : MeasurableEmbedding f
μ : Measure α
s : Set β
⊢ (Measure.map f μ) s ≤ μ (f ⁻¹' s)
tactic: refine le_antisymm ?_ (le_map_apply hf.measurable.aemeasurable s)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
μ✝ ν : Measure α
hf : MeasurableEmbedding f
μ : Measure α
s : Set β
⊢ (Measure.map f μ) s ≤ μ (f ⁻¹' s)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
μ✝ ν : Measure α
hf : MeasurableEmbedding f
μ : Measure α
s : Set β
t : Set β := f '' toMeasurable μ (f ⁻¹' s) ∪ (range f)ᶜ
⊢ (Measure.map f μ) s ≤ μ (f ⁻¹' s)
tactic: set t := f '' toMeasurable μ (f ⁻¹' s) ∪ (range f)ᶜ
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
μ✝ ν : Measure α
hf : MeasurableEmbedding f
μ : Measure α
s : Set β
t : Set β := f '' toMeasurable μ (f ⁻¹' s) ∪ (range f)ᶜ
⊢ (Measure.map f μ) s ≤ μ (f ⁻¹' s)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
μ✝ ν : Measure α
hf : MeasurableEmbedding f
μ : Measure α
s : Set β
t : Set β := f '' toMeasurable μ (f ⁻¹' s) ∪ (range f)ᶜ
htm : MeasurableSet t
⊢ (Measure.map f μ) s ≤ μ (f ⁻¹' s)
tactic: have htm : MeasurableSet t :=
    (hf.measurableSet_image.2 <| measurableSet_toMeasurable _ _).union
      hf.measurableSet_range.compl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
μ✝ ν : Measure α
hf : MeasurableEmbedding f
μ : Measure α
s : Set β
t : Set β := f '' toMeasurable μ (f ⁻¹' s) ∪ (range f)ᶜ
htm : MeasurableSet t
⊢ (Measure.map f μ) s ≤ μ (f ⁻¹' s)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
μ✝ ν : Measure α
hf : MeasurableEmbedding f
μ : Measure α
s : Set β
t : Set β := f '' toMeasurable μ (f ⁻¹' s) ∪ (range f)ᶜ
htm : MeasurableSet t
hst : s ⊆ t
⊢ (Measure.map f μ) s ≤ μ (f ⁻¹' s)
tactic: have hst : s ⊆ t := by
    rw [subset_union_compl_iff_inter_subset, ← image_preimage_eq_inter_range]
    exact image_subset _ (subset_toMeasurable _ _)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
μ✝ ν : Measure α
hf : MeasurableEmbedding f
μ : Measure α
s : Set β
t : Set β := f '' toMeasurable μ (f ⁻¹' s) ∪ (range f)ᶜ
htm : MeasurableSet t
hst : s ⊆ t
⊢ (Measure.map f μ) s ≤ μ (f ⁻¹' s)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
μ✝ ν : Measure α
hf : MeasurableEmbedding f
μ : Measure α
s : Set β
t : Set β := f '' toMeasurable μ (f ⁻¹' s) ∪ (range f)ᶜ
htm : MeasurableSet t
hst : s ⊆ t
hft : f ⁻¹' t = toMeasurable μ (f ⁻¹' s)
⊢ (Measure.map f μ) s ≤ μ (f ⁻¹' s)
tactic: have hft : f ⁻¹' t = toMeasurable μ (f ⁻¹' s) := by
    rw [preimage_union, preimage_compl, preimage_range, compl_univ, union_empty,
      hf.injective.preimage_image]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
μ✝ ν : Measure α
hf : MeasurableEmbedding f
μ : Measure α
s : Set β
t : Set β := f '' toMeasurable μ (f ⁻¹' s) ∪ (range f)ᶜ
htm : MeasurableSet t
hst : s ⊆ t
hft : f ⁻¹' t = toMeasurable μ (f ⁻¹' s)
⊢ (Measure.map f μ) s ≤ μ (f ⁻¹' s)
state_after: no goals
tactic: calc
    μ.map f s ≤ μ.map f t := by gcongr
    _ = μ (f ⁻¹' s) := by rw [map_apply hf.measurable htm, hft, measure_toMeasurable]