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
- Agentic coding accessibility will reshape understanding of software complexity — pixlpa · 2026-08-24
- Devin Agent bypasses Slack block by finding emails in git logs — sandylikesfrogs · 2026-08-24
- Developer habits shift: Agents become collaborators from simple tools — latticecut · 2026-08-24
- Dev bottleneck shifts from writing to reading code: exe.dev co-founder — thursdai_pod · 2026-08-24
- The biggest AI mistake: trying to reinvent the wheel instead of using tools — Tired40s · 2026-08-24
- DeepPaperNote turns research papers into Obsidian notes — tom_doerr · 2026-08-24