Bandits.ArrayModel.measurable_hist_truncRowPullCount
No docstring.
-
๐ : Type u_1m๐ : MeasurableSpace ๐A measurable space is a space equipped with a ฯ-algebra.Nonempty ๐StandardBorelSpace ๐A standard Borel space is a measurable space arising as the Borel sets of some Polish topology.DecidableEq ๐Countable ๐A typeฮฑis countable if there exists an injective mapฮฑ โ โ. -
๐ก : Type u_2m๐ก : MeasurableSpace ๐ก
-
alg : Learning.Algorithm Unit ๐ ๐กA stochastic, sequential algorithm. -
a : ๐ -
n : โ
Measurable fun x => hist alg x nA function f between measurable spaces is measurable if the preimage of every measurable set is measurable.MeasurableSpace : Type u_6 โ Type u_6A measurable space is a space equipped with a ฯ-algebra.
Nonempty : Sort u โ Prop`Nonempty ฮฑ` is a typeclass that says that `ฮฑ` is not an empty type, that is, there exists an element in the type. It differs from `Inhabited ฮฑ` in that `Nonempty ฮฑ` is a `Prop`, which means that it does not actually carry an element of `ฮฑ`, only a proof that *there exists* such an element. Given `Nonempty ฮฑ`, you can construct an element of `ฮฑ` *nonconstructively* using `Classical.choice`.
StandardBorelSpace : (ฮฑ : Type u_1) โ [MeasurableSpace ฮฑ] โ PropA standard Borel space is a measurable space arising as the Borel sets of some Polish topology. This is useful in situations where a space has no natural topology or the natural topology in a space is non-Polish. To endow a standard Borel space `ฮฑ` with a compatible Polish topology, use `letI := upgradeStandardBorel ฮฑ`. One can then use `eq_borel_upgradeStandardBorel ฮฑ` to rewrite the `MeasurableSpace ฮฑ` instance to `borel ฮฑ t`, where `t` is the new topology.
DecidableEq : Sort u โ Sort (max 1 u)Propositional equality is `Decidable` for all elements of a type. In other words, an instance of `DecidableEq ฮฑ` is a means of deciding the proposition `a = b` is for all `a b : ฮฑ`.
Countable : Sort u โ PropA type `ฮฑ` is countable if there exists an injective map `ฮฑ โ โ`.
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
Unit : TypeThe canonical type with one element. This element is written `()`. `Unit` has a number of uses: * It can be used to model control flow that returns from a function call without providing other information. * Monadic actions that return `Unit` have side effects without computing values. * In polymorphic types, it can be used to indicate that no data is to be stored in a particular field.
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.
Bandits.ArrayModel.hist : {๐ : Type u_1} โ
{๐ก : Type u_2} โ
{m๐ : MeasurableSpace ๐} โ
{m๐ก : MeasurableSpace ๐ก} โ
[Nonempty ๐] โ
[StandardBorelSpace ๐] โ
[DecidableEq ๐] โ
Learning.Algorithm Unit ๐ ๐ก โ Bandits.ArrayModel.probSpace ๐ ๐ก โ (n : โ) โ Learning.Hist Unit ๐ ๐ก nHistory of actions and rewards before time `n` in the array model.Go to its page
Code
lemma measurable_hist_truncRowPullCount [Countable ๐] (alg : Algorithm Unit ๐ ๐ก) (a : ๐)
(n : โ) :
Measurable[MeasurableSpace.comap (truncRowPullCount alg a n) inferInstance] (hist alg ยท n)Proof
by
have h_eq : (hist alg ยท n) = (hist alg ยท n) โ (truncRowPullCount alg a n) := by
ext ฯ : 1
refine hist_congr alg n (fun _ _ โฆ rfl) fun i b hi โฆ ?_
by_cases hb : b = a
ยท subst hb
simp [truncRowPullCount, truncRow, hi]
ยท simp [truncRowPullCount, truncRow, hb]
rw [h_eq]
exact (measurable_hist alg n).comp (Measurable.of_comap_le le_rfl)Meaning last changed in v4.35.0-rc2-1-g61e506b (2026-09-22), the 5th 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: 13 project declarations, 68 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.