June 4, 2026

Proof or it didn’t intersect

Show HN: Formally verified polygon intersection – Opus 4.8 oneshots, prev failed

AI claims a math win, but the comments want receipts, demos, and edge-case gossip

TLDR: A developer says they used AI plus a proof-checking system to build a shape-overlap tool that’s mathematically verified, not just tested. Commenters are impressed but immediately started grilling the details, especially the number system used and whether the demo is the real verified thing.

A geometry project on Hacker News just dropped a very nerdy flex with surprisingly juicy comment energy: someone says they’ve built the first formally checked polygon intersection tool, meaning the computer math was verified step by step instead of just being tested and hoped-for-the-best. In plain English, it’s software for figuring out exactly where weird shapes overlap — the kind of thing design tools do all the time — except this version comes with a giant mathematical safety net.

But the real show is the crowd reaction. Instead of instantly bowing to the proof wizardry, commenters went straight into interrogation mode. The first vibe was basically: Cute claim, but what kind of numbers are we talking about here? One user immediately asked whether this runs on whole numbers or floating-point decimals — a classic nerd version of “show us what’s under the hood.” Another wanted to know if the flashy web demo is actually compiled from Lean, the proof system behind the project, which is the comment-section equivalent of checking whether the stunt double did the scene.

There was praise too, and it had a strong “finally, a good use for AI” flavor. One commenter said shape intersections are a nightmare of weird corner cases, making this exactly the sort of tedious, error-prone task where AI shines. That gave the thread a fun split-screen mood: part celebration, part suspicion, part “okay genius, now explain the demo.” Even with only a few comments, the energy is clear — people are impressed, but they still want receipts, edge cases, and maybe a tiny bit of drama before handing over the crown.

Key Points

  • The article presents what it describes as the first formally verified implementation of a polygon intersection algorithm, focused on multipolygon intersection.
  • The project defines multipolygon interiors formally and proves in Lean 4 that the constructed output multipolygon matches the intersection of the input interior sets.
  • The author argues that classical testing cannot exhaustively verify polygon intersection because input configurations and interior point sets are effectively infinite.
  • The repository is designed so reviewers can check correctness by reading three Lean files totaling an 87-line specification and running the Lean checker.
  • The author says recent AI model releases improved the ability to generate algorithm implementations with formal proofs, but correctness is attributed to Lean verification and human review rather than the model.

Hottest takes

"integer coordinates or floating point coordinates?" — CyLith
"compiled from the lean?" — olaird25
"a great use for AI" — prewett
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.