




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Jeremy Avigad Assistant Professor, Philosophy Carnegie Mellon University
Version: January 2002
ii
many errors and inconsistencies. Please let me know if you find these notes useful in any way. I will be happy to make weekly homework assignments and other handouts available, on request.
Jeremy Avigad January 2001
Modifications in January 2002: in addition to minor corrections, I’ve aug- mented the discussions of compactness and second-order logic in Chapters 7 and 8.
The word “logic” derives from the Greek word “logos,” or reason, and logic can be broadly construed as the study of the principles of reasoning. Un- derstood this way, logic is the subject of this course. I should qualify this remark, however. In everyday life, we use different modes of reasoning in different contexts. We can reason about our experi- ences, and try to determine causal relations between different types of events; this forms the basis of scientific inquiry. We can reason probabilistically, and try to determine the “odds” that the Pirates will win the World Series; or we can employ subjunctive reasoning, and wonder what would have happened had Bill Clinton lost the election. We can reason about events occuring in time, or space; we can reason about knowledge, and belief; or we can reason about moral responsibility, and ethical behavior. We can even try to reason about properties that are vague and imprecise, or try to draw “reasonable” conclusions from vague or incomplete data. It will soon become clear that in this course we will only address a small fragment of such reasoning. This fragment is amodal and atemporal, which is to say that we wish to consider reasoning about what is universally true, independent of time, and without concern for what might have been the case had the world been somehow different. Also, we will be concerned with a kind of reasoning that aims for absoluteness and certainty, allowing us to conclude that a certain assertion necessarily follows from some as- sumptions; this ignores the probabilistic, inductive, and “fuzzy” reasoning alluded to above. One can think of the kind of reasoning we will address as the “mathematical” kind, and our subject matter sometimes goes by the
1
title “mathematical logic.” To study mathematical logic, we will employ the usual methods of ana- lytic philosophy: we will present a formal model of the kind of reasoning we wish to capture, and then we will use rigorous methods to study this model. That is, we will try to identify the aspects of language that are important in mathematical reasoning, and present formal definitions of truth and logical consequence; and then we will explore the ramifications of these definitions. Why restrict ourselves to mathematical logic? In part, because it forms an independently interesting “core” of human reasoning, and in part because studying it is much more tractable than studying more general kinds. Even if you are interested in more general notions of truth, language, knowledge, and rationality, it is a good idea to start with mathematics, where things are neat and precise, and then branch out from there. In short, mathe- matical reasoning forms a paradigmatic subset of reasoning, and one that is amenable to rigorous analysis.
When it comes to logical reasoning, certain words seem to play a central role, among them “and”, “if... then,” “every,” and so on, so our first task will be to describe these linguistic constructions formally. In our approach, statements will be “built up” from basic undefined terms using certain logical connectives. With this analysis in hand, will can try to give an account of what it means for a statement ϕ to follow “logically” from a set of hypotheses Γ. One intuitive approach is to say that ϕ follows from Γ if whenever every statement in Γ is true, then so is ϕ. More precisely, we will say that ϕ is a logical consequence of Γ, or Γ logically implies ϕ (written Γ |= ϕ) if, no matter how we interpret the undefined symbols in the language, if everything in Γ is true, then ϕ is true as well. This is a semantic notion: it forces us to explain what we mean by “interpretation,” as well as “true under an interpretation.” Of course, one might also say that ϕ follows from Γ if there is a proof of ϕ from Γ. We will use Γ ` ϕ, and say, informally, “Γ proves ϕ,” when we want to express this fact. This is a syntactic notion: it forces us to explain what we mean by a proof. This leaves us with two notions of logical consequence: a semantic one, and a syntactic one. What is the relationship between them? One of logic’s most impressive achievements, beyond the suitable formalization of the two
logic is alien to you, you might not feel convinced of this last fact, which may make the formal analysis seem dull and unmotivated. If you want to get a better sense of first-order logic and how it works, I recommend Tarski’s World by Barwise and Etchemendy most highly; the package includes both software and exercises that act efficiently to get you comfortable “thinking in” a first-order language.
The following section establishes some of the notation we will use later on, and reviews some of the mathematical notions you should be familiar with. A staple of modern mathematics is the notion of a set of objects. Sets have elements; the relation “x is an element of A” is written x ∈ A. If A and B are sets then A is a subset of B, written A ⊆ B, if every element of A is an element of B. A and B are equal, i.e. the same set, if A ⊆ B and B ⊆ A. Notice that saying A = B is equivalent to saying that every element of A is an element of B and vice-versa; so two sets are equal if they have exactly the same elements. N, Q, and R denote the natural numbers, the rationals, and the reals respectively. Given a set A, one can describe a subset of A by a property; if P is such a property, the notation
{x ∈ A | P (x)}
is read “the set of all elements of A satisyfing P ” or “the set of x ∈ A such that P (x).” For example, the set
{x ∈ N | for some y ∈ N, x = 2y}
is just a fancy way of describing the set of even numbers. If A and B are sets, A ∪ B denotes their union, i.e. the set of things that are in either one, and A ∩ B denotes their intersection, i.e. the set of things that are in both. If A is a collection of sets,
A and
A denote the union and intersection, respectively, of all the sets in A; if A 0 , A 1 , A 2 ,... is a sequence of sets indexed by natural numbers, then
i Ai^ and^
i Ai^ denote their union and intersection. There are other ways of building more sets. For example, if A is any set, P (A), “the power set of A,” denotes the set of all subsets of A. If A and B are sets, A × B, “the cross product of A and B,” is the set of all ordered pairs 〈a, b〉 made up from of an element a ∈ A and an element b ∈ B.
Another staple of modern mathematics is the notion of a function. For- mally (from a set-theoretic, foundational point of view) a function from A to B is a subset of A × B such that for every a in A there is exactly one b ∈ B such that 〈a, b〉 is in the set. Try to match this up with the intuition that a function is a “map” from A to B; the notation f (a) = b means that the pair 〈a, b〉 is in the set. I will write f : A → B to denote that f is a function from A to B; A is called the domain of f , and B is called the range (or codomain). Having seen the formal definition of a function, it won’t hurt you much to forget it. You should sleep better at night knowing that it is there, and knowing that there a precise set-theoretic framework that provides a clear set of rules for talking about sets and functions. However, in practice, it is easier to learn to speak “mathematics” by studying examples (e.g. in these notes and in the textbook). I will often use ~a to indicate a finite sequence of elements a 1 , a 2 ,... , ak. I will assume that you are familiar with proofs by induction on the natural numbers, though I will review this briefly in the next chapter, mainly as a way to motivate more abstract forms of induction and recursion.
One thing that may cause some confusion is the fact that in this course, with will be using informal logical arguments to study formal logical argu- ments. Which is to say, we will be making informal statements about formal statements, proving informal theorems about formal proofs, and so on. Logicians find it useful to distinguish between “theory” and “metatheory”– that is, the theory that you are studying and the theory you are using to study it. Keep this distinction clear! On the informal level, we will be using the same types of rigorous arguments that you will find in many courses in mathematics and analytic philosophy (this is the metatheory). On the formal level, we will define a symbolic language and proof system to model informal logical discourse (this is the theory). But the formal model should not affect the informal practice. For example, just because we define sym- bols ∧ and → to represent the informal notions conjunction and implication, you are not likely to write a letter home to your family and write
Dear Mom and Dad, I went to my logic class today ∧ learned a lot of neat things. I make it through the class → I will learn a lot more.
If P represents some property that a given natural number may or may not have, I will write P (n) to indicate that P holds of n. The principal of induction on the natural numbers is as follows:
Theorem 2.1.1 (induction principle) Suppose P is some property of nat- ural numbers, such that P (0) is true, and for every natural number n, if P (n) is true then so is P (n + 1). Then P holds of every number.
The upshot of this principle is that we can carry out proofs by induction on the natural numbers. That is, to prove that some statement holds for every natural number, first show that it holds of 0 (this is called the base case) and then show that if it holds of some number n, then it holds of n + 1. For example:
Theorem 2.1.2 For every natural number n,
0 + 1 + 2 +... + n = n(n + 1)/ 2.
Proof. Let P (n) be the property “0 + 1 +... + n = n(n+1) /2.” Base case: 0 = 0. Induction step: We need to show that P (n + 1) follows from the assump- tion that P (n) is true. So suppose P (n), i.e. 0 + 1 +... + n = n(n + 1)/2,
7
and let us try to prove P (n + 1), namely
0 + 1 +... + n + (n + 1) = (n + 1)(n + 2)/ 2.
(Note that P (n + 1) is just the result of replacing n by n + 1 in P (n).) We have that
0 + 1 +... + n + (n + 1) = (0 + 1 +... + n) + (n + 1) = n(n + 1)/2 + (n + 1) = (n + 1)(n + 2)/ 2.
The first line is just a matter of rewriting the equation (technically, the associativity of addition). The second line uses the inductive hypothesis, and the third line follows using ordinary algebra.
In Solow’s book you will find many variations on induction; for example, you can start the induction at any number (i.e. prove that P is true for all numbers greater than k, for some k); or, in the inductive hypothesis, use the fact that P is true for every number smaller than n + 1 (and not just n). In important variation of induction is given by
Theorem 2.1.3 (the least element principle) Suppose P is true for some natural number. Then there is a smallest natural number for which P is true.
You should convince yourself that the least element principle is equivalent to induction, which is to say that each one can be proved from the other using only some other basic properties of the natural numbers. (Hint: the least element principle can be rephrased as follows: if there is no smallest natural number for which P is true, then for every natural number, P is false. Given P satisfying the hypothesis, let P ′(n) be the property “P does not hold of any number smaller than n” and use induction to show that P ′ holds of every natural number.) Recall that a number greater than or equal to 2 is composite if it can be written as the product of two smaller numbers. A number is prime if it is not composite. We will say that a number n can be factored into primes if we can write n = p 1 p 2... pk
where each pi is prime. Here is an example of the way that one can use the least element principle:
Theorem 2.1.4 Every natural number greater than or equal to 2 can be factored into primes.
For example, consider the functions given by
f (0) = 1 f (n + 1) = 2 · f (n)
and
g(0) = 1 g(n + 1) = n · g(n).
Can you give explicit equations for computing f and g? In fact, even addition and multiplication can be specified recursively. For example, we can define x + y by
x + 0 = x x + (y + 1) = (x + y) + 1.
More formally, we are specifying a function f (x, y) by recursion on y, with x carried along as a “parameter.” Here is the general theorem.
Theorem 2.1.6 Suppose a is an element of a set A, and h is a function from A to A. Then there is a unique function g : N → A, having the properties
g(0) = a g(n + 1) = h(g(n)) for every natural number n.
Actually, this form of the theorem corresponds to the first two examples above; more generally, there are some extra parameters ~z floating around, so we have
g(0, ~z) = a(~z) g(n + 1, ~z) = h(g(n, ~z), ~z) for every natural number n.
There are, in fact, even fancier forms of recursion. For example, in specifying the value of g(n + 1), you might want to use values of g for arbitrary inputs less than n + 1. For simplicity, however, I will stick with the simple version. An important thing to notice is that what justifies definition by recur- sion is really the principle of induction. That is, suppose we are given the
specification of g as in the statement of the theorem. I claim that for each n, there is a unique function
gn : { 0 ,... , n} → A
satisfying the specifying equations, up to n. This is not hard to show, by induction. We get the final function g by setting
g(n) = gn(n).
We can now summarize what makes the natural numbers so special: we have a special element, 0, and an operation, “+1,” which “generate” the entire set. This is what gives us the principal of induction, and allows us to define functions recursively. Of course, this setup is so simple that we can hope to generalize it. And, in fact, this is exactly what is going on in the Enderton handout. Read that first; you can consider the information here to be supplementary. Let’s try to clarify what we mean when we say that the set of natural numbers is generated from 0 and the successor function (as “+1” is usually known). Suppose we had a large universe U of objects, containing the natural numbers, but possibly containing other things as well (real numbers, functions, Bob, Joe, Susan, the Beatles’ greatest hits,... ). Suppose we also have a generalization of the successor function defined on U , which maps every natural number to its successor and behaves arbitrarily on other members of U. Can we explain what makes the natural numbers special, by characterizing them in terms of U , 0, and the successor operation? Intuitively, the set of natural numbers is the smallest set containing 0 and closed under this operation. To make this more precise, call a set inductive if it contains 0 and is closed under the successor operation. Of course, the natural numbers are such a set, but there are other inductive sets that are too big: for example, take the natural numbers together with { 3. 5 , 4. 5 , 5. 5 ,.. .}. In a sense, we want to say that the natural numbers is the smallest inductive subset of U. Formally, we can define
N∗^ =
{I | I is an inductive subset of U }.
Another way of characterizing the set of natural numbers is to say that the natural numbers are the things you can get to, starting from 0 and applying the successor function at most finitely many times. This is the idea
But anything in C∗^ is in every inductive set. So everything in C∗^ is in C∗.
Lemma 2.2.3 C∗ is a subset of C∗.
Proof. Let a be any element of C∗. Then there is a formation sequence 〈a 0 ,... , ak〉 with ak = a. Show by ordinary induction on the natural num- bers, that for each i, ai is in C∗. So a is in C∗.
So C∗^ = C∗. From now on, let’s drop the stars and call this set C.
Lemma 2.2.4 The principle of induction holds for C. In other words, if D is any inductive subset of C, then D = C.
Proof. Let D be an inductive subset of C. By the definition of C∗, every element of C is in D, so C is a subset of D. Hence D = C.
Put slightly differently, we have the following:
Theorem 2.2.5 (induction principle for C) Suppose P is a property of elements of C, such that P holds of all the elements of B, and for each function fi, if P holds of each of the elements a 1 ,... , ak, then P holds of fi(a 1 ,... , ak). Then P holds of every element of C.
Proof. Let D be the set of elements of C with property P ; the hypothesis says that D is an inductive set.
As far as terminology goes, I will say that C is the “smallest subset of U containing B and closed under the fi.” Or, leaving U implicit, I will write that C is the set inductively defined by the following clauses:
For example, the set of “AB-strings” is the smallest set of strings of symbols such that
where sˆt denotes the result of concatenating the strings s and t. For another example, we can define the set of “arithmetic expressions” to be the smallest set of strings of symbols such that
Here (s + t) is really an abbreviation for “(”ˆsˆ“+”ˆtˆ“)”, but for the most part, I will stick with the lazier notation. Finally, we can think of the natural numbers themselves as being the smallest set of “mathematical objects” containing 0 and closed under the successor function. By the time this course is done, you will have seen lots more examples of inductive definitions. Here is a very simple example of how one can use the principle of induc- tion on an inductively defined set.
Proposition 2.2.6 Every arithmetic proposition has the same number of left and right parentheses.
Proof. If n is a natural number, the decimal representation of n has no left parentheses and no right parentheses, so the statement holds in the base case. For the induction step, suppose the claim holds for s and t, and let us show that it holds for (s + t). In this last expression, the number of left parentheses is equal to one plus the number of left parentheses in s plus the number of left parentheses in t. The number of right parentheses is equal to one plus the number of right parentheses in s plus the number of right parentheses in t. By the inductive hypothesis, these two numbers are equal. A similar argument shows that if the claim holds for s and t, it holds for the expression (s × t). This covers all the cases, so we are done.
A historical note: the definition of the natural numbers “from above,” which involves taking an intersection over all inductive sets, make strike you either as being really nifty, or really bizarre. This characterization first appeared, essentially, in Frege’s “Begriffschrift” of 1879 and his Grundlagen der Arithmetik of 1884. It is also beautifully described in an essay by Richard Dedekind called “Was sind und was sollen die Zahlen,” (roughly, “What are