Hacker News (AI keywords)Jun 4, 2026, 10:06 PMpermute

Show HN: Formally verified polygon intersection, Opus 4.8 one-shot

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

A Lean 4 verified multipolygon intersection project and case study in Claude-assisted formal proofs.

This GitHub project presents a formally verified multipolygon intersection algorithm checked in Lean 4. The author argues trust comes from the Lean checker and a small human-reviewed specification, not from trusting LLM output directly. It also documents how Claude Opus versions improved on Lean proof work, with Opus 4.8 reportedly completing larger proof strategies that earlier attempts could not.

This Show HN points to a GitHub project called verified-polygon-intersection, on the theme of using Lean 4 to formally verify a multi-polygon intersection algorithm. Polygon intersection is a basic function common in vector graphics, CAD, geographic information systems, and graphics editors, but computational geometry often has a large number of boundary conditions—such as overlapping line segments, holes, multiple closed boundary components, and special intersection configurations—that traditional testing struggles to exhaust across all input cases. The author's approach is to write the requirement that "the intersection of the interior sets of two input multi-polygons must equal the interior set of the output multi-polygon" as a formal specification, and to have Lean 4 check the proof, so that correctness does not depend on test cases or on what the LLM says, but on the proof checker.

Full summary

Free shows the 3-line summary; Pro unlocks the full deep summary (~300 words) so you never have to click through.

See Pro plans →

Want the original English / full article?

Read on Hacker News (AI keywords) →

Summaries are AI-generated; the original article is authoritative.