Example bug
A verified network program ensures that "data from two addresses are never commingled", but it does not verify that the NIC can't overwrite control flow memory opening up RCE attacks/other memory reads.
It certainly is harder to make bugs in formally verified software than the alternative, but it is not bug free.
Yes, Lean verifies the algorithm being verified, not hardware or someone else's software.
1. Yes.
2. Yes.
3. This is “you took 10 KLOC to do what 1 could have.”
4. Yes.
Being fairly naive to Lean in general, this always seemed to me like a clear flaw of using Lean solutions as proof of hypotheses
To be clear, this is basically a case of bad defaults in Lean. As Buzzard says, the fix is literally one command.
> The one-line answer: `lake comparator`.
That it's the equivalent of saying it's full moon tonight because I wrote this program.
And he states that you have to check that:
1. The statement the author is making corresponds to the statement in the lean program.
2. The lean program compiles.
3. There is no shenanigans hidden in the lean program to disguise a trivial proof as the one stated.
4. The program does not exploit bugs in lean.