Hacker News new | ask | show | jobs
by dwohnitmok 12 days ago
Point 3 in this article basically is just a case of bad defaults in Lean (Lean at this point should probably just make `lake comparator` a mandatory part of compilation and that immediately fixes the issue as Buzzard mentions).

Really there's only three things to check that the theorem is correct (leaving aside important questions of whether humans actually understand the proof and only caring about whether theorem is true):

1. Check that the formal statement of the theorem matches the informal statement of the theorem

2. Actually compile the proof (with `lake comparator`)

3. Try to make the Lean kernel as bug-free as possible (the hardest one but also the one with the most amount of attention focused on it) or run with multiple different kernels

Assuming those three, no need to read the potentially millions of lines of proof, if all you care about is correctness and not understanding.

1 comments

>Only 3 steps to verify a proof

>step 1, verify the proof

No. Verify the statement not the proof (usually the statement is <<1% the lines of the proof, e.g. in the case of Fermat's Last Theorem it's approximately 0.00001%).
This mistake is amusing because one of the main goals of the article is to explain why the statement is different from the proof of the statement, and why this distinction is important.

The statement is a formal description of the thing you're trying to prove; the proof is the step-by-step reasoning that shows why it's true. Usually the first is much smaller than the second, which is good because it's the thing that you (or some entity you trust) needs to check manually. Checking that the proof proves the statement is what Lean compilation does for you automatically.

Loosely, the statement is like an interface definition (e.g., an abstract base class); the proof is like an implementation of that interface. For sufficiently simple contracts, even regular compiled languages like Java or C++ can check an implementation for "correctness", e.g., that all methods declared in the base class have been defined, that each of them either returns a value of the type declared in its signature or throws, etc. Lean is similar but allows a lot more conditions to be expressed.