File: Mathlib/MeasureTheory/Measure/LogLikelihoodRatio.lean

full_name: MeasureTheory.llr
code: /-- Log-Likelihood Ratio between two measures. -/
noncomputable def llr (μ ν : Measure α) (x : α) : ℝ 
goal: ℝ

full_name: MeasureTheory.llr_def
code: lemma llr_def (μ ν : Measure α) : llr μ ν = fun x ↦ log (μ.rnDeriv ν x).toReal 
goal: MeasureTheory.llr μ ν = fun x => Real.log (μ.rnDeriv ν x).toReal

full_name: MeasureTheory.exp_llr
code: lemma exp_llr (μ ν : Measure α) [SigmaFinite μ] :
    (fun x ↦ exp (llr μ ν x))
      =ᵐ[ν] fun x ↦ if μ.rnDeriv ν x = 0 then 1 else (μ.rnDeriv ν x).toReal 
goal: (fun x => rexp (MeasureTheory.llr μ ν x)) =ᵐ[ν] fun x => if μ.rnDeriv ν x = 0 then 1 else (μ.rnDeriv ν x).toReal

full_name: MeasureTheory.exp_llr_of_ac
code: lemma exp_llr_of_ac (μ ν : Measure α) [SigmaFinite μ] [Measure.HaveLebesgueDecomposition μ ν]
    (hμν : μ ≪ ν) :
    (fun x ↦ exp (llr μ ν x)) =ᵐ[μ] fun x ↦ (μ.rnDeriv ν x).toReal 
goal: (fun x => rexp (MeasureTheory.llr μ ν x)) =ᵐ[μ] fun x => (μ.rnDeriv ν x).toReal

full_name: MeasureTheory.exp_llr_of_ac'
code: lemma exp_llr_of_ac' (μ ν : Measure α) [SigmaFinite μ] [SigmaFinite ν] (hμν : ν ≪ μ) :
    (fun x ↦ exp (llr μ ν x)) =ᵐ[ν] fun x ↦ (μ.rnDeriv ν x).toReal 
goal: (fun x => rexp (MeasureTheory.llr μ ν x)) =ᵐ[ν] fun x => (μ.rnDeriv ν x).toReal

full_name: MeasureTheory.neg_llr
code: lemma neg_llr [SigmaFinite μ] [SigmaFinite ν] (hμν : μ ≪ ν) :
    - llr μ ν =ᵐ[μ] llr ν μ 
goal: -MeasureTheory.llr μ ν =ᵐ[μ] MeasureTheory.llr ν μ

full_name: MeasureTheory.exp_neg_llr
code: lemma exp_neg_llr [SigmaFinite μ] [SigmaFinite ν] (hμν : μ ≪ ν) :
    (fun x ↦ exp (- llr μ ν x)) =ᵐ[μ] fun x ↦ (ν.rnDeriv μ x).toReal 
goal: (fun x => rexp (-MeasureTheory.llr μ ν x)) =ᵐ[μ] fun x => (ν.rnDeriv μ x).toReal

full_name: MeasureTheory.exp_neg_llr'
code: lemma exp_neg_llr' [SigmaFinite μ] [SigmaFinite ν] (hμν : ν ≪ μ) :
    (fun x ↦ exp (- llr μ ν x)) =ᵐ[ν] fun x ↦ (ν.rnDeriv μ x).toReal 
goal: (fun x => rexp (-MeasureTheory.llr μ ν x)) =ᵐ[ν] fun x => (ν.rnDeriv μ x).toReal

full_name: MeasureTheory.measurable_llr
code: @[measurability]
lemma measurable_llr (μ ν : Measure α) : Measurable (llr μ ν) 
goal: Measurable (MeasureTheory.llr μ ν)

full_name: MeasureTheory.stronglyMeasurable_llr
code: @[measurability]
lemma stronglyMeasurable_llr (μ ν : Measure α) : StronglyMeasurable (llr μ ν) 
goal: MeasureTheory.StronglyMeasurable (MeasureTheory.llr μ ν)

full_name: MeasureTheory.llr_smul_left
code: lemma llr_smul_left [IsFiniteMeasure μ] [Measure.HaveLebesgueDecomposition μ ν]
    (hμν : μ ≪ ν) (c : ℝ≥0∞) (hc : c ≠ 0) (hc_ne_top : c ≠ ∞) :
    llr (c • μ) ν =ᵐ[μ] fun x ↦ llr μ ν x + log c.toReal 
goal: MeasureTheory.llr (c • μ) ν =ᵐ[μ] fun x => MeasureTheory.llr μ ν x + Real.log c.toReal

full_name: MeasureTheory.llr_smul_right
code: lemma llr_smul_right [IsFiniteMeasure μ] [Measure.HaveLebesgueDecomposition μ ν]
    (hμν : μ ≪ ν) (c : ℝ≥0∞) (hc : c ≠ 0) (hc_ne_top : c ≠ ∞) :
    llr μ (c • ν) =ᵐ[μ] fun x ↦ llr μ ν x - log c.toReal 
goal: MeasureTheory.llr μ (c • ν) =ᵐ[μ] fun x => MeasureTheory.llr μ ν x - Real.log c.toReal

full_name: MeasureTheory.llr_tilted_left
code: lemma llr_tilted_left [SigmaFinite μ] [SigmaFinite ν] (hμν : μ ≪ ν)
    (hf : Integrable (fun x ↦ exp (f x)) μ) (hfν : AEMeasurable f ν) :
    (llr (μ.tilted f) ν) =ᵐ[μ] fun x ↦ f x - log (∫ z, exp (f z) ∂μ) + llr μ ν x 
goal: MeasureTheory.llr (μ.tilted f) ν =ᵐ[μ] fun x => f x - Real.log (∫ (z : α), rexp (f z) ∂μ) + MeasureTheory.llr μ ν x

full_name: MeasureTheory.integrable_llr_tilted_left
code: lemma integrable_llr_tilted_left [IsFiniteMeasure μ] [SigmaFinite ν]
    (hμν : μ ≪ ν) (hf : Integrable f μ) (h_int : Integrable (llr μ ν) μ)
    (hfμ : Integrable (fun x ↦ exp (f x)) μ) (hfν : AEMeasurable f ν) :
    Integrable (llr (μ.tilted f) ν) μ 
goal: MeasureTheory.Integrable (MeasureTheory.llr (μ.tilted f) ν) μ

full_name: MeasureTheory.integral_llr_tilted_left
code: lemma integral_llr_tilted_left [IsProbabilityMeasure μ] [SigmaFinite ν]
    (hμν : μ ≪ ν) (hf : Integrable f μ) (h_int : Integrable (llr μ ν) μ)
    (hfμ : Integrable (fun x ↦ exp (f x)) μ) (hfν : AEMeasurable f ν) :
    ∫ x, llr (μ.tilted f) ν x ∂μ = ∫ x, llr μ ν x ∂μ + ∫ x, f x ∂μ - log (∫ x, exp (f x) ∂μ) 
goal: ∫ (x : α), MeasureTheory.llr (μ.tilted f) ν x ∂μ =
  ∫ (x : α), MeasureTheory.llr μ ν x ∂μ + ∫ (x : α), f x ∂μ - Real.log (∫ (x : α), rexp (f x) ∂μ)

full_name: MeasureTheory.llr_tilted_right
code: lemma llr_tilted_right [SigmaFinite μ] [SigmaFinite ν]
    (hμν : μ ≪ ν) (hf : Integrable (fun x ↦ exp (f x)) ν) :
    (llr μ (ν.tilted f)) =ᵐ[μ] fun x ↦ - f x + log (∫ z, exp (f z) ∂ν) + llr μ ν x 
goal: MeasureTheory.llr μ (ν.tilted f) =ᵐ[μ] fun x => -f x + Real.log (∫ (z : α), rexp (f z) ∂ν) + MeasureTheory.llr μ ν x

full_name: MeasureTheory.integrable_llr_tilted_right
code: lemma integrable_llr_tilted_right [IsFiniteMeasure μ] [SigmaFinite ν]
    (hμν : μ ≪ ν) (hfμ : Integrable f μ)
    (h_int : Integrable (llr μ ν) μ) (hfν : Integrable (fun x ↦ exp (f x)) ν) :
    Integrable (llr μ (ν.tilted f)) μ 
goal: MeasureTheory.Integrable (MeasureTheory.llr μ (ν.tilted f)) μ

full_name: MeasureTheory.integral_llr_tilted_right
code: lemma integral_llr_tilted_right [IsProbabilityMeasure μ] [SigmaFinite ν]
    (hμν : μ ≪ ν) (hfμ : Integrable f μ) (hfν : Integrable (fun x ↦ exp (f x)) ν)
    (h_int : Integrable (llr μ ν) μ) :
    ∫ x, llr μ (ν.tilted f) x ∂μ = ∫ x, llr μ ν x ∂μ - ∫ x, f x ∂μ + log (∫ x, exp (f x) ∂ν) 
goal: ∫ (x : α), MeasureTheory.llr μ (ν.tilted f) x ∂μ =
  ∫ (x : α), MeasureTheory.llr μ ν x ∂μ - ∫ (x : α), f x ∂μ + Real.log (∫ (x : α), rexp (f x) ∂ν)