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

BanditRLBench · public development edition

Natural-language QA

Read the assumptions, attempt the task, then unfold the solution. Exact graph locations stay visible.

Public dev · 4 cores · 2 Lean warmups · Gold admission and held-out tests pending

Jump to: BRB-001 · BRB-002 · BRB-003 · BRB-004

BRB-001 · From actions to pull counts

BRB-001 · regret-accounting · dev

From actions to pull counts

Assumptions

  • K is a positive finite number of arms; means are fixed real numbers.
  • An arbitrary action sequence is observed for a finite horizon T.

Your task

Let \(\Delta_i=\max_j\mu_j-\mu_i\) and \(N_i(T)\) count the choices of arm i. Derive the gap-weighted pull-count identity for pseudo-regret. Does the identity require independent rewards or a causal policy?

Solution and assessment rubric

Natural-language reference · independent gold review pending

Identity

R_T=T μ_*−Σ_{t<T} μ_{A_t}=Σ_{t<T}(μ_*−μ_{A_t})=Σ_i Δ_i N_i(T).

Argument

Partition the finite time set by the chosen arm. This is a deterministic identity for any action trace; no reward law, independence or policy causality is used.

Scope

It alone provides no useful bound on \(N_i(T)\), realized reward fluctuations or regret rate.

Assessment criteria for the natural-language task

  1. Expand the finite time sum correctly.
  2. Group each time exactly once by its chosen arm.
  3. Separate deterministic accounting from statistical or causal assumptions and from a rate theorem.

Locate this mathematics

Open exact Lean Graph node → · Read the declaration →

BanditRLProof.realMeanRegret_eq_sum_gap_mul_pullCount

Relation: source-correspondence. The declaration anchors this core; formal companion scope is stated separately.

Actual constants in the checked reference proof

Project constants read from the compiled proof value: BanditRLProof.ActionTrace, BanditRLProof.realMeanRegret_eq_sum_gap_mul_pullCount.

Axioms: Classical.choice, Quot.sound, propext.

Recorded library environment: f7e3ec872aea7c82dc2bcc4a825058b358c0f987. This is direct fixed-target proof evidence, not the transitive dependency closure of the library theorem. Full type/proof constants and environment receipt.

Frozen source and verification boundary

Frozen benchmark source (ee8c0b8)

Source SHA-256: 33641e8b11f57bbc3b8c1ebfef6de5452f0fbfc47cade99c87f5c5fff5c0adc7
Question contract: 4172494802d81beecd073af34f00e4d7241f0795e55161b437e344629f9cb2f0

Current graph source matches frozen bytes: true. Current graph location is navigation, not evidence of a new compiled dependency edge.

NL gold admission: pending. Reference compilation receipt. Replay formal submissions.

BRB-002 · When may expectation cross the sum?

BRB-002 · expected-regret-accounting · dev

When may expectation cross the sum?

Assumptions

  • Fix finite arm means \(\mu_i\in\mathbb R\) and finite horizon T; \(\Delta_i=\mu_*-\mu_i\) and pathwise pseudo-regret is \(R_T=\sum_i\Delta_iN_i(T)\).
  • A measure space, finite arm set and random action trace are fixed.
  • For every arm, its real-valued finite-horizon pull count is integrable.

Your task

Derive the expected pseudo-regret decomposition from its pathwise version. Identify the analytic condition needed, and explain whether the conclusion is a realized-regret concentration bound.

Solution and assessment rubric

Natural-language reference · independent gold review pending

Integrability

Each gap is a constant, so its product with an integrable pull count is integrable.

Taking expectations

The finite sum is integrable, expectation commutes with this sum, and constants factor out: E[R_T]=Σ_i Δ_i E[N_i(T)].

Scope

This is an integral identity under the stated integrability premises, not a tail bound for realized rewards. Reward noise needs separate analysis. The abstract library theorem even permits a general measure; probability semantics require choosing a probability measure.

Assessment criteria for the natural-language task

  1. Establish term and sum integrability.
  2. Apply finite-sum integral linearity and constant multiplication.
  3. Do not infer a tail bound, independent samples or probability-space semantics from a general measure identity.

Locate this mathematics

Open exact Lean Graph node → · Read the declaration →

BanditRLProof.integral_realMeanRegret_eq_sum_gap_mul_integral_pullCount

Relation: source-correspondence. The declaration anchors this core; formal companion scope is stated separately.

Frozen source and verification boundary

Frozen benchmark source (ee8c0b8)

Source SHA-256: 33641e8b11f57bbc3b8c1ebfef6de5452f0fbfc47cade99c87f5c5fff5c0adc7
Question contract: 7d0c2f360d88bba4402c149bd6c71a3fea9e07d2a4d422e2a6d6598a7190320d

Current graph source matches frozen bytes: true. Current graph location is navigation, not evidence of a new compiled dependency edge.

NL gold admission: pending. Reference compilation receipt. Replay formal submissions.

BRB-003 · An infinite confidence budget

BRB-003 · confidence-schedules · dev

An infinite confidence budget

Assumptions

  • \(\delta>0\).
  • Bad events \(B_n,\ n\ge0\), satisfy \(\mathbb P(B_n)\le\frac{\delta}{2^{n+1}}\) under the same probability law.

Your task

Bound the probability that any \(B_n\) occurs. Is event independence needed? Distinguish the deterministic budget calculation from the statistical guarantee that supplies each event bound.

Solution and assessment rubric

Natural-language reference · independent gold review pending

Union bound

Countable subadditivity gives P(∪_n B_n)≤Σ_n P(B_n)≤Σ_n δ/2^(n+1)=δ.

Event dependence

Independence between the events is unnecessary.

Statistical obligation

The geometric-series identity only allocates a budget; it does not prove \(\mathbb P(B_n)\le\frac{\delta}{2^{n+1}}\). For adaptive histories, the algorithm must supply applicable conditional bounds or unconditional event bounds for the actual process, not fixed-design statements silently applied after selection.

Assessment criteria for the natural-language task

  1. Use countable subadditivity under one law.
  2. Sum the schedule from n=0 with correct normalization.
  3. Reject a need for event independence and distinguish the missing statistical supplier.

Locate this mathematics

Open exact Lean Graph node → · Read the declaration →

BanditRLProof.Concentration.tsum_ofReal_geometricConfidenceShare

Relation: source-correspondence. The declaration anchors this core; formal companion scope is stated separately.

Actual constants in the checked reference proof

Project constants read from the compiled proof value: BanditRLProof.Concentration.tsum_ofReal_geometricConfidenceShare.

Axioms: Classical.choice, Quot.sound, propext.

Recorded library environment: f7e3ec872aea7c82dc2bcc4a825058b358c0f987. This is direct fixed-target proof evidence, not the transitive dependency closure of the library theorem. Full type/proof constants and environment receipt.

Frozen source and verification boundary

Frozen benchmark source (ee8c0b8)

Source SHA-256: 4fb65a20d59c2524f5f765766ac6a332b17cd4c2b430ccf283938b483a47c3f2
Question contract: b7aff5365b53330baeefac5bf10d574d21d53b27d851a35f5489a40f80c1f99c

Current graph source matches frozen bytes: true. Current graph location is navigation, not evidence of a new compiled dependency edge.

NL gold admission: pending. Reference compilation receipt. Replay formal submissions.

BRB-004 · A confidence interval is not an unbiased estimate

BRB-004 · estimator-semantics · dev

A confidence interval is not an unbiased estimate

Assumptions

  • μ is a real mean and \(r>0\).
  • An estimate satisfies \(|\widehat\mu-\mu|\le r\) with probability one.

Your task

Does this guarantee imply that estimate is unbiased? Give a counterexample. Does it imply that successive estimation errors are independent?

Solution and assessment rubric

Natural-language reference · independent gold review pending

Bias counterexample

No. The deterministic estimate \(\mu+r/2\) has error \(r/2\le r\) with probability one but expectation \(\mu+r/2\), hence nonzero bias.

Interpretation

This is a logical countermodel, not an implementable estimator when μ is unknown.

Dependence counterexample

To refute independence, reuse the same fair random sign \(S\in\{-1,1\}\) at two times and set both errors to \(rS/2\). Both estimates satisfy the interval and are unbiased, but P(error_1>0,error_2>0)=1/2≠1/4.

Conclusion

Neither unbiasedness nor independence follows from interval coverage.

Assessment criteria for the natural-language task

  1. Exhibit a positive-radius counterexample and compute its bias.
  2. Give a joint law violating independence while preserving both intervals.
  3. Explain that an analysis countermodel need not be an executable unknown-mean procedure.

Locate this mathematics

Open exact Lean Graph node → · Read the declaration →

BanditRLProof.Concentration.geometricConfidenceShare

Relation: context-only. This is context for an original counterexample, not a proof of its answer.

Frozen source and verification boundary

Frozen benchmark source (ee8c0b8)

Source SHA-256: 4fb65a20d59c2524f5f765766ac6a332b17cd4c2b430ccf283938b483a47c3f2
Question contract: 86a99a09ddaf1b5243af6cd64157915c5f31d9851e653b4d0ac59fbc94fcba40

Current graph source matches frozen bytes: true. Current graph location is navigation, not evidence of a new compiled dependency edge.

NL gold admission: pending. Reference compilation receipt. Replay formal submissions.