Bandit Algorithms
Tor Lattimore and Csaba Szepesvári
- Location
- Parts VII–VIII as a background index
- Pages
- online pp. 358–538
Teaching chapter 10 of 10 · Canonical route planned
The proof harness, task vocabulary, resource stopping leaves, literature registry, partial source-frozen delayed-feedback, succinct-lower-bound, and stochastic-gradient-bandit audits, and planned BwK, preference, robust, federated, neural-bandit, and sharp KL-asymptotic work.
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. Read this chapter to contribute a new route or understand what is deliberately not claimed.
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
Guo Zeng and Jean Honorio
Dorian Baudry, Emmeran Johnson, Simon Vary, Ciara Pike-Burke, and Patrick Rebeschini
Read top to bottom: each step supplies the state or proof fact used by the next one.
Set θₖ,₁ = 0; the initial action law is uniform.
Set pₖ,ₜ proportional to exp(θₖ,ₜ) over the finite arms.
Draw Aₜ from pₜ and observe the selected arm's reward rₜ.
Add η rₜ(1{Aₜ = k} − pₖ,ₜ) to every coordinate.
Expected gap increments plus failure mass yield the finite-horizon bound.
The source defines its atom set, succinct-support correlation contract, Q/R pair, and finite succinct representations. Its first four lemmas identify the coefficient norms and prove strict representation-size minimality and uniqueness for a fixed vector.
BanditRLlib relationship. BanditRLlib compiles 54 declarations for Definitions 3.1–3.3 and Lemmas 3.1–3.4, including a finite-Bessel proof of strict representation-size minimality for the same vector, and separately diagnoses a global R boundedness obligation. The global Lemmas 3.5–3.6, Assumption 3.7, Theorem 3.8, and every regret endpoint remain outside the compiled slice.
The mathematical content is restated in this site's notation; wording is ours. See physical PDF pp. 4–5 in the linked source for the original statement and full assumptions.
The source theorem combines a forward-potential logarithmic bound with a telescoping control of squared failure probability for the same fixed-IID two-arm SGB trajectory.
BanditRLlib relationship. BanditRLlib compiles this exact Theorem-1 endpoint for the actual sampled pseudo-regret of bounded two-arm fixed-IID laws, specialized through a Unit Dirac environment prior. A separate eight-declaration Appendix-E gate checks finite scalar contracts used in Theorem 4, but does not prove that theorem. The Theorem-1 contract keeps 0 < Delta < 1, eta > 0, eta C_eta < Delta, exact arm means, and T = tailHorizon + 1 explicit. A later 23-declaration Corollary-1 companion compiles as a direct consumer; it is not evidence for Theorem 2.
The mathematical content is restated in this site's notation; wording is ours. See physical PDF pp. 3–4 in the linked source for the original statement and full assumptions.
Corollary 1 balances the already proved small-learning-rate Theorem-1 branch against the pathwise Delta-times-T bound. It describes a horizon-indexed family of fixed-rate policies, not one policy whose rate changes during a run.
BanditRLlib relationship. Twenty-three new declarations compile an explicit finite companion on the generated zero-initialized two-arm fixed-IID trajectory with a Unit Dirac environment prior. For T >= 2 and 0 < Delta < 1, twoArmFixedIIDDirac_corollaryOne bounds expected sampled pseudo-regret by (2 + 1/log 2 + 2 exp 2) sqrt(T log T). The arm reward laws remain bounded fixed-IID laws; the Dirac measure is the prior on the singleton environment, not a claim that rewards are Dirac or Rademacher. This is a direct Theorem-1 consumer and is not independent Theorem-2 evidence.
The mathematical content is restated in this site's notation; wording is ours. See physical PDF p. 5 in the linked source for the original statement and full assumptions.
Appendix C reindexes the generated process by optimal-arm pull count, constructs a low-probability phase for that arm, and turns a no-return event into a long starvation interval and polynomial regret.
BanditRLlib relationship. The exact K = 2 target remains blocked. Twenty-five declarations compile deterministic source-shaped fixed-cutoff and terminal-count consumers, including a generic finite-horizon low-count regret charge; separate compiled layers provide chronological nth-pull semantics, latent fixed-arm products and readout, deferred-decisions prefix factorization, action/readout interfaces, count-capped branch locality, and exact deterministic-time next-reward freshness. A ten-declaration module identifies every inclusive finite prefix and proves equality of the complete visible/native trajectory measures. The selected-block module has eight declarations for missing-pull-aware block transport, fourteen for the exact finite Appendix-C `S0/S1` event, ten for an exact disjoint probability split between the generated all-present phase and an explicit missing-pull phase, and four that send the missing branch into a measurable terminal-count-below event, transport its mass to the generated trajectory, and charge that existing mass against finite-horizon expected sampled pseudo-regret. This is not a product or selected-IID theorem and supplies no positive missing-branch probability. Pull-ordered or stopped selected-reward IID remains uncompiled. The next unique leaf is the generated all-present Appendix-C phase trigger at a fixed chronological cutoff; the stopped-prefix future-cylinder law needed to prove conditional no-return probability at least one half, Rademacher/binomial ballot probability, asymptotic assembly, and the frozen Theorem-2 terminal remain uncompiled.
The mathematical content is restated in this site's notation; wording is ours. See physical PDF p. 6; Appendix C pp. 31–40 in the linked source for the original statement and full assumptions.
This is the finite contract consumed by the Appendix-E transient-phase argument, not the statement of Theorem 4 itself.
BanditRLlib relationship. Eight Lean declarations compile the positive margin, audited finite event composition, and finite geometric phase envelope. They expose an unresolved Step-4 conditioning/direction mismatch while leaving the general-K generated process, uniform buffer/survival producer, stopped supermartingale/Doob route, and Theorem 4 uncompiled.
The mathematical content is restated in this site's notation; wording is ours. See physical PDF pp. 47–49 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. 25 additional dependency, extension, or research-frontier notes are grouped below.
Lean declarationBandit
Plain-English statement. A harness task records the target, task kind, status, source and scenario cards, profile, required artifacts, and acceptance gates used by the automation system.
structure HarnessTask where
Lean declarationBandit
Plain-English statement. If one representation of X uses s succinct atoms and another is strictly z-succinct, then z is at most s.
BanditRLProof.LowerBounds.Succinct.SuccinctUnitSystem.SuccinctRepresentation.sumAbs_eq, BanditRLProof.LowerBounds.Succinct.SuccinctUnitSystem.SuccinctRepresentation.abs_inner_strictBasis_supportSignCombination_eq_one, BanditRLProof.LowerBounds.Succinct.SuccinctUnitSystem.IsSuccinctSupport.orthonormal, BanditRLProof.LowerBounds.Succinct.SuccinctUnitSystem.SuccinctRepresentation.norm_sq_supportSignCombination_eq_sizetheorem succinctSize_ge_strictSize {system : SuccinctUnitSystem V} {x : V} {s z : Nat} (hs : IsSuccinctAt system x s) (hz : IsStrictlySuccinctAt system x z) : z ≤ s
Lean declarationBandit
Plain-English statement. For the source's bounded two-arm fixed-IID SGB process, the expected pseudo-regret of the actual sampled actions satisfies the exact Theorem-1 logarithmic term plus its finite failure-regret term.
BanditRLProof.StochasticGradientBandit.integral_twoArmSampledPseudoRegret_le_sourceTheoremOne, BanditRLProof.StochasticGradientBandit.integral_twoArmSampledPseudoRegret_eq_generated, BanditRLProof.StochasticGradientBandit.twoArmFixedIIDEnvironment_contracttheorem twoArmFixedIIDDirac_theoremOne (armLaw : Fin 2 -> Measure Real) (hprob : forall arm, IsProbabilityMeasure (armLaw arm)) (mean : Fin 2 -> Real) (hbound : forall arm, ∀ᵐ reward ∂armLaw arm, |reward| <= 1) (hmean : forall arm, integral (armLaw arm) id = mean arm) (eta Delta : Real) (heta : 0 < eta) (hDelta : 0 < Delta) (_hDelta_lt_one : Delta < 1) (hgap : mean 0 - mean 1 = Delta) (hmargin : eta * sourceC eta < Delta) (tailHorizon : Nat) : integral (twoArmTrajectoryMeasure (Measure.dirac ()) eta (twoArmFixedIIDEnvironment armLaw hprob)) (twoArmSampledPseudoRegret (Env := Unit) Delta (tailHorizon + 1)) <= Real.log (1 + 4 * eta * Delta * ((tailHorizon + 1 : Nat) : Real)) / (2 * eta) + Delta / (2 * eta * (Delta - eta * sourceC eta))
Lean declarationBandit
Plain-English statement. For positive p-prime and c below one half, a buffered event with mass at least p-prime and conditional joint-survival mass at least one minus twice c yields strictly positive unconditional survival mass.
BanditRLProof.StochasticGradientBandit.theoremFourStepFourSurvivalLowerBound_pos, BanditRLProof.StochasticGradientBandit.theoremFourStepFour_survivalMass_getheorem theoremFourStepFour_survivalMass_pos (pPrime c bufferedMass jointSurvivalMass survivalMass : Real) (hpPrime : 0 < pPrime) (hc_half : c < 1 / 2) (hbuffer : pPrime <= bufferedMass) (hconditional : (1 - 2 * c) * bufferedMass <= jointSurvivalMass) (hsubset : jointSurvivalMass <= survivalMass) : 0 < survivalMass
Lean declarationBandit
Plain-English statement. The first time an adapted cumulative spending process reaches a fixed budget is a stopping time.
theorem isStoppingTime_budgetExhaustionTime_of_adapted {Omega : Type u} [mOmega : MeasurableSpace Omega] {F : Filtration Nat mOmega} {spent : Nat -> Omega -> Nat} (budget : Nat) (hspent : Adapted F spent) : IsStoppingTime F (budgetExhaustionTime spent budget)
Lean declarationBandit
Plain-English statement. On a succinct support, the paper's Q quantity of a finite support combination is exactly the largest absolute coefficient.
BanditRLProof.LowerBounds.Succinct.SuccinctUnitSystem.IsSuccinctSupport.correlationSum_le_one, BanditRLProof.LowerBounds.Succinct.SuccinctUnitSystem.IsSuccinctSupport.inner_basis_basis, BanditRLProof.LowerBounds.Succinct.SuccinctUnitSystem.IsSuccinctSupport.exists_abs_eq_maxAbsCoefficienttheorem sourceQ_supportCombination_eq [Nonempty (Fin s)] (support : IsSuccinctSupport system basis) (a : Fin s → ℝ) : system.sourceQ (supportCombination basis a) = maxAbsCoefficient a
Lean declarationBandit
Plain-English statement. After fixing the pre-action history, the expected SGB update of coordinate k is its sampling probability times instantaneous expected gap minus that arm's gap.
BanditRLProof.StochasticGradientBandit.expectedSourceIncrement_eq_gradientCoordinate, BanditRLProof.StochasticGradientBandit.instantaneousGap_eq_bestMean_sub_policyValuetheorem expectedSourceIncrement_eq_gapCoordinate (p mean gap : Action -> Real) (bestMean : Real) (k : Action) (hp : ∑ a, p a = 1) (hgap : ∀ a, gap a = bestMean - mean a) : expectedSourceIncrement p mean k = p k * (instantaneousGap p gap - gap k)
Lean declarationBandit
Plain-English statement. For the canonical generated SGB process, the conditional next-pair kernel integral of the coordinate update equals that coordinate's softmax probability times current expected gap minus the arm's own gap.
BanditRLProof.StochasticGradientBandit.measurable_historyParameter, BanditRLProof.StochasticGradientBandit.trajectoryMeasure_condDistrib_nextPair_given_environment_prefix, BanditRLProof.StochasticGradientBandit.expectedSourceIncrement_eq_gapCoordinatetheorem integral_measurableEnvironmentHistoryStepKernel_sourceIncrement_eq_gapCoordinate {Env : Type v} [MeasurableSpace Env] (initialTheta : Action -> Real) (eta : Real) (environment : Thompson.MeasurableHistoryEnvironment Env Action Real) (n : Nat) (env : Env) (history : History.FinitePairHistory Action Real n) (mean gap : Action -> Real) (bestMean : Real) (coordinate : Action) (hIntegrable : Integrable (fun pair : Action × Real => sourceIncrement (softmaxProbability (historyParameter initialTheta eta n history)) pair.2 pair.1 coordinate) (Thompson.measurableEnvironmentHistoryStepKernel (historyAlgorithm initialTheta eta) environment n (env, history))) (hmean : forall selected, integral (environment.feedback n (env, (history, selected))) id = mean selected) (hgap : forall action, gap action = bestMean - mean action) : integral (Thompson.measurableEnvironmentHistoryStepKernel (historyAlgorithm initialTheta eta) environment n (env, history)) (fun pair : Action × Real => sourceIncrement (softmaxProbability (historyParameter initialTheta eta n history)) pair.2 pair.1 coordinate) = softmaxProbability (historyParameter initialTheta eta n history) coordinate * (instantaneousGap (softmaxProbability (historyParameter initialTheta eta n history)) gap - gap coordinate)
Lean declarationBandit
Plain-English statement. For the fixed two-arm IID source model, bounded rewards automatically make the generated SGB coordinate update integrable, so the one-step conditional kernel integral equals the Equation-(5) gap coordinate.
BanditRLProof.StochasticGradientBandit.integrable_measurableTwoArmHistoryStepKernel_sourceIncrement_of_contract, BanditRLProof.StochasticGradientBandit.twoArmFixedIIDEnvironment_contract, BanditRLProof.StochasticGradientBandit.integral_measurableEnvironmentHistoryStepKernel_sourceIncrement_eq_gapCoordinatetheorem integral_twoArmFixedIIDHistoryStepKernel_sourceIncrement_eq_gapCoordinate (armLaw : Fin 2 -> Measure Real) (hprob : forall arm, IsProbabilityMeasure (armLaw arm)) (mean : Fin 2 -> Real) (hbound : forall arm, ∀ᵐ reward ∂armLaw arm, |reward| <= 1) (hmean : forall arm, integral (armLaw arm) id = mean arm) (initialTheta : Fin 2 -> Real) (eta : Real) (n : Nat) (history : History.FinitePairHistory (Fin 2) Real n) (gap : Fin 2 -> Real) (bestMean : Real) (coordinate : Fin 2) (hgap : forall action, gap action = bestMean - mean action) : integral (Thompson.measurableEnvironmentHistoryStepKernel (historyAlgorithm initialTheta eta) (twoArmFixedIIDEnvironment armLaw hprob) n ((), history)) (fun pair : Fin 2 × Real => sourceIncrement (softmaxProbability (historyParameter initialTheta eta n history)) pair.2 pair.1 coordinate) = softmaxProbability (historyParameter initialTheta eta n history) coordinate * (instantaneousGap (softmaxProbability (historyParameter initialTheta eta n history)) gap - gap coordinate)
Lean declarationBandit
Plain-English statement. At every finite source-time prefix of the zero-initialized two-arm SGB process, the best-arm softmax odds equal the exponential of twice its parameter.
BanditRLProof.StochasticGradientBandit.twoArmParameterAt_sum_eq_zero, BanditRLProof.StochasticGradientBandit.softmaxProbability_zero_div_one_sub_zero_eq_exp_two_multheorem twoArmProbabilityAt_zero_div_failure_eq_exp_two_mul (eta : Real) (trace : Nat -> Fin 2 × Real) (time : Nat) : twoArmProbabilityAt eta trace time 0 / (1 - twoArmProbabilityAt eta trace time 0) = Real.exp (2 * twoArmParameterAt eta trace time 0)
Lean declarationBandit
Plain-English statement. For any probability law and almost-everywhere measurable reward supported on [-1, 1], its exponential moment obeys the source's exact second-order C-eta bound.
BanditRLProof.StochasticGradientBandit.sourceC_terms_summable, BanditRLProof.StochasticGradientBandit.sq_div_two_mul_sourceC_abs_div_two, BanditRLProof.StochasticGradientBandit.exp_mul_le_sourceEqEighttheorem integral_exp_mul_le_sourceEqEight_of_ae_abs_le_one {Omega : Type*} [MeasurableSpace Omega] (mu : MeasureTheory.Measure Omega) [MeasureTheory.IsProbabilityMeasure mu] (q : Real) (reward : Omega -> Real) (hrewardMeasurable : MeasureTheory.AEStronglyMeasurable reward mu) (hreward : ∀ᵐ omega ∂mu, |reward omega| <= 1) : (∫ omega, Real.exp (q * reward omega) ∂mu) <= 1 + q * (∫ omega, reward omega ∂mu) + q ^ 2 / 2 * sourceC (|q| / 2)
Lean declarationBandit
Plain-English statement. Along the canonical two-arm SGB trajectory, the conditional-distribution integral of the next forward exponential potential obeys the source-shaped one-step recurrence at almost every observed prefix.
BanditRLProof.StochasticGradientBandit.TwoArmBoundedFixedMeanEnvironmentContract, BanditRLProof.StochasticGradientBandit.integral_measurableTwoArmHistoryStepKernel_forwardSuccessor_le_of_contract, BanditRLProof.StochasticGradientBandit.trajectoryMeasure_condDistrib_nextPair_given_environment_prefixtheorem trajectoryPrefix_condDistrib_integral_forwardSuccessor_le {Env : Type v} [MeasurableSpace Env] [StandardBorelSpace Env] (prior : Measure Env) [IsFiniteMeasure prior] (eta Delta : Real) (heta : 0 <= eta) (environment : Thompson.MeasurableHistoryEnvironment Env (Fin 2) Real) (mean : Fin 2 -> Real) (contract : TwoArmBoundedFixedMeanEnvironmentContract environment mean) (hgap : mean 0 - mean 1 = Delta) (n : Nat) : ∀ᵐ context ∂(twoArmTrajectoryMeasure prior eta environment).map (twoArmEnvironmentPrefix n), integral (condDistrib (twoArmNextPair n) (twoArmEnvironmentPrefix n) (twoArmTrajectoryMeasure prior eta environment) context) (twoArmForwardSuccessorPotential eta context.2) <= twoArmForwardRecurrenceBound eta Delta context.2
Lean declarationBandit
Plain-English statement. For each fixed finite time, the forward exponential potential is integrable and its conditional expectation is bounded by the measurable source recurrence bound.
BanditRLProof.StochasticGradientBandit.integrable_twoArmForwardTrajectorySuccessorPotential, BanditRLProof.StochasticGradientBandit.twoArmForwardTrajectorySuccessor_condExp_ae_eq_integral_condDistrib, BanditRLProof.StochasticGradientBandit.trajectoryPrefix_condDistrib_integral_forwardSuccessor_letheorem twoArmForwardTrajectorySuccessor_condExp_le_recurrenceBound {Env : Type v} [MeasurableSpace Env] [StandardBorelSpace Env] (prior : Measure Env) [IsFiniteMeasure prior] (eta Delta : Real) (heta : 0 <= eta) (environment : Thompson.MeasurableHistoryEnvironment Env (Fin 2) Real) (mean : Fin 2 -> Real) (contract : TwoArmBoundedFixedMeanEnvironmentContract environment mean) (hgap : mean 0 - mean 1 = Delta) (n : Nat) : (twoArmTrajectoryMeasure prior eta environment)[ fun sample : Env × ((k : Nat) -> Fin 2 × Real) => twoArmForwardSuccessorPotential eta (twoArmEnvironmentPrefix n sample).2 (twoArmNextPair n sample) | twoArmPrefixSigma (Env := Env) n] ≤ᵐ[ twoArmTrajectoryMeasure prior eta environment] fun sample : Env × ((k : Nat) -> Fin 2 × Real) => twoArmForwardRecurrenceBound eta Delta (twoArmEnvironmentPrefix n sample).2
Lean declarationBandit
Plain-English statement. For the source-initialized two-arm process, a positive learning rate and the strict margin eta C-eta < Delta bound the first-round failure square plus every expected squared later failure probability by one explicit reciprocal coefficient.
BanditRLProof.StochasticGradientBandit.twoArmInverseFailureMassSqTelescope, BanditRLProof.StochasticGradientBandit.twoArmInverseInitialUnconditionalRecurrence, BanditRLProof.StochasticGradientBandit.integrable_twoArmFailureMass_sqtheorem twoArmFullFailureMassSqSum_le {Env : Type v} [MeasurableSpace Env] [StandardBorelSpace Env] (prior : Measure Env) [IsProbabilityMeasure prior] (eta Delta : Real) (heta : 0 < eta) (environment : Thompson.MeasurableHistoryEnvironment Env (Fin 2) Real) (mean : Fin 2 -> Real) (contract : TwoArmBoundedFixedMeanEnvironmentContract environment mean) (hgap : mean 0 - mean 1 = Delta) (hmargin : eta * sourceC eta < Delta) (tailHorizon : Nat) : (1 : Real) / 4 + (Finset.range tailHorizon).sum (fun n => integral (twoArmTrajectoryMeasure prior eta environment) (fun sample => twoArmFailureMass (Env := Env) eta n sample ^ 2)) <= 1 / (2 * eta * (Delta - eta * sourceC eta))
Lean declarationBandit
Plain-English statement. Under explicit positive minimum-gap and maximum-gap envelopes, finite expected pseudo-regret is bounded by a best-parameter post-convergence term plus squared failure mass.
BanditRLProof.StochasticGradientBandit.bestParameterIncrementSum_ge, BanditRLProof.StochasticGradientBandit.instantaneousGap_le_maxGap_mul_failureMass, BanditRLProof.StochasticGradientBandit.failureMass_eq_successFailure_add_sqtheorem sourceRegretDecomposition_le (eta Delta DeltaMax : Real) (p : Nat -> Action -> Real) (gap : Action -> Real) (best : Action) (horizon : Nat) (heta : 0 < eta) (hDelta : 0 < Delta) (hDeltaMax : 0 <= DeltaMax) (hp : ∀ t, ∑ a, p t a = 1) (hp_nonneg : ∀ t a, 0 <= p t a) (hgap_best : gap best = 0) (hgap_min : ∀ a, a ≠ best -> Delta <= gap a) (hgap_max : ∀ a, a ≠ best -> gap a <= DeltaMax) : sourceExpectedPseudoRegret p gap horizon <= (DeltaMax / (eta * Delta)) * bestParameterIncrementSum eta p gap best horizon + DeltaMax * (∑ t ∈ Finset.range horizon, (1 - p t best) ^ 2)
Lean declarationBandit
Plain-English statement. For every horizon at least two, the generated zero-initialized two-arm fixed-IID SGB trajectory with learning rate sqrt(log T / T) has expected sampled pseudo-regret at most an explicit absolute constant times sqrt(T log T).
BanditRLProof.StochasticGradientBandit.twoArmFixedIIDDirac_corollaryOne_piecewise, BanditRLProof.StochasticGradientBandit.corollaryOne_piecewise_bound, BanditRLProof.StochasticGradientBandit.twoArmFixedIIDDirac_theoremOnetheorem twoArmFixedIIDDirac_corollaryOne (armLaw : Fin 2 -> Measure Real) (hprob : forall arm, IsProbabilityMeasure (armLaw arm)) (mean : Fin 2 -> Real) (hbound : forall arm, ∀ᵐ reward ∂armLaw arm, |reward| <= 1) (hmean : forall arm, integral (armLaw arm) id = mean arm) (Delta : Real) (hDelta : 0 < Delta) (hDelta_lt_one : Delta < 1) (hgap : mean 0 - mean 1 = Delta) (tailHorizon : Nat) (horizon_ge_two : 1 <= tailHorizon) : let eta := corollaryOneEta (tailHorizon + 1) integral (twoArmTrajectoryMeasure (Measure.dirac ()) eta (twoArmFixedIIDEnvironment armLaw hprob)) (twoArmSampledPseudoRegret (Env := Unit) Delta (tailHorizon + 1)) <= corollaryOneAbsoluteConstant * corollaryOneRate (tailHorizon + 1)
Lean declarationBandit
Plain-English statement. If the zero-based k-th optimal-arm pull occurs at chronological coordinate t, then exactly k optimal pulls occurred earlier, action t is arm 0, and the inclusive count through t is k plus one.
BanditRLProof.StochasticGradientBandit.isStoppingTime_twoArmNthOptimalPullTime, BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullTime_eq_top_iff, BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullReward_eq_of_time_eq, BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullSuccessProbability_eq_of_time_eqtheorem twoArmNthOptimalPullTime_spec {Env : Type v} [MeasurableSpace Env] (pullIndex t : Nat) (sample : Env × ((k : Nat) -> Fin 2 × Real)) (htime : twoArmNthOptimalPullTime pullIndex sample = (t : WithTop Nat)) : twoArmOptimalPullCount t sample = pullIndex /\ twoArmGeneratedAction sample t = 0 /\ twoArmOptimalPullCount (t + 1) sample = pullIndex + 1
Lean declarationBandit
Plain-English statement. For every finite length m, the first m latent rewards of the optimal arm in the coupled two-arm fixed-IID SGB construction have exactly the m-fold product of that arm's reward law.
BanditRLProof.UCB.armStreamMeasure_map_fixedArmFinitePrefix_eq_pi, BanditRLProof.Thompson.latentArmStreamTrajectoryMeasure_map_fixedArmFinitePrefix_eq_pi, BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullReward_eq_latentCoordinate_aetheorem twoArmFixedIIDLatentTrajectoryMeasure_map_optimalPrefix_eq_pi (armLaw : Fin 2 -> Measure Real) (hprob : forall arm, IsProbabilityMeasure (armLaw arm)) (eta : Real) (m : Nat) : Measure.map (fun sample : UCB.ArmRewardStream 2 × ((n : Nat) -> Fin 2 × Real) => fun i : Fin m => sample.1 (i : Nat) 0) (twoArmFixedIIDLatentTrajectoryMeasure armLaw hprob eta) = Measure.pi (fun _ : Fin m => armLaw 0)
Lean declarationBandit
Plain-English statement. At every finite cutoff, the joint law of the latent reward stream box and generated visible history prefix is exactly the product stream-box law followed by a Markov visible-prefix kernel.
BanditRLProof.UCB.armStreamMeasure_map_frestrictLe_eq_pi, BanditRLProof.Thompson.latentArmStreamTrajectoryKernel_map_frestrictLe_eq_of_streamPrefix_eq, BanditRLProof.Thompson.latentArmStreamTrajectoryKernel_map_frestrictLe_eq_prefixKernel_comaptheorem latentArmStreamTrajectoryMeasure_map_stream_visiblePrefix_eq {Env : Type u} {K : Nat} [MeasurableSpace Env] [StandardBorelSpace Env] [NeZero K] (algorithm : HistoryAlgorithm (Fin K) Real) (env : Env) (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] (n : Nat) : Measure.map (fun sample : UCB.ArmRewardStream K × ((t : Nat) -> Fin K × Real) => (Preorder.frestrictLe n sample.1, Preorder.frestrictLe n sample.2)) (latentArmStreamTrajectoryMeasure algorithm env nu) = Measure.pi (fun _ : Finset.Iic n => Measure.infinitePi fun arm : Fin K => nu arm) ⊗ₘ latentArmStreamVisiblePrefixKernel algorithm env n
Lean declarationBandit
Plain-English statement. After the latent reward stream is mixed out, the joint law of the visible prefix through n and the action selected at n plus one is the visible-prefix marginal followed by the algorithm's policy kernel at n.
BanditRLProof.Thompson.latentArmStreamTrajectoryMeasure, BanditRLProof.Thompson.latentArmStreamVisiblePrefixNextAction, BanditRLProof.Thompson.trajectoryMixture_map_history_action_eq_compProd, BanditRLProof.Thompson.canonicalMeasurableEnvironmentTrajectoryKernel_map_history_action_eq_compProdtheorem latentArmStreamTrajectoryMeasure_map_visiblePrefix_nextAction_eq_compProd {Env : Type u} {K : Nat} [MeasurableSpace Env] [StandardBorelSpace Env] [NeZero K] (algorithm : HistoryAlgorithm (Fin K) Real) (env : Env) (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] (n : Nat) : Measure.map (fun sample : UCB.ArmRewardStream K × ((t : Nat) -> Fin K × Real) => latentArmStreamVisiblePrefixNextAction n sample.2) (latentArmStreamTrajectoryMeasure algorithm env nu) = Measure.map (fun sample : UCB.ArmRewardStream K × ((t : Nat) -> Fin K × Real) => Preorder.frestrictLe n sample.2) (latentArmStreamTrajectoryMeasure algorithm env nu) ⊗ₘ algorithm.policy n
Lean declarationBandit
Plain-English statement. On the branch where the next selected reward coordinate is a fixed target, the visible prefix and next action factor from that target reward coordinate with exactly the selected arm's reward law.
BanditRLProof.Measure.map_compProd_restrict_eq_of_base_restrict_eq_of_fiber_restrict_eq, BanditRLProof.Thompson.latentArmStreamTrajectoryKernel_map_frestrictLe_restrict_countCap_eq_of_withoutCoordinate_eq, BanditRLProof.Thompson.latentArmStreamVisiblePrefixNextActionBranchLocality, BanditRLProof.UCB.armStreamMeasure_map_output_coordinate_compProd_comap_without_eq_prodtheorem latentArmStreamVisiblePrefixNextAction_coordinate_branch_eq_prod {Env : Type u} {K : Nat} [MeasurableSpace Env] [StandardBorelSpace Env] [NeZero K] (algorithm : HistoryAlgorithm (Fin K) Real) (env : Env) (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] (n : Nat) (target : Nat × Fin K) : let branchKernel := ((latentArmStreamTrajectoryKernel algorithm env).map (latentArmStreamVisiblePrefixNextAction n)).restrict (UCB.measurableSet_armStreamHistoryActionCoordinateBranch n target) Measure.map (fun sample : UCB.ArmRewardStream K × (History.FinitePairHistory (Fin K) Real n × Fin K) => (sample.2, UCB.armStreamCoordinate target sample.1)) (UCB.armStreamMeasure nu ⊗ₘ branchKernel) = (Measure.map Prod.snd (UCB.armStreamMeasure nu ⊗ₘ branchKernel)).prod (nu target.2)
Lean declarationBandit
Plain-English statement. Under the visible marginal of the latent SGB coupling, once the observed history through n and the action chosen for round n plus one are known, the next reward has exactly the stationary law of that chosen arm.
BanditRLProof.Thompson.latentArmStreamVisiblePrefixNextAction_selectedCoordinate_mixed_eq_compProd, BanditRLProof.Thompson.latentArmStreamVisibleNextReward_eq_selectedCoordinate_ae, BanditRLProof.Thompson.latentArmStreamVisibleNextReward_joint_eq_compProd, BanditRLProof.UCB.armStreamSelectedRewardKerneltheorem latentArmStreamVisibleTrajectoryMeasure_nextReward_condDistrib_ae_eq_nu {Env : Type u} {K : Nat} [MeasurableSpace Env] [StandardBorelSpace Env] [NeZero K] (algorithm : HistoryAlgorithm (Fin K) Real) (env : Env) (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] (n : Nat) : let visibleMeasure := (latentArmStreamTrajectoryMeasure algorithm env nu).map Prod.snd condDistrib (latentArmStreamVisibleNextReward n) (latentArmStreamVisiblePrefixNextAction n) visibleMeasure =ᵐ[ visibleMeasure.map (latentArmStreamVisiblePrefixNextAction n)] UCB.armStreamSelectedRewardKernel n nu
Lean declarationBandit
Plain-English statement. Forgetting the latent reward stream from the coupled SGB construction gives exactly the same complete visible trajectory law as the native fixed-IID SGB process.
BanditRLProof.Thompson.latentArmStreamVisibleTrajectoryMeasure_map_frestrictLe_eq_native, BanditRLProof.Thompson.nativeStationaryTrajectoryMeasure, BanditRLProof.Thompson.latentArmStreamVisiblePrefixNextPair_eq_compProdtheorem latentArmStreamVisibleTrajectoryMeasure_eq_native {Env : Type u} {K : Nat} [MeasurableSpace Env] [StandardBorelSpace Env] [NeZero K] (algorithm : HistoryAlgorithm (Fin K) Real) (env : Env) (nu : Kernel (Fin K) Real) [IsMarkovKernel nu] : (latentArmStreamTrajectoryMeasure algorithm env nu).map Prod.snd = nativeStationaryTrajectoryMeasure algorithm nu
Lean declarationBandit
Plain-English statement. On the source-shaped generated two-arm SGB process, every finite block of optimal-arm pull times and observed rewards has exactly the law of a missing-pull-aware block on the latent coupling.
BanditRLProof.StochasticGradientBandit.twoArmNthOptimalPullReward_eq_latentCoordinate_ae, BanditRLProof.Thompson.latentArmStreamVisibleTrajectoryMeasure_eq_native, BanditRLProof.StochasticGradientBandit.twoArmFixedIIDLatentTrajectoryMeasure_map_optimalPrefix_eq_pitheorem twoArmFixedIIDTrajectoryMeasure_map_optimalPullTimeRewardBlock_eq_latentMasked (armLaw : Fin 2 -> Measure Real) (hprob : forall arm, IsProbabilityMeasure (armLaw arm)) (eta : Real) (m : Nat) : Measure.map (twoArmOptimalPullTimeRewardBlock (Env := Unit) m) (twoArmTrajectoryMeasure (Measure.dirac ()) eta (twoArmFixedIIDEnvironment armLaw hprob)) = Measure.map (twoArmLatentMaskedOptimalPullBlock m) (twoArmFixedIIDLatentTrajectoryMeasure armLaw hprob eta)
Lean declarationBandit
Plain-English statement. The source-generated finite Appendix-C S0/S1 event has exactly the same probability as the latent optimal-arm reward pattern intersected with the event that every requested pull occurs.
BanditRLProof.StochasticGradientBandit.twoArmFixedIIDTrajectoryMeasure_map_optimalPullTimeRewardBlock_eq_latentMasked, BanditRLProof.StochasticGradientBandit.twoArmLatentMaskedOptimalPullBlock_preimage_appendixCObservedPhaseEvent, BanditRLProof.StochasticGradientBandit.measurableSet_twoArmAppendixCObservedPhaseEventtheorem twoArmFixedIIDTrajectoryMeasure_appendixCGeneratedPhaseEvent_eq_latent (armLaw : Fin 2 -> Measure Real) (hprob : forall arm, IsProbabilityMeasure (armLaw arm)) (eta : Real) (n0 n1 : Nat) (phaseOneTotal : Real) : (twoArmTrajectoryMeasure (Measure.dirac ()) eta (twoArmFixedIIDEnvironment armLaw hprob)) (twoArmAppendixCGeneratedPhaseEvent n0 n1 phaseOneTotal) = (twoArmFixedIIDLatentTrajectoryMeasure armLaw hprob eta) (twoArmAppendixCLatentPhaseEvent n0 n1 phaseOneTotal)
Lean declarationBandit
Plain-English statement. The pure latent Appendix-C reward-pattern probability is exactly the sum of the generated all-pulls-present phase probability and an explicit missing-pull phase probability.
BanditRLProof.StochasticGradientBandit.twoArmAppendixCPureLatentRewardEvent_eq_union_phase_missing, BanditRLProof.StochasticGradientBandit.disjoint_twoArmAppendixCLatentPhaseEvent_missing, BanditRLProof.StochasticGradientBandit.twoArmFixedIIDTrajectoryMeasure_appendixCGeneratedPhaseEvent_eq_latenttheorem twoArmAppendixCRewardPhaseProbability_eq_generated_add_missing (armLaw : Fin 2 -> Measure Real) (hprob : forall arm, IsProbabilityMeasure (armLaw arm)) (eta : Real) (n0 n1 : Nat) (phaseOneTotal : Real) : (Measure.pi (fun _ : Fin (n0 + n1) => armLaw 0) : Measure (Fin (n0 + n1) -> Real)) (twoArmAppendixCRewardPhaseEvent n0 n1 phaseOneTotal) = (twoArmTrajectoryMeasure (Measure.dirac ()) eta (twoArmFixedIIDEnvironment armLaw hprob)) (twoArmAppendixCGeneratedPhaseEvent n0 n1 phaseOneTotal) + (twoArmFixedIIDLatentTrajectoryMeasure armLaw hprob eta) (twoArmAppendixCMissingPullLatentPhaseEvent n0 n1 phaseOneTotal)
Lean declarationBandit
Plain-English statement. If one of the requested optimal-arm pulls in the finite Appendix-C block never occurs, then at every finite horizon the optimal arm has been pulled fewer times than the requested block length.
BanditRLProof.StochasticGradientBandit.mem_twoArmAppendixCMissingPullLatentPhaseEvent_iff, BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCount_lt_of_fin_nthOptimalPullTime_eq_top, BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCountBelowEventtheorem twoArmAppendixCMissingPullLatentPhaseEvent_subset_terminalCountBelow (n0 n1 : Nat) (phaseOneTotal : Real) (horizon : Nat) : twoArmAppendixCMissingPullLatentPhaseEvent n0 n1 phaseOneTotal ⊆ (fun sample : UCB.ArmRewardStream 2 × ((t : Nat) -> Fin 2 × Real) => ((), sample.2)) ⁻¹' twoArmOptimalPullCountBelowEvent (Env := Unit) (n0 + n1) horizon
Lean declarationBandit
Plain-English statement. The existing latent missing-pull phase mass is charged against finite-horizon expected sampled pseudo-regret on the actual generated fixed-IID trajectory.
BanditRLProof.StochasticGradientBandit.twoArmAppendixCMissingPullLatentPhaseEvent_subset_terminalCountBelow, BanditRLProof.StochasticGradientBandit.twoArmFixedIIDLatentTrajectoryMeasure_map_visible_eq_generated, BanditRLProof.StochasticGradientBandit.twoArmFixedIIDMissingPullLatentPhase_probability_le_countBelow, BanditRLProof.StochasticGradientBandit.twoArmOptimalPullCountBelowEvent_charge_mul_probability_le_integraltheorem twoArmFixedIIDMissingPullLatentPhase_charge_mul_probability_le_integral (armLaw : Fin 2 -> Measure Real) (hprob : forall arm, IsProbabilityMeasure (armLaw arm)) (eta Delta : Real) (hDelta : 0 ≤ Delta) (n0 n1 : Nat) (phaseOneTotal : Real) (horizon : Nat) : Delta * ((horizon - (n0 + n1) : Nat) : Real) * (twoArmFixedIIDLatentTrajectoryMeasure armLaw hprob eta).real (twoArmAppendixCMissingPullLatentPhaseEvent n0 n1 phaseOneTotal) ≤ integral (twoArmTrajectoryMeasure (Measure.dirac ()) eta (twoArmFixedIIDEnvironment armLaw hprob)) (twoArmSampledPseudoRegret (Env := Unit) Delta horizon)
Lean declarationBandit
Plain-English statement. On the canonical generated fixed-IID trajectory, the exact regret charge of a measurable fixed-cutoff starvation event times its probability is no larger than expected sampled pseudo-regret.
BanditRLProof.StochasticGradientBandit.twoArmStepOneStarvationEvent_charge_mul_probability_le_integral, BanditRLProof.StochasticGradientBandit.measurableSet_twoArmStepOneStarvationEvent, BanditRLProof.StochasticGradientBandit.twoArmStepOneStarvationEvent_sampledPseudoRegret_eqtheorem twoArmFixedIIDStepOneStarvationEvent_charge_mul_probability_le_integral (armLaw : Fin 2 -> Measure Real) (hprob : forall arm, IsProbabilityMeasure (armLaw arm)) (eta Delta : Real) (hDelta : 0 <= Delta) (cutoff n horizon : Nat) : Delta * ((horizon - n : Nat) : Real) * (twoArmTrajectoryMeasure (Measure.dirac ()) eta (twoArmFixedIIDEnvironment armLaw hprob)).real (twoArmStepOneStarvationEvent (Env := Unit) eta cutoff n horizon) <= integral (twoArmTrajectoryMeasure (Measure.dirac ()) eta (twoArmFixedIIDEnvironment armLaw hprob)) (twoArmSampledPseudoRegret (Env := Unit) Delta horizon)
The compact summary keeps the reading route visible. Open it for source-linked declarations and exact remaining gaps.