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

tactic: set L : E →L[𝕜] 𝕜 →L[𝕜] E := ContinuousLinearMap.smulRightL 𝕜 𝕜 E 1
state_before: α : Type u_2
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.793874
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : 𝕜 → α → E
F' : α → E
x₀ : 𝕜
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
bound : α → ℝ
h_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)
bound_integrable : Integrable bound
h_diff : ∀ᵐ (a : α) ∂μ, HasDerivAt (fun x => F x a) (F' a) x₀
⊢ Integrable F' ∧ HasDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀

tactic: replace h_diff : ∀ᵐ a ∂μ, HasFDerivAt (fun x => F x a) (L (F' a)) x₀ :=
  h_diff.mono fun x hx => hx.hasFDerivAt
state_before: α : Type u_2
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.793874
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : 𝕜 → α → E
F' : α → E
x₀ : 𝕜
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
bound : α → ℝ
h_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)
bound_integrable : Integrable bound
h_diff : ∀ᵐ (a : α) ∂μ, HasDerivAt (fun x => F x a) (F' a) x₀
L : E →L[𝕜] 𝕜 →L[𝕜] E := ↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1
⊢ Integrable F' ∧ HasDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀

tactic: have hm : AEStronglyMeasurable (L ∘ F') μ := L.continuous.comp_aestronglyMeasurable hF'_meas
state_before: α : Type u_2
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.793874
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : 𝕜 → α → E
F' : α → E
x₀ : 𝕜
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
bound : α → ℝ
h_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)
bound_integrable : Integrable bound
L : E →L[𝕜] 𝕜 →L[𝕜] E := ↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (↑L (F' a)) x₀
⊢ Integrable F' ∧ HasDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀

tactic: cases'
  hasFDerivAt_integral_of_dominated_loc_of_lip ε_pos hF_meas hF_int hm h_lipsch bound_integrable
    h_diff with
  hF'_int key
state_before: α : Type u_2
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.793874
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : 𝕜 → α → E
F' : α → E
x₀ : 𝕜
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
bound : α → ℝ
h_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)
bound_integrable : Integrable bound
L : E →L[𝕜] 𝕜 →L[𝕜] E := ↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (↑L (F' a)) x₀
hm : AEStronglyMeasurable (↑L ∘ F') μ
⊢ Integrable F' ∧ HasDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀

tactic: replace hF'_int : Integrable F' μ
state_before: case intro
α : Type u_2
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.793874
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : 𝕜 → α → E
F' : α → E
x₀ : 𝕜
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
bound : α → ℝ
h_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)
bound_integrable : Integrable bound
L : E →L[𝕜] 𝕜 →L[𝕜] E := ↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (↑L (F' a)) x₀
hm : AEStronglyMeasurable (↑L ∘ F') μ
hF'_int : Integrable (↑L ∘ F')
key : HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), (↑L ∘ F') a ∂μ) x₀
⊢ Integrable F' ∧ HasDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀

tactic: refine' ⟨hF'_int, _⟩
state_before: case intro
α : Type u_2
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.793874
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : 𝕜 → α → E
F' : α → E
x₀ : 𝕜
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
bound : α → ℝ
h_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)
bound_integrable : Integrable bound
L : E →L[𝕜] 𝕜 →L[𝕜] E := ↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (↑L (F' a)) x₀
hm : AEStronglyMeasurable (↑L ∘ F') μ
key : HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), (↑L ∘ F') a ∂μ) x₀
hF'_int : Integrable F'
⊢ Integrable F' ∧ HasDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀

tactic: simp_rw [hasDerivAt_iff_hasFDerivAt] at h_diff ⊢
state_before: case intro
α : Type u_2
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.793874
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : 𝕜 → α → E
F' : α → E
x₀ : 𝕜
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
bound : α → ℝ
h_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)
bound_integrable : Integrable bound
L : E →L[𝕜] 𝕜 →L[𝕜] E := ↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (↑L (F' a)) x₀
hm : AEStronglyMeasurable (↑L ∘ F') μ
key : HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), (↑L ∘ F') a ∂μ) x₀
hF'_int : Integrable F'
⊢ HasDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀

tactic: rw [← integrable_norm_iff hm] at hF'_int
state_before: case hF'_int
α : Type u_2
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.793874
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
F : 𝕜 → α → E
F' : α → E
x₀ : 𝕜
ε : ℝ
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀)
hF'_meas : AEStronglyMeasurable F' μ
bound : α → ℝ
h_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)
bound_integrable : Integrable bound
L : E →L[𝕜] 𝕜 →L[𝕜] E := ↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (↑L (F' a)) x₀
hm : AEStronglyMeasurable (↑L ∘ F') μ
hF'_int : Integrable (↑L ∘ F')
key : HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), (↑L ∘ F') a ∂μ) x₀
⊢ Integrable F'