Formal Verification in Practice: Lessons from an AI-Assisted Proof of a 19th-Century Conjecture
This article uses a recent AI-assisted formal proof of an 1859 conjecture as a case study in large-scale formal verification. It breaks the work into a five-stage pipeline (formal statement, dependency graph partitioning, proof search, machine checking, compression and archiving), then covers engineering practices for managing millions of lines of proof code: branching, CI gating, observability, storage and compute scheduling. It also discusses the division of labor between humans and AI, budget and data controls, personal security after public release, and a practical adoption checklist.
1. The Event as an Engineering Case Study
A mathematician in his thirties, long affiliated with a leading AI research institution, had a complete academic record: a top-GPA degree from a well-known university, a significant undergraduate award, a completed PhD, and fluency in several languages. He was not working alone in spirit—he had previously joined an effort on another classic open problem, though a peer institution published first that time.
This time he used an AI coding assistant as the execution layer while owning the definition and adjudication layers himself. Within a few weeks, roughly 17 million lines of formal proof code were generated and compressed, producing a machine-checkable proof of a famous conjecture first posed in 1859. The story is dramatic: the night the code was uploaded, his institution completed an IPO at what was then a record valuation, leaving him with substantial wealth; once the proof was public, social platforms filled with both praise and accusations of “stealing credit” and “betraying the discipline,” which eventually escalated into lethal threats against him personally.
Setting the emotional narrative aside, the episode offers three lessons for engineering practice: hard problems can be decomposed into parallelizable subgoals; AI is well suited to high-repetition formal labor; and trustworthiness comes from machine checking, not author reputation. Each is expanded below.
2. Background: Why These Problems Are Hard to Even Start
The conjecture’s core claim is that primes, which appear randomly distributed along the number line, are actually governed by a complex but deterministic rule. Since its proposal it has served as a “north star” for number theory, and it was included by a mathematics research institute among seven Millennium Prize Problems, each carrying a million-dollar award.
The real difficulty is not compute volume but the absence of a clear attack path. Most top experts avoid a frontal assault because a wrong direction makes the investment nearly unrecoverable. This closely resembles legacy system refactoring: the code runs, documentation is missing, and nobody can guarantee that starting anywhere won’t bring the whole thing down. The point of formal verification is to turn “I think this is correct” into “a machine can check this step by step.”
3. The Technical Path: A Five-Stage Formal Verification Pipeline
- Formal statement. Translate the natural-language proposition into a target theorem in a formal system, fixing axioms, definitions, and dependencies. This step caps everything that follows and must be done by a human.
- Dependency graph partitioning. Split the target into a lemma tree, annotating topological order and parallel branches. In practice a directed acyclic graph describes the dependencies, and nodes with in-degree zero are dispatched first.
- Proof search and generation. AI coding tools mass-produce candidate proof scripts covering subtasks such as algebraic manipulation, inequality estimation, and analytic continuation.
- Machine checking. The proof assistant kernel verifies each step; any failure triggers a rollback. A schematic task descriptor looks like this:
task_id: lemma_0421goal: bound_of_error_termdepends_on: [lemma_0398, lemma_0405]status: verified | failed | blockedattempts: 37
- Compression and archiving. Merge duplicate lemmas, eliminate redundant intermediate results, compress the final artifact to a distributable size, and retain complete verification logs.
The original account’s “17 million lines,” “six weeks,” and “compression progress” are essentially this pipeline running at extreme scale.
4. Engineering Management of Proof Code at Scale
Formal code at the tens-of-millions-of-lines level is no longer “writing a paper” but “maintaining a large repository.” Practices worth borrowing include:
- Versioning and branching. Give each lemma its own branch; merging requires passing the verification pipeline so a bad proof never pollutes the mainline.
- Continuous integration. Make the proof assistant a CI check: verify on every commit, block on failure.
- Observability. Build dashboards for failure counts, blocked duration, and average attempts per lemma to locate bottlenecks.
- Storage and distribution. Put large artifacts in object storage with versioned buckets and lifecycle policies to control cost; distribute build outputs through an artifact repository.
- Compute scheduling. Proof search is a parallel, bursty workload, well suited to elastic scaling on a container platform with a task queue to smooth peaks.
5. Where the Human-AI Boundary Lies
The controversy centers on one challenge: the model actually completed the proof, and the researcher merely “pulled the trigger.” A more accurate framing is that the model compressed execution time while the human compressed the problem space. Defining the right target, judging which lemma deserves investment, and deciding whether to abandon or restructure a failing branch remain human judgments. The engineering takeaway: AI delivers the most value in high-repetition, verifiable, rollback-friendly stages, and carries high risk in target definition and trade-off decisions.
6. Cost and Risk Controls for Long-Horizon Efforts
- Budget guardrails. Set quota ceilings and tiered alerts for long-running tasks so a single experiment cannot consume the entire allocation.
- Checkpoint resume. Persist intermediate results and restart from the most recent verified checkpoint instead of recomputing from scratch.
- Data security. Unpublished research results are highly sensitive assets; enable key management, least privilege, and access auditing to prevent leaks that would cost priority.
- Compliance and attribution. Define the human-AI contribution boundary and record tool versions and prompting strategies in the write-up to keep results reproducible.
7. Personal Safety and Public Attention: The Overlooked Engineering Topic
High-traffic attention following a public release can quickly turn into targeted attacks on an individual. Teams should prepare in advance: separate work identity from private information, enable two-step verification and login protection on platforms, rate-limit and risk-control high-frequency anomalous access, and where necessary use cloud log services plus monitoring alerts to preserve an evidence chain while coordinating with law enforcement channels. On the organizational side, establish a spokesperson mechanism so individuals do not absorb public pressure directly.
8. Actionable Checklist
- Prove feasibility first: pick a small, machine-checkable proposition and run the full pipeline end to end.
- Build the pipeline: version control, continuous integration, and verification gating come first.
- Define the split: humans own goals and trade-offs; tools own generation and repetitive labor.
- Add guardrails: quota alerts, checkpoint resume, key management, and auditing in place together.
- Prepare for safety: privacy separation, access risk controls, and an evidence-retention plan ready.
Baidu AI Cloud’s general capabilities in container platforms, object storage, log services, and monitoring alerts can support the engineering delivery of such high-concurrency, long-duration, verification-heavy tasks. What ultimately decides success is still the ability to define the problem and the engineering discipline of embedding machine checking into the workflow.
