Bandit Algorithms
Tor Lattimore and Csaba Szepesvári
- Location
- Ch. 1 and Ch. 4, especially §4.5
- Pages
- online pp. 8–16 and 56–69; regret decomposition pp. 62–63
Teaching chapter 01 of 10 · Canonical route compiled
The deterministic language shared by the entire project: finite models, action and reward traces, pull counts, gaps, reward sums, pseudo-regret, and count-to-regret decompositions.
How to read the status. It describes this page's canonical local Lean route, not completion of the cited textbook chapter or every extension listed below.
Who should read this. Start here if you know basic probability or machine learning but are new to this Lean library.
Textbook crosswalk
The Book Map is a curated formalization curriculum anchored in Bandit Algorithms, not a chapter-for-chapter reproduction of one book. Visible page labels use the numbered pages of its free online edition; source buttons use the PDF viewer's physical page index, which includes front matter and can therefore be larger. Companion papers cover algorithm-specific results.
Tor Lattimore and Csaba Szepesvári
Open this crosswalk after the finite-bandit bookkeeping route. It preserves the Chapter 14–17 page map without interrupting the beginner sequence.
Tor Lattimore and Csaba Szepesvári
Read top to bottom: each step supplies the state or proof fact used by the next one.
Write the selected arm A_t at every round t.
N_a(T) counts how often arm a appears before horizon T.
Every occurrence of arm a contributes the same model gap Δ_a.
Replace the sum over time by one gap-times-count term per arm.
The standard stochastic-bandit decomposition converts control of suboptimal pull counts into expected regret.
BanditRLlib relationship. BanditRLlib first proves the pathwise finite-trace identity. Algorithm chapters then integrate that bookkeeping identity under their own generated trajectory laws.
The mathematical content is restated in this site's notation; wording is ours. See online pp. 62–63 in the linked source for the original statement and full assumptions.
The mathematical readings are explanatory summaries. The exact generated Lean statement and its source link remain authoritative for hypotheses, types, constants, and indexing.
A curated route through definitions, key bridges, and canonical terminals stays visible. 32 additional dependency, extension, or research-frontier notes are grouped below.
Lean declarationBandit
Plain-English statement. A finite bandit model packages a rational mean for every arm together with a distinguished best arm and a proof that this arm really has maximal mean.
structure FiniteBanditModel (K : Nat) where
Lean declarationBandit
Plain-English statement. The pull count of arm a before time n is the number of indices t<n at which the action trace selected a.
def pullCount [DecidableEq Action] (action : ActionTrace Action) (a : Action) : Nat → Nat | 0 => 0 | t + 1 => pullCount action a t + if action t = a then 1 else 0 @[simp] theorem pullCount_zero [DecidableEq Action] (action : ActionTrace Action) (a : Action) : pullCount action a 0 = 0
Lean declarationBandit
Plain-English statement. Cumulative pseudo-regret can be regrouped by arm: every pull of arm a contributes exactly its fixed gap.
BanditRLProof.pullCount, BanditRLProof.pseudoRegret, BanditRLProof.FiniteBanditModeltheorem pseudoRegret_eq_finset_sum_gap_mul_pullCount : pseudoRegret model action t = (Finset.univ : Finset (Fin K)).sum (fun a : Fin K => model.gap a * (pullCount action a t : Rat))
Lean declarationBandit
Plain-English statement. Minimax expected regret is the infimum, over an explicit policy class, of each policy's supremum expected regret over an explicit environment class.
BanditRLProof.LowerBounds.worstCaseExpectedRegretnoncomputable def minimaxExpectedRegret {Policy : Type u} {Environment : Type v} (regret : Policy -> Environment -> ENNReal) (policyClass : Set Policy) (environmentClass : Set Environment) : ENNReal
Lean declarationBandit
Plain-English statement. A policy is minimax optimal only if it belongs to the chosen policy class and its worst-case regret over the chosen environment class attains that class's minimax value.
BanditRLProof.LowerBounds.minimaxExpectedRegretdef IsMinimaxOptimal {Policy : Type u} {Environment : Type v} (regret : Policy -> Environment -> ENNReal) (policyClass : Set Policy) (environmentClass : Set Environment) (policy : Policy) : Prop
Lean declarationBandit
Plain-English statement. For the two Gaussian observation laws with means zero and Delta and variance one over n, the midpoint decision's worst-case error probability is at most exp(-n Delta squared over eight).
BanditRLProof.LowerBounds.gaussianIIDSampleMeanLaw, BanditRLProof.LowerBounds.twoPointGaussianThresholdDecision_zero_error_event, BanditRLProof.LowerBounds.twoPointGaussianThresholdDecision_gap_error_event, BanditRLProof.LowerBounds.hasSubgaussianMGF_id_gaussianReal_zero, BanditRLProof.LowerBounds.hasSubgaussianMGF_gap_sub_id_gaussianReal, BanditRLProof.LowerBounds.gaussianSampleMeanZeroErrorProbability_le_exp, BanditRLProof.LowerBounds.gaussianSampleMeanGapErrorProbability_le_exptheorem gaussianSampleMeanThresholdRisk_le_exp (sampleSize : Nat) (gap : Real) (hgap : 0 < gap) : gaussianSampleMeanThresholdRisk sampleSize gap ≤ Real.exp (-(sampleSize : Real) * gap ^ 2 / 8)
Lean declarationBandit
Plain-English statement. In an m-plus-one-arm problem with arm zero distinguished, nonnegative expected pulls summing exactly to the horizon imply that some alternative arm is pulled no more than the alternative average n divided by m.
BanditRLProof.LowerBounds.exists_alternative_le_average, BanditRLProof.LowerBounds.alternativeExpectedPullBudget_letheorem exists_leastExploredAlternative {m : Nat} (hm : 0 < m) (expectedPulls : Fin (m + 1) -> Real) (horizon : Nat) (hnonneg : ∀ arm, 0 ≤ expectedPulls arm) (htotal : ∑ arm : Fin (m + 1), expectedPulls arm = (horizon : Real)) : ∃ i : Fin m, expectedPulls i.succ ≤ (horizon : Real) / (m : Real)
Lean declarationBandit
Plain-English statement. If the base-environment expected base-arm pulls exceed the changed-environment expectation by at most an explicit error, then one of the two Chapter 13 regret expressions is at least Delta times n minus that error, divided by two.
BanditRLProof.LowerBounds.baseEnvironmentRegret, BanditRLProof.LowerBounds.changedEnvironmentRegretLowerBoundtheorem max_base_changed_regretLowerBound_ge_half_sub_error (horizon : Nat) (gap baseFirstExpectedPulls changedFirstExpectedPulls error : Real) (hgap : 0 ≤ gap) (hpullDifference : baseFirstExpectedPulls - changedFirstExpectedPulls ≤ error) : gap * ((horizon : Real) - error) / 2 ≤ max (baseEnvironmentRegret horizon gap baseFirstExpectedPulls) (changedEnvironmentRegretLowerBound gap changedFirstExpectedPulls)
Lean declarationBandit
Plain-English statement. If the changed-environment expected base-arm pulls are at least the base-environment expectation, then one Chapter 13 regret expression is at least Delta times n over two.
BanditRLProof.LowerBounds.max_base_changed_regretLowerBound_ge_half_sub_errortheorem max_base_changed_regretLowerBound_ge_half (horizon : Nat) (gap baseFirstExpectedPulls changedFirstExpectedPulls : Real) (hgap : 0 ≤ gap) (htransport : baseFirstExpectedPulls ≤ changedFirstExpectedPulls) : gap * (horizon : Real) / 2 ≤ max (baseEnvironmentRegret horizon gap baseFirstExpectedPulls) (changedEnvironmentRegretLowerBound gap changedFirstExpectedPulls)
Lean declarationBandit
Plain-English statement. Every finite binary prefix code with nonempty codewords satisfies the Kraft inequality.
BanditRLProof.LowerBounds.BinaryPrefixCode.uniquelyDecodable_rangetheorem kraft_inequality [Fintype Symbol] [DecidableEq Symbol] (code : BinaryPrefixCode Symbol) : ∑ word ∈ code.codebook, (1 / 2 : Real) ^ word.length ≤ 1
Lean declarationBandit
Plain-English statement. Finite base-two entropy equals natural entropy divided by the natural logarithm of two.
BanditRLProof.LowerBounds.discreteEntropy, BanditRLProof.LowerBounds.discreteEntropyBaseTwotheorem discreteEntropyBaseTwo_eq_div_log_two (support : Finset Symbol) (probability : Symbol → Real) : discreteEntropyBaseTwo support probability = discreteEntropy support probability / Real.log 2
Lean declarationBandit
Plain-English statement. Restricting two finite measures to any smaller sigma-algebra cannot increase their relative entropy.
BanditRLProof.LowerBounds.relativeEntropy_ne_top_ifftheorem relativeEntropy_trim_le {α : Type*} {m m₀ : MeasurableSpace α} {P Q : @Measure α m₀} [IsFiniteMeasure P] [IsFiniteMeasure Q] (hm : m ≤ m₀) : @relativeEntropy α m (P.trim hm) (Q.trim hm) ≤ @relativeEntropy α m₀ P Q
Lean declarationBandit
Plain-English statement. Measure relative entropy is finite exactly when P is absolutely continuous with respect to Q and the P-log-likelihood ratio is integrable.
BanditRLProof.LowerBounds.relativeEntropytheorem relativeEntropy_ne_top_iff {α : Type*} [MeasurableSpace α] {P Q : Measure α} : relativeEntropy P Q ≠ ∞ ↔ P ≪ Q ∧ Integrable (llr P Q) P
Lean declarationBandit
Plain-English statement. Replacing a full observation by the one-bit answer to whether it lies in a measurable event cannot increase relative entropy.
BanditRLProof.LowerBounds.relativeEntropy_ne_top_iff, BanditRLProof.LowerBounds.relativeEntropy_restrict_add_compl, BanditRLProof.LowerBounds.bernoulliKLCore_event_letheorem bernoulliRelativeEntropy_event_le {α : Type*} [MeasurableSpace α] {P Q : Measure α} [IsProbabilityMeasure P] [IsProbabilityMeasure Q] {A : Set α} (hA : MeasurableSet A) : bernoulliRelativeEntropy (P.real A) (Q.real A) ≤ relativeEntropy P Q
Lean declarationBandit
Plain-English statement. For Bernoulli probabilities p and q, the sum p plus one minus q dominates the extended-real Bretagnolle–Huber testing scale.
BanditRLProof.LowerBounds.binaryBretagnolleHuberCore, BanditRLProof.LowerBounds.bretagnolleHuberScaletheorem binaryBretagnolleHuber {p q : Real} (hp : KLUCB.IsBernoulliParameter p) (hq : KLUCB.IsBernoulliParameter q) : bretagnolleHuberScale (bernoulliRelativeEntropy p q) ≤ p + (1 - q)
Lean declarationBandit
Plain-English statement. The real testing scale one-half exponential negative KL decreases as its extended-real information argument increases.
BanditRLProof.LowerBounds.bretagnolleHuberScale, BanditRLProof.LowerBounds.bretagnolleHuberScale_nonnegtheorem bretagnolleHuberScale_antitone {d D : ENNReal} (h : d ≤ D) : bretagnolleHuberScale D ≤ bretagnolleHuberScale d
Lean declarationBandit
Plain-English statement. For probability measures P and Q and a measurable event A, the P probability of A plus the Q probability of its complement is bounded below by one half exponential negative D(P,Q), with zero on the infinite-KL branch.
BanditRLProof.LowerBounds.bernoulliRelativeEntropy_event_le, BanditRLProof.LowerBounds.bretagnolleHuberScale_antitone, BanditRLProof.LowerBounds.binaryBretagnolleHubertheorem bretagnolleHuber {α : Type*} [MeasurableSpace α] {P Q : Measure α} [IsProbabilityMeasure P] [IsProbabilityMeasure Q] {A : Set α} (hA : MeasurableSet A) : bretagnolleHuberScale (relativeEntropy P Q) ≤ P.real A + Q.real Aᶜ
Lean declarationBandit
Plain-English statement. When two one-step joint laws share the same first marginal, their relative entropy is the first-law integral of the pointwise relative entropy between their conditional kernels.
theorem klDiv_compProd_same_left_eq_lintegral_klDiv_of_measurable {Base Target : Type*} [MeasurableSpace Base] [MeasurableSpace Target] [MeasurableSpace.CountablyGenerated Target] (mu : Measure Base) [IsFiniteMeasure mu] (kappa eta : Kernel Base Target) [IsMarkovKernel kappa] [IsMarkovKernel eta] (hmeasurable : Measurable (fun base => InformationTheory.klDiv (kappa base) (eta base))) : InformationTheory.klDiv (mu ⊗ₘ kappa) (mu ⊗ₘ eta) = ∫⁻ base, InformationTheory.klDiv (kappa base) (eta base) ∂mu
Lean declarationBandit
Plain-English statement. For one common randomized policy in two finite-arm environments, the directed KL between their canonical finite history laws equals the sum of first-environment expected pull counts times the directed KL of each arm law.
BanditRLProof.LowerBounds.klDiv_compProd_same_left_eq_lintegral_klDiv_of_measurable, BanditRLProof.LowerBounds.klDiv_historyStep_samePolicy_eq_iterated_lintegral_armKL_general, BanditRLProof.LowerBounds.canonicalRealizedExpectedPullCountThrough_eq_expectedPullCountThroughtheorem banditHistoryRelativeEntropy_eq_expectedPulls_sum {K : Nat} {Reward : Type v} [MeasurableSpace Reward] [MeasurableSpace.CountablyGenerated Reward] (algorithm : Thompson.HistoryAlgorithm (Fin K) Reward) (armLaw referenceArmLaw : Kernel (Fin K) Reward) [IsMarkovKernel armLaw] [IsMarkovKernel referenceArmLaw] (lastRound : Nat) : InformationTheory.klDiv (canonicalBanditHistoryMeasure algorithm armLaw lastRound) (canonicalBanditHistoryMeasure algorithm referenceArmLaw lastRound) = ∑ arm : Fin K, canonicalRealizedExpectedPullCountThrough algorithm armLaw lastRound arm * InformationTheory.klDiv (armLaw arm) (referenceArmLaw arm)
Lean declarationBandit
Plain-English statement. A measurable observation of two finite measures cannot have more relative entropy than the original laws.
theorem klDiv_map_le {Source Target : Type*} [MeasurableSpace Source] [MeasurableSpace Target] (mu nu : Measure Source) [IsFiniteMeasure mu] [IsFiniteMeasure nu] (observe : Source -> Target) (hobserve : Measurable observe) : InformationTheory.klDiv (mu.map observe) (nu.map observe) <= InformationTheory.klDiv mu nu
Lean declarationBandit
Plain-English statement. Under the first unit-variance Gaussian law, the log Radon–Nikodym derivative toward a second unit-variance Gaussian is an affine function of the observation.
BanditRLProof.LowerBounds.log_gaussianPDFReal_div_gaussianPDFReal_onetheorem llr_gaussianReal_one_ae (mu nu : Real) : llr (unitGaussianArm mu) (unitGaussianArm nu) =ᵐ[unitGaussianArm mu] fun x => (mu - nu) * x + (nu ^ 2 - mu ^ 2) / 2
Lean declarationBandit
Plain-English statement. The relative entropy from a unit-variance Gaussian with mean mu to one with mean nu is one half the squared mean difference.
BanditRLProof.LowerBounds.llr_gaussianReal_one_ae, BanditRLProof.LowerBounds.integrable_llr_gaussianReal_onetheorem klDiv_gaussianReal_one (mu nu : Real) : InformationTheory.klDiv (unitGaussianArm mu) (unitGaussianArm nu) = ENNReal.ofReal ((mu - nu) ^ 2 / 2)
Lean declarationBandit
Plain-English statement. The Chapter 15 gap choice makes the Gaussian information exponent exactly one half.
BanditRLProof.LowerBounds.gaussianMinimaxGap_sqtheorem gaussianMinimaxGap_informationExponent_eq_half {alternativeCount horizon : Real} (halternatives : 0 < alternativeCount) (hhorizon : 0 < horizon) : 2 * horizon * gaussianMinimaxGap alternativeCount horizon ^ 2 / alternativeCount = 1 / 2
Lean declarationBandit
Plain-English statement. For every randomized finite-history policy, k greater than one, and n at least k minus one, some k-armed unit-variance Gaussian bandit with means in the unit cube has expected pseudo-regret at least one twenty-seventh times the square root of (k minus one) times n.
BanditRLProof.LowerBounds.banditHistoryRelativeEntropy_eq_expectedPulls_sum, BanditRLProof.LowerBounds.exists_gaussianMinimax_historyKL_le_half, BanditRLProof.LowerBounds.bretagnolleHuber, BanditRLProof.LowerBounds.klDiv_unitGaussianArm_zero_two_mul, BanditRLProof.LowerBounds.gaussianMinimaxGap_informationExponent_eq_half, BanditRLProof.LowerBounds.sixteen_div_twentySeven_le_exp_neg_halftheorem finiteArmedGaussianMinimaxLowerBound {k horizon : Nat} (hk : 1 < k) (hkhorizon : k - 1 ≤ horizon) (algorithm : Thompson.HistoryAlgorithm (Fin k) Real) : ∃ environment : UnitGaussianBanditEnvironment k, ENNReal.ofReal ((1 / 27 : Real) * Real.sqrt (((k - 1 : Nat) : Real) * (horizon : Real))) ≤ gaussianExpectedPseudoRegret algorithm environment (horizon - 1)
Lean declarationBandit
Plain-English statement. A regret sequence is consistent when its ratio to n to the power p converges to zero for every positive real exponent p.
def IsConsistentRegret (regret : Nat -> Real) : Prop
Lean declarationBandit
Plain-English statement. The logarithmic growth ratio of a positive sum of two consistent regret sequences is eventually at most every positive exponent.
BanditRLProof.LowerBounds.IsConsistentRegret.add, BanditRLProof.LowerBounds.IsConsistentRegret.eventually_add_le_rpowtheorem IsConsistentRegret.eventually_log_add_div_log_le {first second : Nat -> Real} (hfirst : IsConsistentRegret first) (hsecond : IsConsistentRegret second) (hpositive : ∀ᶠ n : Nat in atTop, 0 < first n + second n) {p : Real} (hp : 0 < p) : ∀ᶠ n : Nat in atTop, Real.log (first n + second n) / Real.log n <= p
Lean declarationBandit
Plain-English statement. The Chapter 16 information cost is the extended-real infimum of original-to-alternative KL over laws in the class whose mean is strictly above the target mean.
BanditRLProof.LowerBounds.relativeEntropydef divergenceInfimum {Reward : Type*} [MeasurableSpace Reward] (P : Measure Reward) (muStar : Real) (distributionClass : Set (Measure Reward)) (mean : Measure Reward -> Real) : ENNReal
Lean declarationBandit
Plain-English statement. For a suboptimal unit-variance Gaussian arm, the Chapter 16 information infimum is exactly one half of the squared gap to the optimal mean.
BanditRLProof.LowerBounds.unitGaussianDivergenceInfimum_ge, BanditRLProof.LowerBounds.unitGaussianDivergenceInfimum_le_perturbed, BanditRLProof.LowerBounds.klDiv_gaussianReal_onetheorem unitGaussianDivergenceInfimum_eq (mu muStar : Real) (hmu : mu < muStar) : unitGaussianDivergenceInfimum mu muStar = ENNReal.ofReal ((muStar - mu) ^ 2 / 2)
Lean declarationBandit
Plain-English statement. When only one arm law changes, the original-law expected pulls times that arm's KL controls the sum of the two majority-event errors under one common randomized policy.
BanditRLProof.LowerBounds.banditHistoryRelativeEntropy_eq_expectedPulls_mul_of_only_arm_changed, BanditRLProof.LowerBounds.measurableSet_oneArmMajorityPullEvent, BanditRLProof.LowerBounds.bretagnolleHubertheorem bretagnolleHuberScale_expectedPulls_mul_armKL_le_majorityErrors {K : Nat} {Reward : Type*} [MeasurableSpace Reward] [MeasurableSpace.CountablyGenerated Reward] (algorithm : Thompson.HistoryAlgorithm (Fin K) Reward) (armLaw referenceArmLaw : Kernel (Fin K) Reward) [IsMarkovKernel armLaw] [IsMarkovKernel referenceArmLaw] (changedArm : Fin K) (lastRound : Nat) (hsame : forall arm, arm ≠ changedArm -> armLaw arm = referenceArmLaw arm) : bretagnolleHuberScale (canonicalRealizedExpectedPullCountThrough algorithm armLaw lastRound changedArm * InformationTheory.klDiv (armLaw changedArm) (referenceArmLaw changedArm)) <= (canonicalBanditHistoryMeasure algorithm armLaw lastRound).real (oneArmMajorityPullEvent (Reward := Reward) changedArm lastRound) + (canonicalBanditHistoryMeasure algorithm referenceArmLaw lastRound).real (oneArmMajorityPullEvent (Reward := Reward) changedArm lastRound)ᶜ
Lean declarationBandit
Plain-English statement. For two finite-arm history laws that differ only at one arm, the compiled majority-event charges turn the directed arm KL into the exact logarithmic lower bound on the original-law expected pull count for explicit nonnegative gap vectors.
BanditRLProof.LowerBounds.bretagnolleHuberScale_expectedPulls_mul_armKL_le_majorityErrors, BanditRLProof.LowerBounds.oneArmMajority_probability_charge_le_expectedPseudoRegret, BanditRLProof.LowerBounds.oneArmMajority_compl_probability_charge_le_expectedPseudoRegret, BanditRLProof.LowerBounds.expectedPullCount_ge_log_regret_of_exp_testing_boundtheorem expectedPullCount_ge_log_gapPseudoRegret_of_only_arm_changed {K : Nat} {Reward : Type*} [MeasurableSpace Reward] [MeasurableSpace.CountablyGenerated Reward] (algorithm : Thompson.HistoryAlgorithm (Fin K) Reward) (armLaw referenceArmLaw : Kernel (Fin K) Reward) [IsMarkovKernel armLaw] [IsMarkovKernel referenceArmLaw] (originalGap referenceGap : Fin K -> Real) (horiginalGap : forall arm, 0 <= originalGap arm) (hreferenceGap : forall arm, 0 <= referenceGap arm) (changedArm : Fin K) (changedMargin : Real) (hchangedGap : 0 < originalGap changedArm) (hmargin : 0 < changedMargin) (hother : forall arm, arm ≠ changedArm -> changedMargin <= referenceGap arm) (lastRound : Nat) (hsame : forall arm, arm ≠ changedArm -> armLaw arm = referenceArmLaw arm) (hinformation_ne_top : InformationTheory.klDiv (armLaw changedArm) (referenceArmLaw changedArm) ≠ ∞) (hinformation_pos : 0 < (InformationTheory.klDiv (armLaw changedArm) (referenceArmLaw changedArm)).toReal) : (Real.log (min (originalGap changedArm) changedMargin / 4) + Real.log ((lastRound + 1 : Nat) : Real) - Real.log (canonicalGapExpectedPseudoRegretReal algorithm armLaw originalGap lastRound + canonicalGapExpectedPseudoRegretReal algorithm referenceArmLaw referenceGap lastRound)) / (InformationTheory.klDiv (armLaw changedArm) (referenceArmLaw changedArm)).toReal <= (canonicalRealizedExpectedPullCountThrough algorithm armLaw lastRound changedArm).toReal
Lean declarationBandit
Plain-English statement. For finite-mean product bandits that differ at exactly one arm, the original-law expected pull count satisfies the exact Lemma 16.3 logarithmic lower bound.
BanditRLProof.LowerBounds.oneArmMeanChange_produces_gap_contract, BanditRLProof.LowerBounds.expectedPullCount_ge_log_gapPseudoRegret_of_only_arm_changedtheorem expectedPullCount_ge_log_regret_changeOfMeasure {K : Nat} (algorithm : Thompson.HistoryAlgorithm (Fin K) Real) (original reference : FiniteMeanBanditEnvironment K) (changedArm : Fin K) (hsuboptimal : original.mean changedArm < original.mean original.bestArm) (hunique : forall arm, arm ≠ changedArm -> reference.mean arm < reference.mean changedArm) (hsame : forall arm, arm ≠ changedArm -> original.armLaw arm = reference.armLaw arm) (lastRound : Nat) : (Real.log (min (oneArmMeanIncrease original reference changedArm - original.gap changedArm) (original.gap changedArm) / 4) + Real.log ((lastRound + 1 : Nat) : Real) - Real.log (canonicalGapExpectedPseudoRegretReal algorithm original.armLaw original.gap lastRound + canonicalGapExpectedPseudoRegretReal algorithm reference.armLaw reference.gap lastRound)) / (InformationTheory.klDiv (original.armLaw changedArm) (reference.armLaw changedArm)).toReal <= (canonicalRealizedExpectedPullCountThrough algorithm original.armLaw lastRound changedArm).toReal
Lean declarationBandit
Plain-English statement. Under the local C n^p envelope, every unit-variance Gaussian instance satisfies the exact finite-time positive-part lower bound of Theorem 16.4.
BanditRLProof.LowerBounds.expectedPullCount_ge_log_regret_changeOfMeasure, BanditRLProof.LowerBounds.chapter16GaussianChangedEnvironment_armKL, BanditRLProof.LowerBounds.canonicalGapExpectedPseudoRegretReal_eq_sum_expectedPullstheorem gaussianExpectedRegret_ge_finiteTimeInstanceDependent {K : Nat} (algorithm : Thompson.HistoryAlgorithm (Fin K) Real) (environment : UnitVarianceGaussianBanditEnvironment K) (horizons : Set Nat) (hhorizons : horizons.Nonempty) (C p : Real) (hC : 0 < C) (_hp : p ∈ Set.Ioo (0 : Real) 1) (hregret : forall (lastRound : Nat), lastRound + 1 ∈ horizons -> forall candidate : UnitVarianceGaussianBanditEnvironment K, InChapter16GaussianLocalClass environment candidate -> unitVarianceGaussianExpectedPseudoRegret algorithm candidate lastRound <= C * (((lastRound + 1 : Nat) : Real) ^ p)) (epsilon : Real) (hepsilon : epsilon ∈ Set.Ioc (0 : Real) 1) (lastRound : Nat) (hhorizon : lastRound + 1 ∈ horizons) : unitVarianceGaussianExpectedPseudoRegret algorithm environment lastRound >= 2 / (1 + epsilon) ^ 2 * ∑ arm ∈ Finset.univ.filter (fun arm : Fin K => 0 < environment.gap arm), max (((1 - p) * Real.log ((lastRound + 1 : Nat) : Real) + Real.log (epsilon * environment.gap arm / (8 * C))) / environment.gap arm) 0
Lean declarationBandit
Plain-English statement. If the average random-regret tail over a probability law on instances is at least delta, then one deterministic instance has tail probability at least delta.
theorem exists_cdfTail_ge_of_integral_ge {Instance : Type*} [MeasurableSpace Instance] (Q : Measure Instance) [IsProbabilityMeasure Q] (cdf : Instance -> Real -> Real) (threshold delta : Real) (hIntegrable : Integrable (fun x => 1 - cdf x threshold) Q) (hAverage : delta <= ∫ x, 1 - cdf x threshold ∂Q) : exists x, delta <= 1 - cdf x threshold
Lean declarationBandit
Plain-English statement. An event with probability at least twice delta still has probability at least delta after removing a bad event of probability at most delta.
theorem measureReal_diff_ge_delta {Omega : Type*} [MeasurableSpace Omega] (P : Measure Omega) [IsFiniteMeasure P] (pullSmall clippingBad : Set Omega) (delta : Real) (hPullSmall : 2 * delta <= P.real pullSmall) (hClippingBad : P.real clippingBad <= delta) : delta <= P.real (pullSmall \ clippingBad)
Lean declarationBandit
Plain-English statement. If Eq. (17.8) holds, pulling the hard arm at most half the time and clipping at most a quarter of rounds forces random regret at least gap times horizon over four.
BanditRLProof.LowerBounds.adversarialRegretLowerExpression_ge_quartertheorem randomRegret_ge_quarter_of_clippingDecomposition (horizon pullCount clippingCount : Nat) (gap randomRegret : Real) (hGap : 0 <= gap) (hPull : (pullCount : Real) <= (horizon : Real) / 2) (hClipping : (clippingCount : Real) <= (horizon : Real) / 4) (hSource : adversarialRegretLowerExpression horizon pullCount clippingCount gap <= randomRegret) : gap * ((horizon : Real) / 4) <= randomRegret
Complete when the deterministic finite-bandit vocabulary, traces, counts, reward sums, gap facts, and regret decompositions compile through the public root and external tests. Probabilistic algorithm laws belong to downstream chapters.
The compact summary keeps the reading route visible. Open it for source-linked declarations and exact remaining gaps.