Remix.run Logo
▲ nextaccountic an hour ago

This is just programming

To properly understand a proof you need to run it interactively (or at least I do), which is kind of running in a debugger

I mean the here's the gist of what takes to understand a proof

To prove a theorem in Lean (or similar theorem provers; I'm actually more familiar with Rocq) you have goals, which are the things that are left to prove. The "main goal" is what you want to prove right now, and the other goals are other things you also need to prove

When the list of goals becomes empty, you have proved the theorem. You start with a single goal: the theorem itself

It proceeds like a game. Depending on what the main goal looks like, you can eliminate it calling some piece of code (there's more to it but let's say it's a tactic). But more often than not, eliminating a complex goal just pushes more, hopefully simpler goals into the goal list. So you need to be, well, strategic in what tactics you employ - you need to go into the direction of making things easier to prove, not harder

So what looks like to run a proof interactively? You can go through the proof step by step, all the while you observe how the goal list changes. That's analogous to run a C program in a debugger, watching the local variables of each stack frame

Ok so that's how you (or at least I would) understand a proof - run it interactively, which is like watching a professor write down each step of the proof in a white board, all the while she carefully keeps track of what's left to prove

But anyway. The innovative thing about theorem provers in general is that to verify a proof you run a program (a kernel) which is just a trusted type checker. Unfortunately the official kernel is written in C++ and agents found bugs before (that made the kernel accept theorems that were false). However, there's multiple kernels, so if all of them type checks the proof (and the proof doesn't contain stuff like "sorry", which means it's not proved at all), there's a high confidence in the result