

As an interesting follow-up to the ai-does-maths-using lean4 stubstack comments on Sunday, an llm accidentally uncovers a bug in the lean4 kernel.
Summary by Meven Lennon-Bertrand:
https://lipn.info/@mevenlennonbertrand/116997917683191056
To summarize:
- an AI agent let loose provides a sorry-free proof of the Collatz conjecture
- the proof is detected as actually being a kernel bug
- the bug is related to (nested) inductive types, for which there is no clear theoretical specification: the kernel’s code is the reference
- external checkers (lean4lean and nanoda from a week ago) reproduce the bug, because they essentially copied the reference kernel implementation
Eta: “sorry-free” in this case means a complete proof with no trust-me-bro steps or TODOs… the sorry tactic in lean “proves” a theorem to be correct even if it is garbage or incomplete. More programming languages should make developers apologise for half-arsing their work.
And so
- AI raises the bar for kernel correctness by a lot
- without a clear type-theoretic understanding of what is actually implemented, we’re toast
- external checkers help to catch implementation bugs, but without a clear specification they can’t catch logic bugs
How bad this is, is unclear just yet… probably not the sky actually falling, but not great. Interesting though.
To be extra grumpy… seems to me that most note-taking apps have always been a bit shit, and coding assistants have just pushed them over the edge. All vast electron apps with terrible sandboxing as far as the eye can see.
I quite like the linked-text-document model for various things, and it would be nice if someone could make an editor that a) didn’t use electron and b) could do something like html export. Oh, and c) supported plugins that don’t get unrestricted access to my entire filesystem.
Not even any closed-source options manage that, though. Everything is just bloat and security vulnerabilities as far as the eye can see.