Learning.p0_detAlgorithm
No docstring.
-
๐ : Type u_1m๐ : MeasurableSpace ๐A measurable space is a space equipped with a ฯ-algebra. -
๐ : Type u_2m๐ : MeasurableSpace ๐ -
๐จ : Type u_3m๐จ : MeasurableSpace ๐จ
-
nextA : (n : โ) โ Hist ๐ ๐ ๐จ n ร ๐ โ ๐
-
h_next : โ (n : โ), Measurable (nextA n)implicitA functionfbetween measurable spaces is measurable if the preimage of every measurable set is measurable.
(detAlgorithm nextA h_next).p0 = ProbabilityTheory.Kernel.deterministic (fun o => nextA 0 (default, o)) โฏMeasurableSpace : Type u_6 โ Type u_6A measurable space is a space equipped with a ฯ-algebra.
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.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
Prod : Type u โ Type v โ Type (max u v)The product type, usually written `ฮฑ ร ฮฒ`. Product types are also called pair or tuple types. Elements of this type are pairs in which the first element is an `ฮฑ` and the second element is a `ฮฒ`. Products nest to the right, so `(x, y, z) : ฮฑ ร ฮฒ ร ฮณ` is equivalent to `(x, (y, z)) : ฮฑ ร (ฮฒ ร ฮณ)`. Conventions for notations in identifiers: * The recommended spelling of `ร` in identifiers is `Prod`.
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.detAlgorithm : {๐ : Type u_1} โ
{๐ : Type u_2} โ
{๐จ : Type u_3} โ
{m๐ : MeasurableSpace ๐} โ
{m๐ : MeasurableSpace ๐} โ
{m๐จ : MeasurableSpace ๐จ} โ
(nextA : (n : โ) โ Learning.Hist ๐ ๐ ๐จ n ร ๐ โ ๐) โ
(โ (n : โ), Measurable (nextA n)) โ Learning.Algorithm ๐ ๐ ๐จA deterministic algorithm, which chooses the action given by the function `nextA`. The initial action is `fun o โฆ nextA 0 (default, o)`.Go to its page
Learning.Algorithm.p0 : {๐ : Type u_1} โ
{๐ : Type u_2} โ
{๐จ : Type u_3} โ
{m๐ : MeasurableSpace ๐} โ
{m๐ : MeasurableSpace ๐} โ {m๐จ : MeasurableSpace ๐จ} โ Learning.Algorithm ๐ ๐ ๐จ โ ProbabilityTheory.Kernel ๐ ๐Distribution of the first action given the first observation: the policy at time `0` applied to the empty history.Go to its page
ProbabilityTheory.Kernel.deterministic : {ฮฑ : Type u_1} โ
{ฮฒ : Type u_2} โ
{mฮฑ : MeasurableSpace ฮฑ} โ {mฮฒ : MeasurableSpace ฮฒ} โ (f : ฮฑ โ ฮฒ) โ Measurable f โ ProbabilityTheory.Kernel ฮฑ ฮฒKernel which to `a` associates the dirac measure at `f a`. This is 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`.
Inhabited.default : {ฮฑ : Sort u} โ [self : Inhabited ฮฑ] โ ฮฑ`default` is a function that produces a "default" element of any `Inhabited` type. This element does not have any particular specified properties, but it is often an all-zeroes value.
Code
lemma p0_detAlgorithm :
(detAlgorithm nextA h_next).p0
= Kernel.deterministic (fun o โฆ nextA 0 (default, o))
((h_next 0).comp (measurable_const.prodMk measurable_id))Proof
by
ext o : 1
rw [Algorithm.p0_apply, detAlgorithm_policy, Kernel.deterministic_apply,
Kernel.deterministic_apply]Meaning last changed in v4.34.0-rc2-76-g565f652 (2026-09-10), the 2th recorded change.
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, 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.