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

tactic: by_cases hnt : μ s = ∞
state_before: E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
⊢ pdf X ℙ μ =ᶠ[ae μ] s.indicator ((μ s)⁻¹ • 1)
state_after: case pos
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : μ s = ⊤
⊢ pdf X ℙ μ =ᶠ[ae μ] s.indicator ((μ s)⁻¹ • 1)

case neg
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : ¬μ s = ⊤
⊢ pdf X ℙ μ =ᶠ[ae μ] s.indicator ((μ s)⁻¹ • 1)

tactic: by_cases hns : μ s = 0
state_before: case neg
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : ¬μ s = ⊤
⊢ pdf X ℙ μ =ᶠ[ae μ] s.indicator ((μ s)⁻¹ • 1)
state_after: case pos
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : ¬μ s = ⊤
hns : μ s = 0
⊢ pdf X ℙ μ =ᶠ[ae μ] s.indicator ((μ s)⁻¹ • 1)

case neg
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : ¬μ s = ⊤
hns : ¬μ s = 0
⊢ pdf X ℙ μ =ᶠ[ae μ] s.indicator ((μ s)⁻¹ • 1)

tactic: have : HasPDF X ℙ μ := hasPDF hns hnt hu
state_before: case neg
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : ¬μ s = ⊤
hns : ¬μ s = 0
⊢ pdf X ℙ μ =ᶠ[ae μ] s.indicator ((μ s)⁻¹ • 1)
state_after: case neg
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : ¬μ s = ⊤
hns : ¬μ s = 0
this : HasPDF X ℙ μ
⊢ pdf X ℙ μ =ᶠ[ae μ] s.indicator ((μ s)⁻¹ • 1)

tactic: have : IsProbabilityMeasure ℙ := isProbabilityMeasure hns hnt hu
state_before: case neg
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : ¬μ s = ⊤
hns : ¬μ s = 0
this : HasPDF X ℙ μ
⊢ pdf X ℙ μ =ᶠ[ae μ] s.indicator ((μ s)⁻¹ • 1)
state_after: case neg
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : ¬μ s = ⊤
hns : ¬μ s = 0
this✝ : HasPDF X ℙ μ
this : IsProbabilityMeasure ℙ
⊢ pdf X ℙ μ =ᶠ[ae μ] s.indicator ((μ s)⁻¹ • 1)

tactic: apply (eq_of_map_eq_withDensity _ _).mp
state_before: case neg
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : ¬μ s = ⊤
hns : ¬μ s = 0
this✝ : HasPDF X ℙ μ
this : IsProbabilityMeasure ℙ
⊢ pdf X ℙ μ =ᶠ[ae μ] s.indicator ((μ s)⁻¹ • 1)
state_after: case neg
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : ¬μ s = ⊤
hns : ¬μ s = 0
this✝ : HasPDF X ℙ μ
this : IsProbabilityMeasure ℙ
⊢ Measure.map X ℙ = μ.withDensity (s.indicator ((μ s)⁻¹ • 1))

E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : ¬μ s = ⊤
hns : ¬μ s = 0
this✝ : HasPDF X ℙ μ
this : IsProbabilityMeasure ℙ
⊢ AEMeasurable (s.indicator ((μ s)⁻¹ • 1)) μ

tactic: simp [pdf_eq_zero_of_measure_eq_zero_or_top hu (Or.inr hnt), hnt]
state_before: case pos
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : μ s = ⊤
⊢ pdf X ℙ μ =ᶠ[ae μ] s.indicator ((μ s)⁻¹ • 1)
state_after: no goals

tactic: filter_upwards [measure_zero_iff_ae_nmem.mp hns,
  pdf_eq_zero_of_measure_eq_zero_or_top hu (Or.inl hns)] with x hx h'x
state_before: case pos
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : ¬μ s = ⊤
hns : μ s = 0
⊢ pdf X ℙ μ =ᶠ[ae μ] s.indicator ((μ s)⁻¹ • 1)
state_after: case h
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : ¬μ s = ⊤
hns : μ s = 0
x : E
hx : x ∉ s
h'x : pdf X ℙ μ x = 0 x
⊢ pdf X ℙ μ x = s.indicator ((μ s)⁻¹ • 1) x

tactic: simp [hx, h'x, hns]
state_before: case h
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : ¬μ s = ⊤
hns : μ s = 0
x : E
hx : x ∉ s
h'x : pdf X ℙ μ x = 0 x
⊢ pdf X ℙ μ x = s.indicator ((μ s)⁻¹ • 1) x
state_after: no goals

tactic: rw [hu, withDensity_indicator hms, withDensity_smul _ measurable_one, withDensity_one,
  ProbabilityTheory.cond]
state_before: case neg
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : ¬μ s = ⊤
hns : ¬μ s = 0
this✝ : HasPDF X ℙ μ
this : IsProbabilityMeasure ℙ
⊢ Measure.map X ℙ = μ.withDensity (s.indicator ((μ s)⁻¹ • 1))
state_after: no goals

tactic: exact (measurable_one.aemeasurable.const_smul (μ s)⁻¹).indicator hms
state_before: E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hms : MeasurableSet s
hu : IsUniform X s ℙ μ
hnt : ¬μ s = ⊤
hns : ¬μ s = 0
this✝ : HasPDF X ℙ μ
this : IsProbabilityMeasure ℙ
⊢ AEMeasurable (s.indicator ((μ s)⁻¹ • 1)) μ
state_after: no goals