July 28, 2026
Proof, panic, and polygon drama
Show HN: Formally verified 3D CSG: Trust 93 lines spec, not 1000 lines AI code
Math-proof 3D tool drops, and the comments instantly split into awe, doubt, and bunny-speed jokes
TLDR: A developer says they built a 3D shape-cutting engine whose core correctness is mathematically checked, letting people trust a short spec instead of a huge pile of AI-written code. Commenters swung between impressed and skeptical, with the biggest fight being whether formal proof matters if the tool is slower and the surrounding app can still break.
A new Show HN post rolled in with a deliciously nerdy flex: a 3D shape-cutting tool whose core is mathematically proven correct, so in theory you trust a tiny 93-line rulebook instead of staring at more than 1,000 lines of AI-written code. The creator says the machine even generated 60,000 lines of proof, while humans can mostly just read the short spec and let Lean, a proof-checking system, do the judging. It’s the kind of claim that makes one side of the internet whisper, “the future,” and the other side squint like they just smelled a scam.
And oh, the comments did not disappoint. One camp was impressed, with people calling 3D constructive solid geometry—basically building shapes by adding and subtracting chunks—one of the most intuitive ways to make game spaces, especially indoor levels. Another camp immediately went into trust issues mode: “Wait, you’re telling me I should trust the tiny spec and ignore the giant AI code blob?” Even supporters wanted receipts. Then came the practical crowd, asking the most brutal question in software: yeah, but is it fast? The post admits it takes 24 seconds to intersect two famous Stanford bunny models, which practically invited performance side-eye and comparisons to Manifold, a well-known geometry library used in Blender and Godot.
The funniest mini-drama? A commenter reminded everyone that the verified part is only the engine, not the shiny web demo, and confessed a bug once made it look like the mesh had holes—except the villain was boring old glue code. In other words: the math may be pure, but the surrounding software is still very much mortal.
Key Points
- •The article describes a Lean 4 implementation of 3D mesh intersection that it says is formally verified against a 93-line specification.
- •The project aims to reduce trust in AI-generated code by letting humans review the formal specification and rely on the Lean checker rather than inspecting over 1,000 lines of implementation and over 60,000 lines of proofs.
- •A browser-based demo runs the compiled Lean code locally and supports intersecting example meshes or imported STL files.
- •The article states that the verified kernel is slower than state-of-the-art implementations, taking 24 seconds on two 70k-triangle Stanford bunny meshes.
- •The formalization defines correctness in terms of solids represented by meshes: the output solid must equal the intersection of the two input solids, while preserving well-formedness or reporting invalid inputs.