1 introduction to logic

27
Richard L. Mendelsohn Lehman College and the Graduate School, CUNY Advanced Logic September 8, 2008

Upload: others

Post on 12-Sep-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Introduction to Logic

Richard L. Mendelsohn

Lehman College and the Graduate School,

CUNY

Advanced Logic

September 8, 2008

Page 2: 1 Introduction to Logic

Contents

Part I Propositional Logic

1 Introduction to Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.1 Preliminary Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.1.1 Preliminary motivating remarks . . . . . . . . . . . . . . . . . . . . . 31.1.2 What is a Function? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.1.3 Use and Mention/Object Language and Meta Language 91.1.4 Alternative Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

1.2 The System P: Informal Semantics . . . . . . . . . . . . . . . . . . . . . . . . 111.2.1 Propositional Logic: Introductory Remarks . . . . . . . . . . . 111.2.2 Well-Formed Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131.2.3 Rules of Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

1.3 Historical Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

2 Propositional Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.1 The System P: Informal Semantics (Cont.) . . . . . . . . . . . . . . . . . 23

2.1.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.1.2 Some Facts About |= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

2.2 Normal Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.2.1 Adequate Sets of Connectives . . . . . . . . . . . . . . . . . . . . . . . 282.2.2 Transforming Wffs Into Boolean Normal Form . . . . . . . . 30

2.3 The Interpolation Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322.3.1 Some Facts about Substitution and Interchange . . . . . . . 322.3.2 The Interpolation Theorem . . . . . . . . . . . . . . . . . . . . . . . . . 33

2.4 Homework Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352.4.1 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352.4.2 Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

3 Mathematical Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373.1 Mathematical Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

3.1.1 Peano’s Axioms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Page 3: 1 Introduction to Logic

ii Contents

3.1.2 **Example: Parentheses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413.1.3 The Principle of Induction on the Construction of a Wff 423.1.4 **The Induction Principle . . . . . . . . . . . . . . . . . . . . . . . . . . 43

3.2 Unique Decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453.2.1 Unique Readability Theorem. . . . . . . . . . . . . . . . . . . . . . . . 453.2.2 Finding the Main Connnective . . . . . . . . . . . . . . . . . . . . . . 47

3.3 Some Theorems Involving Induction . . . . . . . . . . . . . . . . . . . . . . . 483.3.1 Unique Valuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483.3.2 The Interpolation Theorem . . . . . . . . . . . . . . . . . . . . . . . . . 483.3.3 Disjunctive Normal Form . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

4 Propositional Logic: Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514.1 The System PS: Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

4.1.1 Axioms and Rules of Inference . . . . . . . . . . . . . . . . . . . . . . 514.1.2 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524.1.3 Further results about ` . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534.1.4 Sample Derivations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

4.2 The Deduction Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564.2.1 Theorems Into Prooofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564.2.2 The Deduction Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

4.3 A System of Natural Deduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 594.3.1 Establishing the Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594.3.2 Introduction and Elimination Rules . . . . . . . . . . . . . . . . . . 594.3.3 Establishing Our Axioms . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

4.4 Homework Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624.4.1 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624.4.2 Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

5 Propositional Logic: Consistency and completeness . . . . . . . . 655.1 Soundness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655.2 Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665.3 Completeness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

5.3.1 An Axiomatization of Propositional Logic . . . . . . . . . . . . 675.3.2 Kalmar’s Proof: Informal Exposition . . . . . . . . . . . . . . . . . 705.3.3 Kalmar’s Proof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

5.4 Homework Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745.4.1 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745.4.2 Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

6 Henkin Style Completeness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756.1 Completeness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

6.1.1 Informal Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756.2 The Henkin Proof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766.3 Compactness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

Page 4: 1 Introduction to Logic

Contents iii

7 Tableaux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817.2 Completeness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

Part II First-Order Logic

8 Completeness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

9 First-Order Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 939.1 The Language of First Order Logic . . . . . . . . . . . . . . . . . . . . . . . . 93

9.1.1 Well-Formed Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 939.1.2 Scope and Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 969.1.3 Problems of Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

10 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10110.1 Informal Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10110.2 Elimination of Quantifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10310.3 Formal Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

10.3.1 Satisfaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10510.3.2 Truth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

10.4 Homework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10910.4.1 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10910.4.2 Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

11 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11111.1 Some Theorems Concerning Satisfaction . . . . . . . . . . . . . . . . . . . . 11111.2 Some Logically Valid Wffs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

12 Natural Deduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11512.1 Hunter’s Axioms for the system Q . . . . . . . . . . . . . . . . . . . . . . . . . 11512.2 Natural Deduction Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11812.3 Sample Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

Page 5: 1 Introduction to Logic

Part I

Propositional Logic

Page 6: 1 Introduction to Logic
Page 7: 1 Introduction to Logic

1

Introduction to Logic

Reading: Metalogic Part I, 1-6; Part II,15-19

Contents1.1 Preliminary Remarks . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.1.1 Preliminary motivating remarks . . . . . . . . . . . . . . . 31.1.2 What is a Function? . . . . . . . . . . . . . . . . . . . . . . . . . 61.1.3 Use and Mention/Object Language and Meta

Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.1.4 Alternative Notations . . . . . . . . . . . . . . . . . . . . . . . . 10

1.2 The System P: Informal Semantics . . . . . . . . . . . . . 111.2.1 Propositional Logic: Introductory Remarks . . . . . 111.2.2 Well-Formed Formulas . . . . . . . . . . . . . . . . . . . . . . . 131.2.3 Rules of Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . 15

1.3 Historical Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

1.1 Preliminary Remarks

1.1.1 Preliminary motivating remarks

In characterizing a formal system, we state the Formation rules, i.e., the rulesfor setting down the sequences of expressions that will count as meaningful.Then we state the Transformation rules, i.e., the rules for generating the the-orems of the system. And finally, we state the Translation rules, i.e., the rulesidentifying what the meaningful expressions specified by the Formation rulesare supposed to mean, so that the theorems of the system will be interpretedas truths. The Formation and Transformation rules of the system are fre-quently called the Syntax of the system; the Translation rules are frequentlycalled the Semantics of the system.1

1 The terms Formation Rules and Transformation Rules are Carnap’s (1937).(Translation Rules is my term); in the days when logicians were suspicious of

Page 8: 1 Introduction to Logic

4 1 Introduction to Logic

One of the paradoxical results many of us are familiar with from elementarylogic is that everything follows from a contradiction. An argument to thiseffect, which does not depend on the well-known peculiarities of the materialconditional, goes as follows:

1. p ∧ ¬p Assumption2. p Simplification, 13. p ∨ q Addition, 24. ¬p Simplification, 15. q Disjunctive Syllogism, 3, 4

So, assuming a contradiction, ‘p ∧ ¬p’, we have been able to derive an arbi-trarily chosen statement, ‘q’.

This is an example of a derivation within a system of natural deduction,which we might call S. A derivation is a sequence of steps, each of which is apremise or an assumption or the result of applying one of the Deduction (i.e.Transformation) Rules in the system to earlier steps in the derivation. Sincewe have ‘q’ on the last line of the derivation and ‘p∧¬p’ our only assumption,we say

‘q’ is derivable from ‘p ∧ ¬p’ in the system S.

In mathematical notation, we express this as follows:

‘p ∧ ¬p’ `S ‘q’

(‘`’ is called the turnstile.)Three Deduction Rules have been used in the derivation:

Simplification:A ∧ BA

Addition:A

A ∨ B

Disjunctive Syllogism :A ∨ B,¬A

B

To apply the rule of Simplification to line 1. in the derivation, we had tobe able to identify the formula on line 1. as a conjunction. Our notationmust be sufficiently precise so that the identification can be done purely onthe basis of the shapes in the notation: a machine, or an individual lackingany understanding of the intended meaning of the shapes, should be ableto make this identification. This is not a totally trivial problem. There aretwo connectives in the formula, and it must be clear that the conjunction-sign is the main connective. Similarly, to apply the rule of Addition, we had

anything semantical in logic, to specify a formal system was just to state theFormation Rules and the Transformation Rules.

Page 9: 1 Introduction to Logic

1.1 Preliminary Remarks 5

to identify the formula on line 3. as a disjunction. So, we require a precisecharacterization of the notion of a meaningful sequence of expressions and aprecise characterization of the notion of the main connective in a formula.

Once we are satisfied that our notation is precisely characterized, then, tocomplete our description of the syntax of our language, we must specify thederivation rules and what is to count as a derivation. If we were to continuethe list of rules in the spirit of those already given, we would produce a listof Introduction-and-Elimination Rules, or, as they are fondly known, IntelimRules, for each of the logical symbols of our language. Addition is an intro-duction rule for ∨ because it enables us to introduce a formula using ∨ intothe derivation; Disjunctive Syllogism is an elimination rule for ∨ because itenables us to break up a previously derived disjunction and write one of thedisjuncts on a distinct line.

Each of the derivation rules in the language is intended to capture someelementary valid inference. The rule of Simplification only says that, givena line containing a conjunction, we can add on a new line to the derivationcontaining one of the conjuncts. (So it is an ∧-elimination rule.) Intuitively,this is supposed to capture the fact that if a conjunction is true, each conjunctis true. Addition holds because a disjunction is true if one of the disjuncts istrue. We want the steps in our derivation to be such that if we start out withtrue premises, then each step the rules enable us to add on to the derivationwill also be true. If we start out with truths and stay on the path of righteous-ness (in this context, that means obeying the laws of logic), then we will neverstray into falsehood. We want the syntactical manipulations admissible in thesetting up of a derivation to mimic the intuitive semantic notion of “followsfrom” or “is a logical consequence of.” We say that

‘q’ is a logical consequence of ‘p ∧ ¬p’ in the structure S.

which is expressed in mathematical notation as:

‘p ∧ ¬p’ |=S ‘q’

(‘|=’ is called the double turnstile.) if any interpretation which makes ‘p∧¬p’true in a structure also makes ‘q’ true.

We need, then, to set up the semantics of our language. We have to makeprecise the notion of an interpretation, which is supposed to set out whatthe elements of the notation mean. For the case of truth-functional logic, theintended structure will consist of the set of truth values T,F and the booleanfunctions on this set. An interpretation links up elements of the notation withelements of the structure. ‘∧’, for example, gets interpreted as the booleanfunction

f∧ : {T, F} × {T, F} → {T, F}

such that

f∧(x, y) ={

T if x = T and y = TF otherwise

Page 10: 1 Introduction to Logic

6 1 Introduction to Logic

That is, a conjunction of two truths is true; a conjunction of any other com-bination of truths and falsehoods is false.

There are two key theorems we want to prove. The first assures us thatour rules are truth-preserving, i.e., that whenever we can derive a statementfrom a set of statements that the argument is intuitively a valid one. Let Γ bea set of statements and let γ be an individual statement. Then we can statethis theorem as follows:

Soundness If Γ ` γ, then Γ |= γ

The second assures us that our rules capture all of those inferences we in-tuitively believe to be valid under the intended interpretation of the logicalsymbols:

Completeness If Γ |= γ, then Γ ` γ

1.1.2 What is a Function?

We associate with each open sentence ‘Px’, that we intuitively take to expressa property, a set P = {x | Px}.2 If we were to take ‘Px’ to be ‘x is a parent’,then P is the set of parents. If ‘Pa’ is true, we say a ∈ P, i.e., a is an elementor member of P. Let C be the set of children. Since every parent is a child, wehave the following relation holding between the two sets: If x ∈ P then x ∈ C.We abbreviate this P ⊆ C, i.e., P is a subset of C. Since there are childrenwho are not parents, i.e., since there exists at least one x such that x ∈ C butx 6∈ P, P is said to be a proper subset of C, denoted P ⊂ C. And since thereexists at least one x such that x ∈ C but x 6∈ P, the two sets are not identical,for sets are identical iff their members are: P = C ↔ (

∧x)(Px ≡ Cx).

We distinguish the element x from the singleton {x}: x ∈ {x} but x 6= {x}.We distinguish the set {x, y} from the ordered pair < x, y > which is frequentlyrepresented as {{x}, {x, y}}. The null or empty set, designated Φ is a set thathas no elements so that for every set S, Φ ⊆ S.

Here are some important operations on sets:

• The intersection of P and CP ∩C = {x | Px∧Cx}. P ∩C is the set of all things that are in both sets,P and C. Following through with our example, it is the set of all thingsthat are both parents and children.3

• The union of P and CP ∪ C = {x | Px ∨ Cx} P ∪ C is the set of all things that are in one orthe other of the two sets P and C. It is the set of all things that are eitherparents or children.

2 Of course, such an unrestricted Comprehension Axiom of Set Theory would allowthe paradoxes to be generated; precise statements guard against them.

3 Since in this particular case P ⊆ C, P ∩ C = P

Page 11: 1 Introduction to Logic

1.1 Preliminary Remarks 7

• The Power Set of P2P = {S | S ⊆ P}. 2P is a set, each of whose elements is a set. It consistsof all possible groupings of parents. So, it includes P itself, the set of allparents, as well as the set of male parents, of female parents, of Frenchparents, of parents of twins, and so on.

We also have P + C = {x | x ∈ P or x ∈ C but not both }. And P − C = {x |x ∈ P ∧ x 6∈ C}. Satisfy yourself that each of the following is true:

P ⊆ P ∪ C, P ∩ C ⊆ P, P ⊆ 2P

We associate with each open sentence Rx1x2 . . . , xn, that we intuitivelytake to express an n-ary relation, a setR = {< x1, x2, . . . , xn >| Rx1x2 . . . , xn}The most usual type of relation is a binary relation relating two things, e.g.η is a parent of ζ. In set theoretic terms, this relation associates elements ofthe set of parents with elements of the set of children, and we represent therelation as the set of ordered pairs < x, y > whose first element x is a parentand whose second element y is a child of that parent. Here are some examplesof such ordered pairs:

<Henry Fonda, Jane Fonda><Henry Fonda, Peter Fonda><Lyndon Johnson, Lucy Johnson><Lady Bird Johnson, Lucy Johnson>

Let us call the set of all such ordered pairs R. Note that we distinguish R fromits inverse, designated R−1, where < y, x >∈ R−1 ↔< x, y >∈ R Where Pis the set of parents and C is the set of children, P × C, called The CartesianProduct of P and C, is {< x, y >| x ∈ P ∧ y ∈ C}. R ⊆ P × C. Actually,R ⊂ P × C, because the ordered pair <Lady Bird Johnson, Jane Fonda>∈ P × C but 6∈ R. We might restrict the ordered pairs in the relation Rto those involving only children who are themselves parents. That restrictedrelation is a subset of P × P, (denoted P2). X1 × X2 × · · · × Xn is the set ofall n-tuples < x1, x2, . . . , xn > where xi ∈ Xi. X × X × · · · × X︸ ︷︷ ︸

n

is the set of

all n-ary operations on X , and is designated Xn. A function is a special kindof relation. The most usual kind of function, a singulary function, associateselements of one set, called the domain of the function, with elements of another(not necessarily distinct), called the range of the function. The domain of thefunction F , Dom(F) = {x |< x, y >∈ F}; the range of the function F , Ran(F)= {y |< x, y >∈ F}. A function, F is a relation that satisfies the followingcondition:

If < x, y >∈ F and < x, z >∈ F , then y = z.

Page 12: 1 Introduction to Logic

8 1 Introduction to Logic

If F is a function and < x, y >∈ F , then y is said to be the value or imageof the function F for the argument x.4 The more usual notation for this is:F(x) = y.

The relation R above is not a function, because it associates more thanone element of the range with a given element of the domain: a parent canhave more than one child. If, however, we were to restrict the relation so thata parent is associated with its first-born child, we would have a function. Thatfunction would contain the ordered pair <Henry Fonda, Jane Fonda> but notthe ordered pair <Henry Fonda, Peter Fonda>. The function F from P intoC has Dom(F)⊆ P and Ran(F)⊆ C. We say that a function G is one-to-oneor 1− 1 if

If < x, y >∈ G and < z, y >∈ G, then x = z.5

F is not 1-1, because a child will have more than one parent. However, if wewere to consider the relation between fathers and their first-born, we wouldhave a 1-1 function. A function G is onto C if Ran(G) = C.6 Neither of the twofunctions just defined are onto C because not all children are first-born.

XY is the set of all functions from Y into X . This notation has alreadybeen used by us. We used 2X to specify the Power Set of X . We can explainthis notation by means of an example. Let X = {a, b}, i.e., the set consistingof the two elements a and b. And we identify the number 2 with any twoelement set: the one we like in logic is {>,⊥}. Now here are all the subsets{a, b}:

Φ{a}{b}{a, b}

These correspond, respectively, to the following functions from {a, b} into{>,⊥}:

{< a,⊥ >,< b,⊥ >}{< a,> >,< b,⊥ >}{< a,⊥ >,< b,> >}{< a,> >,< b,> >}

Each of these is a characteristic function for the respective set, associatingan element with > if it is in the set and associating it with ⊥ if it is not inthe set.7 The notation Xn for X × · · · × X︸ ︷︷ ︸

n

is also to be understood as the set

4 It is because a function associates a unique element with each argument that wecan speak of the value for a given argument.

5 That is, in the more usual notation, G is 1-1 if x = y whenever G(x) = G(y).6 Alternate terminology:an injection is 1-1, a surjection is onto, and a bijection is

1-1, onto.7 These are Frege’s Werthverlaufe.

Page 13: 1 Introduction to Logic

1.1 Preliminary Remarks 9

of all functions from the set consisting of n integers into X . Consider, as anexample, X = {a, b}. Then X × X consists of the following elements:

< a, a >< a, b >< b, b >< b, a >

Then X 2 = {a, b}{1,2} has the following elements, respectively,

{< 1, a >, < 2, a >}{< 1, a >, < 2, b >}{< 1, b >, < 2, b >}{< 1, b >, < 2, a >}

1.1.3 Use and Mention/Object Language and Meta Language

This is a course in metalogic, so it is about logical systems. It is importantthat we keep clear the difference between the language we use to talk abouta logical system (the meta language) and the language of the logical systemwe are talking about (the object language).

The standard philosophical convention for signaling that an expression isbeing talked about is to enclose that expression in single quotes. So, as Quinereminds us, it is not Boston that is disyllabic, but ‘Boston’. So, for example,when we said

‘p ∧ ¬p’ |=S ‘q’

we indicated that one expression was a logical consequence of another: so weplaced each of the expressions in single quote marks because we were talk-ing about them. Observing the distinction between use and mention is quiteimportant; failure to observe it can lead to confusion and error.8 Frequently,however, the quote marks get in the way, and we drop them when there islittle likelihood of confusion. So, we will (as Hunter does) drop quote marksin cases like the example above and write instead

p ∧ ¬p |=S q

Hunter’s system of propositional logic, P, contains various symbols: thepropositional symbols, connectives, and left and right parentheses. These be-long to the object language. But if we want to speak about various formulasin P, we must use the metalanguage. So, we will use calligraphic letters,A,B, C, . . . to speak generally about any formulas of the system. And theconnectives ‘⊃ and ¬ will be included in the metalanguage as well as theobject language. This enables us to speak of a conjunction A ⊃ B withoutspecifying the actual propositional symbols occurring in it, or even specifying8 The classic fire and brimstone sermon on the topic is to be found in W.V.O.

Quine, Mathematical Logic.

Page 14: 1 Introduction to Logic

10 1 Introduction to Logic

how complex A and B might be. Again, we trust that this will not cause anyconfusion.

1.1.4 Alternative Notations

English does not have parentheses to group phrases as our symbolic notationdoes. English has grouping words, however: ‘either’ goes with ‘or’, ‘both’ goeswith ‘and’, and ‘if’ goes with ‘then’. A judicious placement of ‘either’ willrender ‘A and B or C’ unambiguous. ‘Either A and B or C’ is unambiguousand symbolized as ‘(A ∧ B) ∨ C’, while ‘A and either B or C’ goes in as‘A∧ (B ∨ C)’. And ‘If if A then B then C’ goes in as ‘(A ⊃ B) ⊃ C)’, while ‘IfA then if B then C’ goes in as ‘A ⊃ (B ⊃ C)’.

It is possible to have a logical symbolism without parentheses. In Principia,Russell and Whitehead used a system of dots instead; Quine adopted thissystem in Methods of Logic. By placing a dot at the side of a connective, thescope of a connective occurring on that side is broadened. So, for example,(A ⊃ B) ⊃ C) would be represented as A ⊃ B. ⊃ C, while A ⊃ (B ⊃ C) wouldbe represented as A ⊃ .B ⊃ C. It might turn out that more than one dotwould be needed to disambiguate properly. For example, A ⊃: B ∨ C. ⊃ A isA ⊃ ((B ∨ C) ⊃ A).

It is possible to have a logical symbolism with no punctuation neededto group subformulas. Such a symbolism was devised by the Polish logicianLukasiewicz, and has subsequently been called Polish Notation. (Prior (1955)favors this notation in his work.) Here is the notation:9

¬ p Npp ∧ q Kpqp ∨ q Apqp ⊃ q Cpqp ≡ q Epq

We leave it as an exercise to the reader to distinguish CCpqr from CpCqr,ApKqr from AKpqr, and to read

CCpCqrCCpqCprCCpAqrACpqCprCCCpqpp

In Polish notation, the logical symbols are prefixes. In traditional notation,they are infixes. They can also be postfixes. The HP calculators employ whatis known as Reverse Polish Notation for symbolic entry. To calculate ‘3 + 5’,you first enter the ‘3’, then the ‘5’, and finally the ‘+’. How would you enter“5× (4 + 2)’?9 The quantifier notation is as follows:

(V

xi)B ΠxiB(W

xi)B ΣxiB

Page 15: 1 Introduction to Logic

1.2 The System P: Informal Semantics 11

1.2 The System P: Informal Semantics

1.2.1 Propositional Logic: Introductory Remarks

For the sentential connectives, we adopt the following truth table definitions:

A ¬AT FF T

A B A ∧ B A ∨Q A ⊃ B A ≡ BT T T T T TT F F T F FF T F T T FF F F F T T

And we also adopt the following informal guidelines for translating the truthfunctional connectives:10

¬A . . . It is not the case that AA ∧ B . . . A and BA ∨ B . . . A or B, A unless BA ⊃ B . . . If A then B, A only if B, B if AA ≡ B . . . A if, and only if B

As for the connectives, we note the following:

conjunction The two constituent statements in a conjunction are called con-juncts. There is no temporal priority in the ordering to the conjuncts bycontrast with our ordinary ‘and’ which frequently does carry such an im-plication. For example, compare ‘He got knocked on the head and felldown’ and ‘He fell down and got knocked on the head’. It is natural toregard the first as implying that he fell down as a result of the blow tothe head, and the second as implying that he received a blow to the headas a result of the fall. Logically, however, conjunction is commutative, i.e.,ordering does not matter, so that A ∧ B is logically equivalent to B ∧ A.

disjunction The two constituent statements in a disjunction are called dis-juncts. (Quine favors the terminology of alternation and alternates.) Wehave defined the inclusive ‘or’: one or the other or both. The exclusive ‘or’(which computer scientists call ‘xor’) means: one or the other but not both.Latin has two words for ‘or’ corresponding to these two boolean functions,

10 There are a number of alternative symbolisms. For negation -, ¬; for conjunc-tion &, ·; for disjunction +; for the conditional →; for the biconditional↔.

Page 16: 1 Introduction to Logic

12 1 Introduction to Logic

A B A vel B A aut QT T T FT F T TF T T TF F F F

Our ∨ is derived from the ‘v’ in ‘vel’. The mathematical ‘or’ is clearlyinclusive. The situation in ordinary English is a bit more complicated.A high proportion of natural language informants who have not beenexposed to logic will aver theirs is the ‘exclusive’ or. One fallacy in popularreasoning that leads to this belief is worth removing.11 One might thinkthat ‘Sally is either at A&S or Macys’ exhibits the exclusive ‘or’. Sallycannot be at both places at the same time, so she is at one place orthe other, but not both. But the question to bear in mind is, ‘What isdoing the excluding here?’ Is it the ‘or’ that is forcing us to choose onlyone of the alternatives, or is it the fact that the alternatives are mutuallyexclusive? The alternatives are mutually exclusive, so they cannot both betrue. Does this show that the ‘or’ is therefore inclusive? No. It cannot. Itdoes, however, defang one of the most persistent reasons for thinking ‘or’is exclusive. But why does it fail to show that ‘or’ is inclusive? Because,the only line on the truth table that distinguishes the inclusive from theexclusive ‘or’ is the top line when both disjuncts are true. To show wehave an exclusive ‘or’, then, we need a situation in which both disjunctsare true and the disjunction is false. This is not an easy case to come by.(Test intuitions about ‘or’ by considering the negation of a disjunction,e.g., ‘Sally didn’t take either French or Spanish in high school’, and thencalculate what this implies about the truth table for ‘or’.)

conditional A ⊃ B symbolizes the material conditional, as it was dubbedby Russell (some call it the Philonian Conditional after the ancient Stoicphilosopher who first clearly stated its truth conditions.12 The if clauseis called the antecedent; the then clause is called the consequent. Thematerial conditional corresponds to the mathematicians usage, on whichA ⊃ B means

Either A is false or else A is true and (so) B is true.

There is considerable controversy about the connection between the ma-terial conditional and the ordinary conditional, and an even larger andever-growing literature about different types of ordinary conditionals, e.g.,indicative, subjunctive, contrary to fact. (Jeffrey (1990) uses Gricean ideasto defend the material conditional: his examples and discussion are ex-cellent. But the Gricean defense is deeply flawed.) It is, perhaps, worthremarking (and, on reflection, not so surprising) that the ‘if, then’ in com-puter languages is just the material conditional. Think of a command, e.g.,

11 The argument is from Quine (1950).12 See Kneale and Kneale (1962) for discussion.

Page 17: 1 Introduction to Logic

1.2 The System P: Informal Semantics 13

‘Shut the door,’ as telling someone to make a particular statement true,namely, ‘The door is shut.’ Then an ‘If, then’ command in BASIC, say,will be understood by the computer to make the ‘if, then’ statement true.Consider a typical BASIC command:

(15) If x > 0 then goto step 25.

How does the computer understand this? If the antecedent is true, i.e.,if x > 0, then the computer does whatever the consequent tells it todo, in this case, go immediately to step 25. If the antecedent is false,the computer ignores the consequent and simply proceeds to the nextcommand. That is, if the antecedent is true, the computer must makethe consequent true for the conditional to be true; if the antecedent isfalse, the conditional is already true and the computer does not have todo anything to make it true. A last note, also from Quine. We must becareful about distinguishing If A then B from A implies Q. The formersays that ‘A ⊃ B’ is true. The latter says that ‘A ⊃ B’ is logically true.

1.2.2 Well-Formed Formulas

Hunter’s system P has the following vocabulary:

• propositional symbols: p, p′, p′′, p′′′, . . .• connectives: ¬, ⊃• punctuation marks: (, )

Of the infinite number of finite sequences of these elements, we single out themeaningful sequences, namely, the well-formed formulas.13 We define the setof wffs inductively:

Definition 1.2.1 (Well-Formed Formula of PS)

(1) A propositional symbol is a wff;(2) If A is a wff, then ¬A is a wff;(3) If A and B are wffs, then (A ⊃ B) is a wff;(4) The only wffs are those obtained by (1)-(3).

None of the following are wffs of the system:

(p′′ ¬(p′′) p′′ ⊃ p′

Parentheses can only be introduced with the horseshoe. The first contains nohorseshoe, so it cannot contain parentheses—and, of course, if parentheses areintroduced, they would have to be introduced in pairs; the second containsno horseshoe, so it cannot contain parentheses; the third contains a horseshoeand no parentheses. On the other hand each of the following is a wff:

p′′ ¬(p′ ⊃ (¬p′′ ⊃ p′)) (p′′′ ⊃ ¬(p′ ⊃ ¬p))

13 wffs, for short; the adjective well-formed is abbreviated wf.

Page 18: 1 Introduction to Logic

14 1 Introduction to Logic

We can establish that the second, for example, is a wff of the system by meansof the following construction sequence

1. p′ (1)2. p′′ (1)3. ¬p′′ (2), from 2.4. (¬p′′ ⊃ p′) (3), from 1. and 3.5. (p′ ⊃ (¬p′′ ⊃ p′)) (3), from 1. and 4.6. ¬(p′ ⊃ (¬p′′ ⊃ p′)) (2), from 5.

Each line in this construction is either a propositional symbol (as per (1)), orthe negation of an expression that has already been established to be a wff (asper (2)), or a conditional enclosed in parentheses, each of whose constituentsis a previously established wff (as per (3)). Part (4) of the definition of a wffassures us that there is a construction sequence for every wff.14 Informally,it is clear from the definition of a wff that every wff will be a propositionalsymbol, or it will have either of the two forms ¬A or (A ⊃ B), where A,B areboth wffs. Moreover, informally, it is clear that no complex wff can be viewedas having both forms, ¬A and (A ⊃ B). The notion of a construction sequencewill come in handy later on, because we will prove some theorems about thesystem P by induction on the length of a construction proof for a wff.

Definition 1.2.2 (Immediate Subformula) An immediate subformula ofa wff A will be B if A is ¬B or either B or C if A is (B ⊃ C).

Definition 1.2.3 (Subformula) A subformula of a wff A will be either animmediate subformula of A or an immediate subformula of a subformula ofA.15

Having identified what we intend to be the meaningful sequences of expres-sions of P, we should now say something about what we intend them to mean.By an Interpretation for P, we mean an assignment of truth values to eachof the propositional symbols, and an assignment of truth-functions to each ofour propositional connectives in the intended way. That is, we assign ¬ thefunction

f¬ : {T, F} → {T, F}

such that

f¬(x) ={

T if x = FF if x = T

and we assign ⊃ the function

f⊃ : {T, F} × {T, F} → {T, F}

such that14 Question: Can there be more than one construction sequence for a wff?15 Question: Which are the subformulas of ¬(p′ ⊃ (¬p′′ ⊃ p′))?

Page 19: 1 Introduction to Logic

1.2 The System P: Informal Semantics 15

f⊃(x, y) ={

F if x = T and y = FT otherwise

If all goes according to plan, then each interpretation provides us with a uniquetruth value for every complex wff of P. This is not a matter of chance. Theidea is that the truth value of a complex wff is supposed to be a function (sounique) of the truth values of its constituent propositional symbols.16 It canbe proved, though we will put off the proof until we have discussed proof byinduction: we shall need to show that each complex wff decomposes uniquely.

Note that Hunter takes only ¬ and ⊃ as primitive. The other connectivesare easily defined in terms of these primitives. So,

• (A ∨ B) =def (¬A ⊃ B)• (A ∧ B) =def (¬(A ⊃ ¬B))• (A ≡ B) =def ((A ⊃ B) ∧ (B ⊃ A))

For ℵ017 propositional symbols, there are 2ℵ0 distinct interpretations. In

any given wff, there will only be a finite number n of propositional symbols,and so only 2n distinct interpretations of that formula. When we set up atruth table for a wff, we consider all possible assignments of truth values tothe propositional symbols occurring in the wff, and then calculate the truthvalue of that wff for each such assignment. Let’s work out a truth table forthe wff ¬(p′ ⊃ (¬p′′ ⊃ p′)). We consider all possible truth value assignmentsto the propositional symbols p′, p′′, and then calculate the truth value of eachof the subformulas of the wff until we can calculate the truth value of the wffitself. The truth table looks like this:

p′ p′′ ¬p′′ (¬p′′ ⊃ p′) (p′ ⊃ (¬p′′ ⊃ p′)) ¬(p′ ⊃ (¬p′′ ⊃ p′))T T F T T FT F T T T FF T F T T FF F T F T F

We find out that our wff is F for all possible assignments.

1.2.3 Rules of Resolution

Truth tables grow geometrically in size with each new propositional letter. Awff containing 1 variable will have 21 = 2 lines, a wff containing 2 variableswill have 22 = 4 lines, a wff containing 3 variables will have 23 = 8 lines, awff containing 4 variables will have 24 = 16 lines, and so on. So truth tables,although a mechanical way of computing the truth value of a complex for anyassignments of truth values to its constituent propositional symbols, becomes16 This property of the logical system is known as Compositionality.17 This is the number (in the sense of cardinal number of the integers. It is the

smallest transfinite number.

Page 20: 1 Introduction to Logic

16 1 Introduction to Logic

unwieldy rather fast. In this section, we consider an alternative proceduredescribed in Quine’s Methods of Logic. This is the method of Resolution.

There are 8 Rules of Resolution to bear in mind.

(i) Delete T as a component of conjunction.(ii) Delete F as a component of disjunction.(iii) Reduce a conjunction with F as a component to F.(iv) Reduce a disjunction with T as a component to T.(v) If a conditional has T as antecedent or consequent, drop the antecedent.(vi) If a conditional has F as antecedent or consequent, negate the antecedent

and drop the consequent.(vii) Drop T as a component of a biconditional.(viii) Drop F as a component of a biconditional and negate the other side.

In addition, we have the obvious rules governing negation: ¬T becomes F ;¬F becomes T .

Each of these rules is easily justified. Corresponding to each of the rulesare the following facts:

(i) (T ∧ B) ≡ B.(ii) (F ∨ B) ≡ B.(iii) (F ∧ B) ≡ F .(iv) (T ∨ B) ≡ T .(v) (T ⊃ B) ≡ B and (B ⊃ T ) ≡ T .(vi) (F ⊃ B) ≡ T and B ⊃ F ) ≡ ¬B.(vii) (T ≡ B) ≡ B.(viii) (F ≡ B) ≡ ¬B.

We use the rules of resolution as follows. We pick one of the propositionalsymbols occurring in the wff and first assign it T and then assign it F . Ineach case, we resolve as far as we can. If we reach only T ’s and F ’s, we aredone. But if we resolve to another wff, then we follow the same procedure,picking one of the propositional symbols in this wff and first assigning it Tand then F . We continue in this way until we end up only with T ’s and F ’s.If we end up with all T ’s, our original wff is a tautology; if we end up with allF ’s, it is a contradiction. If we end up with at least one T , it is consistent.

Here is an example of how we would resolve for the wff

(p′ ⊃ (p′ ⊃ p′′))

p′ = T p′ = FT ⊃ (T ⊃ p′′) F ⊃ (F ⊃ p′′

T ⊃ p′′ Tp′′

p′′ = T p′′ = FT F

Page 21: 1 Introduction to Logic

1.3 Historical Remarks 17

We pick a propositional symbol, p′, and first assign it T and then assign it F .Working down the left side, we dropped T as antecedent twice, resolving top′′. We then had to let this propositional symbol vary among interpretations.In terms of truth tables, we found that our wff was T for the top line and Ffor the second. We now work out way down the right hand side to see whathappens for the bottom two rows. And we note that since we have F in theantecedent, we can negate it and so it becomes T . Or wff, then, is consistentand equivalent to (p′ ⊃ p′′)

Here is how we would work out our wff from before:

¬(p′ ⊃ (¬p′′ ⊃ p′))

p′ = T p′ = F¬(T ⊃ (¬p′′ ⊃ T )) ¬(F ⊃ (¬p′′ ⊃ F ))

¬(T ⊃ T ) ¬T¬T FF

We choose p′, and set it first T and then F . Working down the left branch, wedrop the antecedent when the consequent is T—twice; and then, the negationof T is F . So, the top two rows of the table are F . Working down the righthand side, we know that F in the antecedent becomes T , and since this isnegated, we resolve to F . The bottom two rows are also F . So, ours is acontradiction, just as we found out earlier.

1.3 Historical Remarks

The study of Logic goes back deep into ancient times. Aristotle is widelyregarded as the one who put the study of Logic on a firm foundation. HisOrganon consisted of four books on logical themes. De Interpretatione setout principles governing logical form, truth, and grammatical form; the PriorAnalytics included a study of deductive logic, primarily of the syllogism; thePosterior analytics included a study of scientific reasoning; the SophisticalRefutations included a study of informal arguments, debating tricks and fal-lacies. Other work in antiquity was carried through by the Stoic logicians—Diodorus, Cleanthes, and Philo—who laid out the rules for the propositionaloperators. Insofar as we focus on deductive logic, that was the major advancein the subject, and although there was considerable interest and work on logicfor many centuries, there were no significant advances in the science until wellinto the 19th century.

Boole and Schroder made progress with traditional logic, the AmericanPeirce too, but it was not as well known. Modern Logic fundamentally startswith Frege (1879), in which we find an axiomatization of propositional logic,first-order logic, higher-order logics and the definition of the ancestral. Themathematical advances subsequent were in set theory, with Cantor, Dedekind,

Page 22: 1 Introduction to Logic

18 1 Introduction to Logic

Peano, Zermelo largely taking the lead. Whitehead and Russell (1910) wasof primary importance, but that was pretty much the end of the line forphilosophically-led developments in logic. All eyes had shifted toward mathe-matics, where Hilbert, Bernays, Ackermann, Godel, Heyting, Lewis, Gentzen,Herbrand, Church, Kleene made the most significant advances.

Page 23: 1 Introduction to Logic

1.3 Historical Remarks 19

Problems

1.1. Which of the following are wffs of the system P, following the strictdefinition given?

(i) (¬p′)(ii) ¬(p′ ⊃ q′)(iii) ¬p′′ ⊃ p′′

(iv) (¬p′ ⊃ p′′)

1.2. Put each of the following into Polish Notation.

(i) (p ⊃ (q ⊃ r)) ⊃ ((p ⊃ q) ⊃ r)(ii) ((p ∨ q) ⊃ r) ≡ (¬r ⊃ ¬(p ∧ q))

1.3. Determine whether the formulas are logically valid, logically consistent,or logically inconsistent using either truth tables or rules of resolution.

(i) ¬(p ∨ q) ⊃ (¬p ∧ ¬q)(ii) ¬(p ≡ q) ⊃ (p ≡ ¬q)(iii) ¬p ⊃ (p ∧ q)(iv) (p ∧ (q ∨ r)) ⊃ ((p ∧ q) ∨ (p ∧ r))(v) ((p ⊃ q) ⊃ p) ⊃ p

1.4. What further truth values can be deduced from those shown?

(i) ¬p ∨ (p ⊃ q) given p ⊃ q is F.(ii) ¬(p ∧ q) ≡ (¬p ⊃ ¬q) given p ∧ q is F.(iii) (¬p ∨ q) ⊃ (p ⊃ ¬r) given the whole formula is F.(iv) (p ⊃ ¬q) ⊃ (r ⊃ q) given the whole formula is F.

Page 24: 1 Introduction to Logic

Part II

First-Order Logic

Page 25: 1 Introduction to Logic
Page 26: 1 Introduction to Logic
Page 27: 1 Introduction to Logic

References

1. Carnap, R. (1937), The Logical Syntax of Language, Routledge & Keegan Paul,London.

2. Church, A. (1956), Introduction to Mathematical Logic, vol. I, Princeton Uni-versity Press, Princeton.

3. Enderton, H. B. (1972), A Mathematical Introduction to Logic, Academic Press,New York.

4. Frege, G. (1879), Begriffsschrift, eine der Arithmetischen Nachgebildete Formel-sprache Des Reinen Denkens, Verlag von L. Nebert, Halle. Chapter I translatedin ?, pp. 1-20.

5. Gabbay, D. and Guenthner, F., eds (1984), Handbook of Philosophical Logic, Vol.II: Extensions of Classical Logic, D. Reidel Publishing Company, Dordrecht.

6. Hunter, G. (1996), Metalogic, Uiversity of California Press, Berkeley and LosAngeles.

7. Jeffrey, R. (1990), Formal Logic, Its Scope and Limits, 3rd Ed, McGraw Hill,New York.

8. Kleene, S. C. (1950), Introduction to Metamathematics, D. Van Nostrand Co.,Princeton.

9. Kneale, W. and Kneale, M. (1962), The Development of Logic, Clarendon Press,Oxford.

10. Lyndon, R. (1966), Notes on Logic, van Nostrand, Princeton.11. Mendelson, E. (1987), Introduction to Mathematical Logic, Third Edition,

Wadsworth & Brooks/Cole, Pacific Grove.12. Prior, A. N. (1955), Formal Logic, Clarendon Press, Oxford.13. Quine, W. V. O. (1950), Methods of Logic, Holt, New York.14. Quine, W. V. O. (1951), Mathematical Logic, revised edn, Harper & Row, New

York.15. Smullyan, R. M. (1968), First-Order Logic, Springer-Verlag, Berlin. Revised

Edition, Dover Press, New York, 1994.16. Stoll, R. (1963), Set Theory and its Logic, Freeman.17. Whitehead, A. and Russell, B. (1910), Principia Mathematica, Vol. I, Cambridge

University Press, Cambridge.