LeanMachineLearning

Learning.IsAlgEnvSeq.klDiv_map_trajectory_stepKernel๐Ÿ”—

Lemma

From the authors

Chain rule for trajectories. For two algorithms alg and alg' run against two environments env and env', the divergence between the laws of the trajectories is the series over the rounds t of the conditional divergences of the step at round t given the first t rounds.

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' : โ„• โ†’ ฮฉ' โ†’ ๐“จ
  • alg : Algorithm ๐“ž ๐“ ๐“จA stochastic, sequential algorithm.
  • alg' : Algorithm ๐“ž ๐“ ๐“จ
  • env : Environment ๐“ž ๐“ ๐“จA stochastic environment.
  • env' : Environment ๐“ž ๐“ ๐“จ
Then
InformationTheory.klDiv (MeasureTheory.Measure.map (trajectory O A Y) P)
    (MeasureTheory.Measure.map (trajectory O' A' Y') P') =
  โˆ‘' (t : โ„•),
    InformationTheory.klDiv ((MeasureTheory.Measure.map (history O A Y t) P).compProd (stepKernel alg env t))
      ((MeasureTheory.Measure.map (history O A Y t) P).compProd (stepKernel alg' env' t))
Code
lemma IsAlgEnvSeq.klDiv_map_trajectory_stepKernel (h : IsAlgEnvSeq O A Y alg env P)
    (h' : IsAlgEnvSeq O' A' Y' alg' env' P') :
    klDiv (P.map (trajectory O A Y)) (P'.map (trajectory O' A' Y')) =
      โˆ‘' t : โ„•, klDiv (P.map (history O A Y t) โŠ—โ‚˜ stepKernel alg env t)
        (P.map (history O A Y t) โŠ—โ‚˜ stepKernel alg' env' t)
Proof
by
  rw [klDiv_map_trajectory_eq_iSup h.measurable_obs h.measurable_action h.measurable_feedback
    h'.measurable_obs h'.measurable_action h'.measurable_feedback, ENNReal.tsum_eq_iSup_nat]
  exact iSup_congr fun n โ†ฆ h.klDiv_map_history_stepKernel h' n

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: 8 project declarations, 36 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.