Show HN: Formally verified 3D CSG: Trust 93 lines spec, not 1000 lines AI code
- Programming
- Developer Tools
- AI
- Open Source
The project is a formally verified implementation of one 3D constructive solid geometry operation: intersecting triangle meshes. It is written in Lean 4, and the core claim is that a human can review a 93 line formal specification, run the Lean checker, and avoid reading the 1000 plus lines of AI-generated implementation and 60000 plus lines of AI-generated proofs. That does not mean the whole demo is verified. The author explicitly says only the geometry kernel is covered. The browser demo and glue code are outside the proof boundary, and one past bug came from converting exact rational output coordinates to floats for the GPU.
If you are considering AI-generated systems code, this is a concrete pattern worth watching: lock down a small formal spec and treat the generated implementation as disposable. For geometry and other edge-case-heavy domains, verification looks more plausible today as a trust tool than as a route to production performance.
-
github.com
- Discuss on HN