frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

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

https://github.com/schildep/verified-3d-mesh-intersection
31•permute•51m ago
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.

Comments

permute•37m ago
Note that the claims are about the kernel not the web demo: While the kernel is formally verified, the UI and glue code (that call the kernel) are not. I once hit a bug that looked like there were holes in the resulting mesh: I found that it was an overflow in the glue code (now fixed) that converts the exact rationals coordinates of the output mesh, for which we prove the specification, to floats before sending them to the GPU. All geometry is happening inside the kernel, for which we know the specification holds.
iFire•26m ago
How does it compare against https://github.com/elalish/manifold in performance and zero corruption?

I spent a lot of time making elalish/manifold work in Godot Engine and it is now a method in Blender too.

https://manifoldcad.org

If it helps, feel free to use the apache2 licensed unit tests that were generated in manifold development https://github.com/elalish/manifold/tree/master/test

iFire•19m ago
> Why we cannot have manifold output meshes in general

As far as I know manifold is not verified software, but it does promise that manifold inputs become manifold outputs.

I wonder how manifold will break in that condition or would it snap to the nearest manifold.

https://github.com/schildep/verified-3d-mesh-intersection#wh...

iFire•14m ago
On a readme style note, please spend more time explaining the algorithm and less time bragging on how amazing vibe coding is or how Lean has a zero trust proof.

I presume the new advance is claim that verified-3d-mesh-intersection is verified and not the claim that vibe coding can replace hand proofs or that the claim that lean4 can be correct without trusting llms.

permute•15m ago
The runtime performance is most probably worse than yours. The goal of this project is a minimal specification that a reviewer can trust. See section in readme on performance and how it could be improved while still keeping formal guarantees, but would mean a reviewer having to trust axioms on floating point numbers: https://github.com/schildep/verified-3d-mesh-intersection#pe...
bob1029•15m ago
This is really neat. I think CSG is one of the more intuitive ways to build 3d environments (especially 'indoor' ones). No geometry is ever destroyed in a proper CSG workflow. A hierarchy of brushes makes it possible to very rapidly iterate parameters like how long a hallway is or the time it takes to get from one objective to another. Often, you only have to apply a transform to a single brush to affect something that would take a non-CSG workflow an entire afternoon to recover from.

The current story with CSG around commercial game engines is pretty awful. Unity has some 3rd party options that can work well but they're also glitchy and don't integrate well with the other parts of the ecosystem. For a while I thinking about building my own CSG implementation but the exact things this project solved were what was stopping me. The EditorWindow integration stuff is not as scary to me (although it is painful). The advanced geometry and set operations is what kept me from trying. It appears that dragon has been (at least partially) slain.

iFire•13m ago
That's why I integrated manifold into godot engine for constructive solid geometry!

https://github.com/godotengine/godot-proposals/issues/9711

agentultra•14m ago
> 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.

I am curious about the approach as I find claims like this hard to believe. There is a theory behind proof kernels that they must be small because they have to be trusted and verifiable by a human. Otherwise the whole system breaks.

How does one trust an LLM generated kernel is proving the right things?

permute•7m ago
Maybe what you mean is that kernels of proof assistants must be small. Here I am referring to a geometry processing kernel (that is formally verified by a proof assistant). The implementation of the algorithm can be very long, the proof that it conforms to the spec can be very long. But lean checks the proof. And so you only have to trust the spec and that the lean proof assistant is correct.

In the 93 lines I assumed a reviewer already trusts that the kernel of the Lean proof assistants is correct. We have to trust somethings.

CyLith•8m ago
The issue I have with all these formally verified numerical algorithms is that, at the end of the day, I need this implemented using actual floating point. It's great that it's verified, but not for the case that is practically meaningful. Unless it's implemented using hardware accelerated floating point, most of these algorithms are not sufficiently performant to be practically useful.
bartvk•4m ago
Congrats with this achievement. Do you see it possible that this project can be integrated into, for example, FreeCAD?

Mazebench

https://mazebench.com/blog?post=introducing-mazebench
1•fidotron•28s ago•0 comments

Show HN: Hiring Method – a deterministic, math-driven recruitment platform

https://hiring-method.com/
1•genekrapivin•28s ago•0 comments

Firefox 153 QWAC Certificate Verification: A New Line in Your Padlock Icon

https://qainsights.com/firefox-153-qwac-certificate-verification-a-new-line-in-your-padlock-icon/
1•qainsights•1m ago•0 comments

Memo-1: A 6502 computer built from scratch, using a Minitel as its terminal

https://github.com/MemoireMorte/Memo-1
1•sciences44•2m ago•0 comments

Show HN: S2Q – Stripe payouts posted into QuickBooks itemized, no subscription

https://s2q.now/
1•artproof•3m ago•0 comments

Goodbye File Browser, for Real This Time

https://hacdias.com/2026/07/28/filebrowser/
1•speckx•5m ago•0 comments

Show HN: WebCMD, a reusable CLI command layer for browser agents

https://github.com/agentrhq/webcmd
1•askadityapandey•6m ago•0 comments

Building Galley House

https://eviltrout.com/blog/2026-07-28-building-galley-house/
1•EvilTrout•8m ago•0 comments

Italian paradise island with no roads, no phone signal and almost no tourists

https://www.cnn.com/travel/palmarola-italy-island-no-tourists
1•mooreds•9m ago•0 comments

Where Crochet Meets Code: Fiber Arts and the History of Computing

https://redmonk.com/videos/abbey-perini/
1•mooreds•10m ago•0 comments

OpenAI Shares Some Alignment Problems

https://thezvi.substack.com/p/openai-shares-some-alignment-problems
1•gmays•10m ago•0 comments

Show HN: PolyBridge – a causal model for forecasting global events

https://polybridge.ai
1•pbforesight•13m ago•0 comments

Why haven't organoids solved all of drug discovery?

https://www.owlposting.com/p/why-havent-organoids-solved-all-of
2•crescit_eundo•13m ago•0 comments

Automated Certificate Generation with Zapier and Google Sheets

https://docs.composeit.app/docs/automation-ideas/zapier-certificates
1•ju99ernaut•14m ago•0 comments

Show HN: Asobi – run a multiplayer game back end locally, no account needed

https://github.com/widgrensit/asobi
1•taure•14m ago•0 comments

Claude Disagrees with Human Philosophers

https://marcusplutowski.com/blog/philsurvey-1-why-claude-disagrees-with-human-philosophers/
1•achierius•14m ago•0 comments

Fed Names VC Marc Andreessen, Ex-Walmart CEO Doug McMillon to Warsh's Task Force

https://www.wsj.com/economy/central-banking/fed-names-leaders-of-warshs-task-forces-b756375d
2•aswegs8•16m ago•1 comments

Most of Your Backfills Didn't Have to Happen

https://luminousmen.substack.com/p/most-of-your-backfills-didnt-have
1•Tomte•17m ago•0 comments

Apple Just Became a $5T Company

https://www.macrumors.com/2026/07/28/apple-just-became-a-5-trillion-company/
3•tosh•17m ago•0 comments

Show HN: Simple Free Quadcopter Calculator

https://www.mjqs.pl/quadcopter-calculator/
1•mjqs•17m ago•0 comments

Podcasts Ruined America

https://www.compactmag.com/article/how-podcasts-ruined-america/
1•speckx•18m ago•0 comments

The Only Software Metric That Matters Is Love (Furialog)

https://furia.com/page.cgi?type=log&id=524
1•surprisetalk•18m ago•0 comments

Math card game (inspired by Scott Wu)

https://www.justwrapapi.com/make-the-number
1•bobcoi03•19m ago•0 comments

AI Engineers' Favourite AI Engineer

https://www.mutagent.io/blog/were-your-ai-engineers-favorite-ai-engineer/
2•benebagus•19m ago•0 comments

Show HN: Base-GPUI: A GPUI port of Base UI headless components

https://github.com/LukeTandjung/base-gpui
1•autodidacc•19m ago•0 comments

File Pilot: Next-gen file explorer

https://filepilot.tech/
1•taubek•20m ago•0 comments

Ask HN: How do you use Copilot in the CLI, App, and IDE?

2•EspressoGPT•20m ago•0 comments

Toward a test of medical AI superintelligence

https://www.nature.com/articles/s41591-026-04539-8?linkId=62962697#Sec3
1•brandonb•20m ago•0 comments

French Polynesia

https://en.wikipedia.org/wiki/French_Polynesia
1•tosh•23m ago•0 comments

VMs can't boot with Network Mode set to Bridged on Apple M5 Pro machines

https://github.com/utmapp/UTM/issues/7658
1•IndySun•24m ago•0 comments