Learning.Environment.comapAction
From the authors
The environment that reads f a when the algorithm plays a, both in the current round and in
the past rounds.
-
π : Type u_1mπ : MeasurableSpace πA measurable space is a space equipped with a Ο-algebra. -
π : Type u_4mπ : MeasurableSpace π -
π' : Type u_5mπ' : MeasurableSpace π' -
π¨ : Type u_7mπ¨ : MeasurableSpace π¨
-
env : Environment π π π¨A stochastic environment. -
f : π' β π
-
hf : Measurable fA functionfbetween measurable spaces is measurable if the preimage of every measurable set is measurable.
Environment π π' π¨env.comap (fun x => Hist.mapAction f) β― f hfMeasurableSpace : 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
Measurable : {Ξ± : Type u_1} β {Ξ² : Type u_2} β [MeasurableSpace Ξ±] β [MeasurableSpace Ξ²] β (Ξ± β Ξ²) β PropA function `f` between measurable spaces is measurable if the preimage of every measurable set is measurable.
Learning.Environment.comap : {π : Type u_1} β
{π : Type u_4} β
{π' : Type u_5} β
{π¨ : Type u_7} β
{mπ : MeasurableSpace π} β
{mπ : MeasurableSpace π} β
{mπ' : MeasurableSpace π'} β
{mπ¨ : MeasurableSpace π¨} β
Learning.Environment π π π¨ β
(F : (n : β) β Learning.Hist π π' π¨ n β Learning.Hist π π π¨ n) β
(β (n : β), Measuβ¦The environment that reads the summary `F n` of the past rounds and reads `f a` when the algorithm plays `a` in the current round. This is the primitive transport operation on environments, dual to `Algorithm.comap`: `Environment.comapAction` is the special case in which `F n` is the round-wise map of the actions. Only the action can change type, since the observations and the feedbacks are outputs of the environment; `F n` can nonetheless forget or summarize the past rounds, as an environment that reads only the last round does.Go to its page
Learning.Hist.mapAction : {π : Type u_1} β
{π : Type u_4} β
{π' : Type u_5} β {π¨ : Type u_7} β (π β π') β {n : β} β Learning.Hist π π π¨ n β Learning.Hist π π' π¨ nTransport the actions of a history.Go to its page
Code
def Environment.comapAction (env : Environment π π π¨) (f : π' β π)
(hf : Measurable f := by fun_prop) : Environment π π' π¨ :=
env.comap (fun _ β¦ Hist.mapAction f) (fun _ β¦ by fun_prop) f hfMeaning 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: 10 project declarations, 23 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.