Theorem: ProbabilityTheory.meas_ge_le_evariance_div_sq
File: Mathlib/Probability/Variance.lean

tactic: have A : (c : ℝ≥0∞) ≠ 0 := by rwa [Ne, ENNReal.coe_eq_zero]
state_before: Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
⊢ ℙ {ω | ↑c ≤ |X ω - ∫ (a : Ω), X a|} ≤ evariance X ℙ / ↑c ^ 2
state_after: Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
⊢ ℙ {ω | ↑c ≤ |X ω - ∫ (a : Ω), X a|} ≤ evariance X ℙ / ↑c ^ 2

tactic: have B : AEStronglyMeasurable (fun _ : Ω => 𝔼[X]) ℙ := aestronglyMeasurable_const
state_before: Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
⊢ ℙ {ω | ↑c ≤ |X ω - ∫ (a : Ω), X a|} ≤ evariance X ℙ / ↑c ^ 2
state_after: Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ ℙ {ω | ↑c ≤ |X ω - ∫ (a : Ω), X a|} ≤ evariance X ℙ / ↑c ^ 2

tactic: convert meas_ge_le_mul_pow_snorm ℙ two_ne_zero ENNReal.two_ne_top (hX.sub B) A using 1
state_before: Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ ℙ {ω | ↑c ≤ |X ω - ∫ (a : Ω), X a|} ≤ evariance X ℙ / ↑c ^ 2
state_after: case h.e'_3
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ ℙ {ω | ↑c ≤ |X ω - ∫ (a : Ω), X a|} = ℙ {x | ↑c ≤ ↑‖(X - fun x => ∫ (a : Ω), X a) x‖₊}

case h.e'_4
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ evariance X ℙ / ↑c ^ 2 = (↑c)⁻¹ ^ ENNReal.toReal 2 * snorm (X - fun x => ∫ (a : Ω), X a) 2 ℙ ^ ENNReal.toReal 2

tactic: rwa [Ne, ENNReal.coe_eq_zero]
state_before: Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
⊢ ↑c ≠ 0
state_after: no goals

tactic: congr
state_before: case h.e'_3
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ ℙ {ω | ↑c ≤ |X ω - ∫ (a : Ω), X a|} = ℙ {x | ↑c ≤ ↑‖(X - fun x => ∫ (a : Ω), X a) x‖₊}
state_after: case h.e'_3.h.e_6.h
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ {ω | ↑c ≤ |X ω - ∫ (a : Ω), X a|} = {x | ↑c ≤ ↑‖(X - fun x => ∫ (a : Ω), X a) x‖₊}

tactic: simp only [Pi.sub_apply, ENNReal.coe_le_coe, ← Real.norm_eq_abs, ← coe_nnnorm,
  NNReal.coe_le_coe, ENNReal.ofReal_coe_nnreal]
state_before: case h.e'_3.h.e_6.h
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ {ω | ↑c ≤ |X ω - ∫ (a : Ω), X a|} = {x | ↑c ≤ ↑‖(X - fun x => ∫ (a : Ω), X a) x‖₊}
state_after: no goals

tactic: rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top]
state_before: case h.e'_4
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ evariance X ℙ / ↑c ^ 2 = (↑c)⁻¹ ^ ENNReal.toReal 2 * snorm (X - fun x => ∫ (a : Ω), X a) 2 ℙ ^ ENNReal.toReal 2
state_after: case h.e'_4
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ evariance X ℙ / ↑c ^ 2 =
    (↑c)⁻¹ ^ ENNReal.toReal 2 *
      ((∫⁻ (x : Ω), ↑‖(X - fun x => ∫ (a : Ω), X a) x‖₊ ^ ENNReal.toReal 2) ^ (1 / ENNReal.toReal 2)) ^ ENNReal.toReal 2

tactic: simp only [show ENNReal.ofNNReal (c ^ 2) = (ENNReal.ofNNReal c) ^ 2 by norm_cast,
  ENNReal.toReal_ofNat, one_div, Pi.sub_apply]
state_before: case h.e'_4
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ evariance X ℙ / ↑c ^ 2 =
    (↑c)⁻¹ ^ ENNReal.toReal 2 *
      ((∫⁻ (x : Ω), ↑‖(X - fun x => ∫ (a : Ω), X a) x‖₊ ^ ENNReal.toReal 2) ^ (1 / ENNReal.toReal 2)) ^ ENNReal.toReal 2
state_after: case h.e'_4
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ evariance X ℙ / ↑c ^ 2 = (↑c)⁻¹ ^ 2 * ((∫⁻ (x : Ω), ↑‖X x - ∫ (a : Ω), X a‖₊ ^ 2) ^ 2⁻¹) ^ 2

tactic: rw [div_eq_mul_inv, ENNReal.inv_pow, mul_comm, ENNReal.rpow_two]
state_before: case h.e'_4
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ evariance X ℙ / ↑c ^ 2 = (↑c)⁻¹ ^ 2 * ((∫⁻ (x : Ω), ↑‖X x - ∫ (a : Ω), X a‖₊ ^ 2) ^ 2⁻¹) ^ 2
state_after: case h.e'_4
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ (↑c)⁻¹ ^ 2 * evariance X ℙ = (↑c)⁻¹ ^ 2 * ((∫⁻ (x : Ω), ↑‖X x - ∫ (a : Ω), X a‖₊ ^ 2) ^ 2⁻¹) ^ 2

tactic: congr
state_before: case h.e'_4
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ (↑c)⁻¹ ^ 2 * evariance X ℙ = (↑c)⁻¹ ^ 2 * ((∫⁻ (x : Ω), ↑‖X x - ∫ (a : Ω), X a‖₊ ^ 2) ^ 2⁻¹) ^ 2
state_after: case h.e'_4.e_a
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ evariance X ℙ = ((∫⁻ (x : Ω), ↑‖X x - ∫ (a : Ω), X a‖₊ ^ 2) ^ 2⁻¹) ^ 2

tactic: simp_rw [← ENNReal.rpow_mul, inv_mul_cancel (two_ne_zero : (2 : ℝ) ≠ 0), ENNReal.rpow_two,
  ENNReal.rpow_one, evariance]
state_before: case h.e'_4.e_a
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ evariance X ℙ = ((∫⁻ (x : Ω), ↑‖X x - ∫ (a : Ω), X a‖₊ ^ 2) ^ 2⁻¹) ^ 2
state_after: no goals

tactic: norm_cast
state_before: Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ : Measure Ω
inst✝ : MeasureSpace Ω
X : Ω → ℝ
hX : AEStronglyMeasurable X ℙ
c : ℝ≥0
hc : c ≠ 0
A : ↑c ≠ 0
B : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ
⊢ ↑(c ^ 2) = ↑c ^ 2
state_after: no goals