LeanMachineLearning exposition

Learning.pullCount_lt_of_forall_ne🔗

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

pullCount_lt_of_forall_ne🔗

LemmaLearning.pullCount_lt_of_forall_ne

No docstring.

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

Code

lemma pullCount_lt_of_forall_ne (h_lt : ∀ s, pullCount A a (s + 1) ω ≠ t) (ht : t ≠ 0) :
    pullCount A a n ω < t
Type uses (1)
Body uses (2)
Used by (1)

Actions: Source · Open Issue

Proof
by
  induction n with
  | zero => simpa using ht.bot_lt
  | succ n hn =>
    specialize h_lt n
    rw [pullCount_add_one] at h_lt ⊢
    grind

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