LeanMachineLearning exposition

Learning.measurableSet_stepsUntil_eq_zero🔗

This page has the declaration's own card below, then its dependency graph, then a card for each dependency (type dependencies first, then the rest of the transitive closure). For a theorem, the graph and the dependency cards only follow its statement's dependencies (its proof is replaced by sorry, so what it proves doesn't depend on how); for everything else, both the type and the body/value are followed, since their content is part of what later declarations build on.

Minimal Lean file

measurableSet_stepsUntil_eq_zero🔗

LemmaLearning.measurableSet_stepsUntil_eq_zero

No docstring.

🔗theorem
Learning.measurableSet_stepsUntil_eq_zero.{u_1, u_3} {𝓐 : Type u_1} {Ω : Type u_3} {m𝓐 : MeasurableSpace 𝓐} [DecidableEq 𝓐] {A : Ω 𝓐} [MeasurableSingletonClass 𝓐] (a : 𝓐) (m : ) : MeasurableSet {ω | stepsUntil A a m ω = 0}
Learning.measurableSet_stepsUntil_eq_zero.{u_1, u_3} {𝓐 : Type u_1} {Ω : Type u_3} {m𝓐 : MeasurableSpace 𝓐} [DecidableEq 𝓐] {A : Ω 𝓐} [MeasurableSingletonClass 𝓐] (a : 𝓐) (m : ) : MeasurableSet {ω | stepsUntil A a m ω = 0}

Code

lemma measurableSet_stepsUntil_eq_zero [MeasurableSingletonClass 𝓐] (a : 𝓐) (m : ℕ) :
    MeasurableSet[MeasurableSpace.comap (A 0) inferInstance]
      {ω : Ω | stepsUntil A a m ω = 0}
Type uses (1)
Body uses (1)
Used by (2)

Actions: Source · Open Issue

Proof
by
  simp only [stepsUntil_eq_zero_iff (a := a) (m := m), ne_eq]
  by_cases hm : m = 0
  · simp only [hm, true_and, zero_ne_one, false_and, or_false]
    refine (measurableSet_singleton _).compl.preimage ?_
    rw [measurable_iff_comap_le]
  by_cases hm1 : m = 1
  swap; · simp [hm, hm1]
  simp only [hm1, one_ne_zero, false_and, true_and, false_or]
  refine (measurableSet_singleton _).preimage ?_
  rw [measurable_iff_comap_le]

Dependency graph

Type dependencies (1)

stepsUntil🔗

DefinitionLearning.stepsUntil

Number of steps until action a was pulled exactly m times.

🔗def
Learning.stepsUntil.{u_1, u_3} {𝓐 : Type u_1} {Ω : Type u_3} [DecidableEq 𝓐] (A : Ω 𝓐) (a : 𝓐) (m : ) (ω : Ω) : ℕ∞
Learning.stepsUntil.{u_1, u_3} {𝓐 : Type u_1} {Ω : Type u_3} [DecidableEq 𝓐] (A : Ω 𝓐) (a : 𝓐) (m : ) (ω : Ω) : ℕ∞

Code

noncomputable
def stepsUntil (A : ℕ → Ω → 𝓐) (a : 𝓐) (m : ℕ) (ω : Ω) : ℕ∞ :=
  sInf ((↑) '' {s | pullCount A a (s + 1) ω = m})
Body uses (1)
Used by (46)

Actions: Source · Open Issue

All dependencies, transitively (1)

pullCount🔗

DefinitionLearning.pullCount

Number of times action a was chosen up to time t (excluding t).

🔗def
Learning.pullCount.{u_1, u_3} {𝓐 : Type u_1} {Ω : Type u_3} [DecidableEq 𝓐] (A : Ω 𝓐) (a : 𝓐) (t : ) (ω : Ω) :
Learning.pullCount.{u_1, u_3} {𝓐 : Type u_1} {Ω : Type u_3} [DecidableEq 𝓐] (A : Ω 𝓐) (a : 𝓐) (t : ) (ω : Ω) :

Code

noncomputable
def pullCount (A : ℕ → Ω → 𝓐) (a : 𝓐) (t : ℕ) (ω : Ω) : ℕ :=
  #(filter (fun s ↦ A s ω = a) (range t))
Used by (146)

Actions: Source · Open Issue