Documentation

CsdLean4.Mathlib.InformationTheory.KlDivArrow

Relative entropy is a Lyapunov function for a Markov dynamics #

Category: 1-Mathlib (CSD-free; staged as a Mathlib-upstream candidate). The general half of the second law at a coarse-graining: what makes a divergence decrease, and what cannot make it decrease.

Mathlib has the three data-processing inequalities for klDiv (klDiv_map_le, klDiv_trim_le, klDiv_comp_right_le). Two consequences that the arrow of time is usually stated as are not there, and this file adds them.

Honest scope #

⚠️ No kernel is constructed, and stationarity is a hypothesis. The theorems say what follows from having a Markov kernel with an invariant law; exhibiting one for a given dynamics is the consumer's problem, and the H-theorem is vacuous for a kernel with no invariant measure.

⚠️ Divergence, not Shannon entropy. klDiv q π decreasing is equivalent to Shannon entropy increasing only when π is uniform on a finite space, through klDiv q uniform = log (card) − H q. That identity is not proved here: it needs the Radon–Nikodym derivative of one finite-type measure against another, which is a separate piece of work. Everything below is therefore about divergence from a reference law.

⚠️ klDiv is ∞ off absolute continuity. Both inequalities are then true and empty. The content is for laws absolutely continuous with respect to the reference.

References: T. Cover, J. Thomas, Elements of Information Theory, 2nd ed., Thm 4.4.1 and §11 (relative entropy decreases under a Markov chain with the stationary distribution as reference); Mathlib.InformationTheory.KullbackLeibler.DataProcessing.

The whole trajectory #

noncomputable def MeasureTheory.Measure.compIterate {α : Type u_1} {mα : MeasurableSpace α} (μ : Measure α) (κ : ProbabilityTheory.Kernel α α) :
ℕ → Measure α

The law after n steps of a kernel.

Equations
Instances For
    @[simp]
    theorem MeasureTheory.Measure.compIterate_zero {α : Type u_1} {mα : MeasurableSpace α} (μ : Measure α) (κ : ProbabilityTheory.Kernel α α) :
    μ.compIterate κ 0 = μ
    @[simp]
    theorem MeasureTheory.Measure.compIterate_succ {α : Type u_1} {mα : MeasurableSpace α} (μ : Measure α) (κ : ProbabilityTheory.Kernel α α) (n : ℕ) :
    μ.compIterate κ (n + 1) = (μ.compIterate κ n).bind ⇑κ

    A reversible step produces nothing #

    ★★ A reversible relabelling changes no divergence. The data processing inequality holds along e and along e.symm, so along a measurable equivalence it is an equality.

    This is the half of a coarse-grained second law that is usually left implicit: an invertible step produces no entropy, so whatever a coarse-grained law produces comes from the coarse-graining or from the kernel.

    The H-theorem #

    ★★★ The H-theorem. If a Markov kernel fixes the reference law π, then the divergence of any law from π is non-increasing under one step of the kernel.

    Nothing is assumed beyond stationarity of π: no symmetry, no double stochasticity, no detailed balance. The proof is the data processing inequality with the stationarity rewritten into its right argument.

    ★★ The divergence from a stationary law is monotone along the whole trajectory, which is what makes it an arrow of time rather than a one-step inequality.

    ★ And so no step of the trajectory is further from the stationary law than the start.