Theorem: ProbabilityTheory.iIndepFun.mgf_sum
File: Mathlib/Probability/Moments.lean

tactic: induction' s using Finset.induction_on with i s hi_notin_s h_rec h_int
state_before: Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsProbabilityMeasure μ
X : ι → Ω → ℝ
h_indep : iIndepFun (fun i => inferInstance) X μ
h_meas : ∀ (i : ι), Measurable (X i)
s : Finset ι
⊢ mgf (∑ i ∈ s, X i) μ t = ∏ i ∈ s, mgf (X i) μ t
state_after: case empty
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsProbabilityMeasure μ
X : ι → Ω → ℝ
h_indep : iIndepFun (fun i => inferInstance) X μ
h_meas : ∀ (i : ι), Measurable (X i)
⊢ mgf (∑ i ∈ ∅, X i) μ t = ∏ i ∈ ∅, mgf (X i) μ t

case insert
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsProbabilityMeasure μ
X : ι → Ω → ℝ
h_indep : iIndepFun (fun i => inferInstance) X μ
h_meas : ∀ (i : ι), Measurable (X i)
i : ι
s : Finset ι
hi_notin_s : i ∉ s
h_rec : mgf (∑ i ∈ s, X i) μ t = ∏ i ∈ s, mgf (X i) μ t
⊢ mgf (∑ i ∈ insert i s, X i) μ t = ∏ i ∈ insert i s, mgf (X i) μ t

tactic: simp only [sum_empty, mgf_zero_fun, measure_univ, ENNReal.one_toReal, prod_empty]
state_before: case empty
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsProbabilityMeasure μ
X : ι → Ω → ℝ
h_indep : iIndepFun (fun i => inferInstance) X μ
h_meas : ∀ (i : ι), Measurable (X i)
⊢ mgf (∑ i ∈ ∅, X i) μ t = ∏ i ∈ ∅, mgf (X i) μ t
state_after: no goals

tactic: have h_int' : ∀ i : ι, AEStronglyMeasurable (fun ω : Ω => exp (t * X i ω)) μ := fun i =>
  ((h_meas i).const_mul t).exp.aestronglyMeasurable
state_before: case insert
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsProbabilityMeasure μ
X : ι → Ω → ℝ
h_indep : iIndepFun (fun i => inferInstance) X μ
h_meas : ∀ (i : ι), Measurable (X i)
i : ι
s : Finset ι
hi_notin_s : i ∉ s
h_rec : mgf (∑ i ∈ s, X i) μ t = ∏ i ∈ s, mgf (X i) μ t
⊢ mgf (∑ i ∈ insert i s, X i) μ t = ∏ i ∈ insert i s, mgf (X i) μ t
state_after: case insert
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsProbabilityMeasure μ
X : ι → Ω → ℝ
h_indep : iIndepFun (fun i => inferInstance) X μ
h_meas : ∀ (i : ι), Measurable (X i)
i : ι
s : Finset ι
hi_notin_s : i ∉ s
h_rec : mgf (∑ i ∈ s, X i) μ t = ∏ i ∈ s, mgf (X i) μ t
h_int' : ∀ (i : ι), AEStronglyMeasurable (fun ω => rexp (t * X i ω)) μ
⊢ mgf (∑ i ∈ insert i s, X i) μ t = ∏ i ∈ insert i s, mgf (X i) μ t

tactic: rw [sum_insert hi_notin_s,
  IndepFun.mgf_add (h_indep.indepFun_finset_sum_of_not_mem h_meas hi_notin_s).symm (h_int' i)
    (aestronglyMeasurable_exp_mul_sum fun i _ => h_int' i),
  h_rec, prod_insert hi_notin_s]
state_before: case insert
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsProbabilityMeasure μ
X : ι → Ω → ℝ
h_indep : iIndepFun (fun i => inferInstance) X μ
h_meas : ∀ (i : ι), Measurable (X i)
i : ι
s : Finset ι
hi_notin_s : i ∉ s
h_rec : mgf (∑ i ∈ s, X i) μ t = ∏ i ∈ s, mgf (X i) μ t
h_int' : ∀ (i : ι), AEStronglyMeasurable (fun ω => rexp (t * X i ω)) μ
⊢ mgf (∑ i ∈ insert i s, X i) μ t = ∏ i ∈ insert i s, mgf (X i) μ t
state_after: no goals