I recently lectured at an EST training workshop in Fischbachau, Germany. There were also a number of student talks, one of which was given by Luca Chiarabini from Munich. He talked about extraction of programs from proofs, using (a variant of) Curry-Howard isomorphism, also known as propositions-as-types. He had some very interesting ideas which were obviously related to old programming tricks, but he approached them from the logical point of view, rather than the programmer’s point of view. It got me thinking about how to write certain recursive programs as proofs. Since it is a nice application of program extraction, I want to share it with you here.
In constructive mathematics even very small sets can be quite a bit more interesting than in classical mathematics. Since you will not believe me that sets with at most one element are very interesting, let us look at the set of truth values, which has “two” elements.
Ordinary mathematicians usually posses a small amount of knowledge about logic. They know their logic is classical because they believe in the Law of Excluded Middle (LEM):
For every proposition `p`, either `p` or `not p` holds.
To many this is a self-evident truth. Therefore they cannot understand why someone would reject such a law, and a useful one at that, since many neat proofs depend on it. An equivalent law of logic is reductio ad absurdum or proof by contradiction:
For every proposition `p`, if `not p` does not hold, then `p` holds.
Constructive mathematicians do indeed reject LEM. But this does not mean they accept its negation! Unfortunately, many ordinary mathematicians seem to think precisely that, and so naturally they conclude that constructive mathematics is garbage. In fact, both classical and constructive mathematics prove quite easily that the negation of LEM is false. So what do constructive mathematicians believe?