LeanMachineLearning

Learning.IsAlgEnvSeq.klDiv_map_history_stepKernel๐Ÿ”—

Lemma

From the authors

Chain rule for histories. For two algorithms alg, alg' run against two environments env, env', the divergence between the laws of the histories of the first M rounds is the sum over the rounds t < M 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 ๐“ž ๐“ ๐“จ
  • M : โ„•
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 (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_history_stepKernel (h : IsAlgEnvSeq O A Y alg env P)
    (h' : IsAlgEnvSeq O' A' Y' alg' env' P') (M : โ„•) :
    klDiv (P.map (history O A Y M)) (P'.map (history O' A' Y' M)) =
      โˆ‘ t โˆˆ range M,
        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
  have hO := h.measurable_obs
  have hA := h.measurable_action
  have hY := h.measurable_feedback
  have hO' := h'.measurable_obs
  have hA' := h'.measurable_action
  have hY' := h'.measurable_feedback
  induction M with
  | zero => simp
  | succ M ih =>
    rw [history_succ, history_succ, โ† Measure.map_map (by fun_prop) (by fun_prop),
      โ† Measure.map_map (by fun_prop) (by fun_prop), klDiv_map_measurableEquiv,
      (h.hasCondDistrib_step M).map_eq, (h'.hasCondDistrib_step M).map_eq,
      klDiv_compProd_eq_add, ih, sum_range_succ]

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