Learning.Environment.feedback_comapAction
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 : ๐' โ ๐ -
env : Environment ๐ ๐ ๐จA stochastic environment. -
n : โ
Assuming
-
hf : Measurable fA functionfbetween measurable spaces is measurable if the preimage of every measurable set is measurable.
Then
(env.comapAction f hf).feedback n = (env.feedback n).comap (fun p => ((Hist.mapAction f p.1.1, p.1.2), f p.2)) โฏ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
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.
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.comapAction : {๐ : Type u_1} โ
{๐ : Type u_4} โ
{๐' : Type u_5} โ
{๐จ : Type u_7} โ
{m๐ : MeasurableSpace ๐} โ
{m๐ : MeasurableSpace ๐} โ
{m๐' : MeasurableSpace ๐'} โ
{m๐จ : MeasurableSpace ๐จ} โ
Learning.Environment ๐ ๐ ๐จ โ
(f : ๐' โ ๐) โ
autoParam (Measurable f) Learning.Environment.comapAction._auto_1 โโฆThe environment that reads `f a` when the algorithm plays `a`, both in the current round and in the past rounds.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`.
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
lemma Environment.feedback_comapAction (env : Environment ๐ ๐ ๐จ) (hf : Measurable f) (n : โ) :
(env.comapAction f hf).feedback n = (env.feedback n).comap
(fun p โฆ ((Hist.mapAction f p.1.1, p.1.2), f p.2)) (by fun_prop)Proof
rfl
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: 12 project declarations, 29 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.