Bandits.iIndepFun_rewardByCount_add_one_action
From the authors
For each action a, the rewards by count (rewardByCount A R a (m + 1))_m are independent
(and by hasLaw_rewardByCount_add_one identically distributed with law Ξ½ a).
-
π : Type u_1mπ : MeasurableSpace πA measurable space is a space equipped with a Ο-algebra.DecidableEq πMeasurableSingletonClass πA typeclass mixin forMeasurableSpaces such that each singleton is measurable.Countable πA typeΞ±is countable if there exists an injective mapΞ± β β. -
Ξ© : Type u_2mΞ© : MeasurableSpace Ξ©
-
O : β β Ξ© β Unit -
A : β β Ξ© β π -
R : β β Ξ© β β -
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.IsProbabilityMeasure PA measureΞΌis called a probability measure ifΞΌ univ = 1. -
alg : Learning.Algorithm Unit π βA stochastic, sequential algorithm. -
Ξ½ : ProbabilityTheory.Kernel π βA kernel from a measurable spaceΞ±to another measurable spaceΞ²is a measurable functionΞΊ : Ξ± β Measure Ξ².ProbabilityTheory.IsMarkovKernel Ξ½A kernel is a Markov kernel if every measure in its image is a probability measure. -
a : π
-
h : Learning.IsAlgEnvSeq O A R alg (Learning.stationaryEnv Ξ½) PAn algorithm-environment sequence: a sequence of observations, actions and feedbacks generated by an algorithm interacting with an environment.
ProbabilityTheory.iIndepFun (fun m Ο => Learning.rewardByCount A R a (m + 1) Ο) (P.prod (streamMeasure Ξ½))A family of functions defined on the same space Ξ© and taking values in possibly different spaces, each with a measurable space structure, is independent if the family of measurable space structuresβ¦MeasurableSpace : Type u_6 β Type u_6A measurable space is a space equipped with a Ο-algebra.
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 : Ξ±`.
MeasurableSingletonClass : (Ξ± : Type u_6) β [MeasurableSpace Ξ±] β PropA typeclass mixin for `MeasurableSpace`s such that each singleton is measurable.
Countable : Sort u β PropA type `Ξ±` is countable if there exists an injective map `Ξ± β β`.
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.
Real : TypeThe type `β` of real numbers constructed as equivalence classes of Cauchy sequences of rational numbers.
MeasureTheory.IsProbabilityMeasure : {Ξ± : Type u_1} β {m0 : MeasurableSpace Ξ±} β MeasureTheory.Measure Ξ± β PropA measure `ΞΌ` is called a probability measure if `ΞΌ univ = 1`.
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.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
ProbabilityTheory.IsMarkovKernel : {Ξ± : Type u_1} β
{Ξ² : Type u_2} β {mΞ± : MeasurableSpace Ξ±} β {mΞ² : MeasurableSpace Ξ²} β ProbabilityTheory.Kernel Ξ± Ξ² β PropA kernel is a Markov kernel if every measure in its image is a probability measure.
ProbabilityTheory.Kernel : (Ξ± : Type u_1) β (Ξ² : Type u_2) β [MeasurableSpace Ξ±] β [MeasurableSpace Ξ²] β Type (max u_1 u_2)A kernel from a measurable space `Ξ±` to another measurable space `Ξ²` is a measurable function `ΞΊ : Ξ± β Measure Ξ²`. The measurable space structure on `MeasureTheory.Measure Ξ²` is given by `MeasureTheory.Measure.instMeasurableSpace`. A map `ΞΊ : Ξ± β MeasureTheory.Measure Ξ²` is measurable iff `β s : Set Ξ², MeasurableSet s β Measurable (fun a β¦ ΞΊ a 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
Learning.stationaryEnv : {π : Type u_2} β
{π¨ : Type u_3} β
{mπ : MeasurableSpace π} β
{mπ¨ : MeasurableSpace π¨} β
(Ξ½ : ProbabilityTheory.Kernel π π¨) β [ProbabilityTheory.IsMarkovKernel Ξ½] β Learning.Environment Unit π π¨A stationary environment without observations, in which the distribution of the next feedback depends only on the last action.Go to its page
ProbabilityTheory.iIndepFun : {Ξ© : Type u_1} β
{ΞΉ : Type u_2} β
{_mΞ© : MeasurableSpace Ξ©} β
{Ξ² : ΞΉ β Type u_6} β
[m : (x : ΞΉ) β MeasurableSpace (Ξ² x)] β
((x : ΞΉ) β Ξ© β Ξ² x) β autoParam (MeasureTheory.Measure Ξ©) ProbabilityTheory.iIndepFun._auto_1 β PropA family of functions defined on the same space `Ξ©` and taking values in possibly different spaces, each with a measurable space structure, is independent if the family of measurable space structures they generate on `Ξ©` is independent. For a function `g` with codomain having measurable space structure `m`, the generated measurable space structure is `MeasurableSpace.comap g m`.
Learning.rewardByCount : {π : Type u_2} β
{R : Type u_3} β {Ξ© : Type u_4} β [DecidableEq π] β (β β Ξ© β π) β (β β Ξ© β R) β π β β β Ξ© Γ (β β π β R) β RReward obtained when pulling action `a` for the `m`-th time. If it is never pulled `m` times, the reward is given by the second component of `Ο`, which in applications will be indepedent with same law.Go to its page
HAdd.hAdd : {Ξ± : Type u} β {Ξ² : Type v} β {Ξ³ : outParam (Type w)} β [self : HAdd Ξ± Ξ² Ξ³] β Ξ± β Ξ² β Ξ³`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.
MeasureTheory.Measure.prod : {Ξ± : Type u_4} β
{Ξ² : Type u_5} β
[inst : MeasurableSpace Ξ±] β
[inst_1 : MeasurableSpace Ξ²] β MeasureTheory.Measure Ξ± β MeasureTheory.Measure Ξ² β MeasureTheory.Measure (Ξ± Γ Ξ²)The binary product of measures. They are defined for arbitrary measures, but we basically prove all properties under the assumption that at least one of them is s-finite.
Bandits.streamMeasure : {π : Type u_1} β
{π‘ : Type u_2} β
{mπ : MeasurableSpace π} β
{mπ‘ : MeasurableSpace π‘} β ProbabilityTheory.Kernel π π‘ β MeasureTheory.Measure (β β π β π‘)Measure of an infinite stream of rewards from each action.Go to its page
Code
lemma iIndepFun_rewardByCount_add_one_action (h : IsAlgEnvSeq O A R alg (stationaryEnv Ξ½) P)
(a : π) :
iIndepFun (fun m Ο β¦ rewardByCount A R a (m + 1) Ο) πProof
(iIndepFun_rewardByCount_add_one h).precomp (g := fun m β¦ (a, m))
fun _ _ hmn β¦ (Prod.mk.inj hmn).2Meaning last changed in v4.34.0-rc2-76-g565f652 (2026-09-10), the 3th 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: 12 project declarations, 69 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.