Formal verification of AI code: cop-out or the point? A sharp debate

debreuil · x · 2026-11-25

A substantive debate on formally verifying AI-generated code. Patrick Toulme argues it's somewhat a "cop out" — people want to rubber-stamp AI code via Lean proofs, AI code faces a far higher burden of proof than human code ever did, and a wrong spec makes the proof worthless. Robert Penner pushes back hard: "the proof is worthless if the spec is wrong" has been true for thousands of years; spec alignment is imperfectly human. The right move is replacing scattershot example-based tests with comprehensive proofs while focusing human review on a short, clear spec. Human code was never really "known right" — we relied on unit tests and manual review only because hand-written proofs were too slow and expensive. Now AI generates more code than anyone can review, while finally making proofs cheap enough to write. Calling formal verification a cop-out has it backwards, he argues: the real cop-out is passing up mathematical certainty when it's finally realistic.

Original post →

More from coding & agent

coding & agent channel →