THE WADSWORTH & BROOKS/COLE MATHEMATICS SERIES SERIES EDITORS

Raoul H. Bott, Harvard University David Eisenbud, Brandeis University Hugh L. Montgomery, University of Michigan Paul J. Sally, Jr., University of Chicago Barry Simon, California Institute of Technology Richard P. Stanley, Massachusetts Institute of Technology M. Adams, and V. Guillemin, Measure Theory and Probability W. Beckner, A. Calderon, R. Fefferman, and P. Jones, Conference on Harmonic Analysis in Honor of Antoni Zygmund G. Chartrand, and L. Lesniak, Graphs & Digraphs, Second Edition J. Cochran, Applied Mathematics: Principles, Techniques, and Applications W. Derrick, Complex Analysis and Applications, Second Edition J. Dieudonne, History of Algebraic Geometry R. Durrett, Brownian Motion and Martingales in Analysis S. Fisher, Complex Variables A. Garsia, Topics in Almost Everywhere Convergence R. McKenzie, G. McNulty, and W. Taylor, Algebras, Lattices, Varieties, Volume I E. Mendelson, Introduction to Mathematical Logic, Third Edition R. Salem, Algebraic Numbers. and Fourier Analysis, and L. Carleson, Selected Problems on Exceptional Sets R. Stanley, Enumerative Combinatorics, Volume I K. Stromberg, An Introduction to Classical Real Analysis

Introduction to Mathematical Logic THIRD EDITION

Elliott Mendelson QUEENS COLLEGE OF THE CITY UNIVERSITY OF NEW YORK

WI1ili WADSWORTH & BROOKS/COLE ADVANCED BOOKS & SOFTWARE .- LIJ

MONTEREY, CALIFORNIA

To Arlene

Wadsworth & Brooks/Cole Advanced Books & Software A Division of Wadsworth, Inc. © 1987 by Wadsworth, Inc., Belmont, California 94002. All rights reserved. Softcover reprint of the hardcover 1st edition 1987 No part of this book may be reproduced, stored in a retrieval system, or transcribed, in any form or by any means---electronic, mechanical, photocopying, recording or otherwisewithout the prior written permission of the publisher, Wadsworth & Brooks/Cole Advanced Books & Software, Monterey, California 93940, a division of Wadsworth, Inc.

10 9 8 7 6 S 4 3 2

Library of Congress Catalogmg·in·Publication Data Mendelson, Elliott. Introduction to mathematical logic. (The Wadsworth & Brooks/Cole mathematics series) Bibliography: p. Includes index. l. Logic, Symbolic and mathematical. I. Title. ll. Series. QA9.M4 1987 Sll'.3 86·11084 ISBN-13: 978-1-4615-7290-9 DOl: 10.1007/978-1-4615-7288-6

e-ISBN-13: 978-1-4615-7288-6

Sponsoring Editor: John Kimmel Editorial Assistant: Maria Rosillo Alsadi Production Editor: Phyllis Larimore Manuscript Editor: Carol Reitz Interior and Cover Design: Vernon T. Boes Art Coordinator: Lisa To"i Interior Illustration: Lori Heckelman Typesetting: ASCO Trade Typesetting Ltd., Hong Kong

Preface This is a compact mtroduction to some of the pnncipal tOpICS of mathematical logic . In the belief that beginners should be exposed to the most natural and easiest proofs, I have used free-swinging set-theoretic methods. The significance of a demand for constructive proofs can be evaluated only after a certain amount of experience with mathematical logic has been obtained. If we are to be expelled from "Cantor's paradise" (as nonconstructive set theory was called by Hilbert), at least we should know what we are missing. The major changes in this new edition are the following. (1) In Chapter 5, Effective Computability, Turing-computabIlity IS now the central notion, and diagrams (flow-charts) are used to construct Turing machines. There are also treatments of Markov algorithms, Herbrand-Godel-computability, register machines, and random access machines. Recursion theory is gone into a little more deeply, including the s-m-n theorem, the recursion theorem, and Rice's Theorem. (2) The proofs of the Incompleteness Theorems are now based upon the Diagonalization Lemma. Lob's Theorem and its connection with Godel's Second Theorem are also studied. (3) In Chapter 2, Quantification Theory, Henkin's proof of the completeness theorem has been postponed until the reader has gained more experience in proof techniques. The exposition of the proof itself has been improved by breaking it down into smaller pieces and using the notion of a scapegoat theory. There is also an entirely new section on semantic trees. (4) Chapter 4, Axiomatic Set Theory, has been enlarged to include a section on theories other than NBG (ZF, Morse-Kelley, type theory, Quine's NF and ML). (5) The notation for connectives and quantifiers has been changed to conform to current usage. In addition, the exposition has been improved in many places, there are more exercises, and the Bibliography has been updated. The five chapters of the book can be covered in two semesters, but, for a one-semester course Chapters 1-3 are quite adequate (omitting, if hurried, Sections 5 and 6 of Chapter 1 and Sections 10-15 of Chapter 2). I adopted the convention of prefixing a D to any section or exercise that will probably be difficult for a beginner, and an A to any section or exercise that presupposes familiarity with a topic that has not been carefully explained in the text. Bibliographical references are given to the best v

vi

Preface

source of information, which is not always the earliest paper; hence, these references give no indication as to priority. I believe this book can be read with ease by anyone with some experience in abstract mathematical thinking. There is, however, no specific prerequisite. This book owes an obvious debt to the standard works of Hilbert and Bemays (1934, 1939), Kleene (1952), Rosser (1953), and Church (1956). I am grateful to many people for their help, and would especially like to thank John Corcoran for a great deal of useful advice and criticism, and Frank Cannonito and Robert Cowen for valuable suggestions. I would also like to express my thanks to John Kimmel and Phyllis Larimore at Wadsworth & Brooks/Cole for their assistance in the writing and editing of this new edition. Also, I appreciate the advice of the following reviewers: Richard Duke, Georgia Institute of Technology; Robert Frankel, Massachusetts Institute of Technology; and Martin G. Kalin, DePaul University.

Elliott Mendelson

Contents Introduction

1

CHAPTER ONE

10

The Propositional Calculus 1. PROPOSITIONAL CONNECTIVES. TRUTH TABLES 2. TAUTOLOGIES

10

14

3. ADEQUATE SETS OF CONNECTIVES

22

4. AN AXIOM SYSTEM FOR THE PROPOSITIONAL CALCULUS 5. INDEPENDENCE. MANY-VALUED LOGICS 6. OTHER AXIOMATIZA TIONS

27

35

37

CHAPTER TWO

41

Quantification Theory 1. QUANTIFIERS

41

2. INTERPRETATIONS. SATISFIABILITY AND TRUTH. MODELS

46

3. FIRST-ORDER THEORIES

54

4. PROPERTIES OF FIRST -ORDER THEORIES

57

5. ADDITIONAL METATHEOREMS AND DERIVED RULES 6. RULE C

60

64

7. COMPLETENESS THEOREMS

67

8. FIRST-ORDER THEORIES WITH EQUALITY

74 vii

viii

Contents

9. DEFINITIONS OF NEW FUNCTION LEITERS AND INDIVIDUAL CONSTANTS

80

10. PRENEX NORMAL FORMS

82

11. ISOMORPHISM OF INTERPRETATIONS. CATEGORICITY OF THEORIES

86

12. GENERALIZED FIRST-ORDER THEORIES. COMPLETENESS AND DECIDABILITY

88

13. ELEMENTARY EQUIVALENCE. ELEMENTARY EXTENSIONS 14. ULTRAPOWERS. NONSTANDARD ANALYSIS 15. SEMANTIC TREES

96

101

110

CHAPTER THREE

Formal Number Theory 1. AXIOM SYSTEM

116

116

2. NUMBER-THEORETIC FUNCTIONS AND RELATIONS 3. PRIMITIVE RECURSIVE AND RECURSIVE FUNCTIONS 4. ARITHMETIZATION. GODEL NUMBERS

129 132

149

5. THE FIXED POINT THEOREM. OODEL'S INCOMPLETENESS THEOREM

159

6. RECURSIVE UNDECIDABILITY. CHURCH'S THEOREM

168

CHAPTER FOUR

Axiomatic Set Theory 1. AN AXIOM SYSTEM 2. ORDINAL NUMBERS

169

169 187

3. EQUINUMEROSITY. FINITE AND DENUMERABLE SETS

196

4. HARTOGS' THEOREM. INITIAL ORDINALS. ORDINAL ARITHMETIC

204

5. THE AXIOM OF CHOICE. THE AXIOM OF REGULARITY 6. OTHER AXIOMATIZATIONS OF SET THEORY

213

222

CHAPTER FIVE

Effective Computability 1. ALGORITHMS. TURING MACHINES 2. DIAGRAMS

236

231 231

Contents

3. PARTIAL RECURSIVE FUNCTIONS. UNSOLVABLE PROBLEMS

ix

242

4. THE KLEENE-MOSTOWSKI HIERARCHY . RECURSIVELY ENUMERABLE SETS

256

5. OTHER NOTIONS OF EFFECTIVE COMPUTABILITY 6. DECISION PROBLEMS

263

285

Bibliography Answers to Selected Exercises Notation Index

289 308

329 332