Theorem: MeasureTheory.pdf.IsUniform.mul_pdf_integrable
File: Mathlib/Probability/Distributions/Uniform.lean

tactic: by_cases hnt : volume s = 0 ∨ volume s = ∞
state_before: E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
⊢ Integrable (fun x => x * (pdf X ℙ volume x).toReal) volume
state_after: case pos
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : volume s = 0 ∨ volume s = ⊤
⊢ Integrable (fun x => x * (pdf X ℙ volume x).toReal) volume

case neg
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬(volume s = 0 ∨ volume s = ⊤)
⊢ Integrable (fun x => x * (pdf X ℙ volume x).toReal) volume

tactic: simp only [not_or] at hnt
state_before: case neg
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬(volume s = 0 ∨ volume s = ⊤)
⊢ Integrable (fun x => x * (pdf X ℙ volume x).toReal) volume
state_after: case neg
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
⊢ Integrable (fun x => x * (pdf X ℙ volume x).toReal) volume

tactic: have : IsProbabilityMeasure ℙ := isProbabilityMeasure hnt.1 hnt.2 huX
state_before: case neg
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
⊢ Integrable (fun x => x * (pdf X ℙ volume x).toReal) volume
state_after: case neg
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
this : IsProbabilityMeasure ℙ
⊢ Integrable (fun x => x * (pdf X ℙ volume x).toReal) volume

tactic: constructor
state_before: case neg
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
this : IsProbabilityMeasure ℙ
⊢ Integrable (fun x => x * (pdf X ℙ volume x).toReal) volume
state_after: case neg.left
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
this : IsProbabilityMeasure ℙ
⊢ AEStronglyMeasurable (fun x => x * (pdf X ℙ volume x).toReal) volume

case neg.right
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
this : IsProbabilityMeasure ℙ
⊢ HasFiniteIntegral (fun x => x * (pdf X ℙ volume x).toReal) volume

tactic: refine hasFiniteIntegral_mul (pdf_eq hcs.measurableSet huX) ?_
state_before: case neg.right
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
this : IsProbabilityMeasure ℙ
⊢ HasFiniteIntegral (fun x => x * (pdf X ℙ volume x).toReal) volume
state_after: case neg.right
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
this : IsProbabilityMeasure ℙ
⊢ ∫⁻ (x : ℝ), ↑‖x‖₊ * s.indicator ((volume s)⁻¹ • 1) x ≠ ⊤

tactic: set ind := (volume s)⁻¹ • (1 : ℝ → ℝ≥0∞)
state_before: case neg.right
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
this : IsProbabilityMeasure ℙ
⊢ ∫⁻ (x : ℝ), ↑‖x‖₊ * s.indicator ((volume s)⁻¹ • 1) x ≠ ⊤
state_after: case neg.right
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
this : IsProbabilityMeasure ℙ
ind : ℝ → ℝ≥0∞ := (volume s)⁻¹ • 1
⊢ ∫⁻ (x : ℝ), ↑‖x‖₊ * s.indicator ind x ≠ ⊤

tactic: have : ∀ x, ↑‖x‖₊ * s.indicator ind x = s.indicator (fun x => ‖x‖₊ * ind x) x := fun x =>
  (s.indicator_mul_right (fun x => ↑‖x‖₊) ind).symm
state_before: case neg.right
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
this : IsProbabilityMeasure ℙ
ind : ℝ → ℝ≥0∞ := (volume s)⁻¹ • 1
⊢ ∫⁻ (x : ℝ), ↑‖x‖₊ * s.indicator ind x ≠ ⊤
state_after: case neg.right
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
this✝ : IsProbabilityMeasure ℙ
ind : ℝ → ℝ≥0∞ := (volume s)⁻¹ • 1
this : ∀ (x : ℝ), ↑‖x‖₊ * s.indicator ind x = s.indicator (fun x => ↑‖x‖₊ * ind x) x
⊢ ∫⁻ (x : ℝ), ↑‖x‖₊ * s.indicator ind x ≠ ⊤

tactic: simp only [ind, this, lintegral_indicator _ hcs.measurableSet, mul_one, Algebra.id.smul_eq_mul,
  Pi.one_apply, Pi.smul_apply]
state_before: case neg.right
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
this✝ : IsProbabilityMeasure ℙ
ind : ℝ → ℝ≥0∞ := (volume s)⁻¹ • 1
this : ∀ (x : ℝ), ↑‖x‖₊ * s.indicator ind x = s.indicator (fun x => ↑‖x‖₊ * ind x) x
⊢ ∫⁻ (x : ℝ), ↑‖x‖₊ * s.indicator ind x ≠ ⊤
state_after: case neg.right
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
this✝ : IsProbabilityMeasure ℙ
ind : ℝ → ℝ≥0∞ := (volume s)⁻¹ • 1
this : ∀ (x : ℝ), ↑‖x‖₊ * s.indicator ind x = s.indicator (fun x => ↑‖x‖₊ * ind x) x
⊢ ∫⁻ (x : ℝ) in s, ↑‖x‖₊ * (volume s)⁻¹ ∂volume ≠ ⊤

tactic: rw [lintegral_mul_const _ measurable_nnnorm.coe_nnreal_ennreal]
state_before: case neg.right
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
this✝ : IsProbabilityMeasure ℙ
ind : ℝ → ℝ≥0∞ := (volume s)⁻¹ • 1
this : ∀ (x : ℝ), ↑‖x‖₊ * s.indicator ind x = s.indicator (fun x => ↑‖x‖₊ * ind x) x
⊢ ∫⁻ (x : ℝ) in s, ↑‖x‖₊ * (volume s)⁻¹ ∂volume ≠ ⊤
state_after: case neg.right
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
this✝ : IsProbabilityMeasure ℙ
ind : ℝ → ℝ≥0∞ := (volume s)⁻¹ • 1
this : ∀ (x : ℝ), ↑‖x‖₊ * s.indicator ind x = s.indicator (fun x => ↑‖x‖₊ * ind x) x
⊢ (∫⁻ (a : ℝ) in s, ↑‖a‖₊ ∂volume) * (volume s)⁻¹ ≠ ⊤

tactic: exact (ENNReal.mul_lt_top (setLIntegral_lt_top_of_isCompact hnt.2 hcs continuous_nnnorm).ne
  (ENNReal.inv_lt_top.2 (pos_iff_ne_zero.mpr hnt.1)).ne).ne
state_before: case neg.right
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
this✝ : IsProbabilityMeasure ℙ
ind : ℝ → ℝ≥0∞ := (volume s)⁻¹ • 1
this : ∀ (x : ℝ), ↑‖x‖₊ * s.indicator ind x = s.indicator (fun x => ↑‖x‖₊ * ind x) x
⊢ (∫⁻ (a : ℝ) in s, ↑‖a‖₊ ∂volume) * (volume s)⁻¹ ≠ ⊤
state_after: no goals

tactic: have I : Integrable (fun x ↦ x * ENNReal.toReal (0)) := by simp
state_before: case pos
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : volume s = 0 ∨ volume s = ⊤
⊢ Integrable (fun x => x * (pdf X ℙ volume x).toReal) volume
state_after: case pos
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : volume s = 0 ∨ volume s = ⊤
I : Integrable (fun x => x * ENNReal.toReal 0) volume
⊢ Integrable (fun x => x * (pdf X ℙ volume x).toReal) volume

tactic: apply I.congr
state_before: case pos
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : volume s = 0 ∨ volume s = ⊤
I : Integrable (fun x => x * ENNReal.toReal 0) volume
⊢ Integrable (fun x => x * (pdf X ℙ volume x).toReal) volume
state_after: case pos
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : volume s = 0 ∨ volume s = ⊤
I : Integrable (fun x => x * ENNReal.toReal 0) volume
⊢ (fun x => x * ENNReal.toReal 0) =ᶠ[ae volume] fun x => x * (pdf X ℙ volume x).toReal

tactic: filter_upwards [pdf_eq_zero_of_measure_eq_zero_or_top huX hnt] with x hx
state_before: case pos
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : volume s = 0 ∨ volume s = ⊤
I : Integrable (fun x => x * ENNReal.toReal 0) volume
⊢ (fun x => x * ENNReal.toReal 0) =ᶠ[ae volume] fun x => x * (pdf X ℙ volume x).toReal
state_after: case h
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : volume s = 0 ∨ volume s = ⊤
I : Integrable (fun x => x * ENNReal.toReal 0) volume
x : ℝ
hx : pdf X ℙ volume x = 0 x
⊢ x * ENNReal.toReal 0 = x * (pdf X ℙ volume x).toReal

tactic: simp [hx]
state_before: case h
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : volume s = 0 ∨ volume s = ⊤
I : Integrable (fun x => x * ENNReal.toReal 0) volume
x : ℝ
hx : pdf X ℙ volume x = 0 x
⊢ x * ENNReal.toReal 0 = x * (pdf X ℙ volume x).toReal
state_after: no goals

tactic: simp
state_before: E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : volume s = 0 ∨ volume s = ⊤
⊢ Integrable (fun x => x * ENNReal.toReal 0) volume
state_after: no goals

tactic: exact aestronglyMeasurable_id.mul
  (measurable_pdf X ℙ).aemeasurable.ennreal_toReal.aestronglyMeasurable
state_before: case neg.left
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → ℝ
s : Set ℝ
hcs : IsCompact s
huX : IsUniform X s ℙ volume
hnt : ¬volume s = 0 ∧ ¬volume s = ⊤
this : IsProbabilityMeasure ℙ
⊢ AEStronglyMeasurable (fun x => x * (pdf X ℙ volume x).toReal) volume
state_after: no goals