BanditRLlib
Lean gate passed before this site build; local proof declarations are shown as compiled.Lean-verified build · exact declarations linked.

Teaching chapter 01 of 10 · Canonical route compiled

1. Finite bandits, traces, and regret

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.

Orientation

Who should read this. Start here if you know basic probability or machine learning but are new to this Lean library.

Learning goals

  • Distinguish a deterministic action trace from a probability law over generated traces.
  • Use pull counts as the bookkeeping interface shared by ETC, UCB, EXP3, and Tsallis routes.
  • Read the finite-sum identity that regroups time-indexed regret by arm.

Textbook crosswalk

Read the mathematics before the Lean interface

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.

Primary spine · free online edition

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
Open at the cited pages
Optional source routeAdvanced lower-bound extensionPart IV page map

Open this crosswalk after the finite-bandit bookkeeping route. It preserves the Chapter 14–17 page map without interrupting the beginner sequence.

Advanced source map

Bandit Algorithms — Part IV, Chapters 14–17

Tor Lattimore and Csaba Szepesvári

Location
§14.1 coding and entropy, §14.2 Theorems 14.1–14.2, Exercise 14.10, §15.1 Lemma 15.1, §15.2 Theorem 15.2, §16.1 Definition 16.1 and Theorem 16.2, §16.2 Lemma 16.3 and Theorem 16.4, §17.1 Theorem 17.1 and Corollaries 17.2–17.3, and §17.2 Theorem 17.4 and Claims 17.5–17.7
Pages
CUP §14.1 starts p. 160, §14.2 starts p. 162, §14.5 starts p. 167, §15.1–15.2 span pp. 170–173, §16.1–16.2 span pp. 177–180, and §17.1–17.2 span pp. 186–190; author-online pp. 186–191, 195–196, 198–201, 207–210, and 216–220; physical PDF pp. 195–200, 204–205, 207–210, 216–219, and 225–229
Open at the cited pages
bookkeeping flow · ordered flow

From an action trace to a gap sum

Read top to bottom: each step supplies the state or proof fact used by the next one.

  1. Record the trace

    Write the selected arm A_t at every round t.

  2. Count each arm

    N_a(T) counts how often arm a appears before horizon T.

  3. Attach its gap

    Every occurrence of arm a contributes the same model gap Δ_a.

  4. Regroup the sum

    Replace the sum over time by one gap-times-count term per arm.

Source theorem · faithful restatement

Lemma 4.5 (regret decomposition)

Original at online pp. 62–63 ↗

The standard stochastic-bandit decomposition converts control of suboptimal pull counts into expected regret.

Model
Any stochastic bandit environment with a finite or countable action set, together with any policy and horizon n.
Assumptions
Arm means, action gaps, regret, and expected pull counts are defined; no concentration or algorithm-specific assumption is used.
Algorithm parameters
Horizon n, action gaps Δ_a, and pull counts T_a(n).
Regret notion
The textbook frequentist expected regret R_n.
Guarantee
An exact identity: regret equals the sum over actions of gap times expected pull count.
Source mathematical statement. Expected regret is the sum, over arms, of each gap times that arm's expected pull count.

BanditRLlib relationship. BanditRLlib first proves the pathwise finite-trace identity. Algorithm chapters then integrate that bookkeeping identity under their own generated trajectory laws.

Natural-language and Lean side by side

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.

Mathematics ↔ Lean

Finite bandit model and certified optimal arm

Lean declarationBanditRLProof.FiniteBanditModel

Compiled

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.

Mathematical reading. 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.
Intuition
The structure prevents later regret proofs from silently choosing a nonoptimal comparator. The proof field is data, so every downstream gap theorem can reuse it.
Why it is needed
Gaps, pseudo-regret, ETC commit errors, UCB suboptimal pulls, and the stochastic Tsallis endpoints all need the same fixed comparator.
Place in the proof
This is the model root of the deterministic proof DAG.
Proof and Lean reading notes
Proof idea
This is a structure definition rather than a theorem. Its crucial invariant is the maximality field; derived lemmas prove gap nonnegativity and upper bounds.
Lean reading notes
A Lean structure bundles values and proofs. Passing one model value therefore passes both the means and the best-arm certificate without a separate global assumption.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
structure FiniteBanditModel (K : Nat) where
Mathematics ↔ Lean

Pull counts along an action trace

Lean declarationBanditRLProof.pullCount

Compiled

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.

Mathematical reading. The pull count of arm a before time n is the number of indices t<n at which the action trace selected a.
Intuition
Most bandit analyses eventually ask how often a suboptimal arm was selected. This definition is the common bridge from an adaptive trace to finite combinatorics.
Why it is needed
ETC uses exact exploration counts; UCB controls small-count and large-count selections; regret decompositions weight these counts by gaps.
Place in the proof
It sits immediately above action traces and below almost every finite-arm regret theorem.
Proof and Lean reading notes
Proof idea
The definition is a finite list count. Separate wrapper lemmas expose equivalent Finset sums and measurable random-variable forms when probability enters.
Lean reading notes
Keeping the core definition dependency-light makes elementary count algebra available before importing measure theory.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
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
Mathematics ↔ Lean

Regret decomposes into gaps times pull counts

Lean declarationBanditRLProof.pseudoRegret_eq_finset_sum_gap_mul_pullCount

Compiled

Plain-English statement. Cumulative pseudo-regret can be regrouped by arm: every pull of arm a contributes exactly its fixed gap.

Mathematical reading. Cumulative pseudo-regret can be regrouped by arm: every pull of arm a contributes exactly its fixed gap.
Intuition
The left side follows time; the right side follows arms. Algorithm-specific proofs normally bound the right side, one arm at a time.
Why it is needed
It turns a probabilistic control of pull counts into a regret theorem without redoing the deterministic bookkeeping for every algorithm.
Place in the proof
This is the central deterministic join between model gaps and algorithm traces.
Proof and Lean reading notes
Proof idea
Expand pseudo-regret as a finite time sum, insert the indicator of each arm, swap finite sums, and identify the inner indicator sum with pullCount.
Lean reading notes
The proof uses Finset rearrangement and previously compiled wrappers. No measure, independence, or integrability assumption appears.
Teaching dependencies
BanditRLProof.pullCount, BanditRLProof.pseudoRegret, BanditRLProof.FiniteBanditModel
Exact Lean statement
theorem 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))
Explore 32 additional Lean teaching notes
Mathematics ↔ Lean

Minimax expected regret is the infimum, over an explicit policy class, of…

Lean declarationBanditRLProof.LowerBounds.minimaxExpectedRegret

Compiled

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.

Mathematical reading. Minimax expected regret is the infimum, over an explicit policy class, of each policy's supremum expected regret over an explicit environment class.
Intuition
A lower-bound theorem must defeat every admissible policy on at least one admissible environment; the two nested order operations make that quantifier order visible.
Why it is needed
Chapter 13 states its Gaussian theorem in minimax form, so later information-theoretic leaves need a stable semantic endpoint rather than an informal phrase.
Place in the proof
This is the order-theoretic root of the Part IV lower-bound spine and is separate from any Gaussian or KL construction.
Proof and Lean reading notes
Proof idea
The definition uses ENNReal complete-lattice infimum and supremum over subtypes for the explicit policy and environment sets.
Lean reading notes
The definitions retain standard empty-class lattice semantics. Intended bandit consumers must prove their policy and environment classes are nonempty; no boundedness assumption is hidden.
Teaching dependencies
BanditRLProof.LowerBounds.worstCaseExpectedRegret
Exact Lean statement
noncomputable def minimaxExpectedRegret {Policy : Type u} {Environment : Type v} (regret : Policy -> Environment -> ENNReal) (policyClass : Set Policy) (environmentClass : Set Environment) : ENNReal
Mathematics ↔ Lean

A policy is minimax optimal only if it belongs to the chosen policy class…

Lean declarationBanditRLProof.LowerBounds.IsMinimaxOptimal

Compiled

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.

Mathematical reading. 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.
Intuition
The same policy can be minimax optimal for one horizon or environment class and fail to be optimal for another.
Why it is needed
This compiles the explicit Chapter 13 warning that minimax optimality is not a property of a policy alone.
Place in the proof
It refines the minimax value surface without asserting that an arbitrary infimum has a minimizing policy.
Proof and Lean reading notes
Proof idea
Package policy-class membership and equality with the already compiled minimax value in one proposition, with projection lemmas for both components.
Lean reading notes
The horizon is carried by the regret functional. Policy and environment classes remain explicit, and no nonemptiness or attainment theorem is assumed.
Teaching dependencies
BanditRLProof.LowerBounds.minimaxExpectedRegret
Exact Lean statement
def IsMinimaxOptimal {Policy : Type u} {Environment : Type v} (regret : Policy -> Environment -> ENNReal) (policyClass : Set Policy) (environmentClass : Set Environment) (policy : Policy) : Prop
Mathematics ↔ Lean

For the two Gaussian observation laws with means zero and Delta and…

Lean declarationBanditRLProof.LowerBounds.gaussianSampleMeanThresholdRisk_le_exp

Compiled

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).

Mathematical reading. 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).
Intuition
A larger sample size or a wider separation makes the two Gaussian hypotheses exponentially easier to distinguish.
Why it is needed
It adds a real two-hypothesis probability theorem for the opening of Section 13.1 while leaving the sharper source display auditable.
Place in the proof
This is a symmetric Chernoff companion, distinct from the separately compiled exact two-sided Mills-ratio Eq. (13.1).
Proof and Lean reading notes
Proof idea
Identify both midpoint error events, derive centered Gaussian sub-Gaussianity from Mathlib's exact MGF, reflect the positive-mean lower tail, apply one-sided Chernoff on each side, and take their maximum.
Lean reading notes
The module proves the canonical iid Gaussian empirical-mean law and, using GaussianMillsRatio, the exact Eq. (13.1) constants in gaussianSampleMeanZeroErrorProbability_source_bounds.
Teaching dependencies
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_exp
Exact Lean statement
theorem gaussianSampleMeanThresholdRisk_le_exp (sampleSize : Nat) (gap : Real) (hgap : 0 < gap) : gaussianSampleMeanThresholdRisk sampleSize gap ≤ Real.exp (-(sampleSize : Real) * gap ^ 2 / 8)
Mathematics ↔ Lean

In an m-plus-one-arm problem with arm zero distinguished, nonnegative…

Lean declarationBanditRLProof.LowerBounds.exists_leastExploredAlternative

Compiled

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.

Mathematical reading. 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.
Intuition
The policy has only n pulls to distribute; after reserving the base arm, not every alternative can exceed the average alternative budget.
Why it is needed
Chapter 13 changes the source distribution of a lightly explored arm, making that change difficult for the policy to detect.
Place in the proof
It is the finite averaging leaf between the exact pull-count identity and the future two-history change-of-measure theorem.
Proof and Lean reading notes
Proof idea
Split the full Fin (m+1) sum into arm zero plus the Fin.succ tail, use nonnegativity to bound the tail by n, then apply Mathlib's finite exists-le-average lemma to m copies of n/m.
Lean reading notes
The source's one-based arms 2 through k are represented by i.succ for i : Fin m. The theorem assumes 0 < m, all expected pulls nonnegative, and the exact total identity; no probability law is hidden.
Teaching dependencies
BanditRLProof.LowerBounds.exists_alternative_le_average, BanditRLProof.LowerBounds.alternativeExpectedPullBudget_le
Exact Lean statement
theorem 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)
Mathematics ↔ Lean

If the base-environment expected base-arm pulls exceed the…

Lean declarationBanditRLProof.LowerBounds.max_base_changed_regretLowerBound_ge_half_sub_error

Compiled

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.

Mathematical reading. 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.
Intuition
The base environment punishes too few base-arm pulls and the changed environment punishes too many; an information theorem may lose a quantitative error without erasing the deterministic lower-bound structure.
Why it is needed
This matches the source's approximate cross-law comparison without turning approximation into equality or an unjustified direction.
Place in the proof
It is the Chapter 13 algebra interface consumed by the compiled Chapter 14–15 history-law and testing route; the resulting Gaussian minimax endpoint gives the source-order statement with c=1/54.
Proof and Lean reading notes
Proof idea
Scale the explicit pull-discrepancy bound by the nonnegative gap, show the two lower expressions sum to at least Delta times n minus the error, and compare their maximum with half their sum.
Lean reading notes
The discrepancy error is a visible Real-valued premise. The declaration proves no absolute continuity, KL bound, testing inequality, or Gaussian construction.
Teaching dependencies
BanditRLProof.LowerBounds.baseEnvironmentRegret, BanditRLProof.LowerBounds.changedEnvironmentRegretLowerBound
Exact Lean statement
theorem 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)
Mathematics ↔ Lean

If the changed-environment expected base-arm pulls are at least the…

Lean declarationBanditRLProof.LowerBounds.max_base_changed_regretLowerBound_ge_half

Compiled

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.

Mathematical reading. 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.
Intuition
This is the zero-error directional endpoint of the quantitative discrepancy theorem.
Why it is needed
It preserves a convenient special case while keeping the more realistic error-bearing bridge canonical.
Place in the proof
It is a corollary, not a change-of-measure theorem and not Theorem 13.1.
Proof and Lean reading notes
Proof idea
Apply the quantitative theorem with error zero and rewrite the directional premise as a nonpositive difference.
Lean reading notes
The cross-environment comparison remains an explicit premise; no statistical law comparison is hidden.
Teaching dependencies
BanditRLProof.LowerBounds.max_base_changed_regretLowerBound_ge_half_sub_error
Exact Lean statement
theorem 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)
Mathematics ↔ Lean

Every finite binary prefix code with nonempty codewords satisfies the Kraft…

Lean declarationBanditRLProof.LowerBounds.BinaryPrefixCode.kraft_inequality

Compiled

Plain-English statement. Every finite binary prefix code with nonempty codewords satisfies the Kraft inequality.

Mathematical reading. Every finite binary prefix code with nonempty codewords satisfies the Kraft inequality.
Intuition
Prefix freedom makes codeword boundaries recoverable in concatenated messages, so the codebook cannot occupy more than all leaves of a binary tree.
Why it is needed
This is the first compiled coding-theory bridge in Chapter 14 and the structural lower-bound ingredient behind entropy versus expected length.
Place in the proof
This declaration is only the prefix-code-to-Kraft leaf. Separate Chapter 14 modules now compile recursive Huffman optimality, the one-bit entropy sandwich, and exact-real arithmetic source coding; their model boundaries remain explicit in the textbook spine.
Proof and Lean reading notes
Proof idea
Prove the range of the encoder uniquely decodable by induction on concatenated word lists, adapt the range to a finite codebook, and invoke Mathlib's Kraft–McMillan theorem.
Lean reading notes
The model explicitly forbids empty codewords. Without that condition, a singleton empty codebook is prefix-free but repeated source strings are not uniquely decodable.
Teaching dependencies
BanditRLProof.LowerBounds.BinaryPrefixCode.uniquelyDecodable_range
Exact Lean statement
theorem kraft_inequality [Fintype Symbol] [DecidableEq Symbol] (code : BinaryPrefixCode Symbol) : ∑ word ∈ code.codebook, (1 / 2 : Real) ^ word.length ≤ 1
Mathematics ↔ Lean

Finite base-two entropy equals natural entropy divided by the natural…

Lean declarationBanditRLProof.LowerBounds.discreteEntropyBaseTwo_eq_div_log_two

Compiled

Plain-English statement. Finite base-two entropy equals natural entropy divided by the natural logarithm of two.

Mathematical reading. Finite base-two entropy equals natural entropy divided by the natural logarithm of two.
Intuition
Bits and nats measure the same information with different logarithmic units.
Why it is needed
The exact conversion closes the definition-level content of Eqs. (14.2)–(14.3) without implying an optimal coding theorem.
Place in the proof
The entropy definitions and nonnegativity compile; the optimal expected-length comparison remains open.
Proof and Lean reading notes
Proof idea
Expand the finite sums and factor the constant inverse of log two through the sum.
Lean reading notes
The definitions use a finite support and the source expression p times log of p inverse; the zero term simplifies to zero in Lean's total real logarithm convention.
Teaching dependencies
BanditRLProof.LowerBounds.discreteEntropy, BanditRLProof.LowerBounds.discreteEntropyBaseTwo
Exact Lean statement
theorem discreteEntropyBaseTwo_eq_div_log_two (support : Finset Symbol) (probability : Symbol → Real) : discreteEntropyBaseTwo support probability = discreteEntropy support probability / Real.log 2
Mathematics ↔ Lean

Restricting two finite measures to any smaller sigma-algebra cannot…

Lean declarationBanditRLProof.LowerBounds.relativeEntropy_trim_le

Compiled

Plain-English statement. Restricting two finite measures to any smaller sigma-algebra cannot increase their relative entropy.

Mathematical reading. Restricting two finite measures to any smaller sigma-algebra cannot increase their relative entropy.
Intuition
Forgetting measurable distinctions replaces the likelihood ratio by its conditional expectation, and convexity says this loses information.
Why it is needed
This closes Exercise 14.10 in its full sub-sigma-algebra form rather than only for the binary sigma-algebra generated by one event.
Place in the proof
It is a general finite-measure theorem; the existing event DPI remains a useful Bernoulli specialization for Bretagnolle–Huber.
Proof and Lean reading notes
Proof idea
Split off infinite KL. In the finite branch, use the Radon–Nikodym derivative under trim, conditional Jensen for klFun, and equality of integrals of measurable functions under trim.
Lean reading notes
The statement keeps the measurable-space order m ≤ m₀ explicit and does not require probability normalization or mutual absolute continuity.
Teaching dependencies
BanditRLProof.LowerBounds.relativeEntropy_ne_top_iff
Exact Lean statement
theorem 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
Mathematics ↔ Lean

Measure relative entropy is finite exactly when P is absolutely continuous…

Lean declarationBanditRLProof.LowerBounds.relativeEntropy_ne_top_iff

Compiled

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.

Mathematical reading. Measure relative entropy is finite exactly when P is absolutely continuous with respect to Q and the P-log-likelihood ratio is integrable.
Intuition
The theorem makes the regular finite branch and singular or non-integrable branch visible instead of hiding them behind a real-valued KL convention.
Why it is needed
Every Chapter 14 conversion from extended-real KL to a real analytic inequality must justify that conversion without silently assuming support compatibility.
Place in the proof
This is the regularity gate between Mathlib's measure KL and the event-level data-processing proof.
Proof and Lean reading notes
Proof idea
The declaration is a project-facing exact adapter for Mathlib's klDiv finiteness characterization.
Lean reading notes
The KL direction is P to Q. Mutual absolute continuity is neither assumed nor derived, and the theorem works on a common measurable space.
Teaching dependencies
BanditRLProof.LowerBounds.relativeEntropy
Exact Lean statement
theorem relativeEntropy_ne_top_iff {α : Type*} [MeasurableSpace α] {P Q : Measure α} : relativeEntropy P Q ≠ ∞ ↔ P ≪ Q ∧ Integrable (llr P Q) P
Mathematics ↔ Lean

Replacing a full observation by the one-bit answer to whether it lies in a…

Lean declarationBanditRLProof.LowerBounds.bernoulliRelativeEntropy_event_le

Compiled

Plain-English statement. Replacing a full observation by the one-bit answer to whether it lies in a measurable event cannot increase relative entropy.

Mathematical reading. Replacing a full observation by the one-bit answer to whether it lies in a measurable event cannot increase relative entropy.
Intuition
Any decision based only on event membership discards information, so its two-point KL cost is no larger than the full-law cost.
Why it is needed
This is the exact bridge from measure-level information to the binary testing inequality used by finite-arm lower bounds.
Place in the proof
It is the compiled event specialization used by testing; the full arbitrary-sub-sigma-algebra Exercise 14.10 now compiles separately as relativeEntropy_trim_le.
Proof and Lean reading notes
Proof idea
Split both measures over A and its complement, identify the restricted Radon–Nikodym derivatives, lower-bound each restricted KL by the corresponding mass-level klFun term, and restore Bernoulli endpoints separately.
Lean reading notes
The parameters are ordered as P(A), Q(A), and the bound uses D(P,Q). Finite KL supplies P absolutely continuous with respect to Q; infinite KL is discharged directly.
Teaching dependencies
BanditRLProof.LowerBounds.relativeEntropy_ne_top_iff, BanditRLProof.LowerBounds.relativeEntropy_restrict_add_compl, BanditRLProof.LowerBounds.bernoulliKLCore_event_le
Exact Lean statement
theorem 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
Mathematics ↔ Lean

For Bernoulli probabilities p and q, the sum p plus one minus q dominates…

Lean declarationBanditRLProof.LowerBounds.binaryBretagnolleHuber

Compiled

Plain-English statement. For Bernoulli probabilities p and q, the sum p plus one minus q dominates the extended-real Bretagnolle–Huber testing scale.

Mathematical reading. For Bernoulli probabilities p and q, the sum p plus one minus q dominates the extended-real Bretagnolle–Huber testing scale.
Intuition
Two binary laws with small relative entropy cannot simultaneously make both directional testing errors tiny.
Why it is needed
The binary theorem isolates the analytic affinity and endpoint work from the measure-theoretic event reduction.
Place in the proof
It sits between event data processing and the final measure-level Chapter 14 theorem.
Proof and Lean reading notes
Proof idea
For interior q, Jensen bounds likelihood affinity below by exp(-d/2), while a two-term square-root inequality bounds half the squared affinity by the testing error. Endpoint support mismatches use infinite KL explicitly.
Lean reading notes
Both p and q carry closed-unit-interval hypotheses. Cases q=0 and q=1 are proved separately, so no interior assumption leaks into the public theorem.
Teaching dependencies
BanditRLProof.LowerBounds.binaryBretagnolleHuberCore, BanditRLProof.LowerBounds.bretagnolleHuberScale
Exact Lean statement
theorem binaryBretagnolleHuber {p q : Real} (hp : KLUCB.IsBernoulliParameter p) (hq : KLUCB.IsBernoulliParameter q) : bretagnolleHuberScale (bernoulliRelativeEntropy p q) ≤ p + (1 - q)
Mathematics ↔ Lean

The real testing scale one-half exponential negative KL decreases as its…

Lean declarationBanditRLProof.LowerBounds.bretagnolleHuberScale_antitone

Compiled

Plain-English statement. The real testing scale one-half exponential negative KL decreases as its extended-real information argument increases.

Mathematical reading. The real testing scale one-half exponential negative KL decreases as its extended-real information argument increases.
Intuition
More divergence permits a weaker lower bound on testing error, while infinite divergence gives the zero scale.
Why it is needed
Antitonicity is the order-theoretic adapter that turns event data processing into the correctly oriented testing bound.
Place in the proof
It connects the binary theorem to the full-measure theorem without converting infinity through ENNReal.toReal.
Proof and Lean reading notes
Proof idea
Split on whether the larger divergence is infinite; otherwise use monotonicity of toReal and the real exponential after negation.
Lean reading notes
The explicit top branch prevents a hidden finiteness assumption in the final source theorem.
Teaching dependencies
BanditRLProof.LowerBounds.bretagnolleHuberScale, BanditRLProof.LowerBounds.bretagnolleHuberScale_nonneg
Exact Lean statement
theorem bretagnolleHuberScale_antitone {d D : ENNReal} (h : d ≤ D) : bretagnolleHuberScale D ≤ bretagnolleHuberScale d
Mathematics ↔ Lean

For probability measures P and Q and a measurable event A, the P…

Lean declarationBanditRLProof.LowerBounds.bretagnolleHuber

Compiled

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.

Mathematical reading. 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.
Intuition
A low-information change of law forces at least one of the two directional testing errors to remain appreciable.
Why it is needed
This is the Chapter 14 testing terminal that Chapter 15 can apply to same-policy bandit-history laws after their divergence has been constructed and bounded.
Place in the proof
It is the exact compiled counterpart of Lattimore–Szepesvári Theorem 14.2, not an adaptive-history theorem by itself.
Proof and Lean reading notes
Proof idea
Apply event data processing, reverse it through the antitone testing scale, invoke the endpoint-complete binary theorem, and rewrite Q(A complement) as one minus Q(A).
Lean reading notes
The theorem assumes only two probability measures on one measurable space and a measurable event. It does not assume finite KL, mutual absolute continuity, a policy, horizon, filtration, or stopping time.
Teaching dependencies
BanditRLProof.LowerBounds.bernoulliRelativeEntropy_event_le, BanditRLProof.LowerBounds.bretagnolleHuberScale_antitone, BanditRLProof.LowerBounds.binaryBretagnolleHuber
Exact Lean statement
theorem 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ᶜ
Mathematics ↔ Lean

When two one-step joint laws share the same first marginal, their relative…

Lean declarationBanditRLProof.LowerBounds.klDiv_compProd_same_left_eq_lintegral_klDiv_of_measurable

Compiled

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.

Mathematical reading. 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.
Intuition
The shared past contributes no information; only the next conditional observation separates the two laws, and its cost is averaged over histories actually seen under the first law.
Why it is needed
This closes the conditional-kernel chain-rule gap that previously prevented arm-level KL costs from being accumulated along an adaptive bandit history.
Place in the proof
It is the measure-theoretic engine of Chapter 15 Lemma 15.1, before specializing the conditional kernels to one randomized policy and finite arms.
Proof and Lean reading notes
Proof idea
Identify the joint Radon–Nikodym derivative fibrewise, integrate its logarithm under the composition product, and preserve the singular branch: positive first-law mass on an infinite-KL fibre makes both sides infinite.
Lean reading notes
The theorem assumes a finite first measure, finite Markov kernels, countably generated target measurable space, and measurability of the pointwise KL function. It does not assume absolute continuity or finite KL.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
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
Mathematics ↔ Lean

For one common randomized policy in two finite-arm environments, the…

Lean declarationBanditRLProof.LowerBounds.banditHistoryRelativeEntropy_eq_expectedPulls_sum

Compiled

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.

Mathematical reading. 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.
Intuition
At every round the same policy cancels from the likelihood ratio; an arm pays information only when the policy selects it, so repeated conditional costs regroup into expected pull counts.
Why it is needed
This is the compiled Chapter 15 change-of-environment identity used by minimax, instance-dependent, and high-probability lower-bound routes.
Place in the proof
It is the local source-facing counterpart of Lattimore–Szepesvári Lemma 15.1. The compiled Theorem 15.2 consumes it; later Chapter 16–17 terminals remain separate.
Proof and Lean reading notes
Proof idea
Recursively expose the canonical finite history law as a composition product, apply the same-policy conditional KL identity at each successor, sum over finite actions, and identify policy arm masses with lower integrals of realized pull counts.
Lean reading notes
Finite arms and a countably generated reward space are explicit. The equality uses ENNReal KL and lower-integral expected counts, covers singular or infinite arm KL, and uses the first environment in both the history law and expectation. The local lastRound index denotes lastRound+1 observations.
Teaching dependencies
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_expectedPullCountThrough
Exact Lean statement
theorem 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)
Mathematics ↔ Lean

A measurable observation of two finite measures cannot have more relative…

Lean declarationBanditRLProof.LowerBounds.klDiv_map_le

Compiled

Plain-English statement. A measurable observation of two finite measures cannot have more relative entropy than the original laws.

Mathematical reading. A measurable observation of two finite measures cannot have more relative entropy than the original laws.
Intuition
Coarsening the available information can only make two laws harder to distinguish.
Why it is needed
This is the reusable data-processing half of Chapter 15 Exercise 15.7 and also turns Lemma 15.1 into bounds for deterministic-history statistics.
Place in the proof
It is a generic finite-measure theorem and a dependency of the stopping-time exercise, not the stopped-history inequality itself.
Proof and Lean reading notes
Proof idea
Split off infinite source KL. In the finite branch, express the pushed-forward Radon–Nikodym density as a conditional expectation, apply Jensen to the convex KL integrand, and compare the resulting integrals.
Lean reading notes
The theorem needs only finite measures and a measurable map. It does not require injectivity, probability normalization, finite KL as a premise, a filtration, or a stopping time.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
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
Mathematics ↔ Lean

Under the first unit-variance Gaussian law, the log Radon–Nikodym…

Lean declarationBanditRLProof.LowerBounds.llr_gaussianReal_one_ae

Compiled

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.

Mathematical reading. 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.
Intuition
Equal Gaussian variances cancel their normalizing constants, leaving a difference of two quadratic exponents that simplifies to an affine log likelihood ratio.
Why it is needed
This is the regular analytic leaf needed before Chapter 15 can compute the KL cost of changing one Gaussian arm.
Place in the proof
It is an arm-level dependency, not the adaptive-history likelihood-ratio decomposition of Lemma 15.1.
Proof and Lean reading notes
Proof idea
Use absolute continuity in both directions through Lebesgue measure, identify both Radon–Nikodym derivatives with Gaussian densities, cancel the positive normalizer, and expand the squares.
Lean reading notes
The almost-everywhere law is the first Gaussian N(mu,1), preserving the source KL direction. No bandit policy or history law appears.
Teaching dependencies
BanditRLProof.LowerBounds.log_gaussianPDFReal_div_gaussianPDFReal_one
Exact Lean statement
theorem llr_gaussianReal_one_ae (mu nu : Real) : llr (unitGaussianArm mu) (unitGaussianArm nu) =ᵐ[unitGaussianArm mu] fun x => (mu - nu) * x + (nu ^ 2 - mu ^ 2) / 2
Mathematics ↔ Lean

The relative entropy from a unit-variance Gaussian with mean mu to one with…

Lean declarationBanditRLProof.LowerBounds.klDiv_gaussianReal_one

Compiled

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.

Mathematical reading. The relative entropy from a unit-variance Gaussian with mean mu to one with mean nu is one half the squared mean difference.
Intuition
Integrating the affine log likelihood ratio under N(mu,1) replaces the observation by its mean mu and leaves the squared mean displacement.
Why it is needed
Theorem 15.2 changes one arm from mean zero to 2 Delta, so this leaf supplies its exact information cost 2 Delta squared.
Place in the proof
It is the compiled Gaussian arm-KL dependency consumed by Lemma 15.1 and the now-compiled Theorem 15.2 history/event assembly.
Proof and Lean reading notes
Proof idea
Prove mutual absolute continuity via Lebesgue measure, establish L1 integrability from the Gaussian first moment, invoke Mathlib's KL integral formula, and normalize the resulting polynomial.
Lean reading notes
The value is symmetric only because both variances are one; the declaration and every downstream contract retain the direction from mu to nu.
Teaching dependencies
BanditRLProof.LowerBounds.llr_gaussianReal_one_ae, BanditRLProof.LowerBounds.integrable_llr_gaussianReal_one
Exact Lean statement
theorem klDiv_gaussianReal_one (mu nu : Real) : InformationTheory.klDiv (unitGaussianArm mu) (unitGaussianArm nu) = ENNReal.ofReal ((mu - nu) ^ 2 / 2)
Mathematics ↔ Lean

The Chapter 15 gap choice makes the Gaussian information exponent exactly…

Lean declarationBanditRLProof.LowerBounds.gaussianMinimaxGap_informationExponent_eq_half

Compiled

Plain-English statement. The Chapter 15 gap choice makes the Gaussian information exponent exactly one half.

Mathematical reading. The Chapter 15 gap choice makes the Gaussian information exponent exactly one half.
Intuition
Choosing the gap to balance the number of alternatives against the horizon keeps the changed history laws at constant information distance after applying Lemma 15.1.
Why it is needed
This isolates the source's tuning algebra before the compiled history-KL and event-testing assembly.
Place in the proof
It is a numeric dependency consumed by the compiled Theorem 15.2, while its statement alone does not bound history divergence.
Proof and Lean reading notes
Proof idea
Square the nonnegative real square root and normalize the positive field denominators.
Lean reading notes
The parameters are explicit positive real alternative count and horizon values. The source terminal discharges the natural-cast and bandit-semantic obligations explicitly.
Teaching dependencies
BanditRLProof.LowerBounds.gaussianMinimaxGap_sq
Exact Lean statement
theorem gaussianMinimaxGap_informationExponent_eq_half {alternativeCount horizon : Real} (halternatives : 0 < alternativeCount) (hhorizon : 0 < horizon) : 2 * horizon * gaussianMinimaxGap alternativeCount horizon ^ 2 / alternativeCount = 1 / 2
Mathematics ↔ Lean

For every randomized finite-history policy, k greater than one, and n at…

Lean declarationBanditRLProof.LowerBounds.finiteArmedGaussianMinimaxLowerBound

Compiled

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.

Mathematical reading. 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.
Intuition
A policy cannot explore every alternative often under the base instance. Raising one lightly sampled arm creates a competing environment that stays close in history KL, so the policy must incur substantial regret in at least one of the two worlds.
Why it is needed
This is the first complete source-facing textbook minimax theorem in the Part IV spine: it joins reusable probability, history-law, Gaussian, event, and lattice layers into the exact external endpoint.
Place in the proof
It is the compiled counterpart of Lattimore–Szepesvári Theorem 15.2 and implies the coarser Chapter 13 order statement with c=1/54. It does not promote the Bernoulli notes, exercises, or Chapter 16–17 terminals.
Proof and Lean reading notes
Proof idea
Give the source's first arm (Lean Fin 0) mean Delta, select a least-explored alternative under the base law, raise only that arm to 2 Delta, use Lemma 15.1 to bound the directed history KL by one half, apply Bretagnolle–Huber to the source event T_1(n) at most n/2 (Lean T_0), and tune Delta so the exponential constant yields 1/27.
Lean reading notes
The policy is an arbitrary randomized HistoryAlgorithm used unchanged in both environments. Expected pseudo-regret is an ENNReal lower integral on the actual canonical history measure and is the source's standard Lemma 4.5-equivalent form; no separate reward-sum regret bridge is claimed here. lastRound=n-1 encodes exactly n observations. The environment witness certifies every mean lies in [0,1] and identifies an optimal arm.
Teaching dependencies
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_half
Exact Lean statement
theorem 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)
Mathematics ↔ Lean

A regret sequence is consistent when its ratio to n to the power p…

Lean declarationBanditRLProof.LowerBounds.IsConsistentRegret

Compiled

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.

Mathematical reading. A regret sequence is consistent when its ratio to n to the power p converges to zero for every positive real exponent p.
Intuition
Consistency excludes a policy that pays polynomial regret on the instance, while still allowing logarithmic and other subpolynomial behavior.
Why it is needed
Definition 16.1 quantifies over every environment and every positive real exponent; the scalar predicate freezes the inner analytic contract exactly.
Place in the proof
It is a generic dependency interface, not proof that a concrete bandit policy is consistent over a concrete class.
Proof and Lean reading notes
Proof idea
The declaration directly records a filter limit for each positive real exponent.
Lean reading notes
Regret nonnegativity is deliberately a caller obligation. The base is the natural horizon cast to Real and the exponent is Real.rpow.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
def IsConsistentRegret (regret : Nat -> Real) : Prop
Mathematics ↔ Lean

The logarithmic growth ratio of a positive sum of two consistent regret…

Lean declarationBanditRLProof.LowerBounds.IsConsistentRegret.eventually_log_add_div_log_le

Compiled

Plain-English statement. The logarithmic growth ratio of a positive sum of two consistent regret sequences is eventually at most every positive exponent.

Mathematical reading. The logarithmic growth ratio of a positive sum of two consistent regret sequences is eventually at most every positive exponent.
Intuition
Two subpolynomial regrets remain subpolynomial, so their logarithm grows more slowly than any positive multiple of log n.
Why it is needed
This is the direction-correct analytic step used in the source proof before taking the limsup that feeds Theorem 16.2's pull-count liminf.
Place in the proof
It stops before the limsup/liminf and before any bandit history law; those endpoints remain separate obligations.
Proof and Lean reading notes
Proof idea
Add the two normalized limits, bound the ratio by one eventually, take monotone logarithms, rewrite log(n^p)=p log n, and divide by positive log n.
Lean reading notes
The sum must be eventually positive and the proof explicitly restricts to horizons greater than one.
Teaching dependencies
BanditRLProof.LowerBounds.IsConsistentRegret.add, BanditRLProof.LowerBounds.IsConsistentRegret.eventually_add_le_rpow
Exact Lean statement
theorem 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
Mathematics ↔ Lean

The Chapter 16 information cost is the extended-real infimum of…

Lean declarationBanditRLProof.LowerBounds.divergenceInfimum

Compiled

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.

Mathematical reading. 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.
Intuition
The easiest law that would make the arm optimal determines how much information a policy must collect to rule out that confusion.
Why it is needed
Keeping the infimum in ENNReal preserves empty alternative sets, support mismatch, zero cost, and infinite cost instead of hiding them behind real defaults.
Place in the proof
This is the exact source-shaped definition. Turning it into expected pulls and regret still requires the blocked history change-of-measure bridge.
Proof and Lean reading notes
Proof idea
Define the infimum over a set comprehension and use complete-lattice sInf_le to insert any admissible candidate.
Lean reading notes
The mean functional and distribution class are explicit. The strict comparison and KL direction P to P-prime are visible in the type.
Teaching dependencies
BanditRLProof.LowerBounds.relativeEntropy
Exact Lean statement
def divergenceInfimum {Reward : Type*} [MeasurableSpace Reward] (P : Measure Reward) (muStar : Real) (distributionClass : Set (Measure Reward)) (mean : Measure Reward -> Real) : ENNReal
Mathematics ↔ Lean

For a suboptimal unit-variance Gaussian arm, the Chapter 16 information…

Lean declarationBanditRLProof.LowerBounds.unitGaussianDivergenceInfimum_eq

Compiled

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.

Mathematical reading. For a suboptimal unit-variance Gaussian arm, the Chapter 16 information infimum is exactly one half of the squared gap to the optimal mean.
Intuition
Every strictly better Gaussian alternative is at least the boundary distance away, while alternatives just above the boundary approach that cost.
Why it is needed
This closes the unit-Gaussian row of Table 16.1 instead of recording only one perturbed candidate.
Place in the proof
It is an exact distribution-level dependency of the now-compiled per-arm information constraint and Theorem 16.2 regret terminal.
Proof and Lean reading notes
Proof idea
Use monotonicity of squared distance for the lower bound, then squeeze positive 1/(n+1) perturbations to zero for the upper bound.
Lean reading notes
The strict premise mu<muStar keeps the boundary gap positive. The value stays ENNReal and preserves original-to-alternative KL.
Teaching dependencies
BanditRLProof.LowerBounds.unitGaussianDivergenceInfimum_ge, BanditRLProof.LowerBounds.unitGaussianDivergenceInfimum_le_perturbed, BanditRLProof.LowerBounds.klDiv_gaussianReal_one
Exact Lean statement
theorem unitGaussianDivergenceInfimum_eq (mu muStar : Real) (hmu : mu < muStar) : unitGaussianDivergenceInfimum mu muStar = ENNReal.ofReal ((muStar - mu) ^ 2 / 2)
Mathematics ↔ Lean

When only one arm law changes, the original-law expected pulls times that…

Lean declarationBanditRLProof.LowerBounds.bretagnolleHuberScale_expectedPulls_mul_armKL_le_majorityErrors

Compiled

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.

Mathematical reading. 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.
Intuition
If the policy almost never pulls the changed arm, the two history laws remain hard to distinguish, so the majority decision must fail in at least one environment.
Why it is needed
This is the exact one-arm event-information layer reused by Lemma 16.3 and the asymptotic route.
Place in the proof
The history KL and event inequality compile and now feed two canonical gap-pseudo-regret event charges; the finite arm-law mean-to-gap identification and source Lemma 16.3 terminal also compile.
Proof and Lean reading notes
Proof idea
Specialize Lemma 15.1 to environments equal off arm i, prove the pull-count majority event measurable, and apply Bretagnolle–Huber.
Lean reading notes
Both history measures use the same possibly randomized HistoryAlgorithm. Pull expectation and KL direction are under the first environment.
Teaching dependencies
BanditRLProof.LowerBounds.banditHistoryRelativeEntropy_eq_expectedPulls_mul_of_only_arm_changed, BanditRLProof.LowerBounds.measurableSet_oneArmMajorityPullEvent, BanditRLProof.LowerBounds.bretagnolleHuber
Exact Lean statement
theorem 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)ᶜ
Mathematics ↔ Lean

For two finite-arm history laws that differ only at one arm, the compiled…

Lean declarationBanditRLProof.LowerBounds.expectedPullCount_ge_log_gapPseudoRegret_of_only_arm_changed

Compiled

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.

Mathematical reading. 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.
Intuition
The policy cannot simultaneously avoid the changed arm, keep both expected gap regrets small, and distinguish the two environments. The two event errors are each paid for by an actual gap-times-pull-count expectation.
Why it is needed
This closes the common-policy information, exact half-horizon charges, factor-one-quarter assembly, and logarithmic algebra that sit immediately below Lemma 16.3.
Place in the proof
It is the compiled conditional consumer below the now-compiled finite-mean source Lemma 16.3 terminal.
Proof and Lean reading notes
Proof idea
Regroup canonical gap pseudo-regret by expected pulls, lower-bound it pathwise on the majority event and its complement, integrate both inequalities, combine with Bretagnolle–Huber, and rearrange the finite positive KL branch.
Lean reading notes
The theorem preserves one randomized HistoryAlgorithm, original-to-alternative KL, first-law expected pulls, the inclusive n=lastRound+1 convention, explicit KL finiteness/positivity, and nonnegative gaps.
Teaching dependencies
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_bound
Exact Lean statement
theorem 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
Mathematics ↔ Lean

For finite-mean product bandits that differ at exactly one arm, the…

Lean declarationBanditRLProof.LowerBounds.expectedPullCount_ge_log_regret_changeOfMeasure

Compiled

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.

Mathematical reading. 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.
Intuition
The finite-mean bridge turns equality of every unchanged law into equality of its mean, so unique optimality after the change supplies exactly the alternative gap needed by the event test.
Why it is needed
This is the first compiled source terminal in Chapter 16's finite-time route and preserves the source minimum, KL direction, original-law pulls, and arbitrary randomized policy.
Place in the proof
Lemma 16.3 and Theorem 16.2 compile, connected by exact horizon indexing and extended-real liminf aggregation.
Proof and Lean reading notes
Proof idea
Certify integral means and optimal arms, derive the original gap and changed margin, invoke the canonical majority-event consumer for finite KL, and treat infinite KL by the source x/infinity convention; zero KL contradicts the unequal finite means.
Lean reading notes
The source horizon n is represented by lastRound+1. No deterministic-policy restriction or reversed KL is introduced.
Teaching dependencies
BanditRLProof.LowerBounds.oneArmMeanChange_produces_gap_contract, BanditRLProof.LowerBounds.expectedPullCount_ge_log_gapPseudoRegret_of_only_arm_changed
Exact Lean statement
theorem 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
Mathematics ↔ Lean

Under the local C n^p envelope, every unit-variance Gaussian instance…

Lean declarationBanditRLProof.LowerBounds.gaussianExpectedRegret_ge_finiteTimeInstanceDependent

Compiled

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.

Mathematical reading. 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.
Intuition
Raise each suboptimal mean by (1+epsilon) times its gap, use Lemma 16.3 arm by arm, and keep only the nonnegative part before summing.
Why it is needed
The theorem closes the exact local Gaussian finite-time endpoint, including its horizon set, 8C logarithm, factor 2/(1+epsilon)^2, and positive-part placement.
Place in the proof
Theorem 16.4 compiles for unrestricted real Gaussian means. The general unstructured-class Theorem 16.2 also compiles.
Proof and Lean reading notes
Proof idea
Prove the shifted mean stays in the coordinatewise local box, compute KL as (1+epsilon)^2 Delta_i^2/2, normalize the two C n^p regrets, multiply by each gap, take a positive part, and sum using the exact regret decomposition.
Lean reading notes
The quantifiers retain a nonempty horizon set N, C>0, p in (0,1), epsilon in (0,1], and n in N.
Teaching dependencies
BanditRLProof.LowerBounds.expectedPullCount_ge_log_regret_changeOfMeasure, BanditRLProof.LowerBounds.chapter16GaussianChangedEnvironment_armKL, BanditRLProof.LowerBounds.canonicalGapExpectedPseudoRegretReal_eq_sum_expectedPulls
Exact Lean statement
theorem 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
Mathematics ↔ Lean

If the average random-regret tail over a probability law on instances is at…

Lean declarationBanditRLProof.LowerBounds.exists_cdfTail_ge_of_integral_ge

Compiled

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.

Mathematical reading. 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.
Intuition
An average cannot exceed every point, so randomizing the hard reward matrix can be converted back into one fixed adversarial sequence.
Why it is needed
This is the exact first-moment content of Claim 17.5, which closes the final probabilistic-method step in the source's adversarial route.
Place in the proof
Claim 17.5 is compiled, but the clipped-normal law and the average-tail lower bound that feed it remain blocked.
Proof and Lean reading notes
Proof idea
Apply Mathlib's probability-measure first-moment theorem to the integrable function x maps to one minus F_x(u), then chain the assumed lower bound on its integral.
Lean reading notes
The source suppresses regularity; Lean exposes integrability of the CDF-tail function as a premise. The theorem does not construct the CDF or reward-matrix law.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
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
Mathematics ↔ Lean

An event with probability at least twice delta still has probability at…

Lean declarationBanditRLProof.LowerBounds.measureReal_diff_ge_delta

Compiled

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.

Mathematical reading. An event with probability at least twice delta still has probability at least delta after removing a bad event of probability at most delta.
Intuition
The pull-small event can lose all rounds with excessive clipping and still retain the confidence level needed by Theorem 17.4.
Why it is needed
This isolates the exact probability bookkeeping between Claims 17.6 and 17.7 without pretending either claim is available.
Place in the proof
It is a generic outer-measure leaf between the two blocked construction-specific claims.
Proof and Lean reading notes
Proof idea
Use Mathlib's lower bound on the real measure of a set difference and finish with linear arithmetic.
Lean reading notes
No measurable-set premise is needed because the measure interface is an outer measure on all sets; finiteness is explicit.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
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)
Mathematics ↔ Lean

If Eq

Lean declarationBanditRLProof.LowerBounds.randomRegret_ge_quarter_of_clippingDecomposition

Compiled

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.

Mathematical reading. 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.
Intuition
After removing the hard-arm pulls and boundary-clipped rounds, at least one quarter of the horizon still contributes the gap.
Why it is needed
This compiles the deterministic end of the source argument while leaving the construction-specific pathwise comparison visible as a premise.
Place in the proof
This conditional lemma does not itself prove Eq. (17.8), but the same module now separately compiles construction-level Eq. (17.8). It does not prove Claim 17.6, Claim 17.7, or Theorem 17.4.
Proof and Lean reading notes
Proof idea
Subtract the half-horizon and quarter-horizon count bounds, multiply by a nonnegative gap, and compose with the explicit source comparison.
Lean reading notes
Counts are natural numbers cast to Real. The nonnegative gap and Eq. (17.8) lower comparison are explicit assumptions.
Teaching dependencies
BanditRLProof.LowerBounds.adversarialRegretLowerExpression_ge_quarter
Exact Lean statement
theorem 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

Maintainer contract

Open the canonical completion definition and blockers

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.

Remaining blockers

  • No remaining blocker inside the user-approved deterministic scope; probabilistic laws are downstream obligations rather than missing Chapter 1 results.

Chapter implementation status

The compact summary keeps the reading route visible. Open it for source-linked declarations and exact remaining gaps.

Open 14 implementation records13 compiled · 1 partial · 0 blocked · 0 planned
MilestoneStatusLean declarationRemaining gap
Finite-arm pseudo-regret decompositionCompiled—
Chapter 13 lower-bound semantic, optimality, and deterministic spineCompiledThe Chapter 14 event-testing foundation and Chapter 15 same-policy adaptive-history KL identity compile.
The separate Chapter 15 consumer closes Theorem 13.1 with c=1/54 and GaussianHypothesisTesting closes exact Eq. (13.1); the broader-class fixed-horizon MOSS near-minimax consequence also compiles. Whole-chapter integration, review and deployment gates remain pending.
Chapter 13 exact Gaussian testing bounds and Chernoff companionCompiled—
Chapter 14 coding, KL data-processing, and Bretagnolle–Huber spineCompiled
BanditRLProof.LowerBounds.BinaryPrefixCodeBanditRLProof.LowerBounds.BinaryPrefixCode.uniquelyDecodable_rangeBanditRLProof.LowerBounds.BinaryPrefixCode.kraft_inequality
Open 55 more declarations
BanditRLProof.LowerBounds.discreteEntropyBanditRLProof.LowerBounds.discreteEntropyBaseTwoBanditRLProof.LowerBounds.discreteEntropyBaseTwo_eq_div_log_twoBanditRLProof.LowerBounds.discreteEntropy_nonnegBanditRLProof.LowerBounds.expectedCodeLengthBanditRLProof.LowerBounds.expectedCodeLength_nonnegBanditRLProof.LowerBounds.huffmanCode_optimalBanditRLProof.LowerBounds.exists_prefixCode_of_uniquelyDecodableBanditRLProof.LowerBounds.IsOptimalPrefixCode.length_antitoneBanditRLProof.LowerBounds.huffmanCode_entropy_sandwichBanditRLProof.LowerBounds.arithmeticBlockCode_rate_tendsto_entropyBanditRLProof.LowerBounds.arithmeticBlockCode_payload_intervalBanditRLProof.LowerBounds.sourceBlock_code_family_limit_ge_entropyBanditRLProof.LowerBounds.exists_ceilingLogPrefixCodeBanditRLProof.LowerBounds.relativeEntropy_finite_crossEntropyBanditRLProof.LowerBounds.entropyTerm_tendsto_zero_rightBanditRLProof.LowerBounds.bernoulliRelativeEntropy_asymmetryBanditRLProof.LowerBounds.relativeEntropy_triangle_counterexampleBanditRLProof.LowerBounds.relativeEntropy_commonDensity_eq_ifBanditRLProof.LowerBounds.bretagnolleHuberScale_le_half_commonDensityAffinity_sqBanditRLProof.LowerBounds.half_commonDensityAffinity_sq_le_overlapBanditRLProof.LowerBounds.klDiv_gaussianReal_same_varianceBanditRLProof.LowerBounds.gaussian_testing_max_error_three_twentiethsBanditRLProof.LowerBounds.relativeEntropyBanditRLProof.LowerBounds.relativeEntropy_of_absolutelyContinuous_of_integrableBanditRLProof.LowerBounds.relativeEntropy_of_probability_absolutelyContinuous_of_integrableBanditRLProof.LowerBounds.relativeEntropy_eq_top_of_not_absolutelyContinuousBanditRLProof.LowerBounds.relativeEntropy_ne_top_iffBanditRLProof.LowerBounds.relativeEntropy_eq_zero_iffBanditRLProof.LowerBounds.relativeEntropy_trim_leBanditRLProof.LowerBounds.absolutelyContinuous_iff_atom_supportBanditRLProof.LowerBounds.rnDeriv_mul_atomBanditRLProof.LowerBounds.rnDeriv_atom_eq_divBanditRLProof.LowerBounds.relativeEntropy_eq_top_of_atom_support_mismatchBanditRLProof.LowerBounds.relativeEntropy_finite_klFunBanditRLProof.LowerBounds.relativeEntropy_finite_sum_logBanditRLProof.LowerBounds.relativeEntropy_finite_eq_ifBanditRLProof.LowerBounds.relativeEntropy_finite_eq_top_iffBanditRLProof.LowerBounds.finitePartitionRelativeEntropyBanditRLProof.LowerBounds.relativeEntropy_eq_iSup_densityApproximation_trimBanditRLProof.LowerBounds.exists_fin_observation_densityApproximationBanditRLProof.LowerBounds.finitePartitionRelativeEntropy_eq_relativeEntropyBanditRLProof.LowerBounds.bernoulliRelativeEntropyBanditRLProof.LowerBounds.rnDeriv_restrict_restrictBanditRLProof.LowerBounds.relativeEntropy_restrict_add_complBanditRLProof.LowerBounds.bernoulliKLCore_event_leBanditRLProof.LowerBounds.exp_neg_half_bernoulliKLCore_le_affinityBanditRLProof.LowerBounds.half_binaryAffinity_sq_le_eventErrorBanditRLProof.LowerBounds.binaryBretagnolleHuberCoreBanditRLProof.LowerBounds.bretagnolleHuberScaleBanditRLProof.LowerBounds.bretagnolleHuberScale_nonnegBanditRLProof.LowerBounds.binaryBretagnolleHuberBanditRLProof.LowerBounds.bernoulliRelativeEntropy_event_leBanditRLProof.LowerBounds.bretagnolleHuberScale_antitoneBanditRLProof.LowerBounds.bretagnolleHuber
Required-body independent review, full main gate and public desktop/mobile acceptance passed. Optional Notes/Bibliographic Remarks/Exercises are not claimed complete; full Exercise 14.10 is an additional compiled result.
Nonempty singleton codewords are a local model convention. Uniform fixed-length optimality holds for power-of-two cardinalities; a compiled ternary counterexample refutes the arbitrary-cardinality reading.
Arithmetic coding is exact-real and classical with constant support/escape overhead, not executable finite-precision code. Cross-entropy differences are unrounded; finite KL iff absolute continuity is finite-alphabet-only.
The adaptive same-policy bandit-history divergence decomposition is a Chapter 15 target, not a Chapter 14 theorem.
Chapter 15 unit-Gaussian likelihood-ratio and KL dependency sliceCompiledThis milestone is intentionally arm-local; the separate compiled Theorem 15.2 milestone consumes it together with Lemma 15.1 and Chapter 14 event testing.
Chapter 15 same-policy adaptive-history KL decompositionCompiledThe local inclusive-round index lastRound represents lastRound+1 observations; later source consumers must preserve that convention explicitly.
The compiled Theorem 15.2 milestone consumes this identity, but later Chapter 16–17 terminals remain separate and are not consequences of Lemma 15.1 alone.
Chapter 15 Exercise 15.7 measurable-observation KL leafPartialConstruct a measurable bounded stopped-history law and prove that its KL charges arm information only through the realized stopping time.
Factor an arbitrary F_tau-measurable random element through the stopped history before applying data processing.
Chapter 15 finite-armed Gaussian minimax lower boundCompiledThe Bernoulli refinement in the Chapter 15 notes and Exercises 15.1–15.6 and 15.8 are outside this compiled main-theorem milestone.
Exercise 15.7 has a separate compiled data-processing dependency, but its stopped-history inequality remains open.
Chapter 16 and Chapter 17 lower-bound terminals remain separate consumers and are not promoted by this result.
Chapter 16 exact Gaussian d_inf and one-arm information dependency sliceCompiledThis historical dependency record predates the now-compiled finite-mean producer, Lemma 16.3, and Theorem 16.4.
Theorem 16.2 still needs its per-arm information-to-liminf extraction, including the zero, finite, and infinite d_inf branches.
Chapter 16 majority-event expected-pseudo-regret producersCompiledThis historical producer record stops below the now-compiled finite-mean environment consumer.
Theorem 16.2 now compiles with every extended-real d_inf branch and finite-count Fatou.
Chapter 16 instance-dependent asymptotic and finite-time source terminalsCompiled—
Chapter 17 stochastic tail terminals and adversarial pathwise coreCompiled—
Chapter 17 stochastic and corrected adversarial high-probability terminalsCompiled—
Theorem 13.1 Gaussian finite-arm minimax lower boundCompiledExact Eq. (13.1) is separately compiled in GaussianHypothesisTesting; the broader-class fixed-horizon MOSS near-minimax consequence compiles in SubgaussianMinimax, with publication gates pending.
Notes 13.2 and Exercises 13.1–13.2 are optional and are not implied by the theorem.

Open boundaries

  • The deterministic identities are reusable; each probabilistic algorithm still needs its own measurable generated law and integrability contracts.
  • A local model-facing endpoint need not match every textbook or upstream theorem signature.

All Lean modules in this chapter

Open the complete module list (223 modules)
ModuleDeclarationsProject importsStatus
BanditRLProof0700Compiled
BanditRLProof.Algorithms.ArmStreamPolicy91Compiled
BanditRLProof.Algorithms.CUCBActualReward81Compiled
BanditRLProof.Algorithms.CUCBCharge202Compiled
BanditRLProof.Algorithms.CUCBChargedConcentration152Compiled
BanditRLProof.Algorithms.CUCBChargedConditional71Compiled
BanditRLProof.Algorithms.CUCBChargedMGF62Compiled
BanditRLProof.Algorithms.CUCBConcentration121Compiled
BanditRLProof.Algorithms.CUCBConditionalMGF102Compiled
BanditRLProof.Algorithms.CUCBConfidence42Compiled
BanditRLProof.Algorithms.CUCBDeterministicTrigger61Compiled
BanditRLProof.Algorithms.CUCBFeedbackModel192Compiled
BanditRLProof.Algorithms.CUCBFiniteConcavity21Compiled
BanditRLProof.Algorithms.CUCBFiniteDeterministicExample121Compiled
BanditRLProof.Algorithms.CUCBFiniteExample212Compiled
BanditRLProof.Algorithms.CUCBFiniteSourceExample232Compiled
BanditRLProof.Algorithms.CUCBGapCutoff62Compiled
BanditRLProof.Algorithms.CUCBGapInverse111Compiled
BanditRLProof.Algorithms.CUCBHistory280Compiled
BanditRLProof.Algorithms.CUCBImpossibleCase21Compiled
BanditRLProof.Algorithms.CUCBNiceEvent111Compiled
BanditRLProof.Algorithms.CUCBObservationMGF161Compiled
BanditRLProof.Algorithms.CUCBOracleMeasurable61Compiled
BanditRLProof.Algorithms.CUCBOracleSuccess91Compiled
BanditRLProof.Algorithms.CUCBPolynomialIntegral52Compiled
BanditRLProof.Algorithms.CUCBPolynomialRegret52Compiled
BanditRLProof.Algorithms.CUCBPolynomialThreshold61Compiled
BanditRLProof.Algorithms.CUCBRefinedRegret42Compiled
BanditRLProof.Algorithms.CUCBRegretDecomposition122Compiled
BanditRLProof.Algorithms.CUCBRegretTail41Compiled
BanditRLProof.Algorithms.CUCBRewardKernel91Compiled
BanditRLProof.Algorithms.CUCBRoundMGF81Compiled
BanditRLProof.Algorithms.CUCBSourceModel151Compiled
BanditRLProof.Algorithms.CUCBSufficientSampling52Compiled
BanditRLProof.Algorithms.CUCBThreshold100Compiled
BanditRLProof.Algorithms.CUCBThresholdTail141Compiled
BanditRLProof.Algorithms.CUCBTrajectory171Compiled
BanditRLProof.Algorithms.CUCBTriggerMGF81Compiled
BanditRLProof.Algorithms.CUCBUnderCount142Compiled
BanditRLProof.Algorithms.CUCBUnderCountIntegral72Compiled
BanditRLProof.Algorithms.CausalAllocation171Compiled
BanditRLProof.Algorithms.CausalAllocationRegret21Compiled
BanditRLProof.Algorithms.CausalConfidence72Compiled
BanditRLProof.Algorithms.CausalExpectedRegret41Compiled
BanditRLProof.Algorithms.CausalHeterogeneous301Compiled
BanditRLProof.Algorithms.CausalHeterogeneousLaw41Compiled
BanditRLProof.Algorithms.CausalHeterogeneousRegret131Compiled
BanditRLProof.Algorithms.CausalHeterogeneousSampling123Compiled
BanditRLProof.Algorithms.CausalImportance271Compiled
BanditRLProof.Algorithms.CausalImportanceTransport71Compiled
BanditRLProof.Algorithms.CausalMarginalLaw171Compiled
BanditRLProof.Algorithms.CausalOptimalAllocation211Compiled
BanditRLProof.Algorithms.CausalOrderedLaw140Compiled
BanditRLProof.Algorithms.CausalParallelDesign251Compiled
BanditRLProof.Algorithms.CausalParallelLaw121Compiled
BanditRLProof.Algorithms.CausalParallelRegret113Compiled
BanditRLProof.Algorithms.CausalRecommendation122Compiled
BanditRLProof.Algorithms.CausalSampleMGF32Compiled
BanditRLProof.Algorithms.CausalSampling101Compiled
BanditRLProof.Algorithms.CausalTuning150Compiled
BanditRLProof.Algorithms.HOOActualRegret61Compiled
BanditRLProof.Algorithms.HOOConcentration141Compiled
BanditRLProof.Algorithms.HOOConditionalMGF162Compiled
BanditRLProof.Algorithms.HOOConfidence42Compiled
BanditRLProof.Algorithms.HOODepthOptimization31Compiled
BanditRLProof.Algorithms.HOOExpectedRegret31Compiled
BanditRLProof.Algorithms.HOOExpectedVisits103Compiled
BanditRLProof.Algorithms.HOOHistory251Compiled
BanditRLProof.Algorithms.HOOIndexConfidence132Compiled
BanditRLProof.Algorithms.HOOMeasurable71Compiled
BanditRLProof.Algorithms.HOOPathComparison32Compiled
BanditRLProof.Algorithms.HOOPrefix61Compiled
BanditRLProof.Algorithms.HOORate11Compiled
BanditRLProof.Algorithms.HOORegretAlgebra51Compiled
BanditRLProof.Algorithms.HOORegretPartition62Compiled
BanditRLProof.Algorithms.HOORewardFamily81Compiled
BanditRLProof.Algorithms.HOOSelectionTail12Compiled
BanditRLProof.Algorithms.HOOTrajectory91Compiled
BanditRLProof.Algorithms.HOOTree230Compiled
BanditRLProof.Algorithms.HeavyTailAdaptive102Compiled
BanditRLProof.Algorithms.HeavyTailExpectedCount42Compiled
BanditRLProof.Algorithms.HeavyTailHistory102Compiled
BanditRLProof.Algorithms.HeavyTailRegret33Compiled
BanditRLProof.Algorithms.HeavyTailRegretCap161Compiled
BanditRLProof.Algorithms.HeavyTailSourceAdaptive41Compiled
BanditRLProof.Algorithms.HeavyTailSourceCounterexample342Compiled
BanditRLProof.Algorithms.HeavyTailSourceExpectedCount42Compiled
BanditRLProof.Algorithms.HeavyTailSourcePolicy212Compiled
BanditRLProof.Algorithms.HeavyTailSourceRegret22Compiled
BanditRLProof.Algorithms.HeavyTailUCB121Compiled
BanditRLProof.Algorithms.KLUCBBernoulli410Compiled
BanditRLProof.Algorithms.KLUCBGeneratedRegret472Compiled
BanditRLProof.Algorithms.MOSS121Compiled
BanditRLProof.Algorithms.MOSSCanonicalHistory121Compiled
BanditRLProof.Algorithms.MOSSCanonicalReward52Compiled
BanditRLProof.Algorithms.MOSSConditionalReward21Compiled
BanditRLProof.Algorithms.MOSSConstants31Compiled
BanditRLProof.Algorithms.MOSSExpectedOccupancy73Compiled
BanditRLProof.Algorithms.MOSSExpectedRegret11Compiled
BanditRLProof.Algorithms.MOSSHistory63Compiled
BanditRLProof.Algorithms.MOSSHistoryLaw42Compiled
BanditRLProof.Algorithms.MOSSHistoryRegret42Compiled
BanditRLProof.Algorithms.MOSSOccupancy102Compiled
BanditRLProof.Algorithms.MOSSOptimism122Compiled
BanditRLProof.Algorithms.MOSSPeeling153Compiled
BanditRLProof.Algorithms.MOSSRegret33Compiled
BanditRLProof.Algorithms.MOSSRewardBranch91Compiled
BanditRLProof.Algorithms.MOSSStream91Compiled
BanditRLProof.Algorithms.MOSSStreamMeasurable53Compiled
BanditRLProof.Algorithms.MOSSUnusedCoordinate112Compiled
BanditRLProof.Algorithms.MusicalChairsCollision342Compiled
BanditRLProof.Algorithms.MusicalChairsCoordination380Compiled
BanditRLProof.Algorithms.MusicalChairsCoordinationRegret191Compiled
BanditRLProof.Algorithms.MusicalChairsCoordinationTime161Compiled
BanditRLProof.Algorithms.MusicalChairsExploration302Compiled
BanditRLProof.Algorithms.MusicalChairsHandoff332Compiled
BanditRLProof.Algorithms.MusicalChairsLearnerRegret323Compiled
BanditRLProof.Algorithms.MusicalChairsMarginal243Compiled
BanditRLProof.Algorithms.MusicalChairsPopulation302Compiled
BanditRLProof.Algorithms.MusicalChairsRanking272Compiled
BanditRLProof.Algorithms.MusicalChairsRealized503Compiled
BanditRLProof.Algorithms.MusicalChairsReward382Compiled
BanditRLProof.Core150Compiled
BanditRLProof.CurvatureNoiseGapGeometry120Compiled
BanditRLProof.ExpectationBochnerSums21Compiled
BanditRLProof.ExpectationFiniteBanditBounds11Compiled
BanditRLProof.ExpectationFiniteBanditModelBounds11Compiled
BanditRLProof.ExpectationFoundation11Compiled
BanditRLProof.ExpectationPseudoRegretOfRealBounds12Compiled
BanditRLProof.ExpectationPseudoRegretRatBounds22Compiled
BanditRLProof.ExpectationPullCount22Compiled
BanditRLProof.ExpectationPullCountBounds11Compiled
BanditRLProof.ExpectationRegretPullCount43Compiled
BanditRLProof.ExpectationSums11Compiled
BanditRLProof.ExpectationWeightedPullCount12Compiled
BanditRLProof.ExpectationWeightedPullCountBounds12Compiled
BanditRLProof.FiniteBanditModelInvariants61Compiled
BanditRLProof.FiniteGapCutoff11Compiled
BanditRLProof.FiniteGapLayerCake50Compiled
BanditRLProof.FiniteRealArgmax101Compiled
BanditRLProof.HOOCantorModel291Compiled
BanditRLProof.HOOCantorRate32Compiled
BanditRLProof.HOODimension101Compiled
BanditRLProof.HOOGeometry41Compiled
BanditRLProof.HOOLevels61Compiled
BanditRLProof.HOOModel132Compiled
BanditRLProof.HOOOptimalBranch81Compiled
BanditRLProof.HOOPacking111Compiled
BanditRLProof.HOOPartition181Compiled
BanditRLProof.HOOTailSum41Compiled
BanditRLProof.HeavyTailArmLaw32Compiled
BanditRLProof.HeavyTailClippedConfidence33Compiled
BanditRLProof.HeavyTailClippedMoments92Compiled
BanditRLProof.HeavyTailClippedScheduled22Compiled
BanditRLProof.HeavyTailClippedTransfer42Compiled
BanditRLProof.HeavyTailClipping91Compiled
BanditRLProof.HeavyTailConfidence71Compiled
BanditRLProof.HeavyTailFixedTilt52Compiled
BanditRLProof.HeavyTailGapThreshold41Compiled
BanditRLProof.HeavyTailPowerSum20Compiled
BanditRLProof.HeavyTailScheduledConfidence22Compiled
BanditRLProof.HeavyTailSourceConfidence133Compiled
BanditRLProof.HeavyTailSourceGap91Compiled
BanditRLProof.HeavyTailSourceSchedule91Compiled
BanditRLProof.HeavyTailTailSum41Compiled
BanditRLProof.HeavyTailTruncation91Compiled
BanditRLProof.HeavyTailTuning142Compiled
BanditRLProof.HeavyTailUnshiftedMGF31Compiled
BanditRLProof.LeafLemmas381Compiled
BanditRLProof.LowerBounds.AffinityKL81Compiled
BanditRLProof.LowerBounds.ArithmeticBlockCoding101Compiled
BanditRLProof.LowerBounds.ArithmeticIntervals111Compiled
BanditRLProof.LowerBounds.ArithmeticPrefixCode51Compiled
BanditRLProof.LowerBounds.ArithmeticZeroExtension52Compiled
BanditRLProof.LowerBounds.BanditHistoryDataProcessing22Compiled
BanditRLProof.LowerBounds.BanditHistoryKL322Compiled
BanditRLProof.LowerBounds.BasicIdeas150Compiled
BanditRLProof.LowerBounds.BlockEntropy131Compiled
BanditRLProof.LowerBounds.CodingEntropyBound21Compiled
BanditRLProof.LowerBounds.CommonDensityKL51Compiled
BanditRLProof.LowerBounds.CommonDensityOverlap131Compiled
BanditRLProof.LowerBounds.CommonDomination31Compiled
BanditRLProof.LowerBounds.ConditionalKernelKL100Compiled
BanditRLProof.LowerBounds.CrossEntropy41Compiled
BanditRLProof.LowerBounds.DyadicAddresses111Compiled
BanditRLProof.LowerBounds.FiniteDiscreteKL81Compiled
BanditRLProof.LowerBounds.FinitePartitionKL111Compiled
BanditRLProof.LowerBounds.FinitePartitionKLRecovery42Compiled
BanditRLProof.LowerBounds.FixedLengthCoding31Compiled
BanditRLProof.LowerBounds.GaussianHypothesisTesting222Compiled
BanditRLProof.LowerBounds.GaussianMillsRatio260Compiled
BanditRLProof.LowerBounds.GaussianMinimax513Compiled
BanditRLProof.LowerBounds.GaussianTesting81Compiled
BanditRLProof.LowerBounds.HighProbability1641Compiled
BanditRLProof.LowerBounds.HuffmanAlphabet81Compiled
BanditRLProof.LowerBounds.HuffmanConstruction61Compiled
BanditRLProof.LowerBounds.HuffmanStep21Compiled
BanditRLProof.LowerBounds.InformationTheory321Compiled
BanditRLProof.LowerBounds.InstanceDependent903Compiled
BanditRLProof.LowerBounds.Minimax111Compiled
BanditRLProof.LowerBounds.PrefixCodeConstruction171Compiled
BanditRLProof.LowerBounds.PrefixCodeExchange91Compiled
BanditRLProof.LowerBounds.PrefixCodeGreedy21Compiled
BanditRLProof.LowerBounds.PrefixCodePruning111Compiled
BanditRLProof.LowerBounds.PrefixCodeSiblings121Compiled
BanditRLProof.LowerBounds.RelativeEntropyFiltration61Compiled
BanditRLProof.LowerBounds.RelativeEntropyNonMetric21Compiled
BanditRLProof.LowerBounds.ShannonLengths81Compiled
BanditRLProof.LowerBounds.SubgaussianMinimax102Compiled
BanditRLProof.LowerBounds.UniformCoding62Compiled
BanditRLProof.MathlibWrappers31Compiled
BanditRLProof.PowerCutoffNormalization11Compiled
BanditRLProof.PowerTailIntegral30Compiled
BanditRLProof.PullCountDecomposition21Compiled
BanditRLProof.PullCountReindex21Compiled
BanditRLProof.RatMeasurability10Compiled
BanditRLProof.RealKernelRegretPullCount81Compiled
BanditRLProof.RealMeanRegretPullCount63Compiled
BanditRLProof.Regret51Compiled
BanditRLProof.RegretCountBounds32Compiled
BanditRLProof.RegretDecomposition11Compiled
BanditRLProof.ScalarENNReal10Compiled
BanditRLProof.ScalarPseudoRegret22Compiled