LeanMachineLearning exposition

Learning.exists_pullCount_eq_of_le🔗

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

exists_pullCount_eq_of_le🔗

LemmaLearning.exists_pullCount_eq_of_le

No docstring.

🔗theorem
Learning.exists_pullCount_eq_of_le.{u_1, u_3} {𝓐 : Type u_1} {Ω : Type u_3} [DecidableEq 𝓐] {A : Ω 𝓐} {a : 𝓐} {n t : } {ω : Ω} (hnm : t pullCount A a (n + 1) ω) (ht : t 0) : s, pullCount A a (s + 1) ω = t
Learning.exists_pullCount_eq_of_le.{u_1, u_3} {𝓐 : Type u_1} {Ω : Type u_3} [DecidableEq 𝓐] {A : Ω 𝓐} {a : 𝓐} {n t : } {ω : Ω} (hnm : t pullCount A a (n + 1) ω) (ht : t 0) : s, pullCount A a (s + 1) ω = t

Code

lemma exists_pullCount_eq_of_le (hnm : t ≤ pullCount A a (n + 1) ω) (ht : t ≠ 0) :
    ∃ s, pullCount A a (s + 1) ω = t
Type uses (1)
Body uses (1)
Used by (1)

Actions: Source · Open Issue

Proof
by
  by_contra! h_contra
  refine lt_irrefl (pullCount A a (n + 1) ω) ?_
  refine lt_of_lt_of_le ?_ hnm
  exact pullCount_lt_of_forall_ne h_contra ht

Dependency graph

Type dependencies (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