Theorem: MeasureTheory.log_rnDeriv_tilted_left_self
File: Mathlib/MeasureTheory/Measure/Tilted.lean

tactic: cases eq_zero_or_neZero μ with
| inl h => simp_rw [h, ae_zero, Filter.EventuallyEq]; exact Filter.eventually_bot
| inr h0 =>
  have hf' : AEMeasurable f μ := aemeasurable_of_aemeasurable_exp hf.1.aemeasurable
  filter_upwards [rnDeriv_tilted_left_self hf'] with x hx
  rw [hx, ENNReal.toReal_ofReal (by positivity), log_div (exp_pos _).ne', log_exp]
  exact (integral_exp_pos hf).ne'
state_before: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f : α → ℝ
inst✝ : SigmaFinite μ
hf : Integrable (fun x => rexp (f x)) μ
⊢ (fun x => log ((μ.tilted f).rnDeriv μ x).toReal) =ᶠ[ae μ] fun x => f x - log (∫ (x : α), rexp (f x) ∂μ)
state_after: no goals

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

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

tactic: have hf' : AEMeasurable f μ := aemeasurable_of_aemeasurable_exp hf.1.aemeasurable
state_before: case inr
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f : α → ℝ
inst✝ : SigmaFinite μ
hf : Integrable (fun x => rexp (f x)) μ
h0 : NeZero μ
⊢ (fun x => log ((μ.tilted f).rnDeriv μ x).toReal) =ᶠ[ae μ] fun x => f x - log (∫ (x : α), rexp (f x) ∂μ)
state_after: case inr
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f : α → ℝ
inst✝ : SigmaFinite μ
hf : Integrable (fun x => rexp (f x)) μ
h0 : NeZero μ
hf' : AEMeasurable f μ
⊢ (fun x => log ((μ.tilted f).rnDeriv μ x).toReal) =ᶠ[ae μ] fun x => f x - log (∫ (x : α), rexp (f x) ∂μ)

tactic: filter_upwards [rnDeriv_tilted_left_self hf'] with x hx
state_before: case inr
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f : α → ℝ
inst✝ : SigmaFinite μ
hf : Integrable (fun x => rexp (f x)) μ
h0 : NeZero μ
hf' : AEMeasurable f μ
⊢ (fun x => log ((μ.tilted f).rnDeriv μ x).toReal) =ᶠ[ae μ] fun x => f x - log (∫ (x : α), rexp (f x) ∂μ)
state_after: case h
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f : α → ℝ
inst✝ : SigmaFinite μ
hf : Integrable (fun x => rexp (f x)) μ
h0 : NeZero μ
hf' : AEMeasurable f μ
x : α
hx : (μ.tilted f).rnDeriv μ x = ENNReal.ofReal (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ)
⊢ log ((μ.tilted f).rnDeriv μ x).toReal = f x - log (∫ (x : α), rexp (f x) ∂μ)

tactic: rw [hx, ENNReal.toReal_ofReal (by positivity), log_div (exp_pos _).ne', log_exp]
state_before: case h
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f : α → ℝ
inst✝ : SigmaFinite μ
hf : Integrable (fun x => rexp (f x)) μ
h0 : NeZero μ
hf' : AEMeasurable f μ
x : α
hx : (μ.tilted f).rnDeriv μ x = ENNReal.ofReal (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ)
⊢ log ((μ.tilted f).rnDeriv μ x).toReal = f x - log (∫ (x : α), rexp (f x) ∂μ)
state_after: case h
α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f : α → ℝ
inst✝ : SigmaFinite μ
hf : Integrable (fun x => rexp (f x)) μ
h0 : NeZero μ
hf' : AEMeasurable f μ
x : α
hx : (μ.tilted f).rnDeriv μ x = ENNReal.ofReal (rexp (f x) / ∫ (x : α), rexp (f 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 μ
hf : Integrable (fun x => rexp (f x)) μ
h0 : NeZero μ
hf' : AEMeasurable f μ
x : α
hx : (μ.tilted f).rnDeriv μ x = ENNReal.ofReal (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ)
⊢ ∫ (x : α), rexp (f x) ∂μ ≠ 0
state_after: no goals

tactic: positivity
state_before: α : Type u_1
mα : MeasurableSpace α
μ : Measure α
f : α → ℝ
inst✝ : SigmaFinite μ
hf : Integrable (fun x => rexp (f x)) μ
h0 : NeZero μ
hf' : AEMeasurable f μ
x : α
hx : (μ.tilted f).rnDeriv μ x = ENNReal.ofReal (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ)
⊢ 0 ≤ rexp (f x) / ∫ (x : α), rexp (f x) ∂μ
state_after: no goals