Learning.Environment.congr
From the authors
Relabelling of the observations, the actions and the feedbacks of an environment along
measurable equivalences. See also Algorithm.congr.
-
๐ : 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 ๐จ'
-
env : Environment ๐ ๐ ๐จA stochastic environment. -
e๐ : ๐ โแต ๐'Equivalences between measurable spaces. -
e๐ : ๐ โแต ๐' -
e๐จ : ๐จ โแต ๐จ'
Environment ๐' ๐' ๐จ'{ 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 := โฏ }MeasurableSpace : Type u_6 โ Type u_6A measurable space is a space equipped with a ฯ-algebra.
Learning.Environment : (๐ : Type u_5) โ
(๐ : Type u_6) โ
(๐จ : Type u_7) โ [MeasurableSpace ๐] โ [MeasurableSpace ๐] โ [MeasurableSpace ๐จ] โ Type (max (max u_5 u_6) u_7)A stochastic environment. At each round, an observation is drawn prior to the algorithm taking an action. Then the environment provides feedback based on the observation and the action.Go to its page
MeasurableEquiv : (ฮฑ : Type u_6) โ (ฮฒ : Type u_7) โ [MeasurableSpace ฮฑ] โ [MeasurableSpace ฮฒ] โ Type (max u_6 u_7)Equivalences between measurable spaces. Main application is the simplification of measurability statements along measurable equivalences.
ProbabilityTheory.Kernel.map : {ฮฑ : Type u_1} โ
{ฮฒ : Type u_2} โ
{mฮฑ : MeasurableSpace ฮฑ} โ
{mฮฒ : MeasurableSpace ฮฒ} โ
{ฮณ : Type u_4} โ
[inst : MeasurableSpace ฮณ] โ ProbabilityTheory.Kernel ฮฑ ฮฒ โ (ฮฒ โ ฮณ) โ ProbabilityTheory.Kernel ฮฑ ฮณThe pushforward of a kernel along a function. If the function is not measurable, we use zero instead. This choice of junk value ensures that typeclass inference can infer that the `map` of a kernel satisfying `IsZeroOrMarkovKernel` again satisfies this property.
ProbabilityTheory.Kernel.comap : {ฮฑ : Type u_1} โ
{ฮฒ : Type u_2} โ
{mฮฑ : MeasurableSpace ฮฑ} โ
{mฮฒ : MeasurableSpace ฮฒ} โ
{ฮณ : Type u_4} โ
{mฮณ : MeasurableSpace ฮณ} โ
ProbabilityTheory.Kernel ฮฑ ฮฒ โ (g : ฮณ โ ฮฑ) โ Measurable g โ ProbabilityTheory.Kernel ฮณ ฮฒPullback of a kernel, such that for each set s `comap ฮบ g hg c s = ฮบ (g c) s`. We include measurability in the assumptions instead of using junk values to make sure that typeclass inference can infer that the `comap` of a Markov kernel is again a Markov kernel.
Learning.Hist.map : {๐ : Type u_1} โ
{๐' : Type u_2} โ
{๐ : Type u_4} โ
{๐' : Type u_5} โ
{๐จ : Type u_7} โ
{๐จ' : Type u_8} โ (๐ โ ๐') โ (๐ โ ๐') โ (๐จ โ ๐จ') โ {n : โ} โ Learning.Hist ๐ ๐ ๐จ n โ Learning.Hist ๐' ๐' ๐จ' nTransport a history round-wise.Go to its page
MeasurableEquiv.symm : {ฮฑ : Type u_1} โ {ฮฒ : Type u_2} โ [inst : MeasurableSpace ฮฑ] โ [inst_1 : MeasurableSpace ฮฒ] โ ฮฑ โแต ฮฒ โ ฮฒ โแต ฮฑThe inverse of an equivalence between measurable spaces.
Prod.mk : {ฮฑ : Type u} โ {ฮฒ : Type v} โ ฮฑ โ ฮฒ โ ฮฑ ร ฮฒConstructs a pair. This is usually written `(x, y)` instead of `Prod.mk x y`. Conventions for notations in identifiers: * The recommended spelling of `(a, b)` in identifiers is `mk`.
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_instanceMeaning 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.