Theorem: hasFDerivAt_integral_of_dominated_loc_of_lip
File: Mathlib/Analysis/Calculus/ParametricIntegral.lean

tactic: obtain ⟨δ, δ_pos, hδ⟩ : ∃ δ > 0, ∀ x ∈ ball x₀ δ, AEStronglyMeasurable (F x) μ ∧ x ∈ ball x₀ ε
state_before: α : Type u_4
inst✝⁷ : MeasurableSpace α
μ : MeasureTheory.Measure α
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_2
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : H → α → E
F' : α → H →L[𝕜] E
x₀ : H
bound : α → ℝ
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
h_lip : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)
bound_integrable : Integrable bound
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀
⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀

tactic: exact eventually_nhds_iff_ball.mp (hF_meas.and (ball_mem_nhds x₀ ε_pos))
state_before: α : Type u_4
inst✝⁷ : MeasurableSpace α
μ : MeasureTheory.Measure α
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_2
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : H → α → E
F' : α → H →L[𝕜] E
x₀ : H
bound : α → ℝ
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
h_lip : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)
bound_integrable : Integrable bound
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀
⊢ ∃ δ, δ > 0 ∧ ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ ∧ x ∈ ball x₀ ε

case intro.intro
α : Type u_4
inst✝⁷ : MeasurableSpace α
μ : MeasureTheory.Measure α
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_2
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : H → α → E
F' : α → H →L[𝕜] E
x₀ : H
bound : α → ℝ
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
h_lip : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)
bound_integrable : Integrable bound
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀
δ : ℝ
δ_pos : δ > 0
hδ : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ ∧ x ∈ ball x₀ ε
⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀

tactic: choose hδ_meas hδε using hδ
state_before: case intro.intro
α : Type u_4
inst✝⁷ : MeasurableSpace α
μ : MeasureTheory.Measure α
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_2
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : H → α → E
F' : α → H →L[𝕜] E
x₀ : H
bound : α → ℝ
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
h_lip : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)
bound_integrable : Integrable bound
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀
δ : ℝ
δ_pos : δ > 0
hδ : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ ∧ x ∈ ball x₀ ε
⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀

tactic: replace h_lip : ∀ᵐ a : α ∂μ, ∀ x ∈ ball x₀ δ, ‖F x a - F x₀ a‖ ≤ |bound a| * ‖x - x₀‖
state_before: case intro.intro
α : Type u_4
inst✝⁷ : MeasurableSpace α
μ : MeasureTheory.Measure α
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_2
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : H → α → E
F' : α → H →L[𝕜] E
x₀ : H
bound : α → ℝ
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
h_lip : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)
bound_integrable : Integrable bound
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀
δ : ℝ
δ_pos : δ > 0
hδ_meas : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ
hδε : ∀ (x : H), x ∈ ball x₀ δ → x ∈ ball x₀ ε
⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀

tactic: exact h_lip.mono fun a lip x hx => lip.norm_sub_le (hδε x hx) (mem_ball_self ε_pos)
state_before: case h_lip
α : Type u_4
inst✝⁷ : MeasurableSpace α
μ : MeasureTheory.Measure α
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_2
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : H → α → E
F' : α → H →L[𝕜] E
x₀ : H
bound : α → ℝ
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
h_lip : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)
bound_integrable : Integrable bound
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀
δ : ℝ
δ_pos : δ > 0
hδ_meas : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ
hδε : ∀ (x : H), x ∈ ball x₀ δ → x ∈ ball x₀ ε
⊢ ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ δ → ‖F x a - F x₀ a‖ ≤ abs (bound a) * ‖x - x₀‖

case intro.intro
α : Type u_4
inst✝⁷ : MeasurableSpace α
μ : MeasureTheory.Measure α
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_2
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : H → α → E
F' : α → H →L[𝕜] E
x₀ : H
bound : α → ℝ
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
bound_integrable : Integrable bound
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀
δ : ℝ
δ_pos : δ > 0
hδ_meas : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ
hδε : ∀ (x : H), x ∈ ball x₀ δ → x ∈ ball x₀ ε
h_lip : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ δ → ‖F x a - F x₀ a‖ ≤ abs (bound a) * ‖x - x₀‖
⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀

tactic: replace bound_integrable := bound_integrable.norm
state_before: case intro.intro
α : Type u_4
inst✝⁷ : MeasurableSpace α
μ : MeasureTheory.Measure α
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_2
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : H → α → E
F' : α → H →L[𝕜] E
x₀ : H
bound : α → ℝ
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
bound_integrable : Integrable bound
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀
δ : ℝ
δ_pos : δ > 0
hδ_meas : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ
hδε : ∀ (x : H), x ∈ ball x₀ δ → x ∈ ball x₀ ε
h_lip : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ δ → ‖F x a - F x₀ a‖ ≤ abs (bound a) * ‖x - x₀‖
⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀

tactic: apply hasFDerivAt_integral_of_dominated_loc_of_lip' δ_pos <;> assumption
state_before: case intro.intro
α : Type u_4
inst✝⁷ : MeasurableSpace α
μ : MeasureTheory.Measure α
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_2
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : H → α → E
F' : α → H →L[𝕜] E
x₀ : H
bound : α → ℝ
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀
δ : ℝ
δ_pos : δ > 0
hδ_meas : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ
hδε : ∀ (x : H), x ∈ ball x₀ δ → x ∈ ball x₀ ε
h_lip : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ δ → ‖F x a - F x₀ a‖ ≤ abs (bound a) * ‖x - x₀‖
bound_integrable : Integrable fun a => ‖bound a‖
⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀