LeanMachineLearning

Learning.klDiv_map_trajectory_eq_iSup๐Ÿ”—

Lemma

From the authors

The divergence between the laws of two trajectories is the supremum over n of the divergences between the laws of the histories up to time n.

Types
  • ๐“ž : Type u_1m๐“ž : MeasurableSpace ๐“žA measurable space is a space equipped with a ฯƒ-algebra.
  • ๐“ : Type u_2m๐“ : MeasurableSpace ๐“
  • ๐“จ : Type u_3m๐“จ : MeasurableSpace ๐“จ
  • ฮฉ : Type u_4mฮฉ : MeasurableSpace ฮฉ
  • ฮฉ' : Type u_5mฮฉ' : MeasurableSpace ฮฉ'
Given
  • P : MeasureTheory.Measure ฮฉA measure is defined to be an outer measure that is countably additive on measurable sets, with the additional assumption that the outer measure is the canonical extension of the restricted measure.MeasureTheory.IsProbabilityMeasure PA measure ฮผ is called a probability measure if ฮผ univ = 1.
  • P' : MeasureTheory.Measure ฮฉ'MeasureTheory.IsProbabilityMeasure P'
  • O : โ„• โ†’ ฮฉ โ†’ ๐“ž
  • A : โ„• โ†’ ฮฉ โ†’ ๐“
  • Y : โ„• โ†’ ฮฉ โ†’ ๐“จ
  • O' : โ„• โ†’ ฮฉ' โ†’ ๐“ž
  • A' : โ„• โ†’ ฮฉ' โ†’ ๐“
  • Y' : โ„• โ†’ ฮฉ' โ†’ ๐“จ
Assuming
  • hO : โˆ€ (n : โ„•), Measurable (O n)A function f between measurable spaces is measurable if the preimage of every measurable set is measurable.
  • hA : โˆ€ (n : โ„•), Measurable (A n)
  • hY : โˆ€ (n : โ„•), Measurable (Y n)
  • hO' : โˆ€ (n : โ„•), Measurable (O' n)
  • hA' : โˆ€ (n : โ„•), Measurable (A' n)
  • hY' : โˆ€ (n : โ„•), Measurable (Y' n)
Then
InformationTheory.klDiv (MeasureTheory.Measure.map (trajectory O A Y) P)
    (MeasureTheory.Measure.map (trajectory O' A' Y') P') =
  โจ† n,
    InformationTheory.klDiv (MeasureTheory.Measure.map (history O A Y n) P)
      (MeasureTheory.Measure.map (history O' A' Y' n) P')
Code
lemma klDiv_map_trajectory_eq_iSup (hO : โˆ€ n, Measurable (O n)) (hA : โˆ€ n, Measurable (A n))
    (hY : โˆ€ n, Measurable (Y n)) (hO' : โˆ€ n, Measurable (O' n)) (hA' : โˆ€ n, Measurable (A' n))
    (hY' : โˆ€ n, Measurable (Y' n)) :
    klDiv (P.map (trajectory O A Y)) (P'.map (trajectory O' A' Y')) =
      โจ† n, klDiv (P.map (history O A Y n)) (P'.map (history O' A' Y' n))
Proof
by
  have hg : โˆ€ n, Measurable fun f : โ„• โ†’ Round ๐“ž ๐“ ๐“จ โ†ฆ fun i : Fin n โ†ฆ f i.1 := fun n โ†ฆ
    .of_eval fun i โ†ฆ measurable_pi_apply i.1
  rw [klDiv_eq_iSup_map hg ?_ MeasurableSpace.iSup_comap_restrictFin]
  ยท refine iSup_congr fun n โ†ฆ ?_
    rw [Measure.map_map (hg n) (measurable_trajectory hO hA hY),
      Measure.map_map (hg n) (measurable_trajectory hO' hA' hY')]
    rfl
  ยท intro n m hnm
    have : (fun f : โ„• โ†’ Round ๐“ž ๐“ ๐“จ โ†ฆ fun i : Fin n โ†ฆ f i.1) =
        (fun h : Fin m โ†’ Round ๐“ž ๐“ ๐“จ โ†ฆ fun i : Fin n โ†ฆ h (Fin.castLE hnm i)) โˆ˜
          fun f : โ„• โ†’ Round ๐“ž ๐“ ๐“จ โ†ฆ fun i : Fin m โ†ฆ f i.1 := rfl
    beta_reduce
    rw [this, โ† MeasurableSpace.comap_comp]
    exact MeasurableSpace.comap_mono (Measurable.of_eval fun i โ†ฆ
      measurable_pi_apply (Fin.castLE hnm i)).comap_le

Meaning last changed in v4.34.0-rc2-76-g565f652 (2026-09-10), the 2th recorded change.

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

Dependency graph

Audit surface: 4 project declarations, 23 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.