Lemma 11 — given a constant-probability prefix of fair coins, the total of 2k coins exceeds and falls short of k by ⌈√k/2⌉ with constant probability
ProvedDynamicOnlineLP.LowerBound.lemma11Let and , and let be independent random variables, each equal to or with probability . Put (so ) and . Then there is an absolute constant with , independent of and , such that with probability at least the first variables take values for which both conditional probabilities are at least :
In particular on that event. This is an anti-concentration statement for a binomial sum conditioned on a partially revealed prefix; in the proof of Theorem 2 it says that when an online algorithm must decide on a profit-2 input of pair , the profit values of that pair seen so far leave both "too many" and "too few" profit-3 inputs possible with constant probability.
Formalization Note All probabilities are finite uniform averages: the prefix ranges over and the remaining variables over , with ; the conditional probability given is the fraction of in the event. The deviation is as in the displayed formula; since is an integer, "" (the sentence's form) is equivalent. The page states the lemma for ; the two-sided form asserted in its sentence ("can be greater or less than its expected value by with equal constant probability") fails at (given the sum cannot be ; given it cannot be ), so it is stated for . "Equal constant probability" is formalized as "each at least ".
import Mathlib
namespace DynamicOnlineLP.LowerBound
/-- Agrawal–Wang–Ye 2014, Lemma 11 (p. 889), two-sided form, for `k ≥ 2`. Let `Y_1, …, Y_{2k}` be
independent fair `0/1` coins and `r ≤ k`; write `y ∈ {0,1}^r` for the values of `Y_1, …, Y_r` and
`u ∈ {0,1}^{2k-r}` for those of `Y_{r+1}, …, Y_{2k}`, so that `∑_j Y_j = #y + #u` (numbers of ones),
and let `d = ⌈√k / 2⌉`. There is an absolute constant `0 < c < 1` such that, with probability at
least `c` over `y`, both conditional probabilities given `Y_1, …, Y_r = y`,
`P(∑_j Y_j ≥ k + d | y)` and `P(∑_j Y_j ≤ k - d | y)`, are at least `c`. All probabilities are
uniform averages over `{0,1}^r` and `{0,1}^{2k-r}`. (The page states it for `k ≥ 1`; at `k = 1`,
`r = 1` no prefix admits both deviations, so the two-sided form needs `k ≥ 2`.) -/
theorem lemma11 :
∃ c : ℝ, 0 < c ∧ c < 1 ∧ ∀ k r : ℕ, 2 ≤ k → r ≤ k →
c ≤ ((Finset.univ.filter (fun y : Fin r → Bool =>
c ≤ ((Finset.univ.filter (fun u : Fin (2 * k - r) → Bool =>
k + ⌈Real.sqrt (k : ℝ) / 2⌉₊ ≤
(Finset.univ.filter (fun j => y j = true)).card +
(Finset.univ.filter (fun j => u j = true)).card)).card : ℝ) /
2 ^ (2 * k - r) ∧
c ≤ ((Finset.univ.filter (fun u : Fin (2 * k - r) → Bool =>
(Finset.univ.filter (fun j => y j = true)).card +
(Finset.univ.filter (fun j => u j = true)).card +
⌈Real.sqrt (k : ℝ) / 2⌉₊ ≤ k)).card : ℝ) /
2 ^ (2 * k - r))).card : ℝ) / 2 ^ r := by sorry
end DynamicOnlineLP.LowerBound
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Claim. There exists a single real constant with that works for every pair of natural numbers with and .
Setup for a given and .
- Let . Because makes positive, this is the usual ceiling and .
- For a binary string, denotes its number of ones.
- For , write for a uniformly random string in . Here , so the exponent is an ordinary difference.
When is good. Call good if both of these hold:
Conclusion. The fraction of good strings is at least :
The same serves both as the threshold on the two inner fractions and as the lower bound on the outer fraction, and it must be the same for all admissible and .
Degenerate cases.
- : has one element, the empty string, so the outer fraction is or . The claim then says the empty string is good: among all strings , both the fraction with and the fraction with are at least .
- : ranges over .
- : these values are excluded, so nothing is claimed about them.
- Arithmetic: there is no division by zero, since the denominators are powers of . There is no truncated subtraction either: the second condition is written as , not with .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.