LeanMachineLearning

Learning.Environment.congr๐Ÿ”—

Definition

From the authors

Relabelling of the observations, the actions and the feedbacks of an environment along measurable equivalences. See also Algorithm.congr.

Types
  • ๐“ž : Type u_1m๐“ž : MeasurableSpace ๐“žA measurable space is a space equipped with a ฯƒ-algebra.
  • ๐“ž' : Type u_2m๐“ž' : MeasurableSpace ๐“ž'
  • ๐“ : Type u_4m๐“ : MeasurableSpace ๐“
  • ๐“' : Type u_5m๐“' : MeasurableSpace ๐“'
  • ๐“จ : Type u_7m๐“จ : MeasurableSpace ๐“จ
  • ๐“จ' : Type u_8m๐“จ' : MeasurableSpace ๐“จ'
Given
  • env : Environment ๐“ž ๐“ ๐“จA stochastic environment.
  • e๐“ž : ๐“ž โ‰ƒแต ๐“ž'Equivalences between measurable spaces.
  • e๐“ : ๐“ โ‰ƒแต ๐“'
  • e๐“จ : ๐“จ โ‰ƒแต ๐“จ'
Result
Environment ๐“ž' ๐“' ๐“จ'
Body
{ obs := fun n => ((env.obs n).map โ‡‘e๐“ž).comap (Hist.map โ‡‘e๐“ž.symm โ‡‘e๐“.symm โ‡‘e๐“จ.symm) โ‹ฏ,
  feedback := fun n =>
    ((env.feedback n).map โ‡‘e๐“จ).comap
      (fun p => ((Hist.map (โ‡‘e๐“ž.symm) (โ‡‘e๐“.symm) (โ‡‘e๐“จ.symm) p.1.1, e๐“ž.symm p.1.2), e๐“.symm p.2)) โ‹ฏ,
  isMarkovKernel_obs := โ‹ฏ, isMarkovKernel_feedback := โ‹ฏ }
Code
noncomputable def Environment.congr (env : Environment ๐“ž ๐“ ๐“จ) (e๐“ž : ๐“ž โ‰ƒแต ๐“ž') (e๐“ : ๐“ โ‰ƒแต ๐“')
    (e๐“จ : ๐“จ โ‰ƒแต ๐“จ') :
    Environment ๐“ž' ๐“' ๐“จ' where
  obs n := ((env.obs n).map e๐“ž).comap (Hist.map e๐“ž.symm e๐“.symm e๐“จ.symm) (by fun_prop)
  feedback n := ((env.feedback n).map e๐“จ).comap
    (fun p โ†ฆ ((Hist.map e๐“ž.symm e๐“.symm e๐“จ.symm p.1.1, e๐“ž.symm p.1.2), e๐“.symm p.2)) (by fun_prop)
  isMarkovKernel_obs n := by
    have : IsMarkovKernel ((env.obs n).map e๐“ž) := Kernel.IsMarkovKernel.map _ e๐“ž.measurable
    infer_instance
  isMarkovKernel_feedback n := by
    have : IsMarkovKernel ((env.feedback n).map e๐“จ) := Kernel.IsMarkovKernel.map _ e๐“จ.measurable
    infer_instance

Meaning last changed in v4.34.0-rc2-76-g565f652 (2026-09-10).

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