Curry–Howard was one of those ideas I taught myself with AI and it was so powerful and unified so much for me, I was downright mad I hadn’t learned it as an undergrad.
LLMs increasingly are allowing us to learn across fields at an unprecedented pace. It’s a wonderful thing.
@nasqretThere are quite a few doubts regarding the correctness and nature of Alpöge’s proof of the Riemann Hypothesis itself. I would like to provide a somewhat technical explanation here of what was actually done.
Imagine that you want to prove the implication P → R, and you have two assumptions, f : P → Q and g : Q → R. In the Curry–Howard correspondence, a statement is a type, and its proof is a term of that type. The implication P → Q is a function type. The function f accepts the proof of P and returns the proof of Q.
Similarly, g takes the proof of Q as an argument and returns the proof of R. Lean is based on the “Calculus of Constructions” variant, i.e., dependent type theory, extended, among other things, to include inductive and quotient types. (https://t.co/w4L1xgPaCM)
An example theorem and proof in Lean for a logical formula: If P implies Q and Q implies R, then P implies R.
theorem h {P Q R : Prop} (f : P → Q) (g : Q → R) : P → R :=
fun p => g (f p) -- here we provide the proof
You compose the functions f and g. From the proof p : P, you obtain f(p) : Q, and then g (f p) : R. Thus, from the proof of P, you obtain the proof of R, so the entire (lambda) function fun p => g (f (p)) has type P → R. Applying f to p is, in this notation, the detachment rule.
What does the Lean kernel do when you enter this code? The elaborator translates the notation of the theorem and proof into terms in Lean’s internal language. The kernel checks whether the proof term has the type declared in the theorem. You can write the same proof using tactics.
- intro p introduces the assumption p : P,
- exact provides the proof of the remaining goal R.
Tactic-based proof (as in Alpöge)
theorem h_tactics {P Q R : Prop} (f : P → Q) (g : Q → R) : P → R := by
intro p
exact g (f p)
The elaborator runs the tactics and constructs a proof term from them. In both examples, #print displays the same term, meaning it is the same proof.
The Riemann Hypothesis already had its formulation in Mathlib as RiemannHypothesis : Prop. It was necessary to construct a term of this type—that is, a proof. Alpöge and Claude provided the code from which Lean constructs this term, using the entire library of intermediate theorems.
I also independently verified the code on Helios; this took many hours of parallel kernel processing across multiple CPUs. In the public verification, the type of the proven theorem was compared with an independently prepared template based on Mathlib. Several verifiers accepted the proof export. The audit showed that the proof, including its intermediate dependencies, uses only three of Lean’s standard axioms (propext, Classical.choice, and Quot.sound).
Comparator checks for compliance with the test case and the list of allowed axioms. The --paranoid mode runs additional verifiers.
- verification report: https://t.co/kseXGk4D2i,
- Comparator documentation: https://lean-lang.org/doc/reference/latest/ValidatingProofs/
What about a swapped kernel? For the tampered code to pass this way, the verifiers would also have to be made to run the swapped binaries. In the public verifications, tools obtained independently of the proof archive were used. Some of the verifiers, including con-leche and con-ron, were compiled on-site from source code in separate repositories. Tools from the official Lean release were also used. Recompiling the proof in an isolated environment produced an export that was identical byte-for-byte, and the verifiers were able to verify it without running Alpöge’s source code. In this situation, it is practically impossible to forge consistent results simply by swapping out the kernel. One would also have to interfere with the verification process. If we were to accept the hypothesis that we live in a simulation, it would have to explain the consistent results of different verifiers in separate environments. Lean FRO and the Mathlib Initiative have confirmed the correctness of both the formulation and the proof. We now have a formally verified proof of the Riemann Hypothesis (https://t.co/ZiCw4knB8l).
However, the proof itself contains many interesting elements from arithmetic geometry and the theory of automorphic forms. Among other things, it involves Iwasawa towers and Galois representations. Its structure is also intriguing. Alpöge describes it as an extension of Stepanov’s idea from the proof of the Riemann Hypothesis for curves over finite fields. In Stepanov’s proof, differentiation helps achieve a high order of vanishing. On the side of the integers, a chain of successive theta lifts between unitary groups plays an analogous role. [Alpöge’s note](https://t.co/GvijK58wlE)
On December 11, I will give the Ulam Lecture at Adam Mickiewicz University in Poznań on the proof and will share the details. You are cordially invited!