Python Bytes · Hands-On Engineering Podcasts · December 2026
Michael Kennedy was covering a write-up in which AI agents translated about 10 percent of CPython's functions into the proof language Lean and reported hundreds of bugs, around 55 of which could crash the interpreter or corrupt memory. This is his reaction to those.
…that has not seen or participated in this i would like you to evaluate it right and tell me if you think this is actually true and so on so they did that to make sure it works and they ended up with 600 000 lines of lean across 1500 files here's a part where it gets weird 18 927 theorems and lemmas
i'm not even sure what a lemma is
i love that they have lemmas so lemmas are like not quite as strong as a theorem it's like a theorem is like a big statement a little lemma is like a little bit of a side idea that you combine to make a theorem type of thing so very fun uh there but here's where it gets interesting it reported 415 verified bugs in c python most of which are small but 55 can crash the interpreter or oh my god corrupt memory from ordinary python code you probably
yeah you might want to look into that
when you hear corrupt memory and crash the interpreter that is one bit of cleverness away from remote code execution with yeah no authentication right that's a very bad place to be
wow so this is completely on their own not associated to the psf or yeah i don't