A mathematician is a machine for turning tokens into theorems
I’ve been following, from a distance, news about the latest theorem to fall: the Riemann hypothesis. This conjecture to me was synonymous with depth and profundity and wonder in pure math. The distribution of the primes feels so mysterious.
This AI proof comes with Lean certification. That means that there is a computer program that’s equivalent to the Riemann hypothesis. If the program compiles, the proof holds. For a while I was confused about why proofs had to compile rather than run.
I’ve written code that compiles but runs forever or crashes:
while True:
print(“ain’t no stopping us now”)
The Lean compiler, however, attempts to verify that functions terminate. If it cannot verify that they terminate, the proof doesn’t compile. Because it can’t solve the halting problem, this could mean that legitimate proofs cannot be compiled. Lastly, runtime crashes and undefined behavior aren’t a thing. For example, indexing an array requires a compile-time guarantee that the index isn’t out of bounds.
My mental model for AI proofs now follows rare event sampling. This is more sophisticated than a stochastic parrot; instead of random gibberish or pieces of eight, the parrot was trained to squawk proposed proofs that can be verified by Lean.
The target - the rare events - are genuine proofs. The LLM provides a proposal distribution trained on the corpus of human written math and proofs. That means the LLM can generate text that resembles real proofs.
The Lean certification provides the final filter, through a rejection sampling step. If the generated text compiles as a Lean proof, we have succeeded in generating our rare event, a bona fide proof. If it doesn’t compile, the compilation errors could be used to refine the proposal.
The title of this post riffs on Erdos’ famous aphorism. The definition of a mathematician could be changing. For the time being, our school still provides free coffee. The romantic in me hopes things don’t change. The culture and the rituals and the mystery of math could disappear as fast as the coffee.