1 What Is Intuitionism?
1 What Is Intuitionism?
1 What is Intuitionism?
Intuitionism originates with the Dutch mathematician L.E.J. Brouwer (18811966)1, who developed, in the years following 1905, a completely new philosophy of mathematics. I'll try to outline two basic points here, without attempting to go too deeply into the quite sophisticated philosophical discussion which ensued the curious reader is referred to the books and papers of Troelstra, Beeson, Bishop & Bridges and Smorynski in the references]. In order to understand these points it is perhaps useful to recall some developments in late 19th century mathematics which to some extent rocked the average mathematician's working intuition. These were the creation of set theory by Cantor, and the development of mathematical logic by Frege and Russell. Both were very successful attempts to codify mathematics and mathematical thinking, and Russell went so far as to propose that mathematics was not more than a deductive system, completely subsumed by logic. This view was also taken by his pupil Wittgenstein who taught that mathematical truths are vacuous tautologies. Brouwer opposed this view vehemently. Against it he raised two related philosophical issues this is an extremely simpli ed picture]: solipsism and the role of language. Solipsism states, in a crude form, that man is basically alone and has no way of rmly establishing the existence of an outside world, let alone facts about such a world. Mathematics can therefore not be concerned with the discovery of absolute truths which are, in some way or another, hidden `out there'. The
Text for a minicourse given at BRICS, spring 1995 Apart from being, as we'll see, a very original character, Brouwer was an extremely gifted mathematician. He solved important open problems in topology, and the mathematical eld known as algebraic topology is essentially due to him. It is therefore that his philosophical arguments carried authority, and that the debate about them raged so violently
1
mathematician in this discussion there is often talk about `the mathematician'. What is meant is an idealized mathematician, a representative of mathematics as a whole, who makes no mistakes] has as his sole tools some basic intuitions on which he can perform constructions. What would such basic intuitions be? A `logicist' as Russell might perhaps take the notion of `set', or operations from logic, as basic. Brouwer accepted only one basic notion: time, mathematically seen as the real line. For a set theorist the real numbers are Dedekind cuts or equivalence classes of fundamental sequences, but for the intuitionist the reals are there without needing any further quali cation. Language is our means of communication, and in Brouwer's view a very defective one. In order to communicate his constructions to others, the mathematician has to devise a codi cation of the mathematical notions and a concise way of getting an argument across. Logic provides an instrument for this, but it is very risky to generalize, by mere linguistic analogy, laws of thought which are valid for nite structures to in nite ones: such \laws" can easily be formulated is a system which then can be proved to be free of contradiction, but nothing guarantees that they represent valid inferences about the mathematical world. One logical principle, obviously valid for statements about nite structures, which came under Brouwer's attack, was the principle of excluded middle (principium tertii exclusi ): for any statement ', either ' or its negation :' is true, often encountered in the following form of reductio ad absurdum: if :' leads to a contradiction, then ' must be true (the other form: if ' leads to contradiction then :' is true, is perfectly acceptable to intuitionists; in fact this is the de nition of :'). In trying to follow Brouwer's main argument against this principle, bear in mind that in the solipsistic mathematician's universe a statement ' can only be true if I have a mathematical construction establishing '! It is very well possible that today's theoretical computer scientists, raised as they are with problems of decidability, have less problems than the mathematicians of 80 years ago, in understanding the so-called \weak counterexamples" with which Brouwer had in mind to refute the principle of excluded middle. Let us then take an, as yet, undecided mathematical proposition (Fermat's last, that there are non nontrivial integer solutions to xn + yn = z n for n > 2, was popular in books on intuitionism, but alas: : : 2 ). There is of course an in nity of them. For example: 1. Goldbach's conjecture: every even natural number is the sum of two prime numbers; 2. There is no sequence of 99 consecutive 9's in the decimal expansion of .
2
Everyone will agree that hak ik2! is a Cauchy sequence, and thus represents a real number . Now in Brouwer's view it makes no sense to say that either = 0 or > 0 since both statements imply a decision of Goldbach's conjecture. The number is a so-called ` oating number'. Another example: take the sequence hbk ik2! given by 8 < ( 2) k0 if k k0 and k0 is least such that after expanding in k0 bk = : decimals, a sequence of 99 consecutive 9's has been found; ( 2) k else
Note that in both cases a counterexample is a nite piece of data, and can be checked in nite time. Now it is possible to de ne a real number by the following Cauchy sequence hak ik2! : 8 k0 if k k0 and k0 is the rst <2 ak = : counterexample to Goldbach's conjecture; 2 k else
Again, hbk ik2! represents a real number ; but now we cannot say 0 or 0 since either statement implies an unfounded opinion on the parity of the length of a possible least expansion sequence of exhibiting 99 9's. On the other hand, given two real numbers which are well apart, such as 0 and 1, it is always true for any real number x, that x > 0 or x < 1; this follows by just approximating them closely enough. Once we take this kind of argument seriously, it has unexpected consequences. For example, the intermediate value theorem of analysis breaks down: For every continuous function f on 0; a] with f (0) < 0 and f (a) > 0, there is x 2 0; a] with f (x) = 0. disproof. Let, for as de ned above, f on 0,3] be de ned by: f (x) = minfx 1; 0g + maxf0; x 2g + Roughly, f looks like this:
intermediate value theorem
Now suppose f has a zero x. Then, as we have argued before, either x < 2 or x > 1 must hold; which implies respectively 0 or 0. I mention two other, generally accepted, ideas in mathematics which are incompatible with the intuitionistic refusal of excluded middle as a valid law of thought: cardinality of nite sets and the well orderedness of the natural numbers. We call a set nite if it can be embedded into a set of the form fn j n < mg for a natural number m (n also ranges over natural numbers). \Classically" (that is, in ordinary mathematics), every nite set can be assigned a unique natural number, its cardinality (number of elements). Not so intuitionistically: take the set f0; g. If it has a cardinality, then that must be 1 or 2. In the rst case = 0, in the second case > 0; so in either case = 0 or 0 holds. The well ordering principle for the natural numbers states that every nonempty subset of N has a least element. In fact, using excluded middle one can show that this is equivalent to the principle of mathematical induction over the natural numbers: if X N is such that 0 2 X and for all x 2 N, x 2 X implies x + 1 2 X , then X = N. Intuitionistically, neither principle implies the other. But whereas induction is a generally accepted principle, also among intuitionists, the well ordering principle implies the principle of excluded middle: let X = f0 j 'g f1g where ' is some statement. Evidently, 1 2 X so X is nonempty; but if the least element of X is 0, then '; if it's 1, then :'. So in either case, ' _ :'.
2 Intuitionistic Logic
The codi cation in a logical system of those laws of thought which were valid in Brouwer's eyes, was carried out by his student A. Heyting and the Russian mathematician Kolmogorov. Given Brouwer's aversion to logic it is no more than natural that he thought this was a \sterile exercise". Not, that at the time the discovery of the intuitionistically valid inferences was a trivial matter. For example, it was clear that for a proposition p, ::p was not equivalent to p (because given this, one can derive the excluded middle); but what about :::p, ::::p and so on? It seems to have been Heyting who discovered that this sequence ends, in fact that :::p is equivalent to :p. Brouwer's proof of this goes wordly as follows (re ecting his horror of logical symbolism): 4
surdity. proof. When property y follows from property x, then from the absurdity of y follows the absurdity of x. Therefore necessarily, since truth implies absurdity of absurdity, absurdity of absurdity of absurdity implies absurdity. Conversely, because the correctness of an arbitrary property implies the absurdity of the absurdity of that property, so must absurdity of truth, that is absurdity, imply absurdity of absurdity of absurdity. Poetic, isn't it? One of the obstacles for a development of formal intuitionistic logic was the lack of a good understanding of how exactly Brouwer read the basic logical connectives. We have already seen that his interpretation of _ (or) is di erent from the usual one. Heyting formulated an interpretation of the symbols !, ^, _, : and ? (a special symbol, standing for \absurdity"), which later became known as the \Brouwer-Heyting-Kolmogorov interpretation". In this interpretation, one de nes what it means to give an intuitionistic proof of a propositional formula ' (that is, a formula built up from these connectives and propositional variables) in terms of proofs of its constituents: A proof of ' ^ is a pair consisting of a proof of ' and a proof of ; a proof of ' _ is also a pair, the rst component of which is a proof of ' or a proof of , and the second component is information as to which is the case; a proof of ' ! is a construction which transforms any proof of ' into a proof of ; ? has no proof; and a proof of :' is a construction which transforms any proof of ' into a contradiction. A derivation system, especially suited for intuitionistic logic, is natural deduction, invented by Gentzen in 1935. In a natural deduction tree, we have the nodes labelled by formulas. The formal syntax is: Form = Var j ? j Form Form j :Form where Var is a set of propositional variables p; q; : : : and 2 f^; _; !g. Formulas at the top nodes are numbered; they are called assumptions. The formula at the root is the conclusion of the tree. For example the tree p1 q2 p^q 5
p ! q1 the assumption p has been discharged, which is made visible by its number at p ! q. The tree now has open (i.e. not discharged) assumption q, and concludes p ! q. Let's go one step further: p1 q2 q p ! q1 q ! (p ! q)2 concludes q ! (p ! q) from no (open) assumptions at all. A formula may occur more than once as assumption, and di erent occurrences may be discharged independently of each other: q1 q2 q1 q1 q^q q^q and 1 q ! (q ^ q) q ! (q ^ q)1 are valid trees. The rst derives q ! (q ^ q) from assumption q (numbered 2); the second one derives the same formula from no open assumptions. So di erent occurrences of the same formula may be numbered di erently or alike; but we insist that di erent formulas be numbered di erently. I now present a formal de nition of natural deduction trees. In the following list we denote by f'k i j 1 i ng
i
a deduction tree with conclusion and open assumptions 'i (i = 1; : : :; n), where assumption 'i is numbered ki . The list is read in the following way: except for the rst case, which is an axiom to start, each item is seen as a rule which permits the construction of the whole tree from its immediate subtrees. I also write ' ~ for the assumption set, if the numbering plays no role in the rule. We then have the following construction principles for deduction trees: f'k i j 1 i ng (1 j n) 1. 'j is a valid tree (starting axiom);
i
2.
D ^
' ~
D0
0 0
' ~0
3.
D _ D
'
' ~
D1
k;l
' k ;~
D '^ D2
l ;~
D '^
4.
'_ f'k i j 1 i ng
i
'_
'i ! k
D '! D ? : i
i; ' ~
! ~
D0
' ' ~ ' ~0
5.
D ?
'
D ?
D0 :
Examples.
1. Let us show that, although intuitionism rejects ' _ :', ::(' _ :') is derivable (i.e. there is a natural deduction tree with no open assumptions, having it as its conclusion): '1 2 :(' _ :') ' _ :'
:(' _ :')2
2. ' ! ::' is derivable:
? ::(' _ :')2
'1
:'2
:::p3
Exercise 1. Construct natural deduction trees for the following formulas: a) (A ! B ) ! (:B ! :A) b) ::(A ! B ) ! (::A ! ::B ) c) (:A _ B ) ! (A ! B ) We call two formulas ' and equivalent if the formulas ' ! and ! ' are Exercise 2. A formula ' is called negative if it contains no _ and all propositional variables p occur negated in '. So, ? and :p are negative, and the negative formulas are closed under application of ^, ! and :. Show that for negative ', ' and ::' are equivalent. Exercise 3.* Show that for negative ', ' is derivable if and only if ' is classically true in the sense of truth-tables for the meaning of this result, see section 4.1]. Exercise 4.* The Rieger-Nishimura lattice] We consider formulas which only contain one propositional variable p, up to equivalence. We de ne, recursively, the following sequence hAn in2! of formulas in p: derivable.
? ::p2
A0 = p ^ :p A2n+1 = A2n 1 _ A2n (n 1) A1 = p A2n+2 = A2n ! A2n 1 (n 1) A2 = :p Finally we set A! = p ! p. Show that every formula ' in the propositional variable p is equivalent to some An or to A! .
*Exercises so
A11 PPP A7 A3 A0
PPP nnn nnn PPP PPP nnn nnn PPP PPP nnn nnn
A9 PPP A5 A1
PPP
A8 A4
(This structure is called the \Rieger-Nishimura lattice" or the \free Heyting algebra on one generator") Show also that the implications between the Ai , the diagram suggests, are provable. In fact, no other implications are provable. Quite in contrast to classical logic, where there are only 4 nonequivalent formulas in p, here there is an in nity of them. Exercise 5.* \Formulas as Types"] The typed -calculus has the following types: Basic types A1 ; : : :; a type 0; Given types S; T , one has the types S T , S + T , S ) T . There are the following terms: For every type S there is a denumerably in nite set of variables of type S S : xS 1 ; x2 ; : : :; Given terms s of type S and t of type T , hs; ti is a term of type S T ; given u of type S T , there is p0u of type S and p1 u of type T ; Given s of type S , there is iS;T (s) of type S + T and jS;T (s) of type T + S ; given u of type S + T , v of type S ) U and w of type T ) U , there is ex(u; v; w) of type U ; Given u of type S ) T and s of type S , there is (us) of type T ; given s of type S and a variable x of type T , there is x:s of type T ) S .
Now let N be the set of natural deduction trees which do not contain negations, and which are minimal, in the sense that there are no unused open assumptions. Let L be the set of terms of the typed -calculus modulo renaming of bound and free variables. There is an obvious bijection between types and negation-free formulas; show that there is a bijection between L and N , such that a term t of type T is sent to a deduction of the formula corresponding to T . Exercise 6. Find a deduction tree for A ! (B _ (A ! C ))] ! A ! (B _ C )] and, if you've done the previous exercise, the -term corresponding to it.
3 Kripke models
way, that the root is the least element). Given such (K; ] ) we de ne upwards closed subsets ' ] of K for any formula ', by induction: ? ] = ;; ' ^ ] = ' ] \ ]; '_ ] = '] ]; ' ! ] = fx 2 K j 8y x (y 2 ' ] ) y 2 ] )g; :' ] = fx 2 K j 8y x y 62 ' ] g. For k 2 K we say that k satis es ' (written k j= ') if k 2 ' ] . We say that (K; ] ) satis es ', or ' is true in the model (K; ] ), if the root of K satis es
To show that a formula is not provable, we often use models. De nition 3.1 A Kripke model is a nite tree K together with a function ] which assigns, to any propositional variable p, a subset p ] of K which is upwards closed, i.e. x 2 p ] and x y imply y 2 p ] (we take the order in this
'. Let us note an evident fact: whether or not x j= ' depends only on the set fy 2 K j y xg and the sets p ] for those p which actually occur in '.
The intuition behind Kripke models is as follows. We see a node of the tree as a \possible world"; the nodes branching out of that node, as possible future states. In the future, information can be gained, but cannot go lost; therefore, the sets ' ] are upwards closed. We draw Kripke models like this, writing p at a node if that node is in p ] : p p? q ?? ? ?? or ? 10
In the rst model, p _ :p is not true; in the second model, (p ! q) _ (q ! p) fails. Exercise 7. Prove this. Exercise 8. Show that in: p?
?? ? ?? ?
:p _ ::p is not true. Exercise 9. Construct models in which the following formulas are not true: a) ((p ! q) ! p) ! p (Pierce's Law) b) (p ! (q _ r)) ! ((p ! q) _ (p ! r))
We have the following important soundness theorem If ' is derivable, then ' is true in all Kripke models. Exercise 10.* Prove this theorem Hint: you have to devise the right induction hypothesis in order to carry induction over the height of deduction trees]. Conversely, there is the less trivial completeness theorem. If ' is true in all Kripke models, ' is derivable. Bearing in mind that Kripke models are nite, we get: corollary. It is decidable whether ' is derivable or not. Exercise 11. Give an intuitive proof of this corollary. For the lovers of complexity results: R. Statman proved in 1979 that the above decision problem is pspace-complete. The following exercises aim to give you an idea of di erent aspects of model theory: the rst one shows preservation of a large class of formulas under a natural construction on trees (joining them together); the second one gives a proof theoretic result (disjunction property) by using models; the third introduces an important class of maps between models, which preserve the logic; and the fourth is of the kind which characterizes a type of models by the formulas which are true in them. Exercise 12. The class RH of Rasiowa-Harrop formulas is de ned as follows: ? 2 RH, p 2 RH, ' ! C 2 RH if C 2 RH, for any '; and :' 2 RH for every '. Given Kripke models (Ki ; ] i)i2I , we de ne a Kripke Pa nite collection ofP model ( i2I Ki ; ] ), where i2I Ki is the union of all trees Ki with a new 11
root k0; ] is just ] i when restricted to Ki , and we put k0 2 p ] if and only if for all i 2 I , p is true in (Ki ; ] i) Show the following: if C is a P Rasiowa-Harrop formula, and for all i, C is true in (Ki ; ] i), then C is true in ( i2I Ki ; ] ). Show also by a counterexample, that the condition that C is a Rasiowa-Harrop formula, can not be dropped. Exercise 13. Show, using the preceding exercise and the completeness theorem, the strong disjunction property for intuitionistic propositional logic: if C ! '_ is derivable, with C Rasiowa-Harrop, then either C ! ' or C ! is derivable. Conclude from this the ordinary disjunction property: if ' _ is derivable, then ' or is derivable. Exercise 14. Let K and L be nite trees. A monotone function f : L ! K is called an open map (or p-morphism ) if for all x 2 L and b f (x) in K , there is y x in L with f (y) = b. Now suppose that (K; ] ) is a Kripke model, L a tree and f : L ! K an open map. We can de ne a Kripke model (L; ] f ) by putting p ] f = f 1( p ] ) Show that for these two Kripke models, for all x 2 L and all formulas ': x j= ' , f (x) j= ' Exercise 15. Show that the tree K is linear if and only if for all Kripke models (K; ] ) and for all formulas '; , the formula (' ! ) _ ( ! ') is true in (K; ] ).
Is intuitionistic mathematics weaker than classical mathematics? On the one hand: obviously. One has deleted an important logical principle. On the other hand, it is possible to embed classical logic into the so-called `negative fragment' of intuitionistic logic; this is the meaning of exercise 3. So if you read all the connectives negatively (i.e. you interpret ' _ as :(:' ^ : ) throughout), everything which is provable classically is also provable intuitionistically. Moreover, since the logic is weaker, there are more models and less equivalences. Usually, a classical notion `splits' intuitionistically, in the sense that there are several notions, classically equivalent to the given one, but intuitionistically no one is equivalent to another. Proving anything about such a notion 12
4 Further Perspectives
intuitionistically, usually gives you a stronger result than proving it classically. Let's see a simple example. You know of course, that the cardinality of the powerset of a set A is strictly larger than that of A itself. Let's prove it: theorem. There is no injective function P (A) ! A, for any set A. classical proof. We identify P (A) with 2A , the set of characteristic functions. Suppose : 2A ! A is injective. Let f : A ! 2 be de ned as follows: if there is g 2 2A with (g) = a and g(a) = 1; f (a) = 0 1 else Let (f ) = N and consider f (N ). If f (N ) = 0 then for some g, (g) = N and g(N ) = 1, so by injectivity of , g = f and f (N ) = 1 contradiction; so f (N ) = 1 whence by the very de nition of f , f (N ) = 0. Again contradiction. Intuitionistically, there are two things wrong with this proof. First, the identi cation of P (A) with 2A ; and even assuming that that's OK, it is not clear that the function f de ned in the proof, is a total function. But the general idea is perfectly all right, so: intuitionistic proof. Again, suppose : P (A) ! A injective. We de ne the following subset of A: = fa 2 A j 8 A(a 2 ) a 6= ( ))g Let N = ( ). Instantiating for in the de nition of , one sees that N cannot be an element of , but we're going to prove it anyway: if satis es N 2 and N = ( ), then by injectivity of , = so N 2 , but that can't be! So, N 2 . What does this teach us? Well, intuitionistically we cannot repeat the trick with 2A instead of P (A). Does that then mean that intuitionistically, we can have an injective function from 2A into A? Yes, it does! And this has important consequences for the semantics of programming languages; for example one can, in an intuitionistic universe, obtain models for an untyped language in which one has all functions from terms to Booleans, as terms.
The interest in intuitionism experienced a revival in the seventies, when it was discovered, by Lawvere and others, that structures which stood in the limelight of mathematical research, namely categories of sheaves (introduced to algebraic geometry by Grothendieck and Verdier) were, at the same time, models of intuitionistic logic. 13
This has two aspects: reasoning intuitionistically one could sometimes obtain results about these structures which would require a lot of calculations otherwise; on the other hand it provided intuitionism with a wealth of structures in which to test (in)equivalences, derivability questions, independence questions and so on. The resulting eld of \topos theory" unites intuitionism with category theory, and enjoys increasing interest from computer scientists. A good introductory text is the book by MacLane and Moerdijk in the references. Many programming languages are based on some form of type theory (like the typed -calculus). The intuition is that the types are sets, and the terms of an arrow type S ) T are functions between sets S and T . In many cases, this intuition can be given a precise meaning in models of intuitionistic set theory. For example, if there is a type N of natural numbers, it is usually the case that the terms of type N ) N denote recursive functions. Yet we know that not all functions from N to N are recursive: : : Do we? In intuitionistic set theory, one often encounters the statement which is called \Church's Thesis", and which says that all functions from N to N are recursive. There are models of intuitionistic set theory, in which this statement is true. So the basic intuition can be vindicated. Another example is \Brouwer's Theorem": all functions from R to R are continuous. The idea is, that in order to construct anything discontinuous, one has to make use of case distinctions like those we saw in section 1, and which are not valid intuitionistically. But we can say something more precise here. Suppose we have Church's thesis true. Set theoretically, the reals don't di er much from NN . Now if the functions from NN to NN are also given recursively, then the Kreisel-Lacombe-Shoen eld theorem of recursion theory tells us that they must be continuous. Thus, also Brouwer's Theorem can be validated in models of intuitionistic set theory. Acknowledgement. I'm grateful to Glynn Winskel and Vladi Sassone for reading through the manuscript, corrections, hints and discussions.
References
1] M. Beeson, Foundations of Constructive Mathematics, Berlin (Springer) 1985 2] E. Bishop & D. Bridges, Constructive Analysis, Berlin (Springer), 1985 3] L.E.J. Brouwer, Collected Works (A. Heyting, ed.), Amsterdam (North Holland), 1975 (2 volumes) 14
4] S. MacLane & I. Moerdijk, Sheaves in Geometry and Logic, Berlin (Springer), 1992 5] C. Smorynski, Logical Number Theory I, An Introduction, Berlin (Springer), 1991 6] R. Statman, Intuitionistic propositional logic is polynomial space complete, TCS 9 (1979), 67-72 7] A.S. Troelstra, Logic in the writings of Brouwer and Heyting, in: Atti del Convegno Internazionale di Storia della Logica, San Gimignano, 1982, Bologna 1983 8] A.S. Troelstra, On the early history of intuitionistic logic, ITLI Preprint ML-88-04, University of Amsterdam 9] A.S.Troelstra, History of constructivism in the twentieth century, ITLI Preprint ML-91-05, University of Amsterdam 10] A.S. Troelstra & D. van Dalen, Constructivism in Mathematics, Amsterdam (North Holland), 1988 (2 volumes)
15