LeanMachineLearning

Bandits.TS.integral_ucb_action_eq_integral_ucb_bestAction๐Ÿ”—

Lemma

No docstring.

๐Ÿ”—theorem
Bandits.TS.integral_ucb_action_eq_integral_ucb_bestAction.{u_1, u_2} {K : โ„•} [Nonempty (Fin K)] {l u ฯƒ2 ฮด : โ„} {ฮฉ : Type u_1} [MeasurableSpace ฮฉ] {๐“” : Type u_2} [MeasurableSpace ๐“”] [StandardBorelSpace ๐“”] [Nonempty ๐“”] {Q : MeasureTheory.Measure ๐“”} [MeasureTheory.IsProbabilityMeasure Q] {ฮบ : ProbabilityTheory.Kernel (๐“” ร— Fin K) โ„} [ProbabilityTheory.IsMarkovKernel ฮบ] {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ Fin K} {R : โ„• โ†’ ฮฉ โ†’ โ„} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] (hK : 0 < K) (h : Learning.IsBayesAlgEnvSeq Q ฮบ (tsAlgorithm hK Q ฮบ) E A R P) (n : โ„•) : โˆซ (x : ฮฉ), (fun ฯ‰ => ClippedUCB.ucb A R l u ฯƒ2 ฮด (A n ฯ‰) n ฯ‰) x โˆ‚P = โˆซ (x : ฮฉ), (fun ฯ‰ => ClippedUCB.ucb A R l u ฯƒ2 ฮด (Learning.IsBayesAlgEnvSeq.bestAction ฮบ E ฯ‰) n ฯ‰) x โˆ‚P
Bandits.TS.integral_ucb_action_eq_integral_ucb_bestAction.{u_1, u_2} {K : โ„•} [Nonempty (Fin K)] {l u ฯƒ2 ฮด : โ„} {ฮฉ : Type u_1} [MeasurableSpace ฮฉ] {๐“” : Type u_2} [MeasurableSpace ๐“”] [StandardBorelSpace ๐“”] [Nonempty ๐“”] {Q : MeasureTheory.Measure ๐“”} [MeasureTheory.IsProbabilityMeasure Q] {ฮบ : ProbabilityTheory.Kernel (๐“” ร— Fin K) โ„} [ProbabilityTheory.IsMarkovKernel ฮบ] {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ Fin K} {R : โ„• โ†’ ฮฉ โ†’ โ„} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] (hK : 0 < K) (h : Learning.IsBayesAlgEnvSeq Q ฮบ (tsAlgorithm hK Q ฮบ) E A R P) (n : โ„•) : โˆซ (x : ฮฉ), (fun ฯ‰ => ClippedUCB.ucb A R l u ฯƒ2 ฮด (A n ฯ‰) n ฯ‰) x โˆ‚P = โˆซ (x : ฮฉ), (fun ฯ‰ => ClippedUCB.ucb A R l u ฯƒ2 ฮด (Learning.IsBayesAlgEnvSeq.bestAction ฮบ E ฯ‰) n ฯ‰) x โˆ‚P

Code

lemma integral_ucb_action_eq_integral_ucb_bestAction (hK : 0 < K)
    (h : IsBayesAlgEnvSeq Q ฮบ (tsAlgorithm hK Q ฮบ) E A R P) (n : โ„•) :
    P[fun ฯ‰ โ†ฆ ucb A R l u ฯƒ2 ฮด (A n ฯ‰) n ฯ‰] =
      P[fun ฯ‰ โ†ฆ ucb A R l u ฯƒ2 ฮด (bestAction ฮบ E ฯ‰) n ฯ‰]
Proof
by
  have := h.measurable_action
  have := h.measurable_param
  have := h.measurable_feedback
  by_cases hn : n = 0
  ยท simp [hn]
  obtain โŸจn, rflโŸฉ := Nat.exists_eq_succ_of_ne_zero hn
  let uc (ha : (Iic n โ†’ Fin K ร— โ„) ร— Fin K) := ucb' n ha.1 l u ฯƒ2 ฮด ha.2
  calc
    _  = P[fun ฯ‰ โ†ฆ uc (history A R n ฯ‰, A (n + 1) ฯ‰)] := by
        simp_rw [uc, ucb_succ_eq_ucb']
    _ = โˆซ ha, uc ha โˆ‚P.map (fun ฯ‰ โ†ฆ (history A R n ฯ‰, A (n + 1) ฯ‰)) := by
        rw [โ† integral_map (by fun_prop) (by fun_prop)]
    _ = โˆซ ha, uc ha โˆ‚P.map (fun ฯ‰ โ†ฆ (history A R n ฯ‰, bestAction ฮบ E ฯ‰)) := by
        rw [โ† compProd_map_condDistrib (by fun_prop), โ† compProd_map_condDistrib (by fun_prop),
            Measure.compProd_congr (hasCondDistrib_action hK h n).condDistrib_eq]
    _ = P[fun ฯ‰ โ†ฆ ucb A R l u ฯƒ2 ฮด (bestAction ฮบ E ฯ‰) (n + 1) ฯ‰] := by
        rw [integral_map (by fun_prop) (by fun_prop)]
        simp_rw [uc, ucb_succ_eq_ucb']

Actions: Source ยท Open Issue

Meaning last changed in v4.34.0-rc2-14-gf86702d (2026-08-25), the 5th recorded change.

Self-contained, with its dependencies inlined and proofs replaced by sorry: download the raw file ยท open it in the Lean web editor.

Dependency graph

Audit surface: 25 project declarations, 129 external constants

โœ“ Proved: no sorry anywhere in its closure

This is the tool's own reading of one build's recorded axioms, and it is not robust against an author who wants it to pass. Checking meant to be relied on should go through Comparator, which replays the proof through the kernel from an export against an explicit list of permitted axioms.