Learning.Environment.Ξ½0_comap
Lemma
No docstring.
Types
-
π : 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 π¨
Given
-
F : (n : β) β Hist π π' π¨ n β Hist π π π¨ nHistory ofncomplete rounds;n = 0is the empty history. -
f : π' β π -
env : Environment π π π¨A stochastic environment.
Assuming
-
hF : β (n : β), Measurable (F n)A functionfbetween measurable spaces is measurable if the preimage of every measurable set is measurable. -
hf : Measurable f
Then
(env.comap F hF f hf).Ξ½0 = env.Ξ½0.comap (fun p => (p.1, f p.2)) β―MeasurableSpace : Type u_6 β Type u_6A measurable space is a space equipped with a Ο-algebra.
Learning.Hist : Type u_5 β Type u_6 β Type u_7 β β β Type (max (max u_7 u_6) u_5)History of `n` complete rounds; `n = 0` is the empty history.Go to its page
Nat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
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.
Eq : {Ξ± : Sort u_1} β Ξ± β Ξ± β PropThe equality relation. It has one introduction rule, `Eq.refl`.
We use `a = b` as notation for `Eq a b`.
A fundamental property of equality is that it is an equivalence relation.
```
variable (Ξ± : Type) (a b c d : Ξ±)
variable (hab : a = b) (hcb : c = b) (hcd : c = d)
example : a = d :=
Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd
```
Equality is much more than an equivalence relation, however. It has the important property that every assertion
respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value.
That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`.
Example:
```
example (Ξ± : Type) (a b : Ξ±) (p : Ξ± β Prop)
(h1 : a = b) (h2 : p a) : p b :=
Eq.subst h1 h2
example (Ξ± : Type) (a b : Ξ±) (p : Ξ± β Prop)
(h1 : a = b) (h2 : p a) : p b :=
h1 βΈ h2
```
The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`.
For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
Conventions for notations in identifiers:
* The recommended spelling of `=` in identifiers is `eq`.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.Environment.Ξ½0 : {π : Type u_1} β
{π : Type u_2} β
{π¨ : Type u_3} β
{mπ : MeasurableSpace π} β
{mπ : MeasurableSpace π} β
{mπ¨ : MeasurableSpace π¨} β Learning.Environment π π π¨ β ProbabilityTheory.Kernel (π Γ π) π¨Distribution of the first feedback given the first observation and action: the feedback kernel at time `0` applied to the empty history.Go to its page
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.
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
lemma Environment.Ξ½0_comap (env : Environment π π π¨) (hF : β n, Measurable (F n))
(hf : Measurable f) :
(env.comap F hF f hf).Ξ½0 = env.Ξ½0.comap (fun p β¦ (p.1, f p.2)) (by fun_prop)Proof
by
ext p : 1
rw [Environment.Ξ½0_apply, feedback_comap, Kernel.comap_apply, env.feedback_zero,
Kernel.comap_apply]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: 5 project declarations, 24 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.