← All papers
First page of An Exact Rounds-versus-Queries Trade-off for Pointer Chasing, Machine-Checked in Lean 4

An Exact Rounds-versus-Queries Trade-off for Pointer Chasing, Machine-Checked in Lean 4

Rafig Huseynzade

cs.CC Aug 29, 2025 · v5 cs.FL cs.LO
The query model, pointer chasing problem, and exact rounds-versus-queries trade-off theorem are formalised in Lean 4 core without Mathlib, sorry-free.
A deterministic query algorithm with $d$ rounds submits $d$ batches of queries, each chosen from the answers to earlier batches. Canonne and Gur asked for general bounds on the cost of removing rounds. For $k$-step pointer chasing over $k$ tables of $m \geq 2$ entries we determine this cost exactly: for $1 \leq d \leq k$, the least worst-case number of queries with at most $d$ rounds is exactly $(k-d)m+d$, so every round removed costs exactly $m-1$ queries, which is what the naive merging of two consecutive rounds pays. The lower bound uses an adversary that answers every query with the queried index, except at the first unread cell of the chain. The model, the problem and the theorem are formalised in Lean 4 without Mathlib, with no sorry and only the axioms propext and Quot.sound; an exhaustive search confirms the formula for small parameters.

Canonne and Gur asked for general bounds on the cost of removing rounds of adaptivity from deterministic query algorithms. The paper studies this cost exactly for k-step pointer chasing over k tables of m entries.

Query strategies are modelled as trees that submit batches of cells per round, with depth and cost defined as predicates on the tree. The upper bound follows the chain one cell per round and reads the last k-d tables in full. The lower bound uses an adversary that answers each query with the queried index, except at the first unread chain cell. The model, the problem and both bounds are formalised in Lean 4.22.0 using only the core library, and an exhaustive search checks small parameters.

With 1 ≤ d ≤ k rounds the least worst-case number of queries is exactly (k−d)m+d, so each removed round costs exactly m−1 queries, the same as naively merging two rounds. The Lean proofs contain no sorry and depend only on the axioms propext and Quot.sound; a few parts, such as the distinct-cell form of the lower bound and the asymptotic corollary, are checked on paper only.

rounds dcost_d(L_k)
d = 0∞
1 ≤ d ≤ k(k−d)m + d
d ≥ kk
Exact cost of deciding L_k with at most d rounds