LeanMachineLearning exposition

3.6.Ā SequentialLearning.Algorithms.RoundRobinšŸ”—

Round-Robin algorithm

That algorithm chooses each of finitely many actions in a round-robin fashion. That is, if there are K actions numbered from 0 to K - 1, then at time n it chooses he action n % K.

Main definitions

  • roundRobinAlgorithm: the Round-Robin algorithm.

Module LeanMachineLearning.SequentialLearning.Algorithms.RoundRobin contains 12 exposed declarations.

sum_mod_rangešŸ”—

Lemmasum_mod_range

No docstring.

šŸ”—theorem
sum_mod_range {K : ā„•} (hK : 0 < K) (a : Fin K) : (āˆ‘ s ∈ Finset.range K, if ⟨s % K, ā‹ÆāŸ© = a then 1 else 0) = 1
sum_mod_range {K : ā„•} (hK : 0 < K) (a : Fin K) : (āˆ‘ s ∈ Finset.range K, if ⟨s % K, ā‹ÆāŸ© = a then 1 else 0) = 1

Code

lemma sum_mod_range {K : ā„•} (hK : 0 < K) (a : Fin K) :
    (āˆ‘ s ∈ range K, if ⟨s % K, Nat.mod_lt _ hK⟩ = a then 1 else 0) = 1
Used by (1)

Actions: Source Ā· Open Issue

Proof
by
  have h_iff (s : ā„•) (hs : s < K) : ⟨s % K, Nat.mod_lt _ hK⟩ = a ↔ s = a := by
    simp only [Nat.mod_eq_of_lt hs, Fin.ext_iff]
  calc (āˆ‘ s ∈ range K, if ⟨s % K, Nat.mod_lt _ hK⟩ = a then 1 else 0)
  _ = āˆ‘ s ∈ range K, if s = a then 1 else 0 := sum_congr rfl fun s hs ↦ by grind
  _ = _ := by
    rw [sum_ite_eq']
    simp

sum_mod_range_mulšŸ”—

Lemmasum_mod_range_mul

No docstring.

šŸ”—theorem
sum_mod_range_mul {K : ā„•} (hK : 0 < K) (m : ā„•) (a : Fin K) : (āˆ‘ s ∈ Finset.range (K * m), if ⟨s % K, ā‹ÆāŸ© = a then 1 else 0) = m
sum_mod_range_mul {K : ā„•} (hK : 0 < K) (m : ā„•) (a : Fin K) : (āˆ‘ s ∈ Finset.range (K * m), if ⟨s % K, ā‹ÆāŸ© = a then 1 else 0) = m

Code

lemma sum_mod_range_mul {K : ā„•} (hK : 0 < K) (m : ā„•) (a : Fin K) :
    (āˆ‘ s ∈ range (K * m), if ⟨s % K, Nat.mod_lt _ hK⟩ = a then 1 else 0) = m
Body uses (1)
Used by (1)

Actions: Source Ā· Open Issue

Proof
by
  induction m with
  | zero => simp
  | succ n hn =>
    calc (āˆ‘ s ∈ range (K * (n + 1)), if ⟨s % K, Nat.mod_lt _ hK⟩ = a then 1 else 0)
    _ = (āˆ‘ s ∈ range (K * n + K), if ⟨s % K, Nat.mod_lt _ hK⟩ = a then 1 else 0) := by ring_nf
    _ = (āˆ‘ s ∈ range (K * n), if ⟨s % K, Nat.mod_lt _ hK⟩ = a then 1 else 0)
        + (āˆ‘ s ∈ Ico (K * n) (K * n + K), if ⟨s % K, Nat.mod_lt _ hK⟩ = a then 1 else 0) := by
      rw [sum_range_add_sum_Ico]
      grind
    _ = n + (āˆ‘ s ∈ Ico (K * n) (K * n + K), if ⟨s % K, Nat.mod_lt _ hK⟩ = a then 1 else 0) := by
      rw [hn]
    _ = n + (āˆ‘ s ∈ range K, if ⟨(s + K * n) % K, Nat.mod_lt _ hK⟩ = a then 1 else 0) := by
      congr 1
      let e : ā„• ↪ ā„• := ⟨fun i : ā„• ↦ i + K * n, fun i j hij ↦ by grind⟩
      have : Finset.map e (range K) = Ico (K * n) (K * n + K) := by
        ext x
        simp only [mem_map, mem_range, Function.Embedding.coeFn_mk, mem_Ico, e]
        refine ⟨fun h ↦ by grind, fun h ↦ ?_⟩
        use x - K * n
        grind
      rw [← this, Finset.sum_map]
      congr
    _ = n + (āˆ‘ s ∈ range K, if ⟨s % K, Nat.mod_lt _ hK⟩ = a then 1 else 0) := by simp
    _ = n + 1 := by rw [sum_mod_range hK]

nextActionšŸ”—

DefinitionLearning.RoundRobin.nextAction

Action chosen by the Round-Robin algorithm at time n + 1. This is action (n + 1) % K.

šŸ”—def
Learning.RoundRobin.nextAction {K : ā„•} (hK : 0 < K) (n : ā„•) : Fin K
Learning.RoundRobin.nextAction {K : ā„•} (hK : 0 < K) (n : ā„•) : Fin K

Code

noncomputable
def RoundRobin.nextAction (hK : 0 < K) (n : ā„•) : Fin K := ⟨(n + 1) % K, Nat.mod_lt _ hK⟩
Used by (14)

Actions: Source Ā· Open Issue

roundRobinAlgorithmšŸ”—

DefinitionLearning.roundRobinAlgorithm

The Round-Robin algorithm: deterministic algorithm that chooses action n % K at time n.

šŸ”—def
Learning.roundRobinAlgorithm.{u_1} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} (hK : 0 < K) : Algorithm (Fin K) š“Ø
Learning.roundRobinAlgorithm.{u_1} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} (hK : 0 < K) : Algorithm (Fin K) š“Ø

Code

noncomputable
def roundRobinAlgorithm (hK : 0 < K) : Algorithm (Fin K) š“Ø :=
  detAlgorithm (fun n _ ↦ RoundRobin.nextAction hK n) (by fun_prop) ⟨0, hK⟩
Type uses (1)
Body uses (2)
Used by (13)

Actions: Source Ā· Open Issue

action_zerošŸ”—

LemmaLearning.RoundRobin.action_zero

No docstring.

šŸ”—theorem
Learning.RoundRobin.action_zero.{u_1, u_2} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} {hK : 0 < K} {ν : ProbabilityTheory.Kernel (Fin K) š“Ø} [ProbabilityTheory.IsMarkovKernel ν] {Ī© : Type u_2} {mĪ© : MeasurableSpace Ī©} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] {A : ā„• → Ī© → Fin K} {Y : ā„• → Ī© → š“Ø} (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P 0) : A 0 =ᵐ[P] fun x => ⟨0, hK⟩
Learning.RoundRobin.action_zero.{u_1, u_2} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} {hK : 0 < K} {ν : ProbabilityTheory.Kernel (Fin K) š“Ø} [ProbabilityTheory.IsMarkovKernel ν] {Ī© : Type u_2} {mĪ© : MeasurableSpace Ī©} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] {A : ā„• → Ī© → Fin K} {Y : ā„• → Ī© → š“Ø} (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P 0) : A 0 =ᵐ[P] fun x => ⟨0, hK⟩

Code

lemma action_zero
    (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P 0) :
    A 0 =ᵐ[P] fun _ ↦ ⟨0, hK⟩
Type uses (3)
Body uses (2)
Used by (3)

Actions: Source Ā· Open Issue

Proof
by
  have : Nonempty (Fin K) := Fin.pos_iff_nonempty.mp hK
  exact h.action_zero_detAlgorithm

action_ae_eq_roundRobinNextActionšŸ”—

LemmaLearning.RoundRobin.action_ae_eq_roundRobinNextAction

No docstring.

šŸ”—theorem
Learning.RoundRobin.action_ae_eq_roundRobinNextAction.{u_1, u_2} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} {hK : 0 < K} {ν : ProbabilityTheory.Kernel (Fin K) š“Ø} [ProbabilityTheory.IsMarkovKernel ν] {Ī© : Type u_2} {mĪ© : MeasurableSpace Ī©} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] {A : ā„• → Ī© → Fin K} {Y : ā„• → Ī© → š“Ø} (n : ā„•) (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (n + 1)) : A (n + 1) =ᵐ[P] fun x => nextAction hK n
Learning.RoundRobin.action_ae_eq_roundRobinNextAction.{u_1, u_2} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} {hK : 0 < K} {ν : ProbabilityTheory.Kernel (Fin K) š“Ø} [ProbabilityTheory.IsMarkovKernel ν] {Ī© : Type u_2} {mĪ© : MeasurableSpace Ī©} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] {A : ā„• → Ī© → Fin K} {Y : ā„• → Ī© → š“Ø} (n : ā„•) (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (n + 1)) : A (n + 1) =ᵐ[P] fun x => nextAction hK n

Code

lemma action_ae_eq_roundRobinNextAction (n : ā„•)
    (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (n + 1)) :
    A (n + 1) =ᵐ[P] fun _ ↦ nextAction hK n
Type uses (4)
Body uses (1)
Used by (1)

Actions: Source Ā· Open Issue

Proof
h.action_detAlgorithm_ae_eq (by grind)

action_ae_eqšŸ”—

LemmaLearning.RoundRobin.action_ae_eq

The action chosen at time n is the action n % K.

šŸ”—theorem
Learning.RoundRobin.action_ae_eq.{u_1, u_2} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} {hK : 0 < K} {ν : ProbabilityTheory.Kernel (Fin K) š“Ø} [ProbabilityTheory.IsMarkovKernel ν] {Ī© : Type u_2} {mĪ© : MeasurableSpace Ī©} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] {A : ā„• → Ī© → Fin K} {Y : ā„• → Ī© → š“Ø} (n : ā„•) (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P n) : A n =ᵐ[P] fun x => ⟨n % K, ā‹ÆāŸ©
Learning.RoundRobin.action_ae_eq.{u_1, u_2} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} {hK : 0 < K} {ν : ProbabilityTheory.Kernel (Fin K) š“Ø} [ProbabilityTheory.IsMarkovKernel ν] {Ī© : Type u_2} {mĪ© : MeasurableSpace Ī©} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] {A : ā„• → Ī© → Fin K} {Y : ā„• → Ī© → š“Ø} (n : ā„•) (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P n) : A n =ᵐ[P] fun x => ⟨n % K, ā‹ÆāŸ©

Code

lemma action_ae_eq (n : ā„•)
    (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P n) :
    A n =ᵐ[P] fun _ ↦ ⟨n % K, Nat.mod_lt _ hK⟩
Type uses (3)
Body uses (3)
Used by (2)

Actions: Source Ā· Open Issue

Proof
by
  cases n with
  | zero => exact action_zero h
  | succ n =>
    filter_upwards [action_ae_eq_roundRobinNextAction n h] with h hn_eq
    rw [hn_eq, nextAction]

pullCount_mulšŸ”—

LemmaLearning.RoundRobin.pullCount_mul

At time K * m, the number of times each action is chosen is equal to m.

šŸ”—theorem
Learning.RoundRobin.pullCount_mul.{u_1, u_2} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} {hK : 0 < K} {ν : ProbabilityTheory.Kernel (Fin K) š“Ø} [ProbabilityTheory.IsMarkovKernel ν] {Ī© : Type u_2} {mĪ© : MeasurableSpace Ī©} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] {A : ā„• → Ī© → Fin K} {Y : ā„• → Ī© → š“Ø} (m : ā„•) (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (K * m - 1)) (a : Fin K) : pullCount A a (K * m) =ᵐ[P] fun x => m
Learning.RoundRobin.pullCount_mul.{u_1, u_2} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} {hK : 0 < K} {ν : ProbabilityTheory.Kernel (Fin K) š“Ø} [ProbabilityTheory.IsMarkovKernel ν] {Ī© : Type u_2} {mĪ© : MeasurableSpace Ī©} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] {A : ā„• → Ī© → Fin K} {Y : ā„• → Ī© → š“Ø} (m : ā„•) (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (K * m - 1)) (a : Fin K) : pullCount A a (K * m) =ᵐ[P] fun x => m

Code

lemma pullCount_mul (m : ā„•)
    (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (K * m - 1))
    (a : Fin K) :
    pullCount A a (K * m) =ᵐ[P] fun _ ↦ m
Type uses (4)
Body uses (4)
Used by (2)

Actions: Source Ā· Open Issue

Proof
by
  rw [Filter.EventuallyEq]
  simp_rw [pullCount_eq_sum]
  have h_arm (n : range (K * m)) : A n =ᵐ[P] fun _ ↦ ⟨n % K, Nat.mod_lt _ hK⟩ :=
    action_ae_eq n (h.mono (by have := n.2; simp only [mem_range] at this; grind))
  simp_rw [Filter.EventuallyEq, ← ae_all_iff] at h_arm
  filter_upwards [h_arm] with ω h_arm
  have h_arm' {i : ā„•} (hi : i ∈ range (K * m)) : A i ω = ⟨i % K, Nat.mod_lt _ hK⟩ := h_arm ⟨i, hi⟩
  calc (āˆ‘ s ∈ range (K * m), if A s ω = a then 1 else 0)
  _ = (āˆ‘ s ∈ range (K * m), if ⟨s % K, Nat.mod_lt _ hK⟩ = a then 1 else 0) :=
    sum_congr rfl fun s hs ↦ by rw [h_arm' hs]
  _ = m := sum_mod_range_mul hK m a

pullCount_eq_onešŸ”—

LemmaLearning.RoundRobin.pullCount_eq_one

No docstring.

šŸ”—theorem
Learning.RoundRobin.pullCount_eq_one.{u_1, u_2} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} {hK : 0 < K} {ν : ProbabilityTheory.Kernel (Fin K) š“Ø} [ProbabilityTheory.IsMarkovKernel ν] {Ī© : Type u_2} {mĪ© : MeasurableSpace Ī©} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] {A : ā„• → Ī© → Fin K} {Y : ā„• → Ī© → š“Ø} (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (K - 1)) (a : Fin K) : pullCount A a K =ᵐ[P] fun x => 1
Learning.RoundRobin.pullCount_eq_one.{u_1, u_2} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} {hK : 0 < K} {ν : ProbabilityTheory.Kernel (Fin K) š“Ø} [ProbabilityTheory.IsMarkovKernel ν] {Ī© : Type u_2} {mĪ© : MeasurableSpace Ī©} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] {A : ā„• → Ī© → Fin K} {Y : ā„• → Ī© → š“Ø} (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (K - 1)) (a : Fin K) : pullCount A a K =ᵐ[P] fun x => 1

Code

lemma pullCount_eq_one
    (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (K - 1)) (a : Fin K) :
    pullCount A a K =ᵐ[P] fun _ ↦ 1
Type uses (4)
Body uses (3)
Used by (2)

Actions: Source Ā· Open Issue

Proof
by
  suffices pullCount A a (K * 1) =ᵐ[P] fun _ ↦ 1 by simpa using this
  refine pullCount_mul 1 (P := P) (ν := ν) (Y := Y) (hK := hK) ?_ a
  simpa

time_gt_of_pullCount_gt_onešŸ”—

LemmaLearning.RoundRobin.time_gt_of_pullCount_gt_one

No docstring.

šŸ”—theorem
Learning.RoundRobin.time_gt_of_pullCount_gt_one.{u_1, u_2} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} {hK : 0 < K} {ν : ProbabilityTheory.Kernel (Fin K) š“Ø} [ProbabilityTheory.IsMarkovKernel ν] {Ī© : Type u_2} {mĪ© : MeasurableSpace Ī©} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] {A : ā„• → Ī© → Fin K} {Y : ā„• → Ī© → š“Ø} (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (K - 1)) (a : Fin K) : āˆ€įµ (ω : Ī©) āˆ‚P, āˆ€ (n : ā„•), 1 < pullCount A a n ω → K < n
Learning.RoundRobin.time_gt_of_pullCount_gt_one.{u_1, u_2} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} {hK : 0 < K} {ν : ProbabilityTheory.Kernel (Fin K) š“Ø} [ProbabilityTheory.IsMarkovKernel ν] {Ī© : Type u_2} {mĪ© : MeasurableSpace Ī©} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] {A : ā„• → Ī© → Fin K} {Y : ā„• → Ī© → š“Ø} (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (K - 1)) (a : Fin K) : āˆ€įµ (ω : Ī©) āˆ‚P, āˆ€ (n : ā„•), 1 < pullCount A a n ω → K < n

Code

lemma time_gt_of_pullCount_gt_one
    (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (K - 1)) (a : Fin K) :
    āˆ€įµ ω āˆ‚P, āˆ€ n, 1 < pullCount A a n ω → K < n
Type uses (4)
Body uses (2)
Used by (2)

Actions: Source Ā· Open Issue

Proof
by
  filter_upwards [pullCount_eq_one h a] with h h_eq n hn
  rw [← h_eq] at hn
  by_contra! h_lt
  exact hn.not_ge (pullCount_mono _ h_lt _)

pullCount_pos_of_time_gešŸ”—

LemmaLearning.RoundRobin.pullCount_pos_of_time_ge

No docstring.

šŸ”—theorem
Learning.RoundRobin.pullCount_pos_of_time_ge.{u_1, u_2} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} {hK : 0 < K} {ν : ProbabilityTheory.Kernel (Fin K) š“Ø} [ProbabilityTheory.IsMarkovKernel ν] {Ī© : Type u_2} {mĪ© : MeasurableSpace Ī©} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] {A : ā„• → Ī© → Fin K} {Y : ā„• → Ī© → š“Ø} (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (K - 1)) : āˆ€įµ (ω : Ī©) āˆ‚P, āˆ€ (n : ā„•), K ≤ n → āˆ€ (b : Fin K), 0 < pullCount A b n ω
Learning.RoundRobin.pullCount_pos_of_time_ge.{u_1, u_2} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} {hK : 0 < K} {ν : ProbabilityTheory.Kernel (Fin K) š“Ø} [ProbabilityTheory.IsMarkovKernel ν] {Ī© : Type u_2} {mĪ© : MeasurableSpace Ī©} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] {A : ā„• → Ī© → Fin K} {Y : ā„• → Ī© → š“Ø} (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (K - 1)) : āˆ€įµ (ω : Ī©) āˆ‚P, āˆ€ (n : ā„•), K ≤ n → āˆ€ (b : Fin K), 0 < pullCount A b n ω

Code

lemma pullCount_pos_of_time_ge
    (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (K - 1)) :
    āˆ€įµ ω āˆ‚P, āˆ€ n, K ≤ n → āˆ€ b : Fin K, 0 < pullCount A b n ω
Type uses (4)
Body uses (2)
Used by (1)

Actions: Source Ā· Open Issue

Proof
by
  have h_ae a := pullCount_eq_one h a
  simp_rw [Filter.EventuallyEq, ← ae_all_iff] at h_ae
  filter_upwards [h_ae] with ω hω n hn a
  refine Nat.one_pos.trans_le ?_
  rw [← hω a]
  exact pullCount_mono _ hn _

pullCount_pos_of_pullCount_gt_onešŸ”—

LemmaLearning.RoundRobin.pullCount_pos_of_pullCount_gt_one

No docstring.

šŸ”—theorem
Learning.RoundRobin.pullCount_pos_of_pullCount_gt_one.{u_1, u_2} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} {hK : 0 < K} {ν : ProbabilityTheory.Kernel (Fin K) š“Ø} [ProbabilityTheory.IsMarkovKernel ν] {Ī© : Type u_2} {mĪ© : MeasurableSpace Ī©} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] {A : ā„• → Ī© → Fin K} {Y : ā„• → Ī© → š“Ø} (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (K - 1)) (a : Fin K) : āˆ€įµ (ω : Ī©) āˆ‚P, āˆ€ (n : ā„•), 1 < pullCount A a n ω → āˆ€ (b : Fin K), 0 < pullCount A b n ω
Learning.RoundRobin.pullCount_pos_of_pullCount_gt_one.{u_1, u_2} {š“Ø : Type u_1} {mš“Ø : MeasurableSpace š“Ø} {K : ā„•} {hK : 0 < K} {ν : ProbabilityTheory.Kernel (Fin K) š“Ø} [ProbabilityTheory.IsMarkovKernel ν] {Ī© : Type u_2} {mĪ© : MeasurableSpace Ī©} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] {A : ā„• → Ī© → Fin K} {Y : ā„• → Ī© → š“Ø} (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (K - 1)) (a : Fin K) : āˆ€įµ (ω : Ī©) āˆ‚P, āˆ€ (n : ā„•), 1 < pullCount A a n ω → āˆ€ (b : Fin K), 0 < pullCount A b n ω

Code

lemma pullCount_pos_of_pullCount_gt_one
    (h : IsAlgEnvSeqUntil A Y (roundRobinAlgorithm hK) (stationaryEnv ν) P (K - 1)) (a : Fin K) :
    āˆ€įµ ω āˆ‚P, āˆ€ n, 1 < pullCount A a n ω → āˆ€ b : Fin K, 0 < pullCount A b n ω
Type uses (4)
Body uses (2)
Used by (1)

Actions: Source Ā· Open Issue

Proof
by
  filter_upwards [time_gt_of_pullCount_gt_one h a, pullCount_pos_of_time_ge h] with ω h1 h2 n h_gt a
  exact h2 n (h1 n h_gt).le a
  1. sum_mod_range
  2. sum_mod_range_mul
  3. Learning.RoundRobin.nextAction
  4. Learning.roundRobinAlgorithm
  5. Learning.RoundRobin.action_zero
  6. Learning.RoundRobin.action_ae_eq_roundRobinNextAction
  7. Learning.RoundRobin.action_ae_eq
  8. Learning.RoundRobin.pullCount_mul
  9. Learning.RoundRobin.pullCount_eq_one
  10. Learning.RoundRobin.time_gt_of_pullCount_gt_one
  11. Learning.RoundRobin.pullCount_pos_of_time_ge
  12. Learning.RoundRobin.pullCount_pos_of_pullCount_gt_one