Skip to content

Commit e367d34

Browse files
committed
two lemmas with sorry proofs
1 parent 985f3aa commit e367d34

3 files changed

Lines changed: 19 additions & 7 deletions

File tree

‎LeanBandits/ETC.lean‎

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ lemma measurable_empMeanETC (m n : ℕ) (a : Fin K) :
110110
exact (measurableSet_singleton _).preimage (by fun_prop)
111111
fun_prop
112112

113-
/-- Arm pulled by the ETC algorithm. -/
113+
/-- Arm pulled by the ETC algorithm at time `n + 1`. -/
114114
noncomputable
115-
def etcArm (hK : 0 < K) (m n : ℕ) (h : Iic n → Fin K × ℝ) : Fin K :=
115+
def etcNextArm (hK : 0 < K) (m n : ℕ) (h : Iic n → Fin K × ℝ) : Fin K :=
116116
have : Nonempty (Fin K) := Fin.pos_iff_nonempty.mp hK
117117
if hn : n < K * m - 1 then
118118
⟨(n + 1) % K, Nat.mod_lt _ hK⟩ -- for `n = 0` we have pulled arm 0 already, and we pull arm 1
@@ -121,9 +121,9 @@ def etcArm (hK : 0 < K) (m n : ℕ) (h : Iic n → Fin K × ℝ) : Fin K :=
121121
else (h ⟨n - 1, by simp⟩).1
122122

123123
@[fun_prop]
124-
lemma measurable_etcArm (hK : 0 < K) (m n : ℕ) : Measurable (etcArm hK m n) := by
124+
lemma measurable_etcNextArm (hK : 0 < K) (m n : ℕ) : Measurable (etcNextArm hK m n) := by
125125
have : Nonempty (Fin K) := Fin.pos_iff_nonempty.mp hK
126-
unfold etcArm
126+
unfold etcNextArm
127127
simp only [dite_eq_ite]
128128
refine Measurable.ite (by simp) (by fun_prop) ?_
129129
refine Measurable.ite (by simp) ?_ (by fun_prop)
@@ -132,7 +132,7 @@ lemma measurable_etcArm (hK : 0 < K) (m n : ℕ) : Measurable (etcArm hK m n) :=
132132
/-- The Explore-Then-Commit Kernel, which describes the arm pulled by the ETC algorithm. -/
133133
noncomputable
134134
def etcKernel (hK : 0 < K) (m n : ℕ) : Kernel (Iic n → Fin K × ℝ) (Fin K) :=
135-
Kernel.deterministic (etcArm hK m n) (by fun_prop)
135+
Kernel.deterministic (etcNextArm hK m n) (by fun_prop)
136136

137137
instance (hK : 0 < K) (m n : ℕ) : IsMarkovKernel (etcKernel hK m n) := by
138138
unfold etcKernel
@@ -154,4 +154,13 @@ def ETCBandit (hK : 0 < K) (m : ℕ) (ν : Kernel (Fin K) ℝ) [IsMarkovKernel
154154
policy := etcKernel hK m
155155
p0 := etcP0 hK
156156

157+
lemma ETC.arm_zero (hK : 0 < K) (m : ℕ) (ν : Kernel (Fin K) ℝ) [IsMarkovKernel ν] :
158+
arm 0 =ᵐ[(ETCBandit hK m ν).trajMeasure] fun h ↦ ⟨0, hK⟩ := by
159+
sorry
160+
161+
lemma ETC.arm_ae_eq_etcNextArm (hK : 0 < K) (m : ℕ) (ν : Kernel (Fin K) ℝ) [IsMarkovKernel ν]
162+
(n : ℕ) :
163+
arm (n + 1) =ᵐ[(ETCBandit hK m ν).trajMeasure] fun h ↦ etcNextArm hK m n (fun i ↦ h i) := by
164+
sorry
165+
157166
end Bandits

‎blueprint/lean_decls‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ Bandits.stepsUntil_pullCount_eq
1616
Bandits.rewardByCount_pullCount_add_one_eq_reward
1717
Bandits.sum_rewardByCount_eq_sum_reward
1818
ProbabilityTheory.HasSubgaussianMGF
19-
ProbabilityTheory.HasSubgaussianMGF.measure_sum_range_ge_le_of_iIndepFun
19+
ProbabilityTheory.HasSubgaussianMGF.measure_sum_range_ge_le_of_iIndepFun
20+
Bandits.etcNextArm
21+
Bandits.etcKernel
22+
Bandits.etcP0

‎blueprint/src/chapters/etc.tex‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ \section{Explore-Then-Commit}
88

99
\begin{definition}[Explore-Then-Commit algorithm]\label{def:etcAlgorithm}
1010
\leanok
11-
\lean{Bandits.etcKernel, Bandits.etcP0}
11+
\lean{Bandits.etcNextArm, Bandits.etcKernel, Bandits.etcP0}
1212
The Explore-Then-Commit (ETC) algorithm with parameter $m \in \mathbb{N}$ is defined as follows:
1313
\begin{enumerate}
1414
\item for $t < Km$, $A_t = t \mod K$ (pull each arm $m$ times),

0 commit comments

Comments
 (0)