Hacker News new | ask | show | jobs
by jillesvangurp 20 days ago
It's a classical scientific confusion how scientist proof their theories. There are basically two approaches. One is proving them correct, which works for a narrow set of theories (mostly mathematical ones). And another is by failing to falsify the theory. Which is what most scientist that aren't mathematicians have to do because their problem is too big/impractical to squeeze into mathematical theorem. For example Einstein had lots of theories and predicted their impact. Many of his theories predicted certain things that have since been demonstrated in the real world. But some of his other theories have been been proven not fully correct through experiments that falsified parts of his theories. The best you can say of his theories is that quite a few of them have withstood many attempts to falsify his theories, so far. Any replacement theory would be subjected to the same tests and objectively would not be better unless those all passed. As it turns out, there are several competing theories that each have their strengths and weaknesses on what tests they fail. None of them is fully correct for everything. But typically they are for most of the stuff we care about like orbital mechanics working more or less as Newton predicted.

Software verification in practice works more like physics than like mathematics. When you are testing software, you aren't trying to prove correctness but verifying that all your known ways of proving the software would be incorrect in some way are incorrect. I.e. the theory that the software is broken in a particular way is false. That doesn't mean it's not broken in a different way. And you can never get to full correctness this way because of the combinatorial explosion of inputs, parameters, etc. means the number of tests you'd have to run quickly goes to infinity. But if you cover most of the stuff you care about, you can at least build up some confidence over time that it probably does what it's supposed to mostly. Of course when LLMs then find new theories about breaking the software that are correct, you still have some issues to clear up.

Formal proofs have their place in things that are small enough in scope and high enough in value to justify using them and have that be feasible. That has been shifting a bit in recent years thanks to better tools, AI, and more compute. But it's still not very practical for large categories of software. If people want to unleash Lean on their vibe coded React thingy, good luck!