LeanMachineLearning

Learning.IsAlgEnvSeq.klDiv_map_history๐Ÿ”—

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 ๐“จMeasurableSpace.CountablyGenerated ๐“จWe say a measurable space is countably generated if it can be generated by a countable set of sets.
  • ฮฉ : 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 (ฮบ (A t ฯ‰)) (ฮบ' (A t ฯ‰)) โˆ‚P
Code
lemma IsAlgEnvSeq.klDiv_map_history [MeasurableSpace.CountablyGenerated ๐“จ]
    (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 (ฮบ (A t ฯ‰)) (ฮบ' (A t ฯ‰)) โˆ‚P
Proof
by
  rw [h.klDiv_map_history_compProd h']
  refine sum_congr rfl fun t _ โ†ฆ ?_
  rw [klDiv_compProd_right_eq_lintegral,
    lintegral_map (measurable_klDiv_kernel ฮบ ฮบ') (h.measurable_action t)]

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