News for hackers. Stuff that matters.
Re:" and the proof is checked in Lean" by trehans on Monday November 16, 2026 @12:33PM (#50520255)
One thing I'm surprised to see little mention of here is that if you want to use Lean proofs for your code and really want good correspondence between what is proved in Lean and what your code actually does, you need a mathematical model of your programming language embedded in Lean and a deterministic parser converting your code itself into Lean. Otherwise, yes, an AI actually has no checks against hallucination and while writing Lean proofs probably helps AI identify its mistakes it really isn't an end-to-end proof of your code's functionality.

I personally think the future probably involves a combination of unit tests and formal verification to support our confidence in AI-written software, as well as means to align high-level human intent with the low-level intent of individual code pieces, which as this article mentions is the other big piece that can slip with formal proofs: we might not be proving what we think we're proving. For those interested I've written an educational post about this topic here as well: https://kellerai.io/resources/ai-proved-your-code-correct

Re:" and the proof is checked in Lean" by hoten on Monday November 16, 2026 @12:42PM (#50520378)
Do people really approach Lean proofs from the programming language level rather than assembly code level (x64, arm, etc)?
Re:" and the proof is checked in Lean" by trehans on Monday November 16, 2026 @12:52PM (#50520521)
Yes, Verus (for Rust) is a good example of programming language level verification. The recent GitHub Next announcement indicates they are using it in their backend.

You're right that if you verify at the assembly language it can give you additional certainty that there are no additional errors in the compilation step. However, it can be easier for AI to reason about proofs written at the programming language level because (from what I can deduce) it matches the level that humans are operating at and it doesn't have additional details such as registers and memory operations to worry about.

Re:" and the proof is checked in Lean" by fritzo on Monday November 16, 2026 @12:58PM (#50520609)
You don't need a model of your programming language in Lean, that's overkill.

It's already useful to isolate a DSL in your software and model that in Lean. Sure that only proves that the domain specific code is correct, but now you've factored your proof into proving high-level correctness and low-level correctness.