Mathematical Logic OXFORD TEXTS IN LOGIC Books in the series 1. Shawn Hedman: A First Course in Logic: An introduction to model theory, proof theory, computability, and complexity 2. Richard Bornat: An Introduction to Proof and Disproof in Formal Logic 3. Ian Chiswell and Wilfrid Hodges: Mathematical Logic Mathematical Logic IAN CHISWELL andWILFRID HODGES 1 3 Great Clarendon Street, Oxford OX2 6DP Oxford University Press is a department of the University of Oxford. It furthers the University’s objective of excellence in research, scholarship, and education by publishing worldwide in Oxford New York Auckland Cape Town Dar es Salaam Hong Kong Karachi Kuala Lumpur Madrid Melbourne Mexico City Nairobi New Delhi Shanghai Taipei Toronto With offices in Argentina Austria Brazil Chile Czech Republic France Greece Guatemala Hungary Italy Japan Poland Portugal Singapore South Korea Switzerland Thailand Turkey Ukraine Vietnam Oxford is a registered trade mark of Oxford University Press in the UK and in certain other countries Published in the United States by Oxford University Press Inc., New York c Ian Chiswell and Wilfrid Hodges, 2007 The moral rights of the author have been asserted Database right Oxford University Press (maker) First published 2007 All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, without the prior permission in writing of Oxford University Press, or as expressly permitted by law, or under terms agreed with the appropriate reprographics rights organization. Enquiries concerning reproduction outside the scope of the above should be sent to the Rights Department, Oxford University Press, at the address above You must not circulate this book in any other binding or cover and you must impose the same condition on any acquirer British Library Cataloguing in Publication Data Data available Library of Congress Cataloging in Publication Data Data available Typeset by Newgen Imaging Systems (P) Ltd., Chennai, India Printed in Great Britain on acid-free paper by Biddles Ltd., King’s Lynn, Norfolk ISBN 978–0–19–857100–1 ISBN 978–0–19–921562–1 (Pbk) 10987654321 Preface This course in Mathematical Logic reflects a third-year undergraduate module that has been taught for a couple of decades at Queen Mary, University of London. Both the authors have taught it (though never together). Many years ago the first author put together a set of lecture notes broadly related to Dirk van Dalen’s excellent text Logic and Structure (Springer-Verlag, 1980). The present text is based on those notes as a template, but everything has been rewritten with some changes of perspective. Nearly all of the text, and a fair number of the exercises, have been tested in the classroom by one or other of the authors. The book covers a standard syllabus in propositional and predicate logic. A teacher could use it to follow a geodesic path from truth tables to the Com- pleteness Theorem. Teachers who are willing to follow our choice of examples from diophantine arithmetic (and are prepared to take on trust Matiyasevich’s analysis of diophantine relations) should find, as we did, that G¨odel’s Incomplete- ness Theorem and the undecidability of predicate logic fall out with almost no extra work. Sometimes the course at Queen Mary has finished with some appli- cations of the Compactness Theorem, and we have included this material too. We aimed to meet the following conditions, probably not quite compatible: • The mathematics should be clean, direct and correct. • As each notion is introduced, the students should be given something rele- vant that they can do with it, preferably at least a calculation. (For example, parsing trees, besides supporting an account of denotational semantics, seem to help students to make computations both in syntax and in semantics.) • Appropriate links should be made to other areas in which mathematical logic is becoming important, for example, computer science, linguistics and cognitive science (though we have not explored links to philosophical logic). • We try to take into account the needs of students and teachers who prefer a formal treatment, as well as those who prefer an intuitive one. We use the Hintikka model construction rather than the more traditional Henkin- Rasiowa-Sikorski one. We do this because it is more hands-on: it allows us to set up the construction by deciding what needs to be done and then doing it, rather than checking that a piece of magic does the work for us. We do not assume that our students have studied any logic before (though in practice most will at least have seen a truth table). Until the more specialist vi Preface matter near the end of the book, the set theory is very light, and we aim to explain any symbolism that might cause puzzlement. There are several proofs by induction and definitions by recursion; we aim to set these out in a format that students can copy even if they are not confident with the underlying ideas. Other lecturers have taught the Queen Mary module. Two who have cer- tainly influenced us (though they were not directly involved in the writing of this book) were Stephen Donkin and Thomas M¨uller—our thanks to them. We also thank Lev Beklemishev, Ina Ehrenfeucht, Jaakko Hintikka, Yuri Matiyasevich and Zbigniew Ras for their kind help and permissions with the photographs of Anatoliˇı Mal’tsev, Alfred Tarski, Hintikka, Matiyasevich and Helena Rasiowa respectively. Every reasonable effort has been made to acknowledge copyright where appropriate. If notified, the publisher will be pleased to rectify any errors or omissions at the earliest opportunity. We have set up a web page at www.maths.qmul.ac.uk/∼wilfrid/mathlogic.html for errata and addenda to this text. Ian Chiswell Wilfrid Hodges School of Mathematical Sciences Queen Mary, University of London August 2006 Contents 1 Prelude 1 1.1 What is mathematics? 1 1.2 Pronunciation guide 3 2 Informal natural deduction 5 2.1 Proofs and sequents 6 2.2 Arguments introducing ‘and’ 9 2.3 Arguments eliminating ‘and’ 14 2.4 Arguments using ‘if’ 16 2.5 Arguments using ‘if and only if’ 22 2.6 Arguments using ‘not’ 24 2.7 Arguments using ‘or’ 27 3 Propositional logic 31 3.1 LP, the language of propositions 32 3.2 Parsing trees 38 3.3 Propositional formulas 45 3.4 Propositional natural deduction 53 3.5 Truth tables 62 3.6 Logical equivalence 69 3.7 Substitution 72 3.8 Disjunctive and conjunctive normal forms 78 3.9 Soundness for propositional logic 85 3.10 Completeness for propositional logic 89 4 First interlude: Wason’s selection task 97 5 Quantifier-free logic 101 5.1 Terms 101 5.2 Relations and functions 105 5.3 The language of first-order logic 111 5.4 Proof rules for equality 121 5.5 Interpreting signatures 128 5.6 Closed terms and sentences 134 5.7 Satisfaction 139 viii Contents 5.8 Diophantine sets and relations 143 5.9 Soundness for qf sentences 148 5.10 Adequacy and completeness for qf sentences 150 6 Second interlude: the Linda problem 157 7 First-order logic 159 7.1 Quantifiers 159 7.2 Scope and freedom 163 7.3 Semantics of first-order logic 169 7.4 Natural deduction for first-order logic 177 7.5 Proof and truth in arithmetic 186 7.6 Soundness and completeness for first-order logic 189 7.7 First-order theories 194 7.8 Cardinality 199 7.9 Things that first-order logic cannot do 206 8 Postlude 213 Appendix A The natural deduction rules 217 Appendix B Denotational semantics 223 Appendix C Solutions to some exercises 229 Index 245 1 Prelude 1.1 What is mathematics? Euclid Egypt, c. 325–265 bc. For Euclid, mathematics consists of proofs and constructions. Al-Khw¯arizm¯ı Baghdad, c. 780–850. For Al-Khw¯arizm¯ı, mathematics consists of calculations. 2 Prelude G. W. Leibniz Germany, 1646–1716. According to Leibniz, we can calculate whether a proof is correct. This will need a suitable language (a universal characteristic) for writing proofs. Gottlob Frege Germany, 1848–1925. Frege invented a universal characteristic. He called it Concept-script (Begriffsschrift). Gerhard Gentzen Germany, 1909–1945. Gentzen’s system of natural deduction allows us to write proofs in a way that is mathematically natural. Prelude 3 1.2 Pronunciation guide To get control of a branch of mathematics, you need to be able to speak it. Here are some symbols that you will probably need to pronounce, with some suggested pronunciations: ⊥ ‘absurdity’ ‘turnstile’ |= ‘models’ ∀ ‘for all’ ∃ ‘there is’ tA ‘the interpretation of t in A’ |=A φ ‘A is a model of φ’ ≈ ‘has the same cardinality as’ ≺ ‘has smaller cardinality than’ The expression ‘x → y’ is read as ‘x maps to y’, and is used for describing functions. For example, ‘x → x2’ describes the function ‘square’, and ‘n → n + 2’ describes the function ‘plus two’. This notation is always a shorthand; the surrounding context must make clear where the x or n comes from. The notation ‘A ⇒ B’ is shorthand for ‘If A then B’, or ‘A implies B’, or sometimes ‘the implication from A to B’, as best suits the context. Do not confuse it with the notation ‘→’. From Chapter 3 onwards, the symbol ‘→’is not shorthand; it is an expression of our formal languages. The safest way of reading it is probably just ‘arrow’ (though in Chapters 2 and 3 we will discuss its translation into English). The notation ‘N’ can be read as ‘the set of natural numbers’ or as ‘the natural number structure’, whichever makes better sense in context.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages259 Page
-
File Size-