Lean 4 Bug Found Incidentally by AI, "Proving" Collatz

jryan491 pts0 comments

Gro-Tsen on X: "So, someone came up with an AI-generated formal proof, in Lean, of a solution to the Collatz problem, and it turned out that the “proof” was merely exploiting a bug in the Lean kernel (allowing you to prove anything)." / X<br>Post

Log inSign up

Post

Gro-Tsen<br>@gro_tsen

So, someone came up with an AI-generated formal proof, in Lean, of a solution to the Collatz problem, and it turned out that the “proof” was merely exploiting a bug in the Lean kernel (allowing you to prove anything).<br>span:not(:empty)~span:not(:empty)]:before:content-['·'] [&>span:not(:empty)~span:not(:empty)]:before:px-1 [&>span:not(:empty)~span:not(:empty)]:before:shrink-0">3:10 PM · Jul 29, 2026239.5KViews

83<br>170<br>3.6K<br>483

span:not(:empty)~span:not(:empty)]:before:content-['·'] [&>span:not(:empty)~span:not(:empty)]:before:px-1 [&>span:not(:empty)~span:not(:empty)]:before:shrink-0 min-w-0 overflow-hidden">Gro-Tsen<br>@gro_tsen

20h

More details and explanations at:

infosec.exchange<br>abadidea (@[email protected])<br>Okay, we have a new contender for Most AI Thing to Ever Happen 1) July 25th: someone messes around with an LLM and posts a proof of the Collatz conjecture that does, in fact, verify in the theorem...

195<br>svg]:size-5 text-body hover:bg-mix-current hover:bg-mix-amount-10 active:bg-mix-current active:bg-mix-amount-15 focus-visible:bg-mix-current focus-visible:bg-mix-amount-10 outline-current -m-2 shrink-0 cursor-pointer border-transparent p-0 text-body size-9 [&>svg]:size-[1.25em] [&>[data-engagement-icon]]:size-[1.25em] group-hover:bg-mix-current group-hover:bg-mix-amount-10" aria-label="View count" type="button" data-state="closed" href="/gro_tsen/status/2082483880632664193/quotes">20K

span:not(:empty)~span:not(:empty)]:before:content-['·'] [&>span:not(:empty)~span:not(:empty)]:before:px-1 [&>span:not(:empty)~span:not(:empty)]:before:shrink-0 min-w-0 overflow-hidden">Gro-Tsen<br>@gro_tsen

20h

Keep this in mind when someone claims that requiring formal proofs in Lean is the end-all solution to AI slop and hallucination in mathematical proofs.

368<br>svg]:size-5 text-body hover:bg-mix-current hover:bg-mix-amount-10 active:bg-mix-current active:bg-mix-amount-15 focus-visible:bg-mix-current focus-visible:bg-mix-amount-10 outline-current -m-2 shrink-0 cursor-pointer border-transparent p-0 text-body size-9 [&>svg]:size-[1.25em] [&>[data-engagement-icon]]:size-[1.25em] group-hover:bg-mix-current group-hover:bg-mix-amount-10" aria-label="View count" type="button" data-state="closed" href="/gro_tsen/status/2082483882792722842/quotes">20K

span:not(:empty)~span:not(:empty)]:before:content-['·'] [&>span:not(:empty)~span:not(:empty)]:before:px-1 [&>span:not(:empty)~span:not(:empty)]:before:shrink-0 min-w-0 overflow-hidden">Gro-Tsen<br>@gro_tsen

20h

(There are other — more frequent — problems, of course, like the fact that the formally proven theorem might not match the informally understood one. Or, more basically, that the proof might be unreadable for humans, making it useless.)

164<br>svg]:size-5 text-body hover:bg-mix-current hover:bg-mix-amount-10 active:bg-mix-current active:bg-mix-amount-15 focus-visible:bg-mix-current focus-visible:bg-mix-amount-10 outline-current -m-2 shrink-0 cursor-pointer border-transparent p-0 text-body size-9 [&>svg]:size-[1.25em] [&>[data-engagement-icon]]:size-[1.25em] group-hover:bg-mix-current group-hover:bg-mix-amount-10" aria-label="View count" type="button" data-state="closed" href="/gro_tsen/status/2082483884868964532/quotes">18K

span:not(:empty)~span:not(:empty)]:before:content-['·'] [&>span:not(:empty)~span:not(:empty)]:before:px-1 [&>span:not(:empty)~span:not(:empty)]:before:shrink-0 min-w-0 overflow-hidden">Gro-Tsen<br>@gro_tsen

18h

* Not that this changes any of the above, but I am informed that the person posting the proof was actually aware that this was a Lean kernel soundness bug, and it was not intended to be taken seriously as a solution to Collatz's problem.

span:not(:empty)~span:not(:empty)]:before:content-['·'] [&>span:not(:empty)~span:not(:empty)]:before:px-1 [&>span:not(:empty)~span:not(:empty)]:before:shrink-0 min-w-0 overflow-hidden">Jason Rute<br>@JasonRute

19h

Replying to @gro_tsenI think they just use collatz as a fun way to demonstrate the lean soundness bug. There is a history of this in the theorem proving community. The author knew it was a soundness bug and it was intentional.

138<br>svg]:size-5 text-body hover:bg-mix-current hover:bg-mix-amount-10 active:bg-mix-current active:bg-mix-amount-15 focus-visible:bg-mix-current focus-visible:bg-mix-amount-10 outline-current -m-2 shrink-0 cursor-pointer border-transparent p-0 text-body size-9 [&>svg]:size-[1.25em] [&>[data-engagement-icon]]:size-[1.25em] group-hover:bg-mix-current group-hover:bg-mix-amount-10" aria-label="View count" type="button" data-state="closed" href="/gro_tsen/status/2082513997400560097/quotes">20K

span:not(:empty)~span:not(:empty)]:before:content-['·'] [&>span:not(:empty)~span:not(:empty)]:before:px-1...

span empty before current size hover

Related Articles