LeanMachineLearning

InformationTheory.measurable_klDiv_kernel🔗

Lemma

From the authors

For finite kernels with countably generated target, a ↦ klDiv (κ a) (η a) is measurable.

Types
  • α : Type u_1mα : MeasurableSpace αA measurable space is a space equipped with a σ-algebra.
  • β : Type u_2mβ : MeasurableSpace βMeasurableSpace.CountableOrCountablyGenerated α βA class registering that either α is countable or β is a countably generated measurable space.
Given
  • κ : ProbabilityTheory.Kernel α βA kernel from a measurable space α to another measurable space β is a measurable function κ : α → Measure β.ProbabilityTheory.IsFiniteKernel κA kernel is finite if every measure in its image is finite, with a uniform bound.
  • η : ProbabilityTheory.Kernel α βProbabilityTheory.IsFiniteKernel η
Then
Measurable fun a => klDiv (κ a) (η a)
A function f between measurable spaces is measurable if the preimage of every measurable set is measurable.
Code
lemma measurable_klDiv_kernel (κ η : Kernel α β) [IsFiniteKernel κ] [IsFiniteKernel η] :
    Measurable fun a ↦ klDiv (κ a) (η a)
Proof
by
  classical
  have h_meas : Measurable fun a ↦
      ∫⁻ b, ENNReal.ofReal (klFun (κ.rnDeriv η a b).toReal) ∂(η a) :=
    Measurable.lintegral_kernel_prod_right
      ((measurable_klFun.comp (Kernel.measurable_rnDeriv κ η).ennreal_toReal).ennreal_ofReal)
  have h_eq : ∀ a, klDiv (κ a) (η a) = if κ a ≪ η a then
      ∫⁻ b, ENNReal.ofReal (klFun (κ.rnDeriv η a b).toReal) ∂(η a) else ∞ := by
    intro a
    split_ifs with hac
    · rw [klDiv_eq_lintegral_klFun_of_ac hac]
      refine lintegral_congr_ae ?_
      filter_upwards [Kernel.rnDeriv_eq_rnDeriv_measure (κ := κ) (η := η) (a := a)] with b hb
      rw [hb]
    · exact klDiv_of_not_ac hac
  simp_rw [h_eq]
  exact Measurable.ite (Kernel.measurableSet_absolutelyContinuous κ η) h_meas measurable_const

Meaning last changed in v4.34.0-rc2-76-g565f652 (2026-09-10).

Self-contained, with its dependencies inlined and proofs replaced by sorry: download the raw file · open it in the Lean web editor.

Dependency graph

Nothing to draw. Its statement rests on no other declaration in this project, and names nothing from a package left unaudited — so the graph is this declaration alone. That is the answer, not a missing picture.

Audit surface: 0 project declarations, 11 external constants

✓ Proved: no sorry anywhere in its closure

This is the tool's own reading of one build's recorded axioms, and it is not robust against an author who wants it to pass. Checking meant to be relied on should go through Comparator, which replays the proof through the kernel from an export against an explicit list of permitted axioms.