Propositions as programsThe Curry-Howard correspondence says that propositions are types, and proofs are programs. I had been wondering if there is a simpler way to think about it, so I came up with this:
Here Any way, this is a special kind of evaluation. It may be partial evaluation, supercompilation, or some sort of static analysis, whatever you call it. It can also take human inputs interactively, as long as it is semantic-preserving --- it returns This seems to match what we have been doing with proof assistants like Coq, and possibly a more natural way of thinking about this kind of theorem proving. I feel that the propositions in Coq are a little far-fetched to be called "types" of the proof terms (note: not to be confused with tactics). For example, we can have a proof term like fun (n' : nat) (IHn' : n' + 0 = n') => ... Is Theorem plus_0_r : forall n:nat, n + 0 = n. Proof. intros n. induction n as [| n']. reflexivity. simpl. rewrite -> IHn'. reflexivity. Qed. They produce the following proof term: plus_0_r = fun n : nat => nat_ind (fun n0 : nat => n0 + 0 = n0) eq_refl (fun (n' : nat) (IHn' : n' + 0 = n') => eq_ind_r (fun n0 : nat => S n0 = S n') eq_refl IHn') n : forall n : nat, n + 0 = n You may think of this proof term as a program with the theorem as its type, but you can also think of it as a reduction of the program This interpretation can also explain the operation of Boyer-Moore style theorem provers (e.g. ACL2), as this is almost exactly how they work. They just don't normally output a machine-verifiable reduction sequence. You may have noticed that we have an important difference from the orginal Curry-Howard correspondence here:
At least proofs are not object-level programs. They are the "operation histories" in the abstract interpreter, which are at the meta-level. We can give this operation history to an independent verifier, so that it can "replay" the abstract interpretation and verify the correctness of the proof. Alternatively, if you consider the verifier as an interpreter then proofs are its input programs. In this sense you can also say that proofs are programs for the proof verifier, and both propositions and proofs can be considered programs. But they are programs at two different semantic levels: the proofs are at a higher level than the propositions. This is very different from Curry-Howard. Thus we have arrived at a unified way of thinking about the two very different styles of theorem proving: Curry-Howard correspondence (as in Coq), and Boyer-Moore (as in ACL2). |