News for hackers. Stuff that matters.
Re:The math is haunted by 7373737373 on Wednesday July 30, 2025 @05:49PM (#44739904)
Does Lean have some sort of verification mode for untrusted proofs that guarantees that a given proof certainly does not use any "sorry" (however indirectly), and does not add to the "proving power" of some separately given fixed set of axioms with further axioms or definitions?
Re:The math is haunted by masterjack on Wednesday July 30, 2025 @05:54PM (#44739954)
Yes, you can `print axioms` to make sure no axioms were added, make sure it compiles with no warnings or errors. There’s also a SafeVerify utility that checks more thoroughly and catches some tricks that RL systems have found
Re:The math is haunted by jonny_eh on Wednesday July 30, 2025 @05:54PM (#44739952)
Apparently this is possible with macros? I dunno: https://github.com/leanprover/lean3/issues/1355
Re:The math is haunted by kmill on Wednesday July 30, 2025 @07:41PM (#44740839)
That's Lean 3, from eight years ago, and it's from before 'sorry' really existed in the way we know it now.

---

To answer the GP's question: Not only is there a verification mode, but Lean generates object files with the fully elaborated definitions and theorems. These can be rechecked by the kernel, or by external verifiers. There's no need to trust the Lean system itself, except to make sure that the theorem statements actually correspond to what we think they're supposed to be.

Re:The math is haunted by treyd on Wednesday July 30, 2025 @08:11PM (#44741017)
What exactly do these object files look like?
Re:The math is haunted by kmill on Wednesday July 30, 2025 @08:19PM (#44741052)
The "olean" files are a binary format that contain everything that was added to the Lean environment. Among other things, it includes all of the declarations and their Lean.Expr [1] expressions. People have written tools to dump the data for inspection [2], or to independently check that the expressions are type correct and the environment is well-formed (that is, check the correctness).

[1] https://github.com/leanprover/lean4/blob/3a3c816a27c0bd45471... [2] https://github.com/digama0/oleandump [3] https://github.com/ammkrn/nanoda_lib

Re:The math is haunted by danabramov on Wednesday July 30, 2025 @05:55PM (#44739962)
Does `#print axioms some_theorem` mentioned at the end of the article qualify? This would show if it depends on `sorry`, even transitively, or on some axioms you haven't vetted.
Re:The math is haunted by 7373737373 on Wednesday July 30, 2025 @06:05PM (#44740047)
Oh, I missed that, thanks! It would be cool to use this to visualize the current state and progress on, and depth of the "proof dependency graph"!