import Mathlib
import FoML


open MeasureTheory Filter Finset Real

open scoped MeasureTheory ProbabilityTheory ENNReal NNReal

theorem extracted_formal_statement_23.{u_1} {Ω : Type u_1} {m : MeasurableSpace Ω} {μ : Measure Ω}
  [inst : IsFiniteMeasure μ] (t a b : ℝ) {X : Ω → ℝ} (hX : AEMeasurable X μ) (h : ∀ᵐ (ω : Ω) ∂μ, X ω ∈ Set.Icc a b) :
  let e := fun t ω => rexp (t * X ω);
  let e' := fun t ω => rexp (t * X ω) * X ω;
  Integrable (e' t) μ ∧ HasDerivAt (fun t => ∫ (x : Ω), e t x ∂μ) (∫ (x : Ω), e' t x ∂μ) t → Integrable (e t) μ := sorry

Tactic state before:
Ω : Type u_1
m : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
t a b : ℝ
X : Ω → ℝ
hX : AEMeasurable X μ
h : ∀ᵐ (ω : Ω) ∂μ, X ω ∈ Set.Icc a b
c : ℝ := ‖a‖ ⊔ ‖b‖
e : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω)
e' : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω) * X ω
⊢ Integrable (e' t) μ ∧ HasDerivAt (fun t => ∫ (x : Ω), e t x ∂μ) (∫ (x : Ω), e' t x ∂μ) t

Tactic:
apply hasDerivAt_integral_of_dominated_loc_of_deriv_le

Tactic state after:
[case ε_pos
 Ω : Type u_1
 m : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsFiniteMeasure μ
 t a b : ℝ
 X : Ω → ℝ
 hX : AEMeasurable X μ
 h : ∀ᵐ (ω : Ω) ∂μ, X ω ∈ Set.Icc a b
 c : ℝ := ‖a‖ ⊔ ‖b‖
 e : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω)
 e' : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω) * X ω
 ⊢ 0 < ?ε,
 case hF_meas
 Ω : Type u_1
 m : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsFiniteMeasure μ
 t a b : ℝ
 X : Ω → ℝ
 hX : AEMeasurable X μ
 h : ∀ᵐ (ω : Ω) ∂μ, X ω ∈ Set.Icc a b
 c : ℝ := ‖a‖ ⊔ ‖b‖
 e : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω)
 e' : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω) * X ω
 ⊢ ∀ᶠ (x : ℝ) in nhds t, AEStronglyMeasurable (e x) μ,
 case hF_int
 Ω : Type u_1
 m : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsFiniteMeasure μ
 t a b : ℝ
 X : Ω → ℝ
 hX : AEMeasurable X μ
 h : ∀ᵐ (ω : Ω) ∂μ, X ω ∈ Set.Icc a b
 c : ℝ := ‖a‖ ⊔ ‖b‖
 e : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω)
 e' : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω) * X ω
 ⊢ Integrable (e t) μ,
 case hF'_meas
 Ω : Type u_1
 m : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsFiniteMeasure μ
 t a b : ℝ
 X : Ω → ℝ
 hX : AEMeasurable X μ
 h : ∀ᵐ (ω : Ω) ∂μ, X ω ∈ Set.Icc a b
 c : ℝ := ‖a‖ ⊔ ‖b‖
 e : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω)
 e' : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω) * X ω
 ⊢ AEStronglyMeasurable (e' t) μ,
 case h_bound
 Ω : Type u_1
 m : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsFiniteMeasure μ
 t a b : ℝ
 X : Ω → ℝ
 hX : AEMeasurable X μ
 h : ∀ᵐ (ω : Ω) ∂μ, X ω ∈ Set.Icc a b
 c : ℝ := ‖a‖ ⊔ ‖b‖
 e : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω)
 e' : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω) * X ω
 ⊢ ∀ᵐ (a : Ω) ∂μ, ∀ x ∈ Metric.ball t ?ε, ‖e' x a‖ ≤ ?bound a,
 case bound_integrable
 Ω : Type u_1
 m : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsFiniteMeasure μ
 t a b : ℝ
 X : Ω → ℝ
 hX : AEMeasurable X μ
 h : ∀ᵐ (ω : Ω) ∂μ, X ω ∈ Set.Icc a b
 c : ℝ := ‖a‖ ⊔ ‖b‖
 e : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω)
 e' : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω) * X ω
 ⊢ Integrable ?bound μ,
 case h_diff
 Ω : Type u_1
 m : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsFiniteMeasure μ
 t a b : ℝ
 X : Ω → ℝ
 hX : AEMeasurable X μ
 h : ∀ᵐ (ω : Ω) ∂μ, X ω ∈ Set.Icc a b
 c : ℝ := ‖a‖ ⊔ ‖b‖
 e : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω)
 e' : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω) * X ω
 ⊢ ∀ᵐ (a : Ω) ∂μ, ∀ x ∈ Metric.ball t ?ε, HasDerivAt (fun x => e x a) (e' x a) x,
 case bound
 Ω : Type u_1
 m : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsFiniteMeasure μ
 t a b : ℝ
 X : Ω → ℝ
 hX : AEMeasurable X μ
 h : ∀ᵐ (ω : Ω) ∂μ, X ω ∈ Set.Icc a b
 c : ℝ := ‖a‖ ⊔ ‖b‖
 e : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω)
 e' : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω) * X ω
 ⊢ Ω → ℝ,
 case ε
 Ω : Type u_1
 m : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsFiniteMeasure μ
 t a b : ℝ
 X : Ω → ℝ
 hX : AEMeasurable X μ
 h : ∀ᵐ (ω : Ω) ∂μ, X ω ∈ Set.Icc a b
 c : ℝ := ‖a‖ ⊔ ‖b‖
 e : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω)
 e' : ℝ → Ω → ℝ := fun t ω => rexp (t * X ω) * X ω
 ⊢ ℝ]