Bandits.ArrayModel.hist_add_one_eq_finSuccProd'
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 π -
π‘ : Type u_2mπ‘ : MeasurableSpace π‘
-
alg : Learning.Algorithm Unit π π‘A stochastic, sequential algorithm. -
Ο : probSpace π π‘Probability space for the array model of stochastic bandits. -
n : β
hist alg Ο (n + 1) =
(MeasurableEquiv.finSuccProd (Learning.Round Unit π π‘) n).symm
(hist alg Ο n, (), algFunction alg n (hist alg Ο n) (Ο.1 n),
Ο.2 (Learning.pullCount' n (hist alg Ο n) (algFunction alg n (hist alg Ο n) (Ο.1 n)))
(algFunction alg n (hist alg Ο n) (Ο.1 n)))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 : Ξ±`.
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.
Bandits.ArrayModel.probSpace : Type u_1 β Type u_2 β Type (max u_1 u_2)Probability space for the array model of stochastic bandits.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.
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`.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
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`.
MeasurableEquiv.finSuccProd : (X : Type u_2) β [inst : MeasurableSpace X] β (n : β) β (Fin (n + 1) β X) βα΅ (Fin n β X) Γ XMeasurable equivalence between `Fin (n + 1) β X` and `(Fin n β X) Γ X`.Go to its page
Learning.Round : Type u_5 β Type u_6 β Type u_7 β Type (max u_5 u_7 u_6)One round of interaction: an observation, then an action, then a feedback.Go to its page
MeasurableEquiv.symm : {Ξ± : Type u_1} β {Ξ² : Type u_2} β [inst : MeasurableSpace Ξ±] β [inst_1 : MeasurableSpace Ξ²] β Ξ± βα΅ Ξ² β Ξ² βα΅ Ξ±The inverse of an equivalence between measurable spaces.
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`.
Unit.unit : UnitThe only element of the unit type. It can be written as an empty tuple: `()`.
Bandits.ArrayModel.algFunction : {π : Type u_1} β
{π‘ : Type u_2} β
{mπ : MeasurableSpace π} β
{mπ‘ : MeasurableSpace π‘} β
[Nonempty π] β
[StandardBorelSpace π] β Learning.Algorithm Unit π π‘ β (n : β) β Learning.Hist Unit π π‘ n β βunitInterval β πThe next action is the image of the history and a uniform random variable by this function.Go to its page
Learning.pullCount' : {π : Type u_1} β {π : Type u_2} β {R : Type u_3} β [DecidableEq π] β (n : β) β Learning.Hist π π R n β π β βNumber of pulls of arm `a` in the history before time `n`. This is the number of entries in `h` in which the arm is `a`.Go to its page
Code
lemma hist_add_one_eq_finSuccProd' [DecidableEq π] (alg : Algorithm Unit π π‘)
(Ο : probSpace π π‘) (n : β) :
hist alg Ο (n + 1) =
(MeasurableEquiv.finSuccProd (Round Unit π π‘) n).symm
(hist alg Ο n, ((), algFunction alg n (hist alg Ο n) (Ο.1 n),
Ο.2 (pullCount' n (hist alg Ο n) (algFunction alg n (hist alg Ο n) (Ο.1 n)))
(algFunction alg n (hist alg Ο n) (Ο.1 n))))Proof
by rw [MeasurableEquiv.finSuccProd_symm_apply] rfl
Meaning last changed in v4.35.0-rc2-1-g61e506b (2026-09-22), the 4th 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: 10 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.