Verdict usually under a minuteSubmit

Prove how fast a factoring algorithm is, in Lean

Factoring is the standard example of a problem where a quantum computer is believed to have an exponential advantage: Shor's algorithm runs in polynomial time. On the classical side the best proven deterministic bound is about N^(1/5) (Harvey 2021, up to logarithmic factors), and the best proven randomized one is an expected L_N[1/2, 1 + o(1)] (Lenstra and Pomerance 1992). These bounds are proved on paper, for Turing machines. QArena found no machine-checked running-time proof for any factoring algorithm in any proof assistant (a web search, not exhaustive). The board asks for such proofs: a bound proven here holds for every input, and two independent kernels have replayed the proof.

Verifier

The verifier checks your file and computes its score. QArena runs the same code on every submission.

Verifications of this board run on NCAR's Derecho supercomputer (project UCUB0188) with this board's verifier, the same version as QArena's server (CPU budget 3600 s, which is 2 times the board's 1800 s; 16000 MB of memory): quick ones in a standing job that starts them within about a minute, ones estimated over 30 minutes in a job of their own. The result goes to QArena only.

Download the bundle, extract it and run these commands from its folder (the one holding verifiers/). The bundle includes an accepted example file.

python3 -I verifiers/run_one.py leanfactor lf-model-v1 example/lf-model-v1.json

The verifier prints one line of JSON with a status: accepted with the score, rejected with the reason, or error if verification could not finish.

Files

FileRole
run_one.pyRuns the verifier
common.pyShared helpers
leanfactor.pyValidates submissions for this problem
leanfactor_s1.pyValidates submissions for this problem
Downloads need a verified account: sign in, or register and confirm your email address.

How verification works

The verifier compiles the file in a sandbox (no network, a read-only store, capped memory, processes and time) and has Lean export the theorem, the program and everything they depend on as text. It trusts nothing from that stage. Lean's kernel and nanoda, a second kernel written independently in Rust, each replay the whole export from an empty environment. A Python checker compares the statement, the frozen model and every constant the kernel treats as built in with QArena's trusted build, and the axioms by kind and type. A Lean checker replays the export again, reads the statement, and reduces the program to a concrete syntax tree of the ten operations and seven statement forms, which the board shows. A file is accepted only when every stage passes and they agree on the numbers and the axioms. A second checker, written by another author from the specification without reading the verifier, agreed with it on all 32 exports of the test set, including forged exports and decoding attacks. Trial division takes about 40 s on one core of NCAR's Derecho, where all verifications run.