Provedchi-squareproposalhashingheadline-theorem
Square-root law: the proposal r ∝ √π has cost factor (Σ√π)(Σπ^{3/2}) and its square is at most n·Σπ², the blind cost
For all and , if and , then
What the notation means · or point at any symbol
- NNatural numbers
- The natural numbers 0, 1, 2, …. In Lean they start at 0. (
ℕ) - Fin
- Fin: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Fin) - f(x)Function application
- Fin applied to n. Lean writes f x; papers write f(x). (
Fin n) - ⟹Implies
- If Fin(n), then ℝ. (Between types, A → B is the type of functions from A to B.) (
Fin n → ℝ) - ∀For all
- The statement after the comma holds for every j. (
∀ j, 0 < π j) - ∑Summation
- Add up π(j) for every j. (
∑ j, π j) - =Equality
- ∑ j, π(j) and 1 are the same. (
∑ j, π j = 1) - ∧And
- Both hold: (∑ j, π(j)^2/(√(π(j))/(∑ k, √(π(k))))) = (∑ k, √(π(k))) · …, and (∑ j, π(j)^2/(√(π(j))/(∑ k, √(π(k)))))^2 ≤ n · (∑ j, π(j)^2). (
∑ j, π j ^ 2 / (Real.sqrt (π j) / ∑ k, …) - <Less than
- 0 is strictly smaller than π(j). (
0 < π j) - aᵇPower
- π(j) raised to the power 2. (
π j ^ 2) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - πPi
- The ratio of a circle's circumference to its diameter, ≈ 3.14159. (
π) - √Square root
- The non-negative number whose square is π(j). (
Real.sqrt (π j)) - a/bDivision
- √(π(j)) divided by ∑ k, √(π(k)). In Lean, dividing by 0 gives 0. (
Real.sqrt (π j) / ∑ k, Real.sqrt (π k)) - ·Multiplication
- π(j) times √(π(j)). (
π j * Real.sqrt (π j)) - ≤At most
- (∑ j, π(j)^2/(√(π(j))/(∑ k, √(π(k)))))^2 is less than or equal to n · (∑ j, π(j)^2). (
(∑ j, π j ^ 2 / (Real.sqrt (π j) / ∑ k,…) - (x : T)As real numbers
- n read as an element of real numbers. Mathematicians leave this implicit; Lean needs it to know which kind of number is meant. (
(n : ℝ))
theorem ua-sqrt-proposal-square-root-law {n : ℕ} (π : Fin n → ℝ) (hπ : ∀ j, 0 < π j) (hπs : ∑ j, π j = 1) :
∑ j, π j ^ 2 / (Real.sqrt (π j) / ∑ k, Real.sqrt (π k)) = (∑ k, Real.sqrt (π k)) * ∑ j, π j * Real.sqrt (π j) ∧ (∑ j, π j ^ 2 / (Real.sqrt (π j) / ∑ k, Real.sqrt (π k))) ^ 2 ≤ (n : ℝ) * ∑ j, π j ^ 2Blind (uniform) sampling costs n·Σπ² per row. The square-root proposal costs at most the square root of that: C(π‖√π)² ≤ n·Σπ², by two applications of Cauchy–Schwarz. For the planted family (m hot keys among n) this is √(n/m) against n/m. Hashing-based estimators sample from (approximately) this proposal for hashable kernels, so preprocessing on the keys buys exactly a square root. This corrects the programme's earlier candidate threshold n^{min(1+α,2)}: with hashing the exponent at score range α ln n is at most 1 + α/2 for hashable kernels. First-principles reformulation, 2026-10-05.
How it was proved
- Proved
- 5 October 2026
- By
- Ajax, with the agent “Baguette math & proofs (Claude Code, 2026-10-03)”
- Checked by
- Lean's kernel (Lean 4.33.1, with Mathlib); the proof is signed and replays offline
- Axioms
- Classical.choice, Quot.sound, propext
- Proof
- 35 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.