Theorem: MeasureTheory.withDensity_inv_same_le
File: Mathlib/MeasureTheory/Measure/WithDensity.lean

tactic: change (μ.withDensity f).withDensity (fun x ↦ (f x)⁻¹) ≤ μ
state_before: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
⊢ (μ.withDensity f).withDensity f⁻¹ ≤ μ
state_after: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
⊢ ((μ.withDensity f).withDensity fun x => (f x)⁻¹) ≤ μ

tactic: rw [← withDensity_mul₀ hf hf.inv]
state_before: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
⊢ ((μ.withDensity f).withDensity fun x => (f x)⁻¹) ≤ μ
state_after: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
⊢ μ.withDensity (f * fun x => (f x)⁻¹) ≤ μ

tactic: suffices (f * fun x ↦ (f x)⁻¹) ≤ᵐ[μ] 1 by
  refine (withDensity_mono this).trans ?_
  rw [withDensity_one]
state_before: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
⊢ μ.withDensity (f * fun x => (f x)⁻¹) ≤ μ
state_after: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
⊢ (f * fun x => (f x)⁻¹) ≤ᶠ[ae μ] 1

tactic: filter_upwards with x
state_before: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
⊢ (f * fun x => (f x)⁻¹) ≤ᶠ[ae μ] 1
state_after: case h
α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
x : α
⊢ (f * fun x => (f x)⁻¹) x ≤ 1 x

tactic: simp only [Pi.mul_apply, Pi.one_apply]
state_before: case h
α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
x : α
⊢ (f * fun x => (f x)⁻¹) x ≤ 1 x
state_after: case h
α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
x : α
⊢ f x * (f x)⁻¹ ≤ 1

tactic: by_cases hx_top : f x = ∞
state_before: case h
α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
x : α
⊢ f x * (f x)⁻¹ ≤ 1
state_after: case pos
α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
x : α
hx_top : f x = ⊤
⊢ f x * (f x)⁻¹ ≤ 1

case neg
α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
x : α
hx_top : ¬f x = ⊤
⊢ f x * (f x)⁻¹ ≤ 1

tactic: by_cases hx_zero : f x = 0
state_before: case neg
α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
x : α
hx_top : ¬f x = ⊤
⊢ f x * (f x)⁻¹ ≤ 1
state_after: case pos
α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
x : α
hx_top : ¬f x = ⊤
hx_zero : f x = 0
⊢ f x * (f x)⁻¹ ≤ 1

case neg
α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
x : α
hx_top : ¬f x = ⊤
hx_zero : ¬f x = 0
⊢ f x * (f x)⁻¹ ≤ 1

tactic: rw [ENNReal.mul_inv_cancel hx_zero hx_top]
state_before: case neg
α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
x : α
hx_top : ¬f x = ⊤
hx_zero : ¬f x = 0
⊢ f x * (f x)⁻¹ ≤ 1
state_after: no goals

tactic: refine (withDensity_mono this).trans ?_
state_before: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
this : (f * fun x => (f x)⁻¹) ≤ᶠ[ae μ] 1
⊢ μ.withDensity (f * fun x => (f x)⁻¹) ≤ μ
state_after: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
this : (f * fun x => (f x)⁻¹) ≤ᶠ[ae μ] 1
⊢ μ.withDensity 1 ≤ μ

tactic: rw [withDensity_one]
state_before: α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
this : (f * fun x => (f x)⁻¹) ≤ᶠ[ae μ] 1
⊢ μ.withDensity 1 ≤ μ
state_after: no goals

tactic: simp only [hx_top, ENNReal.inv_top, mul_zero, zero_le]
state_before: case pos
α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
x : α
hx_top : f x = ⊤
⊢ f x * (f x)⁻¹ ≤ 1
state_after: no goals

tactic: simp only [hx_zero, ENNReal.inv_zero, zero_mul, zero_le]
state_before: case pos
α : Type u_1
m0 : MeasurableSpace α
μ✝ μ : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
x : α
hx_top : ¬f x = ⊤
hx_zero : f x = 0
⊢ f x * (f x)⁻¹ ≤ 1
state_after: no goals