Learning.measurableSet_snd_eq_and_pullCount'_eq
No docstring.
-
๐ : Type u_1m๐ : MeasurableSpace ๐A measurable space is a space equipped with a ฯ-algebra. -
๐ : Type u_2m๐ : MeasurableSpace ๐DecidableEq ๐MeasurableSingletonClass ๐A typeclass mixin forMeasurableSpaces such that each singleton is measurable. -
R : Type u_3mR : MeasurableSpace R
-
n : โ -
b : ๐ -
k : โ
MeasurableSet {u | u.2 = b โง pullCount' n u.1.1 b = k}MeasurableSet s means that s is measurable (in the ambient measure space on ฮฑ)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.
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.
MeasurableSet : {ฮฑ : Type u_1} โ [MeasurableSpace ฮฑ] โ Set ฮฑ โ Prop`MeasurableSet s` means that `s` is measurable (in the ambient measure space on `ฮฑ`)
Set.ofPred : {ฮฑ : Type u} โ (ฮฑ โ Prop) โ Set ฮฑTurn a predicate `p : ฮฑ โ Prop` into a set, also written as `{x | p x}`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`.And : Prop โ Prop โ Prop`And a b`, or `a โง b`, is the conjunction of propositions. It can be constructed and destructed like a pair: if `ha : a` and `hb : b` then `โจha, hbโฉ : a โง b`, and if `h : a โง b` then `h.left : a` and `h.right : b`. Conventions for notations in identifiers: * The recommended spelling of `โง` in identifiers is `and`.
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 measurableSet_snd_eq_and_pullCount'_eq [MeasurableSingletonClass ๐]
(n : โ) (b : ๐) (k : โ) :
MeasurableSet {u : (Hist ๐ ๐ R n ร ๐) ร ๐ | u.2 = b โง pullCount' n u.1.1 b = k}Proof
((measurableSet_singleton _).preimage measurable_snd).inter
((measurableSet_singleton _).preimage
((measurable_pullCount' n b).comp (measurable_fst.comp measurable_fst)))Meaning last changed in v4.35.0-rc2-1-g61e506b (2026-09-22), 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: 4 project declarations, 18 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.