Formally verified 3D CSG uses a 93-line spec and 60,000 lines of AI-written proofs
permute · hn · 2026-07-28
Formal verification for 3D CSG in Lean 4
The author claims this is the first formally verified implementation of a 3D constructive solid geometry operation: mesh intersection. The kernel is implemented in Lean 4 and checked against a compact 93-line specification that defines the resulting mesh surface precisely and enforces practical well-formedness conditions.
A central goal of the project is to reduce trust in AI-written code: a human only needs to review the short specification and run the Lean checker, while more than 60,000 lines of Lean proofs were generated by an agent and never need to be manually inspected. The implementation and proofs are treated as a black box because correctness is enforced at compile time. There is also a browser demo running the verified kernel compiled to WebAssembly.
More from coding & agent
- Gemini shown off modding Minecraft to turn players into any Spider-Man — zacharynado · 2026-10-16
- 10 open-source repos that let your AI agent reverse-engineer apps and games — victor_explore · 2026-10-16
- The new CTO job: agent management and QA loops, 'cable management' instead of coding — HankYeomans · 2026-10-16
- Why company AI agents go stale: adoption needs in-house knowledge, not just better agents — EdenEmarco177 · 2026-10-16
- Open-source MCP lets coding agents search Obsidian's 9,000-plugin directory before reinventing wheels — pitfa19 · 2026-10-16
- Cheng Lou open-sources Handwired: hand-written weights turn code into training-free neural nets — dotey · 2026-10-16