Theorem: MeasureTheory.llr_tilted_left
File: Mathlib/MeasureTheory/Measure/LogLikelihoodRatio.lean

tactic: have hfμ : AEMeasurable f μ :=
  aemeasurable_of_aemeasurable_exp (AEStronglyMeasurable.aemeasurable hf.1)
state_before: α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
⊢ llr (μ.tilted f) ν =ᶠ[ae μ] fun x => f x - log (∫ (z : α), rexp (f z) ∂μ) + llr μ ν x
state_after: α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
⊢ llr (μ.tilted f) ν =ᶠ[ae μ] fun x => f x - log (∫ (z : α), rexp (f z) ∂μ) + llr μ ν x

tactic: simp only [hμ, ae_zero, Filter.EventuallyEq]
state_before: case inl
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
hμ : μ = 0
⊢ llr (μ.tilted f) ν =ᶠ[ae μ] fun x => f x - log (∫ (z : α), rexp (f z) ∂μ) + llr μ ν x
state_after: case inl
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
hμ : μ = 0
⊢ ∀ᶠ (x : α) in ⊥, llr (Measure.tilted 0 f) ν x = f x - log (∫ (z : α), rexp (f z) ∂0) + llr 0 ν x

tactic: exact Filter.eventually_bot
state_before: case inl
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
hμ : μ = 0
⊢ ∀ᶠ (x : α) in ⊥, llr (Measure.tilted 0 f) ν x = f x - log (∫ (z : α), rexp (f z) ∂0) + llr 0 ν x
state_after: no goals

tactic: filter_upwards [hμν.ae_le (toReal_rnDeriv_tilted_left hfμ hfν), Measure.rnDeriv_pos hμν,
  hμν.ae_le (Measure.rnDeriv_lt_top μ ν)] with x hx hx_pos hx_lt_top
state_before: case inr
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
h0 : NeZero μ
⊢ llr (μ.tilted f) ν =ᶠ[ae μ] fun x => f x - log (∫ (z : α), rexp (f z) ∂μ) + llr μ ν x
state_after: case h
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
h0 : NeZero μ
x : α
hx : ((μ.tilted f).rnDeriv ν x).toReal = (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * (μ.rnDeriv ν x).toReal
hx_pos : 0 < μ.rnDeriv ν x
hx_lt_top : μ.rnDeriv ν x < ⊤
⊢ llr (μ.tilted f) ν x = f x - log (∫ (z : α), rexp (f z) ∂μ) + llr μ ν x

tactic: rw [llr, hx, log_mul, div_eq_mul_inv, log_mul (exp_pos _).ne', log_exp, log_inv, llr,
  ← sub_eq_add_neg]
state_before: case h
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
h0 : NeZero μ
x : α
hx : ((μ.tilted f).rnDeriv ν x).toReal = (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * (μ.rnDeriv ν x).toReal
hx_pos : 0 < μ.rnDeriv ν x
hx_lt_top : μ.rnDeriv ν x < ⊤
⊢ llr (μ.tilted f) ν x = f x - log (∫ (z : α), rexp (f z) ∂μ) + llr μ ν x
state_after: case h
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
h0 : NeZero μ
x : α
hx : ((μ.tilted f).rnDeriv ν x).toReal = (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * (μ.rnDeriv ν x).toReal
hx_pos : 0 < μ.rnDeriv ν x
hx_lt_top : μ.rnDeriv ν x < ⊤
⊢ (∫ (x : α), rexp (f x) ∂μ)⁻¹ ≠ 0

case h.hx
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
h0 : NeZero μ
x : α
hx : ((μ.tilted f).rnDeriv ν x).toReal = (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * (μ.rnDeriv ν x).toReal
hx_pos : 0 < μ.rnDeriv ν x
hx_lt_top : μ.rnDeriv ν x < ⊤
⊢ rexp (f x) / ∫ (x : α), rexp (f x) ∂μ ≠ 0

case h.hy
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
h0 : NeZero μ
x : α
hx : ((μ.tilted f).rnDeriv ν x).toReal = (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * (μ.rnDeriv ν x).toReal
hx_pos : 0 < μ.rnDeriv ν x
hx_lt_top : μ.rnDeriv ν x < ⊤
⊢ (μ.rnDeriv ν x).toReal ≠ 0

tactic: simp only [ne_eq, inv_eq_zero]
state_before: case h
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
h0 : NeZero μ
x : α
hx : ((μ.tilted f).rnDeriv ν x).toReal = (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * (μ.rnDeriv ν x).toReal
hx_pos : 0 < μ.rnDeriv ν x
hx_lt_top : μ.rnDeriv ν x < ⊤
⊢ (∫ (x : α), rexp (f x) ∂μ)⁻¹ ≠ 0
state_after: case h
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
h0 : NeZero μ
x : α
hx : ((μ.tilted f).rnDeriv ν x).toReal = (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * (μ.rnDeriv ν x).toReal
hx_pos : 0 < μ.rnDeriv ν x
hx_lt_top : μ.rnDeriv ν x < ⊤
⊢ ¬∫ (x : α), rexp (f x) ∂μ = 0

tactic: exact (integral_exp_pos hf).ne'
state_before: case h
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
h0 : NeZero μ
x : α
hx : ((μ.tilted f).rnDeriv ν x).toReal = (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * (μ.rnDeriv ν x).toReal
hx_pos : 0 < μ.rnDeriv ν x
hx_lt_top : μ.rnDeriv ν x < ⊤
⊢ ¬∫ (x : α), rexp (f x) ∂μ = 0
state_after: no goals

tactic: simp only [ne_eq, div_eq_zero_iff]
state_before: case h.hx
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
h0 : NeZero μ
x : α
hx : ((μ.tilted f).rnDeriv ν x).toReal = (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * (μ.rnDeriv ν x).toReal
hx_pos : 0 < μ.rnDeriv ν x
hx_lt_top : μ.rnDeriv ν x < ⊤
⊢ rexp (f x) / ∫ (x : α), rexp (f x) ∂μ ≠ 0
state_after: case h.hx
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
h0 : NeZero μ
x : α
hx : ((μ.tilted f).rnDeriv ν x).toReal = (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * (μ.rnDeriv ν x).toReal
hx_pos : 0 < μ.rnDeriv ν x
hx_lt_top : μ.rnDeriv ν x < ⊤
⊢ ¬(rexp (f x) = 0 ∨ ∫ (x : α), rexp (f x) ∂μ = 0)

tactic: push_neg
state_before: case h.hx
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
h0 : NeZero μ
x : α
hx : ((μ.tilted f).rnDeriv ν x).toReal = (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * (μ.rnDeriv ν x).toReal
hx_pos : 0 < μ.rnDeriv ν x
hx_lt_top : μ.rnDeriv ν x < ⊤
⊢ ¬(rexp (f x) = 0 ∨ ∫ (x : α), rexp (f x) ∂μ = 0)
state_after: case h.hx
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
h0 : NeZero μ
x : α
hx : ((μ.tilted f).rnDeriv ν x).toReal = (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * (μ.rnDeriv ν x).toReal
hx_pos : 0 < μ.rnDeriv ν x
hx_lt_top : μ.rnDeriv ν x < ⊤
⊢ rexp (f x) ≠ 0 ∧ ∫ (x : α), rexp (f x) ∂μ ≠ 0

tactic: exact ⟨(exp_pos _).ne', (integral_exp_pos hf).ne'⟩
state_before: case h.hx
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
h0 : NeZero μ
x : α
hx : ((μ.tilted f).rnDeriv ν x).toReal = (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * (μ.rnDeriv ν x).toReal
hx_pos : 0 < μ.rnDeriv ν x
hx_lt_top : μ.rnDeriv ν x < ⊤
⊢ rexp (f x) ≠ 0 ∧ ∫ (x : α), rexp (f x) ∂μ ≠ 0
state_after: no goals

tactic: simp [ENNReal.toReal_eq_zero_iff, hx_lt_top.ne, hx_pos.ne']
state_before: case h.hy
α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
hfμ : AEMeasurable f μ
h0 : NeZero μ
x : α
hx : ((μ.tilted f).rnDeriv ν x).toReal = (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * (μ.rnDeriv ν x).toReal
hx_pos : 0 < μ.rnDeriv ν x
hx_lt_top : μ.rnDeriv ν x < ⊤
⊢ (μ.rnDeriv ν x).toReal ≠ 0
state_after: no goals