[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p✝ : ℕ
μ✝ : Measure Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
⊢ ℝ
[PROOFSTEP]
have m := fun (x : Ω) =>
  μ[X]
    -- Porting note: Lean deems `μ[(X - fun x => μ[X]) ^ p]` ambiguous
[GOAL]
Ω : Type u_1
ι : Type u_2
m✝ : MeasurableSpace Ω
X✝ : Ω → ℝ
p✝ : ℕ
μ✝ : Measure Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
m : Ω → ℝ
⊢ ℝ
[PROOFSTEP]
exact μ[(X - m) ^ p]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
hp : p ≠ 0
⊢ moment 0 p μ = 0
[PROOFSTEP]
simp only [moment, hp, zero_pow', Ne.def, not_false_iff, Pi.zero_apply, integral_const, smul_eq_mul, mul_zero]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
hp : p ≠ 0
⊢ centralMoment 0 p μ = 0
[PROOFSTEP]
simp only [centralMoment, hp, Pi.zero_apply, integral_const, smul_eq_mul, mul_zero, zero_sub, Pi.pow_apply,
  Pi.neg_apply, neg_zero, zero_pow', Ne.def, not_false_iff]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
h_int : Integrable X
⊢ centralMoment X 1 μ = (1 - ENNReal.toReal (↑↑μ Set.univ)) * ∫ (x : Ω), X x ∂μ
[PROOFSTEP]
simp only [centralMoment, Pi.sub_apply, pow_one]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
h_int : Integrable X
⊢ ∫ (x : Ω), X x - ∫ (x : Ω), X x ∂μ ∂μ = (1 - ENNReal.toReal (↑↑μ Set.univ)) * ∫ (x : Ω), X x ∂μ
[PROOFSTEP]
rw [integral_sub h_int (integrable_const _)]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
h_int : Integrable X
⊢ ∫ (a : Ω), X a ∂μ - ∫ (a : Ω), ∫ (x : Ω), X x ∂μ ∂μ = (1 - ENNReal.toReal (↑↑μ Set.univ)) * ∫ (x : Ω), X x ∂μ
[PROOFSTEP]
simp only [sub_mul, integral_const, smul_eq_mul, one_mul]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
⊢ centralMoment X 1 μ = 0
[PROOFSTEP]
by_cases h_int : Integrable X μ
[GOAL]
case pos
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
h_int : Integrable X
⊢ centralMoment X 1 μ = 0
[PROOFSTEP]
rw [centralMoment_one' h_int]
[GOAL]
case pos
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
h_int : Integrable X
⊢ (1 - ENNReal.toReal (↑↑μ Set.univ)) * ∫ (x : Ω), X x ∂μ = 0
[PROOFSTEP]
simp only [measure_univ, ENNReal.one_toReal, sub_self, zero_mul]
[GOAL]
case neg
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
h_int : ¬Integrable X
⊢ centralMoment X 1 μ = 0
[PROOFSTEP]
simp only [centralMoment, Pi.sub_apply, pow_one]
[GOAL]
case neg
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
h_int : ¬Integrable X
⊢ ∫ (x : Ω), X x - ∫ (x : Ω), X x ∂μ ∂μ = 0
[PROOFSTEP]
have : ¬Integrable (fun x => X x - integral μ X) μ :=
  by
  refine' fun h_sub => h_int _
  have h_add : X = (fun x => X x - integral μ X) + fun _ => integral μ X := by ext1 x; simp
  rw [h_add]
  exact h_sub.add (integrable_const _)
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
h_int : ¬Integrable X
⊢ ¬Integrable fun x => X x - integral μ X
[PROOFSTEP]
refine' fun h_sub => h_int _
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
h_int : ¬Integrable X
h_sub : Integrable fun x => X x - integral μ X
⊢ Integrable X
[PROOFSTEP]
have h_add : X = (fun x => X x - integral μ X) + fun _ => integral μ X := by ext1 x; simp
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
h_int : ¬Integrable X
h_sub : Integrable fun x => X x - integral μ X
⊢ X = (fun x => X x - integral μ X) + fun x => integral μ X
[PROOFSTEP]
ext1 x
[GOAL]
case h
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
h_int : ¬Integrable X
h_sub : Integrable fun x => X x - integral μ X
x : Ω
⊢ X x = ((fun x => X x - integral μ X) + fun x => integral μ X) x
[PROOFSTEP]
simp
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
h_int : ¬Integrable X
h_sub : Integrable fun x => X x - integral μ X
h_add : X = (fun x => X x - integral μ X) + fun x => integral μ X
⊢ Integrable X
[PROOFSTEP]
rw [h_add]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
h_int : ¬Integrable X
h_sub : Integrable fun x => X x - integral μ X
h_add : X = (fun x => X x - integral μ X) + fun x => integral μ X
⊢ Integrable ((fun x => X x - integral μ X) + fun x => integral μ X)
[PROOFSTEP]
exact h_sub.add (integrable_const _)
[GOAL]
case neg
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
h_int : ¬Integrable X
this : ¬Integrable fun x => X x - integral μ X
⊢ ∫ (x : Ω), X x - ∫ (x : Ω), X x ∂μ ∂μ = 0
[PROOFSTEP]
rw [integral_undef this]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
hX : Memℒp X 2
⊢ centralMoment X 2 μ = variance X μ
[PROOFSTEP]
rw [hX.variance_eq]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
hX : Memℒp X 2
⊢ centralMoment X 2 μ = ∫ (x : Ω), ((X - fun x => ∫ (x : Ω), X x ∂μ) ^ 2) x ∂μ
[PROOFSTEP]
rfl
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
⊢ mgf 0 μ t = ENNReal.toReal (↑↑μ Set.univ)
[PROOFSTEP]
simp only [mgf, Pi.zero_apply, mul_zero, exp_zero, integral_const, smul_eq_mul, mul_one]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
⊢ cgf 0 μ t = log (ENNReal.toReal (↑↑μ Set.univ))
[PROOFSTEP]
simp only [cgf, mgf_zero_fun]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
⊢ mgf X 0 t = 0
[PROOFSTEP]
simp only [mgf, integral_zero_measure]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
⊢ cgf X 0 t = 0
[PROOFSTEP]
simp only [cgf, log_zero, mgf_zero_measure]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t c : ℝ
⊢ mgf (fun x => c) μ t = ENNReal.toReal (↑↑μ Set.univ) * exp (t * c)
[PROOFSTEP]
simp only [mgf, integral_const, smul_eq_mul]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t c : ℝ
inst✝ : IsProbabilityMeasure μ
⊢ mgf (fun x => c) μ t = exp (t * c)
[PROOFSTEP]
simp only [mgf_const', measure_univ, ENNReal.one_toReal, one_mul]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
hμ : μ ≠ 0
c : ℝ
⊢ cgf (fun x => c) μ t = log (ENNReal.toReal (↑↑μ Set.univ)) + t * c
[PROOFSTEP]
simp only [cgf, mgf_const']
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
hμ : μ ≠ 0
c : ℝ
⊢ log (ENNReal.toReal (↑↑μ Set.univ) * exp (t * c)) = log (ENNReal.toReal (↑↑μ Set.univ)) + t * c
[PROOFSTEP]
rw [log_mul _ (exp_pos _).ne']
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
hμ : μ ≠ 0
c : ℝ
⊢ log (ENNReal.toReal (↑↑μ Set.univ)) + log (exp (t * c)) = log (ENNReal.toReal (↑↑μ Set.univ)) + t * c
[PROOFSTEP]
rw [log_exp _]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
hμ : μ ≠ 0
c : ℝ
⊢ ENNReal.toReal (↑↑μ Set.univ) ≠ 0
[PROOFSTEP]
rw [Ne.def, ENNReal.toReal_eq_zero_iff, Measure.measure_univ_eq_zero]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
hμ : μ ≠ 0
c : ℝ
⊢ ¬(μ = 0 ∨ ↑↑μ Set.univ = ⊤)
[PROOFSTEP]
simp only [hμ, measure_ne_top μ Set.univ, or_self_iff, not_false_iff]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsProbabilityMeasure μ
c : ℝ
⊢ cgf (fun x => c) μ t = t * c
[PROOFSTEP]
simp only [cgf, mgf_const, log_exp]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
⊢ mgf X μ 0 = ENNReal.toReal (↑↑μ Set.univ)
[PROOFSTEP]
simp only [mgf, zero_mul, exp_zero, integral_const, smul_eq_mul, mul_one]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsProbabilityMeasure μ
⊢ mgf X μ 0 = 1
[PROOFSTEP]
simp only [mgf_zero', measure_univ, ENNReal.one_toReal]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
⊢ cgf X μ 0 = log (ENNReal.toReal (↑↑μ Set.univ))
[PROOFSTEP]
simp only [cgf, mgf_zero']
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsProbabilityMeasure μ
⊢ cgf X μ 0 = 0
[PROOFSTEP]
simp only [cgf_zero', measure_univ, ENNReal.one_toReal, log_one]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hX : ¬Integrable fun ω => exp (t * X ω)
⊢ mgf X μ t = 0
[PROOFSTEP]
simp only [mgf, integral_undef hX]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hX : ¬Integrable fun ω => exp (t * X ω)
⊢ cgf X μ t = 0
[PROOFSTEP]
simp only [cgf, mgf_undef hX, log_zero]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
⊢ 0 ≤ mgf X μ t
[PROOFSTEP]
refine' integral_nonneg _
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
⊢ 0 ≤ fun x => (fun ω => exp (t * X ω)) x
[PROOFSTEP]
intro ω
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
ω : Ω
⊢ OfNat.ofNat 0 ω ≤ (fun x => (fun ω => exp (t * X ω)) x) ω
[PROOFSTEP]
simp only [Pi.zero_apply]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
ω : Ω
⊢ 0 ≤ exp (t * X ω)
[PROOFSTEP]
exact (exp_pos _).le
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => exp (t * X ω)
⊢ 0 < mgf X μ t
[PROOFSTEP]
simp_rw [mgf]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => exp (t * X ω)
⊢ 0 < ∫ (x : Ω), exp (t * X x) ∂μ
[PROOFSTEP]
have : ∫ x : Ω, exp (t * X x) ∂μ = ∫ x : Ω in Set.univ, exp (t * X x) ∂μ := by simp only [Measure.restrict_univ]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => exp (t * X ω)
⊢ ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ
[PROOFSTEP]
simp only [Measure.restrict_univ]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => exp (t * X ω)
this : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ
⊢ 0 < ∫ (x : Ω), exp (t * X x) ∂μ
[PROOFSTEP]
rw [this, set_integral_pos_iff_support_of_nonneg_ae _ _]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => exp (t * X ω)
this : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ
⊢ 0 < ↑↑μ ((Function.support fun x => exp (t * X x)) ∩ Set.univ)
[PROOFSTEP]
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'
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => exp (t * X ω)
this : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ
⊢ (Function.support fun x => exp (t * X x)) = Set.univ
[PROOFSTEP]
ext1 x
[GOAL]
case h
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => exp (t * X ω)
this : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ
x : Ω
⊢ (x ∈ Function.support fun x => exp (t * X x)) ↔ x ∈ Set.univ
[PROOFSTEP]
simp only [Function.mem_support, Set.mem_univ, iff_true_iff]
[GOAL]
case h
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => exp (t * X ω)
this : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ
x : Ω
⊢ exp (t * X x) ≠ 0
[PROOFSTEP]
exact (exp_pos _).ne'
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => exp (t * X ω)
this : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ
h_eq_univ : (Function.support fun x => exp (t * X x)) = Set.univ
⊢ 0 < ↑↑μ ((Function.support fun x => exp (t * X x)) ∩ Set.univ)
[PROOFSTEP]
rw [h_eq_univ, Set.inter_univ _]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => exp (t * X ω)
this : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ
h_eq_univ : (Function.support fun x => exp (t * X x)) = Set.univ
⊢ 0 < ↑↑μ Set.univ
[PROOFSTEP]
refine' Ne.bot_lt _
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => exp (t * X ω)
this : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ
h_eq_univ : (Function.support fun x => exp (t * X x)) = Set.univ
⊢ ↑↑μ Set.univ ≠ ⊥
[PROOFSTEP]
simp only [hμ, ENNReal.bot_eq_zero, Ne.def, Measure.measure_univ_eq_zero, not_false_iff]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => exp (t * X ω)
this : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ
⊢ 0 ≤ᵐ[Measure.restrict μ Set.univ] fun x => exp (t * X x)
[PROOFSTEP]
refine' eventually_of_forall fun x => _
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => exp (t * X ω)
this : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ
x : Ω
⊢ OfNat.ofNat 0 x ≤ (fun x => exp (t * X x)) x
[PROOFSTEP]
rw [Pi.zero_apply]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => exp (t * X ω)
this : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ
x : Ω
⊢ 0 ≤ (fun x => exp (t * X x)) x
[PROOFSTEP]
exact (exp_pos _).le
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
hμ : μ ≠ 0
h_int_X : Integrable fun ω => exp (t * X ω)
this : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ
⊢ IntegrableOn (fun x => exp (t * X x)) Set.univ
[PROOFSTEP]
rwa [integrableOn_univ]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
⊢ mgf (-X) μ t = mgf X μ (-t)
[PROOFSTEP]
simp_rw [mgf, Pi.neg_apply, mul_neg, neg_mul]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
⊢ cgf (-X) μ t = cgf X μ (-t)
[PROOFSTEP]
simp_rw [cgf, mgf_neg]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t✝ : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
s t : ℝ
⊢ IndepFun (fun ω => exp (s * X ω)) fun ω => exp (t * Y ω)
[PROOFSTEP]
have h_meas : ∀ t, Measurable fun x => exp (t * x) := fun t => (measurable_id'.const_mul t).exp
[GOAL]
Ω : 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 => exp (t * x)
⊢ IndepFun (fun ω => exp (s * X ω)) fun ω => exp (t * Y ω)
[PROOFSTEP]
change IndepFun ((fun x => exp (s * x)) ∘ X) ((fun x => exp (t * x)) ∘ Y) μ
[GOAL]
Ω : 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 => exp (t * x)
⊢ IndepFun ((fun x => exp (s * x)) ∘ X) ((fun x => exp (t * x)) ∘ Y)
[PROOFSTEP]
exact IndepFun.comp h_indep (h_meas s) (h_meas t)
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
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
[PROOFSTEP]
simp_rw [mgf, Pi.add_apply, mul_add, exp_add]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_indep : IndepFun X Y
hX : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ
hY : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ
⊢ ∫ (x : Ω), exp (t * X x) * exp (t * Y x) ∂μ = (∫ (x : Ω), exp (t * X x) ∂μ) * ∫ (x : Ω), exp (t * Y x) ∂μ
[PROOFSTEP]
exact (h_indep.exp_mul t t).integral_mul hX hY
[GOAL]
Ω : 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
[PROOFSTEP]
have A : Continuous fun x : ℝ => exp (t * x) := by continuity
[GOAL]
Ω : 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 => exp (t * x)
[PROOFSTEP]
continuity
[GOAL]
Ω : 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 => exp (t * x)
⊢ mgf (X + Y) μ t = mgf X μ t * mgf Y μ t
[PROOFSTEP]
have h'X : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ := A.aestronglyMeasurable.comp_aemeasurable hX.aemeasurable
[GOAL]
Ω : 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 => exp (t * x)
h'X : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ
⊢ mgf (X + Y) μ t = mgf X μ t * mgf Y μ t
[PROOFSTEP]
have h'Y : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ := A.aestronglyMeasurable.comp_aemeasurable hY.aemeasurable
[GOAL]
Ω : 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 => exp (t * x)
h'X : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ
h'Y : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ
⊢ mgf (X + Y) μ t = mgf X μ t * mgf Y μ t
[PROOFSTEP]
exact h_indep.mgf_add h'X h'Y
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
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
[PROOFSTEP]
by_cases hμ : μ = 0
[GOAL]
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 ω => exp (t * X ω)
h_int_Y : Integrable fun ω => exp (t * Y ω)
hμ : μ = 0
⊢ cgf (X + Y) μ t = cgf X μ t + cgf Y μ t
[PROOFSTEP]
simp [hμ]
[GOAL]
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 ω => exp (t * X ω)
h_int_Y : Integrable fun ω => exp (t * Y ω)
hμ : ¬μ = 0
⊢ cgf (X + Y) μ t = cgf X μ t + cgf Y μ t
[PROOFSTEP]
simp only [cgf, h_indep.mgf_add h_int_X.aestronglyMeasurable h_int_Y.aestronglyMeasurable]
[GOAL]
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 ω => exp (t * X ω)
h_int_Y : Integrable fun ω => exp (t * Y ω)
hμ : ¬μ = 0
⊢ log (mgf X μ t * mgf Y μ t) = log (mgf X μ t) + log (mgf Y μ t)
[PROOFSTEP]
exact log_mul (mgf_pos' hμ h_int_X).ne' (mgf_pos' hμ h_int_Y).ne'
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_int_X : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ
h_int_Y : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ
⊢ AEStronglyMeasurable (fun ω => exp (t * (X + Y) ω)) μ
[PROOFSTEP]
simp_rw [Pi.add_apply, mul_add, exp_add]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X Y : Ω → ℝ
h_int_X : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ
h_int_Y : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ
⊢ AEStronglyMeasurable (fun ω => exp (t * X ω) * exp (t * Y ω)) μ
[PROOFSTEP]
exact AEStronglyMeasurable.mul h_int_X h_int_Y
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X : ι → Ω → ℝ
s : Finset ι
h_int : ∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ
⊢ AEStronglyMeasurable (fun ω => exp (t * Finset.sum s (fun i => X i) ω)) μ
[PROOFSTEP]
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
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X : ι → Ω → ℝ
s : Finset ι
h_int : ∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ
⊢ AEStronglyMeasurable (fun ω => exp (t * Finset.sum s (fun i => X i) ω)) μ
[PROOFSTEP]
induction' s using Finset.induction_on with i s hi_notin_s h_rec h_int
[GOAL]
case empty
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X : ι → Ω → ℝ
s : Finset ι
h_int✝ : ∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ
h_int : ∀ (i : ι), i ∈ ∅ → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ
⊢ AEStronglyMeasurable (fun ω => exp (t * Finset.sum ∅ (fun i => X i) ω)) μ
[PROOFSTEP]
simp only [Pi.zero_apply, sum_apply, sum_empty, mul_zero, exp_zero]
[GOAL]
case empty
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X : ι → Ω → ℝ
s : Finset ι
h_int✝ : ∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ
h_int : ∀ (i : ι), i ∈ ∅ → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ
⊢ AEStronglyMeasurable (fun ω => 1) μ
[PROOFSTEP]
exact aestronglyMeasurable_const
[GOAL]
case insert
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X : ι → Ω → ℝ
s✝ : Finset ι
h_int✝ : ∀ (i : ι), i ∈ s✝ → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ
i : ι
s : Finset ι
hi_notin_s : ¬i ∈ s
h_rec :
  (∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ) →
    AEStronglyMeasurable (fun ω => exp (t * Finset.sum s (fun i => X i) ω)) μ
h_int : ∀ (i_1 : ι), i_1 ∈ insert i s → AEStronglyMeasurable (fun ω => exp (t * X i_1 ω)) μ
⊢ AEStronglyMeasurable (fun ω => exp (t * Finset.sum (insert i s) (fun i => X i) ω)) μ
[PROOFSTEP]
have : ∀ i : ι, i ∈ s → AEStronglyMeasurable (fun ω : Ω => exp (t * X i ω)) μ := fun i hi =>
  h_int i (mem_insert_of_mem hi)
[GOAL]
case insert
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X : ι → Ω → ℝ
s✝ : Finset ι
h_int✝ : ∀ (i : ι), i ∈ s✝ → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ
i : ι
s : Finset ι
hi_notin_s : ¬i ∈ s
h_rec :
  (∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ) →
    AEStronglyMeasurable (fun ω => exp (t * Finset.sum s (fun i => X i) ω)) μ
h_int : ∀ (i_1 : ι), i_1 ∈ insert i s → AEStronglyMeasurable (fun ω => exp (t * X i_1 ω)) μ
this : ∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ
⊢ AEStronglyMeasurable (fun ω => exp (t * Finset.sum (insert i s) (fun i => X i) ω)) μ
[PROOFSTEP]
specialize h_rec this
[GOAL]
case insert
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X : ι → Ω → ℝ
s✝ : Finset ι
h_int✝ : ∀ (i : ι), i ∈ s✝ → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ
i : ι
s : Finset ι
hi_notin_s : ¬i ∈ s
h_int : ∀ (i_1 : ι), i_1 ∈ insert i s → AEStronglyMeasurable (fun ω => exp (t * X i_1 ω)) μ
this : ∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ
h_rec : AEStronglyMeasurable (fun ω => exp (t * Finset.sum s (fun i => X i) ω)) μ
⊢ AEStronglyMeasurable (fun ω => exp (t * Finset.sum (insert i s) (fun i => X i) ω)) μ
[PROOFSTEP]
rw [sum_insert hi_notin_s]
[GOAL]
case insert
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
X : ι → Ω → ℝ
s✝ : Finset ι
h_int✝ : ∀ (i : ι), i ∈ s✝ → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ
i : ι
s : Finset ι
hi_notin_s : ¬i ∈ s
h_int : ∀ (i_1 : ι), i_1 ∈ insert i s → AEStronglyMeasurable (fun ω => exp (t * X i_1 ω)) μ
this : ∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ
h_rec : AEStronglyMeasurable (fun ω => exp (t * Finset.sum s (fun i => X i) ω)) μ
⊢ AEStronglyMeasurable (fun ω => exp (t * (X i + ∑ x in s, X x) ω)) μ
[PROOFSTEP]
apply aestronglyMeasurable_exp_mul_add (h_int i (mem_insert_self _ _)) h_rec
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
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) ω)
[PROOFSTEP]
simp_rw [Pi.add_apply, mul_add, exp_add]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X✝ : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
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 ω) * exp (t * Y ω)
[PROOFSTEP]
exact (h_indep.exp_mul t t).integrable_mul h_int_X h_int_Y
[GOAL]
Ω : 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 ι
h_int : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)
⊢ Integrable fun ω => exp (t * Finset.sum s (fun i => X i) ω)
[PROOFSTEP]
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 integrable_const _
· have : ∀ i : ι, i ∈ s → Integrable (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]
  refine' IndepFun.integrable_exp_mul_add _ (h_int i (mem_insert_self _ _)) h_rec
  exact (h_indep.indepFun_finset_sum_of_not_mem h_meas hi_notin_s).symm
[GOAL]
Ω : 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 ι
h_int : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)
⊢ Integrable fun ω => exp (t * Finset.sum s (fun i => X i) ω)
[PROOFSTEP]
induction' s using Finset.induction_on with i s hi_notin_s h_rec h_int
[GOAL]
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)
s : Finset ι
h_int✝ : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)
h_int : ∀ (i : ι), i ∈ ∅ → Integrable fun ω => exp (t * X i ω)
⊢ Integrable fun ω => exp (t * Finset.sum ∅ (fun i => X i) ω)
[PROOFSTEP]
simp only [Pi.zero_apply, sum_apply, sum_empty, mul_zero, exp_zero]
[GOAL]
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)
s : Finset ι
h_int✝ : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)
h_int : ∀ (i : ι), i ∈ ∅ → Integrable fun ω => exp (t * X i ω)
⊢ Integrable fun ω => 1
[PROOFSTEP]
exact integrable_const _
[GOAL]
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)
s✝ : Finset ι
h_int✝ : ∀ (i : ι), i ∈ s✝ → Integrable fun ω => exp (t * X i ω)
i : ι
s : Finset ι
hi_notin_s : ¬i ∈ s
h_rec :
  (∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)) → Integrable fun ω => exp (t * Finset.sum s (fun i => X i) ω)
h_int : ∀ (i_1 : ι), i_1 ∈ insert i s → Integrable fun ω => exp (t * X i_1 ω)
⊢ Integrable fun ω => exp (t * Finset.sum (insert i s) (fun i => X i) ω)
[PROOFSTEP]
have : ∀ i : ι, i ∈ s → Integrable (fun ω : Ω => exp (t * X i ω)) μ := fun i hi => h_int i (mem_insert_of_mem hi)
[GOAL]
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)
s✝ : Finset ι
h_int✝ : ∀ (i : ι), i ∈ s✝ → Integrable fun ω => exp (t * X i ω)
i : ι
s : Finset ι
hi_notin_s : ¬i ∈ s
h_rec :
  (∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)) → Integrable fun ω => exp (t * Finset.sum s (fun i => X i) ω)
h_int : ∀ (i_1 : ι), i_1 ∈ insert i s → Integrable fun ω => exp (t * X i_1 ω)
this : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)
⊢ Integrable fun ω => exp (t * Finset.sum (insert i s) (fun i => X i) ω)
[PROOFSTEP]
specialize h_rec this
[GOAL]
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)
s✝ : Finset ι
h_int✝ : ∀ (i : ι), i ∈ s✝ → Integrable fun ω => exp (t * X i ω)
i : ι
s : Finset ι
hi_notin_s : ¬i ∈ s
h_int : ∀ (i_1 : ι), i_1 ∈ insert i s → Integrable fun ω => exp (t * X i_1 ω)
this : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)
h_rec : Integrable fun ω => exp (t * Finset.sum s (fun i => X i) ω)
⊢ Integrable fun ω => exp (t * Finset.sum (insert i s) (fun i => X i) ω)
[PROOFSTEP]
rw [sum_insert hi_notin_s]
[GOAL]
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)
s✝ : Finset ι
h_int✝ : ∀ (i : ι), i ∈ s✝ → Integrable fun ω => exp (t * X i ω)
i : ι
s : Finset ι
hi_notin_s : ¬i ∈ s
h_int : ∀ (i_1 : ι), i_1 ∈ insert i s → Integrable fun ω => exp (t * X i_1 ω)
this : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)
h_rec : Integrable fun ω => exp (t * Finset.sum s (fun i => X i) ω)
⊢ Integrable fun ω => exp (t * (X i + ∑ x in s, X x) ω)
[PROOFSTEP]
refine' IndepFun.integrable_exp_mul_add _ (h_int i (mem_insert_self _ _)) h_rec
[GOAL]
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)
s✝ : Finset ι
h_int✝ : ∀ (i : ι), i ∈ s✝ → Integrable fun ω => exp (t * X i ω)
i : ι
s : Finset ι
hi_notin_s : ¬i ∈ s
h_int : ∀ (i_1 : ι), i_1 ∈ insert i s → Integrable fun ω => exp (t * X i_1 ω)
this : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)
h_rec : Integrable fun ω => exp (t * Finset.sum s (fun i => X i) ω)
⊢ IndepFun (X i) (∑ x in s, X x)
[PROOFSTEP]
exact (h_indep.indepFun_finset_sum_of_not_mem h_meas hi_notin_s).symm
[GOAL]
Ω : 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 in s, X i) μ t = ∏ i in s, mgf (X i) μ t
[PROOFSTEP]
classical
induction' s using Finset.induction_on with i s hi_notin_s h_rec h_int
· simp only [sum_empty, mgf_zero_fun, measure_univ, ENNReal.one_toReal, prod_empty]
· have h_int' : ∀ i : ι, AEStronglyMeasurable (fun ω : Ω => exp (t * X i ω)) μ := fun i =>
    ((h_meas i).const_mul t).exp.aestronglyMeasurable
  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]
[GOAL]
Ω : 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 in s, X i) μ t = ∏ i in s, mgf (X i) μ t
[PROOFSTEP]
induction' s using Finset.induction_on with i s hi_notin_s h_rec h_int
[GOAL]
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 in ∅, X i) μ t = ∏ i in ∅, mgf (X i) μ t
[PROOFSTEP]
simp only [sum_empty, mgf_zero_fun, measure_univ, ENNReal.one_toReal, prod_empty]
[GOAL]
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 in s, X i) μ t = ∏ i in s, mgf (X i) μ t
⊢ mgf (∑ i in insert i s, X i) μ t = ∏ i in insert i s, mgf (X i) μ t
[PROOFSTEP]
have h_int' : ∀ i : ι, AEStronglyMeasurable (fun ω : Ω => exp (t * X i ω)) μ := fun i =>
  ((h_meas i).const_mul t).exp.aestronglyMeasurable
[GOAL]
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 in s, X i) μ t = ∏ i in s, mgf (X i) μ t
h_int' : ∀ (i : ι), AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ
⊢ mgf (∑ i in insert i s, X i) μ t = ∏ i in insert i s, mgf (X i) μ t
[PROOFSTEP]
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]
[GOAL]
Ω : 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 ι
h_int : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)
⊢ cgf (∑ i in s, X i) μ t = ∑ i in s, cgf (X i) μ t
[PROOFSTEP]
simp_rw [cgf]
[GOAL]
Ω : 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 ι
h_int : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)
⊢ log (mgf (∑ i in s, X i) μ t) = ∑ x in s, log (mgf (X x) μ t)
[PROOFSTEP]
rw [← log_prod _ _ fun j hj => ?_]
[GOAL]
Ω : 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 ι
h_int : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)
⊢ log (mgf (∑ i in s, X i) μ t) = log (∏ i in s, mgf (X i) μ t)
[PROOFSTEP]
rw [h_indep.mgf_sum h_meas]
[GOAL]
Ω : 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 ι
h_int : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)
j : ι
hj : j ∈ s
⊢ mgf (X j) μ t ≠ 0
[PROOFSTEP]
exact (mgf_pos (h_int j hj)).ne'
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable fun ω => exp (t * X ω)
⊢ ENNReal.toReal (↑↑μ {ω | ε ≤ X ω}) ≤ exp (-t * ε) * mgf X μ t
[PROOFSTEP]
cases' ht.eq_or_lt with ht_zero_eq ht_pos
[GOAL]
case inl
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable fun ω => exp (t * X ω)
ht_zero_eq : 0 = t
⊢ ENNReal.toReal (↑↑μ {ω | ε ≤ X ω}) ≤ exp (-t * ε) * mgf X μ t
[PROOFSTEP]
rw [ht_zero_eq.symm]
[GOAL]
case inl
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable fun ω => exp (t * X ω)
ht_zero_eq : 0 = t
⊢ ENNReal.toReal (↑↑μ {ω | ε ≤ X ω}) ≤ exp (-0 * ε) * mgf X μ 0
[PROOFSTEP]
simp only [neg_zero, zero_mul, exp_zero, mgf_zero', one_mul]
[GOAL]
case inl
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable fun ω => exp (t * X ω)
ht_zero_eq : 0 = t
⊢ ENNReal.toReal (↑↑μ {ω | ε ≤ X ω}) ≤ ENNReal.toReal (↑↑μ Set.univ)
[PROOFSTEP]
rw [ENNReal.toReal_le_toReal (measure_ne_top μ _) (measure_ne_top μ _)]
[GOAL]
case inl
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable fun ω => exp (t * X ω)
ht_zero_eq : 0 = t
⊢ ↑↑μ {ω | ε ≤ X ω} ≤ ↑↑μ Set.univ
[PROOFSTEP]
exact measure_mono (Set.subset_univ _)
[GOAL]
case inr
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable fun ω => exp (t * X ω)
ht_pos : 0 < t
⊢ ENNReal.toReal (↑↑μ {ω | ε ≤ X ω}) ≤ exp (-t * ε) * mgf X μ t
[PROOFSTEP]
calc
  (μ {ω | ε ≤ X ω}).toReal = (μ {ω | exp (t * ε) ≤ exp (t * X ω)}).toReal :=
    by
    congr with ω
    simp only [Set.mem_setOf_eq, exp_le_exp, gt_iff_lt]
    exact ⟨fun h => mul_le_mul_of_nonneg_left h ht_pos.le, fun h => le_of_mul_le_mul_left h ht_pos⟩
  _ ≤ (exp (t * ε))⁻¹ * μ[fun ω => exp (t * X ω)] :=
    by
    have : exp (t * ε) * (μ {ω | exp (t * ε) ≤ exp (t * X ω)}).toReal ≤ μ[fun ω => exp (t * X ω)] :=
      mul_meas_ge_le_integral_of_nonneg (fun x => (exp_pos _).le) h_int _
    rwa [mul_comm (exp (t * ε))⁻¹, ← div_eq_mul_inv, le_div_iff' (exp_pos _)]
  _ = exp (-t * ε) * mgf X μ t := by rw [neg_mul, exp_neg]; rfl
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable fun ω => exp (t * X ω)
ht_pos : 0 < t
⊢ ENNReal.toReal (↑↑μ {ω | ε ≤ X ω}) = ENNReal.toReal (↑↑μ {ω | exp (t * ε) ≤ exp (t * X ω)})
[PROOFSTEP]
congr with ω
[GOAL]
case e_a.e_a.h
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable fun ω => exp (t * X ω)
ht_pos : 0 < t
ω : Ω
⊢ ω ∈ {ω | ε ≤ X ω} ↔ ω ∈ {ω | exp (t * ε) ≤ exp (t * X ω)}
[PROOFSTEP]
simp only [Set.mem_setOf_eq, exp_le_exp, gt_iff_lt]
[GOAL]
case e_a.e_a.h
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable fun ω => exp (t * X ω)
ht_pos : 0 < t
ω : Ω
⊢ ε ≤ X ω ↔ t * ε ≤ t * X ω
[PROOFSTEP]
exact ⟨fun h => mul_le_mul_of_nonneg_left h ht_pos.le, fun h => le_of_mul_le_mul_left h ht_pos⟩
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable fun ω => exp (t * X ω)
ht_pos : 0 < t
⊢ ENNReal.toReal (↑↑μ {ω | exp (t * ε) ≤ exp (t * X ω)}) ≤ (exp (t * ε))⁻¹ * ∫ (x : Ω), (fun ω => exp (t * X ω)) x ∂μ
[PROOFSTEP]
have : exp (t * ε) * (μ {ω | exp (t * ε) ≤ exp (t * X ω)}).toReal ≤ μ[fun ω => exp (t * X ω)] :=
  mul_meas_ge_le_integral_of_nonneg (fun x => (exp_pos _).le) h_int _
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable fun ω => exp (t * X ω)
ht_pos : 0 < t
this : exp (t * ε) * ENNReal.toReal (↑↑μ {ω | exp (t * ε) ≤ exp (t * X ω)}) ≤ ∫ (x : Ω), (fun ω => exp (t * X ω)) x ∂μ
⊢ ENNReal.toReal (↑↑μ {ω | exp (t * ε) ≤ exp (t * X ω)}) ≤ (exp (t * ε))⁻¹ * ∫ (x : Ω), (fun ω => exp (t * X ω)) x ∂μ
[PROOFSTEP]
rwa [mul_comm (exp (t * ε))⁻¹, ← div_eq_mul_inv, le_div_iff' (exp_pos _)]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable fun ω => exp (t * X ω)
ht_pos : 0 < t
⊢ (exp (t * ε))⁻¹ * ∫ (x : Ω), (fun ω => exp (t * X ω)) x ∂μ = exp (-t * ε) * mgf X μ t
[PROOFSTEP]
rw [neg_mul, exp_neg]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable fun ω => exp (t * X ω)
ht_pos : 0 < t
⊢ (exp (t * ε))⁻¹ * ∫ (x : Ω), (fun ω => exp (t * X ω)) x ∂μ = (exp (t * ε))⁻¹ * mgf X μ t
[PROOFSTEP]
rfl
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : t ≤ 0
h_int : Integrable fun ω => exp (t * X ω)
⊢ ENNReal.toReal (↑↑μ {ω | X ω ≤ ε}) ≤ exp (-t * ε) * mgf X μ t
[PROOFSTEP]
rw [← neg_neg t, ← mgf_neg, neg_neg, ← neg_mul_neg (-t)]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : t ≤ 0
h_int : Integrable fun ω => exp (t * X ω)
⊢ ENNReal.toReal (↑↑μ {ω | X ω ≤ ε}) ≤ exp (- -t * -ε) * mgf (-X) μ (-t)
[PROOFSTEP]
refine' Eq.trans_le _ (measure_ge_le_exp_mul_mgf (-ε) (neg_nonneg.mpr ht) _)
[GOAL]
case refine'_1
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : t ≤ 0
h_int : Integrable fun ω => exp (t * X ω)
⊢ ENNReal.toReal (↑↑μ {ω | X ω ≤ ε}) = ENNReal.toReal (↑↑μ {ω | -ε ≤ (-X) ω})
[PROOFSTEP]
congr with ω
[GOAL]
case refine'_1.e_a.e_a.h
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : t ≤ 0
h_int : Integrable fun ω => exp (t * X ω)
ω : Ω
⊢ ω ∈ {ω | X ω ≤ ε} ↔ ω ∈ {ω | -ε ≤ (-X) ω}
[PROOFSTEP]
simp only [Pi.neg_apply, neg_le_neg_iff]
[GOAL]
case refine'_2
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : t ≤ 0
h_int : Integrable fun ω => exp (t * X ω)
⊢ Integrable fun ω => exp (-t * (-X) ω)
[PROOFSTEP]
simp_rw [Pi.neg_apply, neg_mul_neg]
[GOAL]
case refine'_2
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : t ≤ 0
h_int : Integrable fun ω => exp (t * X ω)
⊢ Integrable fun ω => exp (t * X ω)
[PROOFSTEP]
exact h_int
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable fun ω => exp (t * X ω)
⊢ ENNReal.toReal (↑↑μ {ω | ε ≤ X ω}) ≤ exp (-t * ε + cgf X μ t)
[PROOFSTEP]
refine' (measure_ge_le_exp_mul_mgf ε ht h_int).trans _
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable fun ω => exp (t * X ω)
⊢ exp (-t * ε) * mgf (fun ω => X ω) μ t ≤ exp (-t * ε + cgf X μ t)
[PROOFSTEP]
rw [exp_add]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable fun ω => exp (t * X ω)
⊢ exp (-t * ε) * mgf (fun ω => X ω) μ t ≤ exp (-t * ε) * exp (cgf X μ t)
[PROOFSTEP]
exact mul_le_mul le_rfl (le_exp_log _) mgf_nonneg (exp_pos _).le
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : t ≤ 0
h_int : Integrable fun ω => exp (t * X ω)
⊢ ENNReal.toReal (↑↑μ {ω | X ω ≤ ε}) ≤ exp (-t * ε + cgf X μ t)
[PROOFSTEP]
refine' (measure_le_le_exp_mul_mgf ε ht h_int).trans _
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : t ≤ 0
h_int : Integrable fun ω => exp (t * X ω)
⊢ exp (-t * ε) * mgf (fun ω => X ω) μ t ≤ exp (-t * ε + cgf X μ t)
[PROOFSTEP]
rw [exp_add]
[GOAL]
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : t ≤ 0
h_int : Integrable fun ω => exp (t * X ω)
⊢ exp (-t * ε) * mgf (fun ω => X ω) μ t ≤ exp (-t * ε) * exp (cgf X μ t)
[PROOFSTEP]
exact mul_le_mul le_rfl (le_exp_log _) mgf_nonneg (exp_pos _).le