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

Lean 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-003

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

Prove the exact library identity realMeanRegret mean action n = ∑ a : Fin K, realMeanGap mean a * (pullCount action a n : ℝ).

Only the fixed signature below is graded. The NL assumptions describe the parent problem; the signature is the exact formal contract.

theorem Submission {K : Nat} (mean : Fin K → ℝ) (action : BanditRLProof.ActionTrace (Fin K)) (n : Nat) :
    BanditRLProof.realMeanRegret mean action n =
      ∑ a : Fin K, BanditRLProof.realMeanGap mean a *
        (BanditRLProof.pullCount action a n : ℝ) := by
  -- your proof
Reference proof for the graded Lean target
by
  exact BanditRLProof.realMeanRegret_eq_sum_gap_mul_pullCount mean action n

Scope: the fixed formal signature above. This is a library-application warmup.

Parent natural-language explanation and 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-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

Prove only the deterministic ENNReal sum for geometricConfidenceShare; the event-probability argument is outside this reference.

Only the fixed signature below is graded. The NL assumptions describe the parent problem; the signature is the exact formal contract.

theorem Submission {delta : ℝ} (h : 0 ≤ delta) :
    ∑' n, ENNReal.ofReal (BanditRLProof.Concentration.geometricConfidenceShare delta n) =
      ENNReal.ofReal delta := by
  -- your proof
Reference proof for the graded Lean target
by
  exact BanditRLProof.Concentration.tsum_ofReal_geometricConfidenceShare h

Scope: the fixed formal signature above. This is a library-application warmup.

Parent natural-language explanation and 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.