LeanMachineLearning exposition

Learning.measurable_sumRewards'🔗

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

measurable_sumRewards'🔗

LemmaLearning.measurable_sumRewards'

No docstring.

🔗theorem
Learning.measurable_sumRewards'.{u_1} {𝓐 : Type u_1} {m𝓐 : MeasurableSpace 𝓐} [DecidableEq 𝓐] [MeasurableSingletonClass 𝓐] (n : ) (a : 𝓐) : Measurable fun h => sumRewards' n h a
Learning.measurable_sumRewards'.{u_1} {𝓐 : Type u_1} {m𝓐 : MeasurableSpace 𝓐} [DecidableEq 𝓐] [MeasurableSingletonClass 𝓐] (n : ) (a : 𝓐) : Measurable fun h => sumRewards' n h a

Code

lemma measurable_sumRewards' [MeasurableSingletonClass 𝓐] (n : ℕ) (a : 𝓐) :
    Measurable (fun h ↦ sumRewards' n h a)
Type uses (1)
Used by (1)

Actions: Source · Open Issue

Proof
by
  simp_rw [sumRewards']
  have h_meas s : Measurable (fun (h : Iic n → 𝓐 × ℝ) ↦ if (h s).1 = a then (h s).2 else 0) := by
    refine Measurable.ite ?_ (by fun_prop) (by fun_prop)
    exact (measurableSet_singleton _).preimage (by fun_prop)
  fun_prop

Dependency graph

Type dependencies (1)

sumRewards'🔗

DefinitionLearning.sumRewards'

Sum of rewards of arm a up to (and including) time n.

🔗def
Learning.sumRewards'.{u_1} {𝓐 : Type u_1} [DecidableEq 𝓐] (n : ) (h : (Finset.Iic n) 𝓐 × ) (a : 𝓐) :
Learning.sumRewards'.{u_1} {𝓐 : Type u_1} [DecidableEq 𝓐] (n : ) (h : (Finset.Iic n) 𝓐 × ) (a : 𝓐) :

Code

noncomputable
def sumRewards' (n : ℕ) (h : Iic n → 𝓐 × ℝ) (a : 𝓐) :=
  ∑ s, if (h s).1 = a then (h s).2 else 0
Used by (9)

Actions: Source · Open Issue