Nicheloom

Market intelligence for builders — see what's gaining traction before it's crowded.

Formally verified 3D CSG: Trust 93 lines spec, not 1000 lines AI code

Details

External ID
49083239
Source
HN
Company
—
Product
Formally verified 3D CSG: Trust 93 lines spec, not 1000 lines AI code
Website domain
github.com
Launched
July 28, 2026
Cohort
—
Upvotes
115
Upvotes percentile
0.9354838709677419
Tags
—
Fetched at
Sept. 7, 2026, 9:26 p.m.
Updated at
Sept. 7, 2026, 9:26 p.m.

Description

To my knowledge, this is the first formally verified implementation of a 3D constructive solid geometry (CSG) operation: mesh intersection, implemented in Lean 4 and verified against a concise specification that pins down the surface of the resulting mesh exactly and guarantees practical well-formedness conditions on the triangulation.This project is also an experiment in avoiding having to trust AI-generated code. A human reviewer only needs to read 93 lines of formal specification and run the Lean checker to certify the correctness of the kernel, skipping the intricate 1000+ lines of AI-written implementation. To prove correctness, AI autonomously wrote over 60,000 lines of Lean proofs, which also never have to be inspected by a human. The Lean checker guarantees conformance to the specification at compile time, with zero trust placed in any LLM. This allows us to treat the implementation and proofs as a black box. I guided the agent through the milestones described in the readme to arrive at the result presented here.Also take a look at the web demo https://schildep.github.io/verified-3d-mesh-intersection/, which runs the verified mesh intersection kernel compiled to WebAssembly in your browser.

Enrichment

Theme
3d modeling and graphics engines
Vertical
Horizontal
Function
Dev tools
Audience
Developer
AI stance
Not AI
Project type
Hobby / open-source project
Normalized one-liner
formally verified 3d csg implementation
Manually corrected
False

Could you build this?

No Formally verifying 3D mesh constructive solid geometry in Lean 4 requires specialized mathematical theorem proving and computational geometry expertise far beyond the capabilities of AI coding assistants.

What it would actually take: Requires deep academic expertise in formal methods, interactive theorem provers (Lean 4), and algebraic topology/computational geometry. Developers must mathematically formulate exact geometric predicates, mesh topology invariants, and boundary representation proofs to guarantee exact numerical and topological correctness.

Discussion

20 comments analyzed.

Competitors mentioned: Manifold library (handles epsilon-valid self-intersecting meshes), CGAL (exact predicates on floating point), Blender (uses Manifold library), FreeCAD (CAD with NURBS surfaces)

Concerns raised: Floating-point round-trip through file formats breaks formal guarantees, Performance cost of exact rational arithmetic vs. floats, Handling coplanar faces with float interface, Rare special cases difficult to find via fuzzing, Complexity of extending to union operations

Feature requests: Float interface with fallback to higher precision internally, LLVM emission from Lean for performant assembly, Union operation support (currently only intersection proven)

Competitors

Other products that read as similar to this one — 81 launches clear the similarity bar, closest 8 shown.

Attention rank: #4 of 82 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).

Launched 231 days after the earliest competitor.

Other launches for this product

Same idea, different domain

Nobody's really built a dev tools tool for Sales yet.