Learning.IsAlgEnvSeq.filtrationObs
From the authors
Filtration generated by the history before time n together with the observation at
time n.
-
๐ : Type u_1m๐ : MeasurableSpace ๐A measurable space is a space equipped with a ฯ-algebra. -
๐ : Type u_2m๐ : MeasurableSpace ๐ -
๐จ : Type u_3m๐จ : MeasurableSpace ๐จ -
ฮฉ : Type u_4mฮฉ : MeasurableSpace ฮฉ
-
O : โ โ ฮฉ โ ๐ -
A : โ โ ฮฉ โ ๐ -
Y : โ โ ฮฉ โ ๐จ -
alg : Algorithm ๐ ๐ ๐จA stochastic, sequential algorithm. -
env : Environment ๐ ๐ ๐จA stochastic environment. -
P : MeasureTheory.Measure ฮฉA measure is defined to be an outer measure that is countably additive on measurable sets, with the additional assumption that the outer measure is the canonical extension of the restricted measure.MeasureTheory.IsFiniteMeasure PA measureฮผis called finite ifฮผ univ < โ.
MeasureTheory.Filtration โ mฮฉA Filtration on a measurable space ฮฉ with ฯ-algebra m is a monotone sequence of sub-ฯ-algebras of m.{ seq := fun n => MeasurableSpace.comap (fun ฯ => (history O A Y n ฯ, O n ฯ)) inferInstance, mono' := โฏ, le' := โฏ }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.Algorithm : (๐ : Type u_5) โ
(๐ : Type u_6) โ
(๐จ : Type u_7) โ [MeasurableSpace ๐] โ [MeasurableSpace ๐] โ [MeasurableSpace ๐จ] โ Type (max (max u_5 u_6) u_7)A stochastic, sequential algorithm. At each round, it sees an observation in `๐`, then takes an action in `๐`, and finally receives feedback in `๐จ`. The action is a random function of the past rounds and the current observation.Go to its page
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
MeasureTheory.IsFiniteMeasure : {ฮฑ : Type u_1} โ {m0 : MeasurableSpace ฮฑ} โ MeasureTheory.Measure ฮฑ โ PropA measure `ฮผ` is called finite if `ฮผ univ < โ`.
MeasureTheory.Measure : (ฮฑ : Type u_5) โ [MeasurableSpace ฮฑ] โ Type u_5A measure is defined to be an outer measure that is countably additive on measurable sets, with the additional assumption that the outer measure is the canonical extension of the restricted measure. The measure of a set `s`, denoted `ฮผ s`, is an extended nonnegative real. The real-valued version is written `ฮผ.real s`.
Learning.IsAlgEnvSeq : {๐ : Type u_1} โ
{๐ : Type u_2} โ
{๐จ : Type u_3} โ
{ฮฉ : Type u_4} โ
{m๐ : MeasurableSpace ๐} โ
{m๐ : MeasurableSpace ๐} โ
{m๐จ : MeasurableSpace ๐จ} โ
{mฮฉ : MeasurableSpace ฮฉ} โ
(โ โ ฮฉ โ ๐) โ
(โ โ ฮฉ โ ๐) โ
(โ โ ฮฉ โ ๐จ) โ
Learning.Algorithm ๐ ๐ ๐จ โโฆAn algorithm-environment sequence: a sequence of observations, actions and feedbacks generated by an algorithm interacting with an environment.Go to its page
MeasureTheory.Filtration : {ฮฉ : Type u_1} โ (ฮน : Type u_2) โ [Preorder ฮน] โ MeasurableSpace ฮฉ โ Type (max u_1 u_2)A `Filtration` on a measurable space `ฮฉ` with ฯ-algebra `m` is a monotone sequence of sub-ฯ-algebras of `m`.
MeasureTheory.Filtration.mk : {ฮฉ : Type u_1} โ
{ฮน : Type u_2} โ
[inst : Preorder ฮน] โ
{m : MeasurableSpace ฮฉ} โ
(seq : ฮน โ MeasurableSpace ฮฉ) โ Monotone seq โ (โ (i : ฮน), seq i โค m) โ MeasureTheory.Filtration ฮน mMeasurableSpace.comap : {ฮฑ : Type u_1} โ {ฮฒ : Type u_2} โ (ฮฑ โ ฮฒ) โ MeasurableSpace ฮฒ โ MeasurableSpace ฮฑThe reverse image of a measurable space under a function. `comap f m` contains the sets `s : Set ฮฑ` such that `s` is the `f`-preimage of a measurable set in `ฮฒ`.
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.history : {๐ : Type u_1} โ
{๐ : Type u_2} โ
{๐จ : Type u_3} โ {ฮฉ : Type u_4} โ (โ โ ฮฉ โ ๐) โ (โ โ ฮฉ โ ๐) โ (โ โ ฮฉ โ ๐จ) โ (n : โ) โ ฮฉ โ Learning.Hist ๐ ๐ ๐จ nHistory of the algorithm-environment sequence before time `n`: the rounds at times `0, ..., n - 1`.Go to its page
inferInstance : {ฮฑ : Sort u} โ [i : ฮฑ] โ ฮฑ`inferInstance` synthesizes a value of any target type by typeclass inference. This function has the same type signature as the identity function, but the square brackets on the `[i : ฮฑ]` argument means that it will attempt to construct this argument by typeclass inference. (This will fail if `ฮฑ` is not a `class`.) Example: ``` #check (inferInstance : Inhabited Nat) -- Inhabited Nat def foo : Inhabited (Nat ร Nat) := inferInstance example : foo.default = (default, default) := rfl ```
Code
def filtrationObs (h : IsAlgEnvSeq O A Y alg env P) :
Filtration โ mฮฉ where
seq n := MeasurableSpace.comap (fun ฯ โฆ (history O A Y n ฯ, O n ฯ)) inferInstance
mono' n m hnm := by
simp only
rw [โ measurable_iff_comap_le]
rcases eq_or_lt_of_le hnm with rfl | hlt
ยท exact measurable_iff_comap_le.mpr le_rfl
have : (fun ฯ โฆ (history O A Y n ฯ, O n ฯ)) =
(fun p : Hist ๐ ๐ ๐จ m ร ๐ โฆ
(fun i : Fin n โฆ p.1 (Fin.castLE hnm i), (p.1 โจn, hltโฉ).obs)) โ
(fun ฯ โฆ (history O A Y m ฯ, O m ฯ)) := rfl
rw [this]
exact measurable_comp_comap _ (by fun_prop)
le' n := by
rw [โ measurable_iff_comap_le]
exact (Learning.measurable_history h.measurable_obs h.measurable_action
h.measurable_feedback n).prodMk (h.measurable_obs n)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: 6 project declarations, 28 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.