This part of the Theorem Proving in Lean 4 tutorial might need updating. @Leonard41111588
- 粉丝规模
- 2.4万关注 3.5千
- 日常浏览中位数
- 2.8千30天 19条7日 8帖
- 收藏率
- 0.5%赞率 2.1%互动 2.6%
- 网络权威分
- 52/ 100
- 30 天黑马爆款
- 4最高 9.9×
近 3 天粉丝成长曲线
移动鼠标查看每日粉丝变化
近 14 周发文节奏
- 14 周推文
- 19
- 活跃发文日
- 10/13
- 活跃周数
- 2/2
- 周均产出
- 10.2
- 单日峰值
- 3
- 高频星期
- 周二
帖子分享了两段引言,将写作、编程与思考和理解联系起来。
- 第一段引言认为,写作和编程都是思考的形式。
- 第二段引言认为,尝试把一个想法编程实现,可以检验是否真正理解它。
Believe me, you really want to know the Curry–Howard correspondence is. A great explanation in a tweet.
There 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. (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: t.co/kseXGk4D2i, - Comparator documentation: t.co/YOLf9am4Rs
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 (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](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!
Today Andrew Kennedy joined @HarmonicMath to help us on our mission to automate the formal verification of software and hardware. At Microsoft Research Cambridge he co-designed and built generics for .NET and C#, and designed the units-of-measure type system in F#, grounded in his POPL work on relational parametricity. He formalised x86 in Rocq, with a verified assembler and separation logic for machine code. At Meta he worked on the type system for Hack. Welcome, Andrew!
The worst presentations I have given are the ones I have prepared for the most. I end up giving a stilted presentation, distracted by trying to read my slide notes. I think some of the best presentations I have given are the ones where I just walked into the room and started talking, those end up with flow, energy and excitment, but some chaos and disorder too.
@satnam6502 The beast part is that you have fresh perspectives 😉! Seriously, overthinking complicates most presentations.
Maki di roti and saag, my favourite meal, this time made by mother for me on my last evening here. Excellent. I've been away from my wife and kids for a month now, and it's high time I got back to them.
When I talk about AI with people outside computer science, I struggle to convey how fast it’s moving. We’re used to exponentials. Most people aren’t, because they rarely meet one outside an epidemic. So even eminent, brilliant people underestimate the pace. That worries me most when it comes to government policy.
Humans are bad at extrapolating the exponential.
A great talk by @danghica on how to civilize AI coding at Huawei. Some common approaches to the talk I will give later in the day.
Andhra style cod is the first dish I've made from my new Gunpowder cookbook. My mum approved. The marinade is ground black pepper, freshly grated ginger and I used mango powder instead of lemon. The sauce was made from mustard seeds, cumin seeds, fenugreek seeds, curry leaves, onion, tomato, ground coriander, Kashmiri chili powder, ground turmeric, tamarind paste and coconut cream, and tasted excellent. I got a lovely piece of cod from Waitrose.
I've had months to prepare for my University of Cambridge talk. When am I actually preparing it? On the train down of course!
Dishoom.
What's a restaurant chain everyone raves about that you think is mediocre?
My name is in this edition of Notices of the American Mathematical Society! Although all I had to do was make a donation earlier this year. This edition includes an article co-authored by my friend Mateja Jamnik on Shaping the Future of Mathematics in the Age of AI which reports on a meeting held in Leiden in September 2025. Much has changed since then, although the line "Means reshape ends: the capabilities of new technology risk dictating what counts as mathematically significant, rather than serving our priorities." A very interesting sentence.
The mushroom XO linguini with a Cantabrian anchovy, crispy leeks, and 36-month-aged parmesan was one of the many hits at Brett restaurant in Glasgow last night.
My University of Cambridge Wednesday seminar is done. The video recording of the talk will go up at
One of the great dishes Ann Duncan and I had at Margo in Glasgow was cured chalkstream trout, tiger milk, salted plum and shiso.
Dinner at my favourite restaurant in the UK. Brett in #Glasgow.
Striking dresses at the Azzedine Alaïa exhibition at the Legion of Honor in San Francisco.
A lovely 4.7 mile walk around the west end of Glasgow, crossing the river Kelvin several times. Sadly there was a police detour in Kelvingrove Park after a grim episode late last night.
Prof. George Constantinides and I met in Cambridge to discuss UK deployment of AI infrastructure. Nice to visit AI Commons and see what they are up to at their Fora digs.
同领域相似创作者
浏览 科技与产品 全部创作者 →Runway AI责任工程负责人、软件工程团队领导,并联合创办Cloudash。
软件性能专家,分享计算机系统研究、硬件分析与高性能代码验证实践。
Drizzle ORM 构建开源 TypeScript 数据库工具,包括 SQL ORM 与 PostgreSQL 驱动。
Parisa Tabriz 在 Google Chrome 负责浏览器工作,关注 Web 标准与浏览器智能体安全测试。
