{"slug": "show-hn-formally-verified-polygon-intersection-opus-4-8-oneshots-prev-failed", "title": "Show HN: Formally verified polygon intersection – Opus 4.8 oneshots, prev failed", "summary": "A developer has released what they claim is the first formally verified implementation of a polygon intersection algorithm, using the Lean proof checker to guarantee correctness. The project, which supports complex multipolygons with holes and self-intersections, was built with AI assistance where the Opus 4.8 model generated the algorithm and formal proof in a single attempt. The verification relies entirely on the Lean checker and human specification review, not on the AI model's output.", "body_md": "To my knowledge, this is the first formally verified implementation of an intersection algorithm for polygons.\n\nThe experience of working with AI agents on this project changed a lot with recent model releases, as I describe in the readme. Opus 4.8 is able to provide algorithm implementation with formal proof in one shot, whereas previous models required me to provide proof strategies in multiple steps.\n\nTrust in the correctness comes entirely from the Lean checker and human review of a small specification, not from the LLM.\n\nAlso check out the web demo built around the verified core linked in the readme.\n\nIt supports multipolygons including holes, self intersections, and overlapping edges.\n\nComments URL: [https://news.ycombinator.com/item?id=48331400](https://news.ycombinator.com/item?id=48331400)\n\nPoints: 1\n\n# Comments: 0", "url": "https://wpnews.pro/news/show-hn-formally-verified-polygon-intersection-opus-4-8-oneshots-prev-failed", "canonical_source": "https://github.com/schildep/verified-polygon-intersection", "published_at": "2026-05-30 01:21:18+00:00", "updated_at": "2026-05-30 01:46:44.388680+00:00", "lang": "en", "topics": ["ai-agents", "large-language-models"], "entities": ["Lean", "Opus 4.8", "Hacker News"], "alternates": {"html": "https://wpnews.pro/news/show-hn-formally-verified-polygon-intersection-opus-4-8-oneshots-prev-failed", "markdown": "https://wpnews.pro/news/show-hn-formally-verified-polygon-intersection-opus-4-8-oneshots-prev-failed.md", "text": "https://wpnews.pro/news/show-hn-formally-verified-polygon-intersection-opus-4-8-oneshots-prev-failed.txt", "jsonld": "https://wpnews.pro/news/show-hn-formally-verified-polygon-intersection-opus-4-8-oneshots-prev-failed.jsonld"}}