Math says always. Code says until it doesn't.
TL;DR: I read a WIRED story about using math to prove that code does what it should, and it sent me down a rabbit hole about whether anything is certain. Math is solid, but only inside rules people agreed to. Code has an edge that math doesn't, and Pac-Man hit it in 1980. This is my opinion as a builder, not an expert's, so the post ends with questions.
On October 29 I read a WIRED story by Paresh Dave with the best headline I'd seen in a while: "The 'Pain in the Ass' Math That Could Save Vibe Coding From Itself."
An hour later I was asking Claude whether 1 + 1 = 2 is something we can count on.
I know. That's very basic. Stay with me.
Tests find bugs. Proofs rule them out.
The field the story covers is called formal verification. Testing is spot checks: you try a bunch of inputs and see what breaks. It can show that bugs exist. It can't show that none are left.
A formal proof works differently. You write down exactly what the code must always do, for example "this balance never goes negative," and a tool checks every possible case. If the proof passes, the rule holds for every input, including the ones nobody thought to test.
The catch has always been cost. Writing those proofs by hand is slow, expert work, so it mostly lived in places like chips and cryptography. The WIRED story is about AI changing that. Stanford researcher Chuyue Sun and her colleagues built an AI tool that finished a verification project in less than half a day for under $500. WIRED reports the same work took three experts five months.
I'd hold that comparison loosely. Those experts probably had to work out what "correct" even meant for that code, and I don't know how much of their groundwork the AI got to reuse. If it reused a lot, the two jobs aren't the same size.
Sun has since joined &Truth, one of several startups betting on this. Its launch announcement says it builds on Lean, an open-source proof system.
The pitch makes sense to me. AI writes code faster than anyone can read it, so the checking has to be automated too. A proof checker doesn't care how confident the AI sounds. The proof passes or it doesn't.
That's what got me. I can't count on an LLM. I can't fully count on code. Is math the one thing I can count on?
1 + 1 = 2 took hundreds of pages
I asked Claude for the plain-English version, and this is where my brain started breaking.
Between 1910 and 1913, Bertrand Russell and Alfred North Whitehead published Principia Mathematica, an attempt to build all of math from pure logic. No numbers allowed at the start. They had to define what "1" is, what "adding" is, and what "2" is before they could get anywhere. The key step toward 1 + 1 = 2 shows up as proposition ✱54.43, several hundred pages into the first volume.
The point wasn't that 1 + 1 = 2 is hard. The point was how much sits underneath it that we never notice, because we learned it as kids.
The rules are chosen. The answers aren't.
Here's the part I keep turning over. Math starts from a few rules called axioms, like "every number has a next number." People chose those rules. They picked ones so obvious that nobody can find a reason to doubt them, but they still picked them.
Claude's analogy was chess. Somebody made up the rule that bishops move diagonally. Nothing in nature says they have to. But once you agree to the rules, checkmate is checkmate. Nobody argues their way out of it.
So math's certainty is an if-then certainty. If you accept these rules, then 1 + 1 = 2, every time, forever. The "then" part is absolute. The "if" part is a human agreement. It's a very good one, and it has held up for a very long time, but it's an agreement.
Then there's Kurt Gödel. In 1931 he proved that any consistent rulebook strong enough to do basic arithmetic has statements it can neither prove nor disprove using its own rules. Add a new rule to cover one, and a new one shows up. The Stanford Encyclopedia of Philosophy has the careful version. My version: math is solid ground, and no system can reach all of it.
Do people think math was discovered or invented?
My first reaction was: every number does have a next number. Doesn't it?
Turns out that argument goes back at least to Plato. One camp says math is discovered: numbers exist on their own, like a mountain, whether or not anyone notices them. The other says it's invented: a language we built that happens to describe the world well.
Philosophers are split. The 2020 PhilPapers Survey asked philosophers about abstract objects like numbers. About 1,600 of them answered that question:
| Position | Accept or lean toward |
|---|---|
| Platonism (they exist on their own) | 38.4% |
| Nominalism (they don't) | 41.9% |
| Other | 20.8% |
What I keep coming back to is space. The Arecibo message, beamed toward a star cluster in 1974, opens with the numbers 1 to 10 in binary. The Voyager Golden Record cover marks how long one turn of the record takes, 3.6 seconds, in binary arithmetic. The people who sent those messages were betting that any intelligent species would land on the same math. That bet only makes sense if math is out there to be found.
Code has edges that math doesn't
Here's what tied it together for me. Vitalik Buterin, who co-founded Ethereum, wrote a long post this year, A shallow dive into formal verification. In it, he points out that a computer program is itself a mathematical object, so proving what a program does is proving a theorem. That means code should get math's certainty. Except code runs on real machines, and real machines have edges.
In pure math, every number has a next one. In code, it doesn't.
A small computer number, one byte, holds 256 values: 0 through 255. Add 1 to 255 and you don't get 256. It wraps back to 0, like a clock going from 12 to 1. That's called overflow.
Pac-Man came out in 1980, and it counted levels in one byte, starting from 0. So level 256 is stored as 255. Nobody expected a player to get that far. When someone did, the routine that draws the fruit at the bottom of the screen added 1 to that 255, and it wrapped to 0. That routine is supposed to draw at most seven pieces. Handed a 0, it tries to draw 256, and the right half of the maze fills with garbage. Players call it the split screen, or the kill screen. The level can't be finished.
Don Hodges, a programmer, traced the bug line by line and wrote a patch for it decades later. The Cutting Room Floor has the walkthrough with screenshots.
The programmers made a reasonable call with the memory they had. The math said "always." The code said "until 255."
My tests passed on the wrong rule
I've hit a small version of this myself. In Dead Keys, the typing game I built with Kiro for Kiroween, one property test (a test that throws hundreds of generated inputs at a rule instead of a few hand-picked ones) found that the words-per-minute math came back as "not a number" when a round was short enough. None of the example tests used a time that small. A property test is a step closer to a proof than a normal test. It checks more of the possible cases, but still not all of them.
Then I played the game, and found what no test did. Two words on screen could start with the same letter, so typing that letter sometimes locked the game onto the word I wasn't looking at. All tests passed with that bug in place. They checked that the lock rule worked. None of them asked whether it was the right rule.
A proof would have made the same mistake, with more confidence.
A proof answers the question you asked
I think this is where verification earns its keep, and also where it stops.
A proof tool could show that a counter can never pass 255. Classic job for it. But a proof only covers the rules somebody wrote down. If the rule is wrong, or missing, the code is verified and still wrong. Buterin calls formal verification "not a panacea." The biggest risk he names is that the spec itself can be wrong.
The people doing this for real seem to know it. Signal Shot, a project trying to prove Signal's encryption is secure all the way down to its actual Rust code, brings in domain experts to check the key definitions before the heavy proving starts. Even the moonshot starts with a person asking whether the question is right.
There's another wrinkle I didn't expect. The proof checker is software too. Someone wrote it, so it could have bugs. The field's answer is to keep the checker tiny. Lean, for example, describes itself as having a small, trusted kernel, the core that checks every proof, small enough for people to read closely. So the whole tower still rests on a piece of code people agreed to trust. The trust gets shrunk down, not removed.
The spec problem is the part that lines up with how I build. My agents generate, and I decide what "correct" means. My PRDs label features MUST, STUB, or NEVER. Those labels are a spec. Verification looks to me like what happens when a spec becomes something a machine can enforce.
So I don't think the human job goes away. I think it moves. The proof can tell you the bridge holds the weight you named. It can't tell you whether you named the right weight.
So I have questions
I'd love to hear from people who know more about this than I do:
- Have you used a proof tool like Lean, Dafny, or Verus? What was the first thing you proved, and was the hard part the proof or writing the rule?
- Discovered or invented? Where do you land, and did building software change your answer?
- What's your favorite overflow bug? Pac-Man can't be the only one.
- If you could prove one small piece of a vibe-coded app, which piece would you pick? I still think 1 + 1 = 2.
Possibly. Maybe.
Quick context if you are new here. I work in the California courts, running court operations for the county. I started building with AI in July 2025 and I have been learning in public ever since. I do not write the code. I direct, the agents generate, I validate and decide. I build the Clew Suite, a set of civic tech tools for making complex systems easier to inspect. That is the lens I am writing from.
Researched with AI assistance in November 2026. The plain-language explanations started in a chat with Claude (Opus 5.5) on the day I read the WIRED story, and every outside claim links to its source. This field is moving fast, so always check the source.
AI Assisted. Human Approved. Powered by NLP.

Top comments (2)
The line that stayed with me is 'a proof answers the question you asked' — that's the whole spec problem in one sentence, and it maps exactly onto vibe coding. The AI writes the code, I decide what 'correct' means, and if I named the wrong weight the bridge still holds it. On your question 4 — if I could prove one small piece of a vibe-coded app, it'd be the auth boundary. Everything else I can eyeball; that one I want math on. And I'm landing on discovered, by the way — the Arecibo bet is hard to argue with.
I've been on the wrong side of your "tests passed on the wrong rule" paragraph, and it took a while to see it.
A small grader of mine validated the JSON a model returns for scores. Its own test file was green. I mutation-tested it anyway — eleven wrong behaviours with a definite right answer: NaN, Infinity, index 2.7, duplicate index, a "here's the example format" string pulled out of the model's explanation. It caught one of eleven.
Green, while NaN came back as a perfect 1.0 and 2.7 quietly became index 2. Nothing in that suite was wrong. It just answered a narrower question than the one I thought I'd asked.
More assertions didn't fix it. Writing down what's in contract at all did — two of the eleven turned out not to be holes. The same catalogue afterwards: 11/11 caught, no blind spots. Spec work and proving work are the same work; you just do the prose half first.
So my answer to #4: don't prove the feature, prove the tri-state on the reporting path — that "I checked and found nothing" is unreachable when the check never ran. Our gate returns 0 clean / 1 block / 2 unmeasured, and 2 is not green. Tiny state machine, provable, and it pays because that failure looks exactly like success from the outside.
Which is also my #3. My favourite overflow isn't a counter — it's the report. Your fruit-draw routine was already one: 255+1=0 never shows up as an error, it shows up as a clean zero.
I don't write proofs either, and I haven't touched Lean or Dafny. Mutation testing is my stand-in: a step closer, not a proof, same as your property test.