AI-Assisted Formal Proofs: Engineering Practices for Tackling Open Mathematical Problems
This article examines the engineering practices behind a large-scale AI-assisted formal proof effort that produced over 17 million lines of machine-checkable code targeting a famous unsolved conjecture in number theory. It explains how open-problem solving becomes a decomposable, measurable, and reproducible engineering activity, covering the division of labor between formal proof assistants and AI coding tools, a layered and sharded architecture for massive proof codebases, version control and verification pipelines, context management in human-AI collaboration, and contingency planning for attribution disputes, public backlash, and personal safety after release. A transferable engineering checklist is included for teams applying these patterns to complex systems.
1. Framing the Event: When “Proof” Becomes Large-Scale Software Engineering
A mathematician in his thirties collaborated with an AI coding tool over a very short period and produced more than 17 million lines of formal proof code targeting one of the most famous unsolved conjectures in number theory. Once the results were public, reactions split sharply: some called it a landmark collaboration paradigm, others questioned contribution attribution, and extreme threats against the individual even appeared.
Setting aside the people and brands involved, the real value of this event for the engineering community is that it turned “solving an open problem” from a purely intellectual activity into a class of engineering work that can be decomposed, measured, and reproduced. Three characteristics stand out:
- Explosive scale: A proof is no longer a few pages of manuscript but tens of millions of lines of formal code that a compiler must verify line by line.
- No known path: There is no deterministic route, so task decomposition must rely on assumption management and staged milestones.
- Human-AI coupling: Humans handle problem modeling and key insights, while the model handles large-scale retrieval, boilerplate generation, and local filling.
Together, these three points make the traditional model of “one repository, a few branches, occasional review” completely inadequate.
2. Capability Foundation: The Boundary Between Formal Proofs and AI Coding Tools
The core of a formal proof is to write a mathematical proposition as a machine-checkable statement, with a proof assistant checking step by step whether each inference is valid. Its value lies in “zero-trust verification”: as long as the underlying axioms and logic system are accepted, a passing compiler means the reasoning is sound.
In this kind of task, the reasonable role of an AI coding tool is an accelerator, not an authority:
- Retrieval and alignment: Locate reusable lemmas in a large existing theorem library to reduce duplicate work.
- Boilerplate generation: Produce structurally similar, low-risk proof fragments in bulk.
- Local problem solving: Try multiple proof strategies for a single goal and provide candidate paths.
- Consistency checks: Detect naming conflicts, unused assumptions, and format drift.
The boundary must be emphasized: the model provides no guarantee of mathematical correctness, and any generated result must go through formal compilation and human review. Treating model output directly as a conclusion is the biggest systemic risk in such projects.
3. Architecture Design: The Engineering Skeleton for Tens of Millions of Lines of Proof Code
At the scale of tens of millions of lines, a “layered + sharded + strongly verified” architecture is recommended:
- Axiom and foundation layer: Defines basic objects, notation, and invariants; changes require the highest level of review.
- Lemma reuse layer: Builds a searchable theorem index by topic domain, with a list of prerequisites.
- Main proof layer: Split by milestones into independently compilable modules, each with a clear target proposition.
- Experiment and discard layer: Stores failed attempts and keeps negative results to avoid repeating the same mistakes.
A schematic module dependency description (pseudocode):
module MainProofdepends_on: [BaseLayer, LemmaIndex, Milestone_03]target: Theorem RiemannHypothesisverify: compile_strict + no_sorry_policyendpolicy no_sorry_policy:reject if contains(placeholder_proof)reject if unused_assumptionrequire provenance for every imported lemma
Here no_sorry_policy means placeholder proofs are not allowed to slip through, which is the most basic quality red line for formal projects.
4. Version Control and Verification Pipelines
An ordinary code repository fails quickly at the tens-of-millions-of-lines scale and needs dedicated strategies:
- Sharded commits: Commit per milestone, keeping each change within a reviewable scope.
- Content-addressed caching: Cache build artifacts by file content hash to avoid full recomputation.
- Incremental compilation: Rerun only the affected dependency closure.
- Mandatory gates: Before merging, strict-mode compilation, placeholder scanning, and dependency provenance must all pass.
- Reproducible builds: Pin toolchain versions so that all artifacts can be rebuilt at any point in time.
A simplified pipeline in pseudocode:
on pull_request:changed = diff_modules(target=main)affected = dependency_closure(changed)build(affected, mode=strict)scan(placeholders, unused_assumptions, license_headers)if all_passed: allow_mergeelse: block_with_report
The point of this pipeline is to turn “correctness” from a matter of personal reputation into an organizational capability that can be executed automatically.
5. Context Management in Human-AI Collaboration
In long-running projects, context is the scarcest resource. Reusable practices include:
- Ticket-based tasks: Each goal to be proved is a ticket with acceptance criteria, prerequisite lemmas, known obstacles, and failure records.
- Dual-channel memory: One channel stores verified facts, the other stores rejected paths; both must be searchable.
- Small commits: Check in each compilable fragment as soon as it is done to lower rollback cost.
- Human gates: Introducing key assumptions and changing definitions must be decided by humans.
- Sleep and rhythm management: In the event, “not sleeping for days” was a warning sign; long-term efforts must enforce rotation and rest, otherwise the error rate rises significantly.
6. Risks After Public Release and How to Respond
Releasing large-scale results brings three practical risks that need plans in advance:
- Attribution disputes: Use commit history, review records, and reproducible builds as objective evidence, and respond with methodology rather than emotional statements.
- Polarized public opinion: Establish a unified messaging line, distinguish “tool contribution” from “human contribution,” and avoid exaggerated claims.
- Personal safety risk: This is the top priority. Contact the platform to report, preserve evidence, call the police if necessary, and temporarily reduce public exposure of schedules and contact details.
At the same time, the team should prepare a “reproducible package”: pinned toolchain, dependency list, build scripts, and verification reports, so that third parties can verify independently. This is far more powerful than any argument.
7. A Transferable Engineering Checklist
- Are placeholder proofs prohibited and strict compilation enforced?
- Does every lemma have a recorded source and dependency list?
- Is work sharded by milestone with each change reviewable?
- Are incremental compilation and content-addressed caching in place?
- Is there a negative-results library that keeps failed paths?
- Are human decision gates and mandatory rest mechanisms defined?
- Are plans ready for public opinion, attribution, and safety?
- Can all build artifacts be reproduced with one command?
8. Conclusion
What this kind of event really leaves behind is not the argument over “who proved what,” but a method for engineering open problems: a layered architecture to control complexity, a strict pipeline to protect correctness, context management to sustain efficiency over long periods, and contingency plans to cover the practical risks after release. For R&D teams, transferring this paradigm to their own complex system design yields far more than watching a trending topic. If you need to host massive build artifacts and collaboration data, a general combination of object storage, container platforms, logging services, and monitoring and alerting can build equally robust reproducible infrastructure.
