l3lab/ntp-mathlib huggingface dataset:
theorem mgf_pos' (hμ : μ ≠ 0) (h_int_X : Integrable (fun ω => exp (t * X ω)) μ) :
    0 < mgf X μ t := by
  simp_rw [mgf]
  have : ∫ x : Ω, exp (t * X x) ∂μ = ∫ x : Ω in Set.univ, exp (t * X x) ∂μ := by
    simp only [Measure.restrict_univ]
  rw [this, set_integral_pos_iff_support_of_nonneg_ae _ _]
  · have h_eq_univ : (Function.support fun x : Ω => exp (t * X x)) = Set.univ := by
      ext1 x
      simp only [Function.mem_support, Set.mem_univ, iff_true_iff]
      exact (exp_pos _).ne'
    rw [h_eq_univ, Set.inter_univ _]
    refine' Ne.bot_lt _
    

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => rexp (t * X ω)
this : ∫ (x : Ω), rexp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, rexp (t * X x) ∂μ
h_eq_univ : (Function.support fun x => rexp (t * X x)) = Set.univ
⊢ ↑↑μ Set.univ ≠ ⊥

Next tactic:
simp only [hμ, ENNReal.bot_eq_zero, Ne.def, Measure.measure_univ_eq_zero, not_false_iff]
theorem mgf_pos' (hμ : μ ≠ 0) (h_int_X : Integrable (fun ω => exp (t * X ω)) μ) :
    0 < mgf X μ t := by
  simp_rw [mgf]
  have : ∫ x : Ω, exp (t * X x) ∂μ = ∫ x : Ω in Set.univ, exp (t * X x) ∂μ := by
    simp only [Measure.restrict_univ]
  rw [this, set_integral_pos_iff_support_of_nonneg_ae _ _]
  · have h_eq_univ : (Function.support fun x : Ω => exp (t * X x)) = Set.univ := by
      ext1 x
      simp only [Function.mem_support, Set.mem_univ, iff_true_iff]
      exact (exp_pos _).ne'
    rw [h_eq_univ, Set.inter_univ _]
    refine' Ne.bot_lt _
    simp only [hμ, ENNReal.bot_eq_zero, Ne.def, Measure.measure_univ_eq_zero, not_false_iff]
  · 

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => rexp (t * X ω)
this : ∫ (x : Ω), rexp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, rexp (t * X x) ∂μ
⊢ 0 ≤ᵐ[Measure.restrict μ Set.univ] fun x => rexp (t * X x)

Next tactic:
refine' eventually_of_forall fun x => _
theorem mgf_pos' (hμ : μ ≠ 0) (h_int_X : Integrable (fun ω => exp (t * X ω)) μ) :
    0 < mgf X μ t := by
  simp_rw [mgf]
  have : ∫ x : Ω, exp (t * X x) ∂μ = ∫ x : Ω in Set.univ, exp (t * X x) ∂μ := by
    simp only [Measure.restrict_univ]
  rw [this, set_integral_pos_iff_support_of_nonneg_ae _ _]
  · have h_eq_univ : (Function.support fun x : Ω => exp (t * X x)) = Set.univ := by
      ext1 x
      simp only [Function.mem_support, Set.mem_univ, iff_true_iff]
      exact (exp_pos _).ne'
    rw [h_eq_univ, Set.inter_univ _]
    refine' Ne.bot_lt _
    simp only [hμ, ENNReal.bot_eq_zero, Ne.def, Measure.measure_univ_eq_zero, not_false_iff]
  · refine' eventually_of_forall fun x => _
    

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => rexp (t * X ω)
this : ∫ (x : Ω), rexp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, rexp (t * X x) ∂μ
x : Ω
⊢ OfNat.ofNat 0 x ≤ (fun x => rexp (t * X x)) x

Next tactic:
rw [Pi.zero_apply]
theorem mgf_pos' (hμ : μ ≠ 0) (h_int_X : Integrable (fun ω => exp (t * X ω)) μ) :
    0 < mgf X μ t := by
  simp_rw [mgf]
  have : ∫ x : Ω, exp (t * X x) ∂μ = ∫ x : Ω in Set.univ, exp (t * X x) ∂μ := by
    simp only [Measure.restrict_univ]
  rw [this, set_integral_pos_iff_support_of_nonneg_ae _ _]
  · have h_eq_univ : (Function.support fun x : Ω => exp (t * X x)) = Set.univ := by
      ext1 x
      simp only [Function.mem_support, Set.mem_univ, iff_true_iff]
      exact (exp_pos _).ne'
    rw [h_eq_univ, Set.inter_univ _]
    refine' Ne.bot_lt _
    simp only [hμ, ENNReal.bot_eq_zero, Ne.def, Measure.measure_univ_eq_zero, not_false_iff]
  · refine' eventually_of_forall fun x => _
    rw [Pi.zero_apply]
    

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => rexp (t * X ω)
this : ∫ (x : Ω), rexp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, rexp (t * X x) ∂μ
x : Ω
⊢ 0 ≤ (fun x => rexp (t * X x)) x

Next tactic:
exact (exp_pos _).le
theorem mgf_pos' (hμ : μ ≠ 0) (h_int_X : Integrable (fun ω => exp (t * X ω)) μ) :
    0 < mgf X μ t := by
  simp_rw [mgf]
  have : ∫ x : Ω, exp (t * X x) ∂μ = ∫ x : Ω in Set.univ, exp (t * X x) ∂μ := by
    simp only [Measure.restrict_univ]
  rw [this, set_integral_pos_iff_support_of_nonneg_ae _ _]
  · have h_eq_univ : (Function.support fun x : Ω => exp (t * X x)) = Set.univ := by
      ext1 x
      simp only [Function.mem_support, Set.mem_univ, iff_true_iff]
      exact (exp_pos _).ne'
    rw [h_eq_univ, Set.inter_univ _]
    refine' Ne.bot_lt _
    simp only [hμ, ENNReal.bot_eq_zero, Ne.def, Measure.measure_univ_eq_zero, not_false_iff]
  · refine' eventually_of_forall fun x => _
    rw [Pi.zero_apply]
    exact (exp_pos _).le
  · 

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => rexp (t * X ω)
this : ∫ (x : Ω), rexp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, rexp (t * X x) ∂μ
⊢ IntegrableOn (fun x => rexp (t * X x)) Set.univ

Next tactic:
rwa [integrableOn_univ]
theorem mgf_neg : mgf (-X) μ t = mgf X μ (-t) := by 

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
⊢ mgf (-X) μ t = mgf X μ (-t)

Next tactic:
simp_rw [mgf, Pi.neg_apply, mul_neg, neg_mul]
theorem cgf_neg : cgf (-X) μ t = cgf X μ (-t) := by 

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
⊢ cgf (-X) μ t = cgf X μ (-t)

Next tactic:
simp_rw [cgf, mgf_neg]
/-- This is a trivial application of `IndepFun.comp` but it will come up frequently. -/
theorem IndepFun.exp_mul {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ) (s t : ℝ) :
    IndepFun (fun ω => exp (s * X ω)) (fun ω => exp (t * Y ω)) μ := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t✝ : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
s t : ℝ
⊢ IndepFun (fun ω => rexp (s * X ω)) fun ω => rexp (t * Y ω)

Next tactic:
have h_meas : ∀ t, Measurable fun x => exp (t * x) := fun t => (measurable_id'.const_mul t).exp
/-- This is a trivial application of `IndepFun.comp` but it will come up frequently. -/
theorem IndepFun.exp_mul {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ) (s t : ℝ) :
    IndepFun (fun ω => exp (s * X ω)) (fun ω => exp (t * Y ω)) μ := by
  have h_meas : ∀ t, Measurable fun x => exp (t * x) := fun t => (measurable_id'.const_mul t).exp
  

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t✝ : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
s t : ℝ
h_meas : ∀ (t : ℝ), Measurable fun x => rexp (t * x)
⊢ IndepFun (fun ω => rexp (s * X ω)) fun ω => rexp (t * Y ω)

Next tactic:
change IndepFun ((fun x => exp (s * x)) ∘ X) ((fun x => exp (t * x)) ∘ Y) μ
/-- This is a trivial application of `IndepFun.comp` but it will come up frequently. -/
theorem IndepFun.exp_mul {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ) (s t : ℝ) :
    IndepFun (fun ω => exp (s * X ω)) (fun ω => exp (t * Y ω)) μ := by
  have h_meas : ∀ t, Measurable fun x => exp (t * x) := fun t => (measurable_id'.const_mul t).exp
  change IndepFun ((fun x => exp (s * x)) ∘ X) ((fun x => exp (t * x)) ∘ Y) μ
  

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t✝ : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
s t : ℝ
h_meas : ∀ (t : ℝ), Measurable fun x => rexp (t * x)
⊢ IndepFun ((fun x => rexp (s * x)) ∘ X) ((fun x => rexp (t * x)) ∘ Y)

Next tactic:
exact IndepFun.comp h_indep (h_meas s) (h_meas t)
theorem IndepFun.mgf_add {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ)
    (hX : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ)
    (hY : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ) :
    mgf (X + Y) μ t = mgf X μ t * mgf Y μ t := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
hX : AEStronglyMeasurable (fun ω => rexp (t * X ω)) μ
hY : AEStronglyMeasurable (fun ω => rexp (t * Y ω)) μ
⊢ mgf (X + Y) μ t = mgf X μ t * mgf Y μ t

Next tactic:
simp_rw [mgf, Pi.add_apply, mul_add, exp_add]
theorem IndepFun.mgf_add {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ)
    (hX : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ)
    (hY : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ) :
    mgf (X + Y) μ t = mgf X μ t * mgf Y μ t := by
  simp_rw [mgf, Pi.add_apply, mul_add, exp_add]
  

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
hX : AEStronglyMeasurable (fun ω => rexp (t * X ω)) μ
hY : AEStronglyMeasurable (fun ω => rexp (t * Y ω)) μ
⊢ ∫ (x : Ω), rexp (t * X x) * rexp (t * Y x) ∂μ = (∫ (x : Ω), rexp (t * X x) ∂μ) * ∫ (x : Ω), rexp (t * Y x) ∂μ

Next tactic:
exact (h_indep.exp_mul t t).integral_mul hX hY
theorem IndepFun.mgf_add' {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ) (hX : AEStronglyMeasurable X μ)
    (hY : AEStronglyMeasurable Y μ) : mgf (X + Y) μ t = mgf X μ t * mgf Y μ t := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
⊢ mgf (X + Y) μ t = mgf X μ t * mgf Y μ t

Next tactic:
have A : Continuous fun x : ℝ => exp (t * x) := by continuity
theorem IndepFun.mgf_add' {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ) (hX : AEStronglyMeasurable X μ)
    (hY : AEStronglyMeasurable Y μ) : mgf (X + Y) μ t = mgf X μ t * mgf Y μ t := by
  have A : Continuous fun x : ℝ => exp (t * x) := by 

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
⊢ Continuous fun x => rexp (t * x)

Next tactic:
continuity
theorem IndepFun.mgf_add' {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ) (hX : AEStronglyMeasurable X μ)
    (hY : AEStronglyMeasurable Y μ) : mgf (X + Y) μ t = mgf X μ t * mgf Y μ t := by
  have A : Continuous fun x : ℝ => exp (t * x) := by continuity
  

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
A : Continuous fun x => rexp (t * x)
⊢ mgf (X + Y) μ t = mgf X μ t * mgf Y μ t

Next tactic:
have h'X : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ :=
    A.aestronglyMeasurable.comp_aemeasurable hX.aemeasurable
theorem IndepFun.mgf_add' {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ) (hX : AEStronglyMeasurable X μ)
    (hY : AEStronglyMeasurable Y μ) : mgf (X + Y) μ t = mgf X μ t * mgf Y μ t := by
  have A : Continuous fun x : ℝ => exp (t * x) := by continuity
  have h'X : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ :=
    A.aestronglyMeasurable.comp_aemeasurable hX.aemeasurable
  

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
A : Continuous fun x => rexp (t * x)
h'X : AEStronglyMeasurable (fun ω => rexp (t * X ω)) μ
⊢ mgf (X + Y) μ t = mgf X μ t * mgf Y μ t

Next tactic:
have h'Y : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ :=
    A.aestronglyMeasurable.comp_aemeasurable hY.aemeasurable
theorem IndepFun.mgf_add' {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ) (hX : AEStronglyMeasurable X μ)
    (hY : AEStronglyMeasurable Y μ) : mgf (X + Y) μ t = mgf X μ t * mgf Y μ t := by
  have A : Continuous fun x : ℝ => exp (t * x) := by continuity
  have h'X : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ :=
    A.aestronglyMeasurable.comp_aemeasurable hX.aemeasurable
  have h'Y : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ :=
    A.aestronglyMeasurable.comp_aemeasurable hY.aemeasurable
  

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
hX : AEStronglyMeasurable X μ
hY : AEStronglyMeasurable Y μ
A : Continuous fun x => rexp (t * x)
h'X : AEStronglyMeasurable (fun ω => rexp (t * X ω)) μ
h'Y : AEStronglyMeasurable (fun ω => rexp (t * Y ω)) μ
⊢ mgf (X + Y) μ t = mgf X μ t * mgf Y μ t

Next tactic:
exact h_indep.mgf_add h'X h'Y
theorem IndepFun.cgf_add {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ)
    (h_int_X : Integrable (fun ω => exp (t * X ω)) μ)
    (h_int_Y : Integrable (fun ω => exp (t * Y ω)) μ) :
    cgf (X + Y) μ t = cgf X μ t + cgf Y μ t := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
h_int_X : Integrable fun ω => rexp (t * X ω)
h_int_Y : Integrable fun ω => rexp (t * Y ω)
⊢ cgf (X + Y) μ t = cgf X μ t + cgf Y μ t

Next tactic:
by_cases hμ : μ = 0
theorem IndepFun.cgf_add {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ)
    (h_int_X : Integrable (fun ω => exp (t * X ω)) μ)
    (h_int_Y : Integrable (fun ω => exp (t * Y ω)) μ) :
    cgf (X + Y) μ t = cgf X μ t + cgf Y μ t := by
  by_cases hμ : μ = 0
  · 

Proof state:
case pos
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
h_int_X : Integrable fun ω => rexp (t * X ω)
h_int_Y : Integrable fun ω => rexp (t * Y ω)
hμ : μ = 0
⊢ cgf (X + Y) μ t = cgf X μ t + cgf Y μ t

Next tactic:
simp [hμ]
theorem IndepFun.cgf_add {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ)
    (h_int_X : Integrable (fun ω => exp (t * X ω)) μ)
    (h_int_Y : Integrable (fun ω => exp (t * Y ω)) μ) :
    cgf (X + Y) μ t = cgf X μ t + cgf Y μ t := by
  by_cases hμ : μ = 0
  · simp [hμ]
  

Proof state:
case neg
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
h_int_X : Integrable fun ω => rexp (t * X ω)
h_int_Y : Integrable fun ω => rexp (t * Y ω)
hμ : ¬μ = 0
⊢ cgf (X + Y) μ t = cgf X μ t + cgf Y μ t

Next tactic:
simp only [cgf, h_indep.mgf_add h_int_X.aestronglyMeasurable h_int_Y.aestronglyMeasurable]
theorem IndepFun.cgf_add {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ)
    (h_int_X : Integrable (fun ω => exp (t * X ω)) μ)
    (h_int_Y : Integrable (fun ω => exp (t * Y ω)) μ) :
    cgf (X + Y) μ t = cgf X μ t + cgf Y μ t := by
  by_cases hμ : μ = 0
  · simp [hμ]
  simp only [cgf, h_indep.mgf_add h_int_X.aestronglyMeasurable h_int_Y.aestronglyMeasurable]
  

Proof state:
case neg
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
h_int_X : Integrable fun ω => rexp (t * X ω)
h_int_Y : Integrable fun ω => rexp (t * Y ω)
hμ : ¬μ = 0
⊢ log (mgf X μ t * mgf Y μ t) = log (mgf X μ t) + log (mgf Y μ t)

Next tactic:
exact log_mul (mgf_pos' hμ h_int_X).ne' (mgf_pos' hμ h_int_Y).ne'
theorem aestronglyMeasurable_exp_mul_add {X Y : Ω → ℝ}
    (h_int_X : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ)
    (h_int_Y : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ) :
    AEStronglyMeasurable (fun ω => exp (t * (X + Y) ω)) μ := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_int_X : AEStronglyMeasurable (fun ω => rexp (t * X ω)) μ
h_int_Y : AEStronglyMeasurable (fun ω => rexp (t * Y ω)) μ
⊢ AEStronglyMeasurable (fun ω => rexp (t * (X + Y) ω)) μ

Next tactic:
simp_rw [Pi.add_apply, mul_add, exp_add]
theorem aestronglyMeasurable_exp_mul_add {X Y : Ω → ℝ}
    (h_int_X : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ)
    (h_int_Y : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ) :
    AEStronglyMeasurable (fun ω => exp (t * (X + Y) ω)) μ := by
  simp_rw [Pi.add_apply, mul_add, exp_add]
  

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_int_X : AEStronglyMeasurable (fun ω => rexp (t * X ω)) μ
h_int_Y : AEStronglyMeasurable (fun ω => rexp (t * Y ω)) μ
⊢ AEStronglyMeasurable (fun ω => rexp (t * X ω) * rexp (t * Y ω)) μ

Next tactic:
exact AEStronglyMeasurable.mul h_int_X h_int_Y
theorem aestronglyMeasurable_exp_mul_sum {X : ι → Ω → ℝ} {s : Finset ι}
    (h_int : ∀ i ∈ s, AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ) :
    AEStronglyMeasurable (fun ω => exp (t * (∑ i in s, X i) ω)) μ := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X : ι → Ω → ℝ
s : Finset ι
h_int : ∀ i ∈ s, AEStronglyMeasurable (fun ω => rexp (t * X i ω)) μ
⊢ AEStronglyMeasurable (fun ω => rexp (t * Finset.sum s (fun i => X i) ω)) μ

Next tactic:
classical
  induction' s using Finset.induction_on with i s hi_notin_s h_rec h_int
  · simp only [Pi.zero_apply, sum_apply, sum_empty, mul_zero, exp_zero]
    exact aestronglyMeasurable_const
  · have : ∀ i : ι, i ∈ s → AEStronglyMeasurable (fun ω : Ω => exp (t * X i ω)) μ := fun i hi =>
      h_int i (mem_insert_of_mem hi)
    specialize h_rec this
    rw [sum_insert hi_notin_s]
    apply aestronglyMeasurable_exp_mul_add (h_int i (mem_insert_self _ _)) h_rec
theorem aestronglyMeasurable_exp_mul_sum {X : ι → Ω → ℝ} {s : Finset ι}
    (h_int : ∀ i ∈ s, AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ) :
    AEStronglyMeasurable (fun ω => exp (t * (∑ i in s, X i) ω)) μ := by
  classical
  

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X : ι → Ω → ℝ
s : Finset ι
h_int : ∀ i ∈ s, AEStronglyMeasurable (fun ω => rexp (t * X i ω)) μ
⊢ AEStronglyMeasurable (fun ω => rexp (t * Finset.sum s (fun i => X i) ω)) μ

Next tactic:
induction' s using Finset.induction_on with i s hi_notin_s h_rec h_int
theorem aestronglyMeasurable_exp_mul_sum {X : ι → Ω → ℝ} {s : Finset ι}
    (h_int : ∀ i ∈ s, AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ) :
    AEStronglyMeasurable (fun ω => exp (t * (∑ i in s, X i) ω)) μ := by
  classical
  induction' s using Finset.induction_on with i s hi_notin_s h_rec h_int
  · 

Proof state:
case empty
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X : ι → Ω → ℝ
h_int : ∀ i ∈ ∅, AEStronglyMeasurable (fun ω => rexp (t * X i ω)) μ
⊢ AEStronglyMeasurable (fun ω => rexp (t * Finset.sum ∅ (fun i => X i) ω)) μ

Next tactic:
simp only [Pi.zero_apply, sum_apply, sum_empty, mul_zero, exp_zero]
theorem aestronglyMeasurable_exp_mul_sum {X : ι → Ω → ℝ} {s : Finset ι}
    (h_int : ∀ i ∈ s, AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ) :
    AEStronglyMeasurable (fun ω => exp (t * (∑ i in s, X i) ω)) μ := by
  classical
  induction' s using Finset.induction_on with i s hi_notin_s h_rec h_int
  · simp only [Pi.zero_apply, sum_apply, sum_empty, mul_zero, exp_zero]
    

Proof state:
case empty
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X : ι → Ω → ℝ
h_int : ∀ i ∈ ∅, AEStronglyMeasurable (fun ω => rexp (t * X i ω)) μ
⊢ AEStronglyMeasurable (fun ω => 1) μ

Next tactic:
exact aestronglyMeasurable_const
theorem aestronglyMeasurable_exp_mul_sum {X : ι → Ω → ℝ} {s : Finset ι}
    (h_int : ∀ i ∈ s, AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ) :
    AEStronglyMeasurable (fun ω => exp (t * (∑ i in s, X i) ω)) μ := by
  classical
  induction' s using Finset.induction_on with i s hi_notin_s h_rec h_int
  · simp only [Pi.zero_apply, sum_apply, sum_empty, mul_zero, exp_zero]
    exact aestronglyMeasurable_const
  · 

Proof state:
case insert
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X : ι → Ω → ℝ
i : ι
s : Finset ι
hi_notin_s : i ∉ s
h_rec :
  (∀ i ∈ s, AEStronglyMeasurable (fun ω => rexp (t * X i ω)) μ) →
    AEStronglyMeasurable (fun ω => rexp (t * Finset.sum s (fun i => X i) ω)) μ
h_int : ∀ i_1 ∈ insert i s, AEStronglyMeasurable (fun ω => rexp (t * X i_1 ω)) μ
⊢ AEStronglyMeasurable (fun ω => rexp (t * Finset.sum (insert i s) (fun i => X i) ω)) μ

Next tactic:
have : ∀ i : ι, i ∈ s → AEStronglyMeasurable (fun ω : Ω => exp (t * X i ω)) μ := fun i hi =>
      h_int i (mem_insert_of_mem hi)
theorem aestronglyMeasurable_exp_mul_sum {X : ι → Ω → ℝ} {s : Finset ι}
    (h_int : ∀ i ∈ s, AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ) :
    AEStronglyMeasurable (fun ω => exp (t * (∑ i in s, X i) ω)) μ := by
  classical
  induction' s using Finset.induction_on with i s hi_notin_s h_rec h_int
  · simp only [Pi.zero_apply, sum_apply, sum_empty, mul_zero, exp_zero]
    exact aestronglyMeasurable_const
  · have : ∀ i : ι, i ∈ s → AEStronglyMeasurable (fun ω : Ω => exp (t * X i ω)) μ := fun i hi =>
      h_int i (mem_insert_of_mem hi)
    

Proof state:
case insert
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X : ι → Ω → ℝ
i : ι
s : Finset ι
hi_notin_s : i ∉ s
h_rec :
  (∀ i ∈ s, AEStronglyMeasurable (fun ω => rexp (t * X i ω)) μ) →
    AEStronglyMeasurable (fun ω => rexp (t * Finset.sum s (fun i => X i) ω)) μ
h_int : ∀ i_1 ∈ insert i s, AEStronglyMeasurable (fun ω => rexp (t * X i_1 ω)) μ
this : ∀ i ∈ s, AEStronglyMeasurable (fun ω => rexp (t * X i ω)) μ
⊢ AEStronglyMeasurable (fun ω => rexp (t * Finset.sum (insert i s) (fun i => X i) ω)) μ

Next tactic:
specialize h_rec this
theorem aestronglyMeasurable_exp_mul_sum {X : ι → Ω → ℝ} {s : Finset ι}
    (h_int : ∀ i ∈ s, AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ) :
    AEStronglyMeasurable (fun ω => exp (t * (∑ i in s, X i) ω)) μ := by
  classical
  induction' s using Finset.induction_on with i s hi_notin_s h_rec h_int
  · simp only [Pi.zero_apply, sum_apply, sum_empty, mul_zero, exp_zero]
    exact aestronglyMeasurable_const
  · have : ∀ i : ι, i ∈ s → AEStronglyMeasurable (fun ω : Ω => exp (t * X i ω)) μ := fun i hi =>
      h_int i (mem_insert_of_mem hi)
    specialize h_rec this
    

Proof state:
case insert
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X : ι → Ω → ℝ
i : ι
s : Finset ι
hi_notin_s : i ∉ s
h_int : ∀ i_1 ∈ insert i s, AEStronglyMeasurable (fun ω => rexp (t * X i_1 ω)) μ
this : ∀ i ∈ s, AEStronglyMeasurable (fun ω => rexp (t * X i ω)) μ
h_rec : AEStronglyMeasurable (fun ω => rexp (t * Finset.sum s (fun i => X i) ω)) μ
⊢ AEStronglyMeasurable (fun ω => rexp (t * Finset.sum (insert i s) (fun i => X i) ω)) μ

Next tactic:
rw [sum_insert hi_notin_s]
theorem aestronglyMeasurable_exp_mul_sum {X : ι → Ω → ℝ} {s : Finset ι}
    (h_int : ∀ i ∈ s, AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ) :
    AEStronglyMeasurable (fun ω => exp (t * (∑ i in s, X i) ω)) μ := by
  classical
  induction' s using Finset.induction_on with i s hi_notin_s h_rec h_int
  · simp only [Pi.zero_apply, sum_apply, sum_empty, mul_zero, exp_zero]
    exact aestronglyMeasurable_const
  · have : ∀ i : ι, i ∈ s → AEStronglyMeasurable (fun ω : Ω => exp (t * X i ω)) μ := fun i hi =>
      h_int i (mem_insert_of_mem hi)
    specialize h_rec this
    rw [sum_insert hi_notin_s]
    

Proof state:
case insert
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X : ι → Ω → ℝ
i : ι
s : Finset ι
hi_notin_s : i ∉ s
h_int : ∀ i_1 ∈ insert i s, AEStronglyMeasurable (fun ω => rexp (t * X i_1 ω)) μ
this : ∀ i ∈ s, AEStronglyMeasurable (fun ω => rexp (t * X i ω)) μ
h_rec : AEStronglyMeasurable (fun ω => rexp (t * Finset.sum s (fun i => X i) ω)) μ
⊢ AEStronglyMeasurable (fun ω => rexp (t * (X i + ∑ x in s, X x) ω)) μ

Next tactic:
apply aestronglyMeasurable_exp_mul_add (h_int i (mem_insert_self _ _)) h_rec
theorem IndepFun.integrable_exp_mul_add {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ)
    (h_int_X : Integrable (fun ω => exp (t * X ω)) μ)
    (h_int_Y : Integrable (fun ω => exp (t * Y ω)) μ) :
    Integrable (fun ω => exp (t * (X + Y) ω)) μ := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
h_int_X : Integrable fun ω => rexp (t * X ω)
h_int_Y : Integrable fun ω => rexp (t * Y ω)
⊢ Integrable fun ω => rexp (t * (X + Y) ω)

Next tactic:
simp_rw [Pi.add_apply, mul_add, exp_add]