Theorem: MeasureTheory.addHaar_image_le_lintegral_abs_det_fderiv
File: Mathlib/MeasureTheory/Function/Jacobian.lean

tactic: let u n := disjointed (spanningSets μ) n
state_before: E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal (abs (ContinuousLinearMap.det (f' x))) ∂μ

tactic: have u_meas : ∀ n, MeasurableSet (u n) := by
  intro n
  apply MeasurableSet.disjointed fun i => ?_
  exact measurable_spanningSets μ i
state_before: E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal (abs (ContinuousLinearMap.det (f' x))) ∂μ

tactic: have A : s = ⋃ n, s ∩ u n := by
  rw [← inter_iUnion, iUnion_disjointed, iUnion_spanningSets, inter_univ]
state_before: E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal (abs (ContinuousLinearMap.det (f' x))) ∂μ

tactic: intro n
state_before: E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
⊢ ∀ (n : ℕ), MeasurableSet (u n)

tactic: apply MeasurableSet.disjointed fun i => ?_
state_before: E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
n : ℕ
⊢ MeasurableSet (u n)

tactic: exact measurable_spanningSets μ i
state_before: E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
n i : ℕ
⊢ MeasurableSet (spanningSets μ i)

tactic: rw [← inter_iUnion, iUnion_disjointed, iUnion_spanningSets, inter_univ]
state_before: E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
⊢ s = ⋃ (n : ℕ), s ∩ u n

tactic: conv_lhs => rw [A, image_iUnion]
state_before: E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ↑↑μ (f '' s) ≤ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ u n))

tactic: exact measure_iUnion_le _
state_before: E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ↑↑μ (⋃ (i : ℕ), f '' (s ∩ u i)) ≤ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ u n))

tactic: apply ENNReal.tsum_le_tsum fun n => ?_
state_before: E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ (∑' (n : ℕ), ↑↑μ (f '' (s ∩ u n))) ≤
    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal (abs (ContinuousLinearMap.det (f' x))) ∂μ

tactic: apply
  addHaar_image_le_lintegral_abs_det_fderiv_aux2 μ (hs.inter (u_meas n)) _ fun x hx =>
    (hf' x hx.1).mono (inter_subset_left _ _)
state_before: E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
n : ℕ
⊢ ↑↑μ (f '' (s ∩ u n)) ≤ ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal (abs (ContinuousLinearMap.det (f' x))) ∂μ

tactic: have : μ (u n) < ∞ :=
  lt_of_le_of_lt (measure_mono (disjointed_subset _ _)) (measure_spanningSets_lt_top μ n)
state_before: E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
n : ℕ
⊢ ↑↑μ (s ∩ u n) ≠ ⊤

tactic: exact ne_of_lt (lt_of_le_of_lt (measure_mono (inter_subset_right _ _)) this)
state_before: E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
n : ℕ
this : ↑↑μ (u n) < ⊤
⊢ ↑↑μ (s ∩ u n) ≠ ⊤

tactic: conv_rhs => rw [A]
state_before: E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ (∑' (n : ℕ), ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal (abs (ContinuousLinearMap.det (f' x))) ∂μ) =
    ∫⁻ (x : E) in s, ENNReal.ofReal (abs (ContinuousLinearMap.det (f' x))) ∂μ

tactic: rw [lintegral_iUnion]
state_before: E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ (∑' (n : ℕ), ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal (abs (ContinuousLinearMap.det (f' x))) ∂μ) =
    ∫⁻ (x : E) in ⋃ (n : ℕ), s ∩ u n, ENNReal.ofReal (abs (ContinuousLinearMap.det (f' x))) ∂μ

tactic: intro n
state_before: case hm
E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ∀ (i : ℕ), MeasurableSet (s ∩ u i)

tactic: exact hs.inter (u_meas n)
state_before: case hm
E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
n : ℕ
⊢ MeasurableSet (s ∩ u n)

tactic: exact pairwise_disjoint_mono (disjoint_disjointed _) fun n => inter_subset_right _ _
state_before: case hd
E : Type u_1
F : Type ?u.792702
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ Pairwise (Disjoint on fun n => s ∩ u n)