LeanMachineLearning

Learning.IsAlgEnvSeq.klDiv_map_history_compProd๐Ÿ”—

Lemma

From the authors

Chain rule for histories of a single algorithm versus two stationary environments.

Types
  • ๐“ : Type u_2m๐“ : MeasurableSpace ๐“A measurable space is a space equipped with a ฯƒ-algebra.
  • ๐“จ : 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'
  • A : โ„• โ†’ ฮฉ โ†’ ๐“
  • Y : โ„• โ†’ ฮฉ โ†’ ๐“จ
  • A' : โ„• โ†’ ฮฉ' โ†’ ๐“
  • Y' : โ„• โ†’ ฮฉ' โ†’ ๐“จ
  • O : โ„• โ†’ ฮฉ โ†’ Unit
  • O' : โ„• โ†’ ฮฉ' โ†’ Unit
  • alg : Algorithm Unit ๐“ ๐“จA stochastic, sequential algorithm.
  • ฮบ : ProbabilityTheory.Kernel ๐“ ๐“จA kernel from a measurable space ฮฑ to another measurable space ฮฒ is a measurable function ฮบ : ฮฑ โ†’ Measure ฮฒ.ProbabilityTheory.IsMarkovKernel ฮบA kernel is a Markov kernel if every measure in its image is a probability measure.
  • ฮบ' : ProbabilityTheory.Kernel ๐“ ๐“จProbabilityTheory.IsMarkovKernel ฮบ'
  • M : โ„•
Assuming
Then
InformationTheory.klDiv (MeasureTheory.Measure.map (history O A Y M) P)
    (MeasureTheory.Measure.map (history O' A' Y' M) P') =
  โˆ‘ t โˆˆ Finset.range M,
    InformationTheory.klDiv ((MeasureTheory.Measure.map (A t) P).compProd ฮบ)
      ((MeasureTheory.Measure.map (A t) P).compProd ฮบ')
Code
lemma IsAlgEnvSeq.klDiv_map_history_compProd (h : IsAlgEnvSeq O A Y alg (stationaryEnv ฮบ) P)
    (h' : IsAlgEnvSeq O' A' Y' alg (stationaryEnv ฮบ') P') (M : โ„•) :
    klDiv (P.map (history O A Y M)) (P'.map (history O' A' Y' M)) =
      โˆ‘ t โˆˆ range M, klDiv (P.map (A t) โŠ—โ‚˜ ฮบ) (P.map (A t) โŠ—โ‚˜ ฮบ')
Proof
by
  rw [h.klDiv_map_history_stepKernel h']
  refine sum_congr rfl fun t _ โ†ฆ ?_
  have h_obs := (h.hasCondDistrib_obs t).map_eq
  rw [obs_stationaryEnv] at h_obs
  rw [stepKernel_stationaryEnv, stepKernel_stationaryEnv,
    klDiv_compProd_compProd_compProd_prodMkLeft_eq_klDiv_comp_compProd, โ† h_obs,
    โ† (h.hasCondDistrib_action t).hasLaw_comp.map_eq]

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, 40 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.