InformationTheory.measurable_klDiv_kernel
From the authors
For finite kernels with countably generated target, a ↦ klDiv (κ a) (η a) is measurable.
-
α : 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.
-
κ : 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 η
Measurable fun a => klDiv (κ a) (η a)A function f between measurable spaces is measurable if the preimage of every measurable set is measurable.MeasurableSpace : Type u_6 → Type u_6A measurable space is a space equipped with a σ-algebra.
MeasurableSpace.CountableOrCountablyGenerated : Type u_5 → (β : Type u_6) → [MeasurableSpace β] → PropA class registering that either `α` is countable or `β` is a countably generated measurable space.
ProbabilityTheory.IsFiniteKernel : {α : Type u_1} →
{β : Type u_2} → {mα : MeasurableSpace α} → {mβ : MeasurableSpace β} → ProbabilityTheory.Kernel α β → PropA kernel is finite if every measure in its image is finite, with a uniform bound.
ProbabilityTheory.Kernel : (α : Type u_1) → (β : Type u_2) → [MeasurableSpace α] → [MeasurableSpace β] → Type (max u_1 u_2)A kernel from a measurable space `α` to another measurable space `β` is a measurable function `κ : α → Measure β`. The measurable space structure on `MeasureTheory.Measure β` is given by `MeasureTheory.Measure.instMeasurableSpace`. A map `κ : α → MeasureTheory.Measure β` is measurable iff `∀ s : Set β, MeasurableSet s → Measurable (fun a ↦ κ a s)`.
Measurable : {α : Type u_1} → {β : Type u_2} → [MeasurableSpace α] → [MeasurableSpace β] → (α → β) → PropA function `f` between measurable spaces is measurable if the preimage of every measurable set is measurable.
InformationTheory.klDiv : {α : Type u_2} → {mα : MeasurableSpace α} → MeasureTheory.Measure α → MeasureTheory.Measure α → ENNRealKullback-Leibler divergence between two measures.
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_constMeaning 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.