Learning.pullCount_stepsUntil
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.
pullCount_stepsUntil๐
Learning.pullCount_stepsUntilNo docstring.
Learning.pullCount_stepsUntil.{u_1, u_3} {๐ : Type u_1} {ฮฉ : Type u_3} [DecidableEq ๐] {A : โ โ ฮฉ โ ๐} {a : ๐} {m : โ} {ฯ : ฮฉ} (hm : m โ 0) (h_exists : โ s, pullCount A a (s + 1) ฯ = m) : pullCount A a (ENat.toNat (stepsUntil A a m ฯ)) ฯ = m - 1Learning.pullCount_stepsUntil.{u_1, u_3} {๐ : Type u_1} {ฮฉ : Type u_3} [DecidableEq ๐] {A : โ โ ฮฉ โ ๐} {a : ๐} {m : โ} {ฯ : ฮฉ} (hm : m โ 0) (h_exists : โ s, pullCount A a (s + 1) ฯ = m) : pullCount A a (ENat.toNat (stepsUntil A a m ฯ)) ฯ = m - 1
Code
lemma pullCount_stepsUntil (hm : m โ 0) (h_exists : โ s, pullCount A a (s + 1) ฯ = m) :
pullCount A a (stepsUntil A a m ฯ).toNat ฯ = m - 1Type uses (2)
Body uses (4)
Used by (1)
Actions: Source ยท Open Issue
Proof
by
have h_action := action_eq_of_stepsUntil_eq_coe (A := A) (n := (stepsUntil A a m ฯ).toNat)
(a := a) (ฯ := ฯ) hm ?_
swap; ยท symm; simpa [stepsUntil_eq_top_iff]
have h_add_one := pullCount_stepsUntil_add_one h_exists
nth_rw 1 [โ h_action] at h_add_one
rw [ENat.toNat_add ?_ (by simp), ENat.toNat_one, pullCount_action_eq_pullCount_add_one]
at h_add_one
swap; ยท simpa [stepsUntil_eq_top_iff]
grindDependency graph
Type dependencies (2)
pullCount๐
Learning.pullCount
Number of times action a was chosen up to time t (excluding t).
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))
Actions: Source ยท Open Issue
stepsUntil๐
Learning.stepsUntil
Number of steps until action a was pulled exactly m times.
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