This action might not be possible to undo. Are you sure you want to continue?

# MATHEMATICAL LOGIC FOR COMPUTER SCIENCE

Second Edition

WORLD SCIENTIFIC SERIES IN COMPUTER SCIENCE

25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47:

Computer Epistemology — A Treatise on the Feasibility of the Unfeasible or Old Ideas Brewed New (T Vamos) Applications of Learning and Planning Methods (Ed. N G Bourbakis) Advances in Artificial Intelligence — Applications and Theory (Ed. J Bezdek) Introduction to Database and Knowledge-Base Systems (S Krishna) Pattern Recognition: Architectures, Algorithms and Applications (Eds. R Plamondon & H D Cheng) Character and Handwriting Recognition — Expanding Frontiers (Ed. P S P Wang) Software Science and Engineering — Selected Papers from the Kyoto Symposia (Eds. / Nakata & M Hagiya) Advances in Machine Vision — Strategies and Applications (Eds. C Archibald & E Petriu) Mathematical Foundations of Parallel Computing (V V Voevodin) Language Architectures and Programming Environments (Eds. T Ichikawa & H Tsubotani) Information-Theoretic Incompleteness (G J Chaitin) Advanced Visual Interfaces (Eds. T Catarci, M Costabile & S Levialdi) Non-Deterministic Concurrent Logic Programming in PANDORA (R Bahgat) Computer Vision: Systems, Theory and Applications (Eds. A Basu & X Li) New Approaches to Knowledge Acquisition (Lu Ruqian) Current Trends in Theoretical Computer Science — Essays and Tutorials (Eds. G Rozenberg & A Salomaa) Distributed Constraint Logic Programming (Ho-Fung Leung) RLISP '88 — An Evolutionary Approach to Program Design & Reuse (J Marti) Cooperation in Industrial Multi-agent Systems (N Jennings) Compositional Methods for Communication Protocol Design — A Petri Net Approach (N A Anisimov) Computer Simulation of Developing Structures in Nature, Society & Culture (V V Alexandrov & A I Semenkov) Mathematical Aspects of Natural and Formal Languages (G Paun) Mathematical Logic for Computer Science (2nd Edn.) (Lu Zhongwan)

For a complete list of published titles in the series, please write in to the publisher.

Series in Computer Science Vol. 47

**MATHEMATICAL LOGIC FOR COMPUTER SCIENCE
**

Second Edition

Lu Zhongwan

Chinese Academy of Sciences Beijing

World Scientific

Singapore • New Jersey'London • Hong Kong

Published by World Scientific Publishing Co. Pte. Ltd. P O Box 128, Fairer Road, Singapore 912805 USA office: Suite IB, 1060 Main Street, River Edge, NJ 07661 UK office: 57 Shelton Street, Covent Garden, London WC2H 9HE

British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library.

MATHEMATICAL LOGIC FOR COMPUTER SCIENCE (Second Edition) Copyright © 1998 by World Scientific Publishing Co. Pte. Ltd. All rights reserved. This book, or parts thereof, may not be reproduced in any form or by any means, electronic or mechanical, including photocopying, recording or any information storage and retrieval system now known or to be invented, without written permission from the Publisher.

For photocopying of material in this volume, please pay a copying fee through the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, USA. In this case permission to photocopy is not required from the publisher.

ISBN 981-02-3091-5

This book is printed on acid-free paper.

Printed in Singapore by Uto-Print

this book is self-contained. those t h a t rival classical logic and those which extend it. formal deduction. Hence m a t h e m a t i c a l logic is essentially related t o computer science. non-classical logics can be divided into two groups. including classical and non-classical logics. Topics are discussed concisely with the essentials emphasized and the minor details excluded. This book describes those aspects of mathematical logic which are closely related to each other. are reviewed. etc. v . soundness and completeness are the main topics introduced. Roughly. It is a branch of m a t h e matics. and an appendix. for instance. In Chapter 1 of prerequisites. For various logics. the n a t u r e of m a t h e m a t i c a l logic is explained. which are essentially related to each other. and m a n y branches of m a t h e matical logic have applications in it. the basic concepts of set theory. including the fundamental theorems of countable sets. In the Introduction. nine chapters. proof and computation. T h e second includes modal and temporal logics. language. This book consists of an introduction. Besides these prerequisites. Formal deduction is t r e a t e d in the form of n a t u r a l deduction which resembles ordinary m a t h e m a t i c a l reasoning. constructive logic and multi-valued logics.PREFACE Mathematical logic studies logical problems with m a t h e m a t i c a l methods. There are two kinds of mathematical research. this book chooses to describe constructive and m o d a l logics. but those concerning the applications of mathematical logic in computer science are not involved. Of non-classical logics. since m a n y concepts in m a t h e matical logic are defined inductively. This first group includes. and inductive definitions and proofs are explained in detail. semantics. principally logical problems in mathematics. Materials adopted in this book are intended to a t t e n d to b o t h the peculiarities of logical systems and the requirements of computer science. their background.

Lowenheim-Skolem Theorem. T h e revisions in this edition are essentially concerned with rewriting proofs and expanding the explanations in the remarks. Zhang Li helped in making suggestions and preparing the revisions. b u t these logics are described separately in C h a p t e r s 2 and 3 because classical propositional logic has its own characteristics. Chapter 4 introduces t h e axiomatic deduction system. I would like to offer my deepest t h a n k s to m a n y people. a n d H e r b r a n d Theorem. its soundness and completeness are studied in C h a p t e r 5. Professor Tang Zhisong. T h e discussions with the students during my years of teaching in the universities have been very helpful in the revision of this book. Professor Wang Shiqiang. and the late Professor Wu Yunzeng provided much criticism and advice. a simple form of formal proof in n a t u r a l deduction system is introduced. Chapters 7-9 describe constructive and modal logics. and proves the equivalence between it and t h e n a t u r a l deduction system. Especially. 6. In Appendix. and discuss the relationship between classical logic and these non-classical logics. Mr. Professor Yang Dongping. for instance. T h e first edition of this book was printed in 1989.VI Chapters 2-5 describe classical logics. the completeness problem of classical propositional logic and t h e different cases of classical first-order logic with and without equality are t r e a t e d separately. Classical logic is t h e basis of this book. in order to show the distinction of these cases in the t r e a t m e n t of completeness. and "interpretation" and "assignment" are combined into one term "valuation". . Sec. Professor Xu Kongshi. Chapter 6 studies. Furthermore. T h e G r a d u a t e School of University of Science and Technology of China (in Beijing) and Tsinghua University provided me with the opportunity t o teach the materials of this book. In the writing of this book. on t h e basis of soundness and completeness. which is the basis of one approach of automatic theorem proving in artificial intelligence. Professor Hu Shihua taught me m a t h a m a t i c a l logic selflessly.4 of C h a p t e r 6 is eliminated. Classical propositional logic may be regarded as part of classical first-order logic. "propositional logic" and "first-order logic" are renamed as "classical propositional logic" a n d "classical firstorder logic". Compactness Theorem. New terms and notations are adopted instead of original ones.

J. Ms. M. K. S. K. H. and Ms. G. Gan. Ms.VII I would also like to thank the staff of World Scientific Publishing Company. and then Mr. first Professor K. S. Phua. Tan. Lu Zhongwan Institute of Software. Chinese Academy of Sciences Garduate School of University of Science and Technology of China (in Beijing) October 1996 . Ho. for their friendly and efficient help in the production of this book. Jennifer Gan. Han. H. Ms. Finally I would like to express gratitude to my wife Ding Yi for her patient typing and encouragement during the long writing period.

This page is intentionally left blank .

8 Propositions and connectives Propositional language Structure of formulas Semantics Tautological consequence Formal deduction Disjunctive and conjunctive normal forms Adequate sets of connectives v 1 5 5 11 15 17 18 21 26 33 40 45 61 65 69 70 74 83 93 97 106 3.3 2.2 2. Prerequisites 1.6 Proposition functions and quantifiers First-order language Semantics Logical consequence Formal deduction Prenex normal form ix .7 2.5 3.6 2.1 Sets 1.3 Notations 2.4 3.CONTENTS Preface Introduction 1.1 2.2 3.5 2. Classical Propositional Logic 2.1 3. Classical First-Order Logic 3.2 Inductive definitions and proofs 1.4 2.3 3.

2 9.6 Semantics Formal deduction Soundness Completeness Equality 206 209 211 212 217 221 227 229 233 Appendix (a simple form of formal proof in natural deduction) Bibliography List of Symbols Index .5 9.Contents ts XI 9.4 9.3 9.

T h e contents of this book belong to deductive logic. the m a t t e r of the propositions in 2) is quite distinct from t h a t in 1). which are either true or false. (Premise) Z does not play tennis. (Premise) ' I 10 1 0 is not a multiple of 3. v I (Premise) 1) | The sum of t h e digits of 10 1 0 is not a multiple of 3. Hence. 1 . Some conclusion is said to be deducible from some premises when the t r u t h of the premises implies t h a t of the conclusion. T h e reasoning in 2) { Every middle school student plays tennis. principally the logical problems in mathematics. B u t the premises and conclusion in 2) may be true or false.INTRODUCTION Mathematical logic is the study of logical problems. Besides. Some logicians prefer to speak of sentences (or statements) instead of propositions. in which deductive reasoning is studied. We first consider some examples. (Conclusion) are true propositions and the reasoning in 1) is correct. T h e premises and conclusions in reasoning are propositions. T h e correctness seems to be concerned with the t r u t h of t h e premises and conclusion. and t h e justification for its correctness is t h e same as t h a t for the correctness of 1). Their motivations might be t h a t a sentence is used as a unit of expression in n a t u r a l languages and a proposition as w h a t a sentence asserts. T h e premises and conclusion in f T h e sum of the digits of every multiple of 3 is a multiple of 3. (Premise) Z is not a middle school student. Such reasoning is called deductive. But this is not the case. (Conclusion) is also correct. the study of deductive reasoning is the study of those kinds of premises and conclusions t h a t are in t h e deducibility relation.

and member 5. confusion sometimes arises. (Premise) X knows the captain of the football team. (Premise) a is not a member of S. respectively). Deducibility requires only that the truth of the premises implies that of the conclusion. then the last proposition can be deduced from the first two (no matter what set. nor with the truth or falsehood of the premises and conclusion. (Premise) Somebody in Class A is the captain of the football team. . by what is the deducibility relation determined? A proposition has its matter. When propositions are expressed and their logical forms analysed in natural languages. The premises and conclusion in both 1) and 2) are of the following logical forms respectively: 3) { Every member of S has the property P . while that in 5) is not. (Premise) X knows the captain of the football team. (Conclusion) X knows somebody in Class A. property. (Premise) Y is the captain of the football team. For instance. and its logical form (or simply. Then. which determines its truth or falsehood. This illustrates that linguistic similarity in natural languages does not in general imply the sameness of logical form. but studies whether the truth of the premises implies that of the conclusion. (Conclusion) Obviously. (Premise) a does not have the property P. Mathematical logic does not study the truth or falsehood of the premises and conclusion. and a are. Mathematical logic is concerned with the analysis of the premises and conclusions with attention to the logical form in abstraction from the matter and from the truth or falsehood. in the following two arguments: 4) 5) { { X knows Y. (Conclusion) the corresponding propositions are similar linguistically.2 Intrc Introduction Therefore the correctness of reasoning is neither concerned with the matter. for any three propositions. It is the logical forms of the premises and conclusion which determine the deducibility relation between them. if they are respectively of the logical forms in 3). But the argument in 4) is correct. P . form).

Discussion of topics takes place in some language. that is the formal language. the object being discussed is itself a language. hence it is convenient to date the beginning of mathematical logic back to that year. formal language has its semantics and syntax. is concerned with the formal structure of expressions. Traditionally mathematics does not make the language of mathematics or its method of reasoning an object of study. These purposes were accomplished in Frege [1879]. Such artificial symbolic language is called formal language. Leibniz strove for an exact universal language of science and looked for a calculus of reasoning so that arguments and disagreements can be settled by calculation. irrespective of any interpretation.Inti Introduction \ion 3 For these reasons we need to construct a kind of symbolic language to replace the natural languages. Semantics is concerned with the meaning of expressions when the symbols are interpreted in a certain way. Syntax. The logical forms of propositions can be expressed precisely by formulas. in which symbols are used to form formulas and formulas serve to express propositions. Mathematical logic attempts to study these aspects mathematically (by first making precise the language and the inferences used). The language being discussed is called the object language. . As in the case of natural languages. But now. Hence two languages on different levels are involved. on the other hand. It is customary to trace back to Leibniz (1646-1716) for the ideas of modern mathematical logic. Such exact language of science is the formal language to be constructed and such calculus of reasoning is the system of formal deducibility to be developed in the following chapters. These two aspects of a formal language must be distinguished from each other. It thus becomes a new branch of mathematics. The language in which the discussion takes place is called the metalanguage. The metalanguage used here is the English language.

. 1.1. We write aeS S to mean that a is a member of 5. called members or elements. The reader may omit this chapter at first reading and refer to it when necessary. and inductive proofs. . inductive definitions. . and write ai. . and an £ 5.. For convenience..an ^ S to mean that a\ £ 5 . SETS A set is a collection of objects.1 PREREQUISITES The only prerequisite for reading this book is familiarity with the basic notions of sets. ... Here a brief summary of these will be given.an 6 5 to mean that OL\ G 5 . . . and write aiS S to mean that a is not a member of 5. . . 5 .. we write ai. and an £ S. . .

Hence the components of a set are independent of the order and repetition of its members. we have {a} = {a.}. S is said to be a subset of T. the extension of the set of nonnegative even numbers is {0. and its intension is "being a or (3 or 7"./?. The extension of the set {a./?} = { A a } = {a./?. The totality of members contained in a set is called its extension.. .7} . since it requires doing nothing to verify that for any member x E 0. which has no member at all.7.4. 0 is a subset of any set S. for every x. S = T iff S C T and T C S. . and 7. . and its extension is "being a non-negative integer divisible by 2". Every set is a subset of itself. 0 C S is said to be vacuously true. x E S implies x E T.a} = {a. ./?. written as SCT T iff for every x..x E S iff x ET. {a./3} = {7. that is..6 Mathematical Logic for Computer Science Science Sets are determined by their members. (3.a} .a./?./?} = {a.an} . .7} is a./?. For instance.. that is. iff S C T and S ^T. Or in other words. which is impossible. The intension of a set is the common property of its members.2.. S is said to be a proper subset of T. A set with a i . an as its members is written as {ai. { a . Hence a set is determined by its extension. S ^ T means that S and T are unequal. 5. a} . One special set is the empty set 0. written as S =T iff (the word "iff" is used as an abbreviation of "if and only if") they have the same members. Obviously. 7 } = {a. x E S also holds. there is some x such that x E S iff x i T. £ . /?. .. Two sets S and T are said to be equal. 0 C S is false iff there is some x such that x E 0 and x $.

. . suppose S i . .^^. we set Si U . S n are sets and n > 2. . Suppose {Si | z G / } is a collection of sets indexed by members of the set I. . x < 100 and x T = {x | x = 0 or x = 1 ( x = 2} . intersection. . The ordered pair of objects a and /? is written as <«. Then we set I ) Si = {x | x G Si for some z G / } . suppose for the set of all objects x such that uch S = {x | x < 100 and x iiis prime} . 100. .1. S HT and S — T are called the union.T = {x | x G 5 and x ^ T} . The set {x | x G S andi_x_ } may be written as x {xeS We define s\\_x_}_ } • . . Si f l . For instance. .2}. ieiI s [ j Si = {x I x G Si for each i G / } . \I iei I They are respectively the union and intersection of {Si | i G 7}. . . .Prerequisites es 7 We write {x | x I X x | x | x } } . and difference of 5 and T respectively. n Sn — {x | x G Si for each i = 1 . x = 0 or x = 1 or no less than i n n then 5 is the set of all primes lnnn 4-v. and T = {0. S = {x | x £ S} . 5 and T are said to be disjoint iff 5 D T = 0. n} . ./?> • . U Sn = {x | x G Si for some i — 1 . 5 U T. n} . . 5 . S n T = {x | x e S and x G T} . 5 is called the complement of 5. . ov or s< x eT} . More generally. SUT = {x\xeS ■ e. .

. Sn = S x .77)| 777.. . .x)|x G 5 } .. . . ... .ft) iff a = <*i and /? = ft.Xn/| i%n)\ Xi ?••• •) •> Xn ^n j •... It is a subset of S2.. a n .. . i } . A special binary relation on any set S is the equality relation: or {(x.R = { ( x i . . S .. xi S i . = For instance..8 Mathematical Logic for Computer Science Then (a. .. . . Then ( a i . .77 are natural numbers and m < n) 7 {(771.. S which is a subset of 5. . . ra.x nn G S and relation R exists xn) x x G 5 and relation JR exists -ft among x i . . . Sri is defined by Si x ... an 77-ary relation R on a set 5 is the set JR: . n) 17Ti. When S i . . . . x n ) | x\ G Si. . . . n are natural numbers and 7 7 < 77} is the set of ordered pairs of natural numbers of which the first component is smaller than the second.y G S a n d x = y} |x. A set of ordered n-tuples is also written with the notation \\Xi. .. .R = {x G 5 I x has the property R} . . .. n n v ' For n > 1. x S = { ( x i .. . . x Sn = {(xi. {(xi.. x n ) ||x i . a n ) ( f t . ./?) = (c*i. . x n G Snn}} . /3m) iff n = m and a» = ft for i = 1 . ..y) \x. . ^ are the same. . xS = ! . . {(777. xnn in this order }. The Cartesian product S\ x .. A unary relation R on £ is a property: C S. . S} S} . . . . . Xn n GS} > .. .xX n G 5*-> /. .. . . . .. . . x Hence R C Snn . .an) is the same as the finite sequence a i . x nj) |IxX i. . the nth Cartesian product Sn of S is Sx . x Sn of sets S\... . .. ... The ordered n-tuple (ai.2/ and x {(x. . . .

and m < n } . 4 . The restriction of R to Si is the n-ary relation R Pi S™.. = n 5 n into S./-v-r <» 1 I / . Suppose R is an n-ary relation on S and 5i C S. . } . and its extension is { 0 . onto (f function / is one-one (an injection) if f(x) = f(y) implies x — y. then f maps S ontoTT ( / is a surjection). . we say that / is a function from S to (into) T (or / maps S into T). . If / is n-ary and ( x i . Its extension is the set of all ordered n-tuples which are in this relation. If / is a function with dom(f) — S and ran(f) C T. .> • : T . . such that m + x = n". xn) G dom(f). and denote it by f'. and the successor is a unary function on N.y) G / for somex} . The extension and intension of a relation are different concepts. z) G / . f:S-+T. 2 . . n)\m and n are natural numbers.\ T* /-^ *-\ v r\ y-1 /n 4-iir«lrvn T T T U 1 /-»!-» A function (mapping) f is a set of ordered pairs such that if (x. A If in addition ran(f) = T. . the intension of the property (unary relation) "being even number" on the set of natural numbers is "divisible by 2". x n ) ) .xn) for / ( ( x i . An n-ary function on 5 is a function mapping S addition is a binary function on the set N of natural numbers. . and the range ran(f) of / is the set ran(f) — {y \ (x. . surjection). then y = z. y) G / is denoted by f(x) and is called the value of f at x. *»/-» I r\ 4-1 r \ n I o i4-o *-»-» /~s r» trt i r-» r-r T4-o n v f / i n o i A n 10 4-Vi/-» jn/-»4. For instance. . and its extension is {(m. Suppose / : S —> T is a function and Si C S. . The intension of a relation is its meaning.y) G / and (x. If / is a function and x G dom(f). A T. For instance. . The intension of the binary relation "m < n" on natural numbers is "there exists non-zero natural number x. The domain dom(f) of / is the set dom(f) = {x | (x.y) G / for some?/} .»n). .S-^T. then we write / ( x i .Prerequisites tes 9 A relation (as a set) has its extension and intension. then the unique y for which (x. The restriction of f to Si is the function f\Si : Si -)■ T . . It is obvious that the relation concept defined above is its extension. .

Then the ^-equivalence classes make a partition of 5. iff for any x G S. i2 is an equivalence relation on 5. xifo. Suppose R is an equivalence relation on S. natural numbers can be used as measures of size.y. power) of a set 5. denoted by \s\. Then for any x. ? . Two sets S and T are said to be equipotent. This permits the classification of sets with respect to the notion of equipotence. iff R is reflexive. whenever both xify and i/ite. For any x e S. Cardinals generalize this situation to infinite sets. and transitive on S. Obviously ~ is an equivalence relation. y G S. We define the following notions. the set x = {y G S\ xRy} is called the R-equivalence class of x. The cardinal of a set S is a measure of its size. For finite sets. and thus we can generalize the notion of the number of members in a set so that it covers infinite sets. We often write xRy xRy ■V for (x. symmetric. iff for any x. x = y iff xRy . R is reflexive on 5. y) G R. then xite.y e S. the ^-equivalence classes are subsets of S such that each member of S belongs to exactly one ^-equivalence class. R is transitive on 5. A cardinal (or cardinal number.z G 5. written as 5~T T iff there is a one-one function from S onto T. whenever xify. then yRx. Suppose R is a binary relation. that is. iff for any x.10 Mathematical Logic for Computerir Science which is defined by (f\Si)(x) = /(x) for every x G Si . i? is symmetric on 5.

. some natural number is taken to be \S\. that is. When S is finite. □ 1.1.3.2.2. .5. iff \S\ < \N\.1. A finite set S is equipotent to { 0 .. iff S is finite or countably infinite. . .1. iff \S\ = \N\. An equivalent formulation of the definition is to characterise the set as the smallest one closed under the rules.4. The set of all finite sequences with the members of a countable set as components is countable. S is said to be countable (or enumerable).es 11 is associated with S in such a way that | 5 | = \T\ iff S~T T . □ Theorem 1. n — l } for some natural number n. .1. □ Theorem 1.1. S is said to be countably (or enumerably) infinite. □ Theorem 1. The Cartesian product of any finite number of countable sets is count able. A subset of a countable set is countable. □ Theorem 1. The union of countably many countable sets is countable. Then two sets have the same cardinal iff they are equipotent. INDUCTIVE DEFINITIONS AND PROOFS Inductive definitions of sets are often presented informally by giving some rules for generating members of the set and then adding that an object is to be in the set only if it has been generated according to the rules. Theorem 1. We state several theorems about countable sets with their proofs omit ted.1. The union of any finite number of countable sets is countable. We note that 101 = 0 = By \S\ < \T\ we mean that there is a one-one function from S into T.l Prerequisites .

If If R(0).2. R(n)" can be derived from [1] and [2°] as . That is. [3] n G N only if n has been generated by [1] and [2]. is the proof of [1] of Theorem 1.2. if n G N. [2] For any n. if fl(0). that is. if fl(n). The proof consists of two steps. [2] For any n € iV. The proposition "For every n G iV. Suppose R is a property and R(x) means that x has property R.3 may be replaced by [2°] For any n G JV.. [1] 0 G S. if n € 5. Then 5 satisfies [1] and [2] of Definition 1. G N. T h e o r e m 1.3 is called an inductive proof or a proof by induction. In connection with proofs by induction. then i?(n) for any n G A/". Definition 1. i?(n) for any n G AT. Suppose R is a property and R(x) means that x has property R. Definition 1. if n G 5. then n' € 5. Q A proof by means of Theorem 1. and the variable n in it is the induction variable. The condition [2] in Theorem 1. The first step. R(n).2.2. Hence N C 5. if R(n). The second step.12 Mathematical Logic for * Computer Science Science The basic example of an inductive definition is that of the set JV of natural numbers.. then n' G N (nf being the successor of n).2.3. we shall use the following terminology.2.1 can be formulated equivalently as follows. [2] For any n G N. [1] [1] fl(0). . For the sake of simplicity we shall sometimes write "ind hyp" for the induction hypothesis. R(n'). then ^ ( n ' ) . [l] o G N.3. called the basis of induction. then R{n').2.2. then ij(n'). The assumption R(n) in the induction step is called the induction hypothesis. N is the smallest set S such that [i] oeS.2. Proof.2. T h e o r e m 1. R(n)" is the induction proposition. is the proof of [2].1. "For any n G N. Definition 1. called the induction step. Suppose 5 = { n G iV|ii(n)}.3. [2] For any n. [2] For any n. then nr G S.2..

because. Hence for any n G N. By Definition 1. that is. /(0) = j7(o) = 3(0) .2.R(n). For instance.1 [1]). Because "m < 0" is false. [2*] is 1) If R(m) for each m < 0. Theorem 1.R(n)n can be :(«)" derived from [2*]. (Principle of definition by recursion) pie Suppose g and h are given functions on N. .1 [2]. Such a definition is called a definition by recursion. By [1] and 0 G N (see Definition 1. . Therefore "For every n G N. By [2]. . and N C 5. Then.2.4. then R(m)") is vacuously true. we have i?(0). n' G 5.2. Then there exists a unique function / satisfying slying J /(0) = 3(0) . n' e N follows from n £ TV. Let S — {n G N\R(0) and . Course-of-values induction has still another version. if R(m) for each m < n. W) \f(n') = h(f(n)). The proof of course-of-values induction is as follows. called course-of-values induction. R(n). employing already given functions. .2. we obtain R(nf). f(n') = h(f(n)). Suppose n e S. for every n G N. . This is another version of proof by induction. Thus 5 satisfies [1] and [2] of Definition 1. then the following equations: I 7 ( 0 ) = f f0(0) /(0) = ( 0 ) \f(n') = K h(f(n)) Sip!) = h(f(n)) define a function f on N from g and h. which is [1]. When n = 0. we have 0 G S. yet this is not the case.2. then R(n). in which the fol lowing [2*] is used instead of [1] and [2°]: [2*] For any n G N. let g and h be given functions on N. "R(m) for each m < 0" (which means "if ra < 0. n G N and i i ( 0 ) . . and R(n)}. by 1). then J?(0). f(n) can be computed in finite steps from the defining equations.Prerequisites \es 13 well. Then R(n'). Although at first sight / seems to be defined in terms of itself. Recursion is a method of defining a function on an inductively defined set by specifying each of its values in terms of previously defined values. [2°] follows obviously from [2*]. .

x n< G S .. . G T. f(gi(xi. S is the smallest set T such that M C T and... x n iJ ) = / ifti(/(xi). n ) We note that the generation of any member in the set N of natural jration numbers is unique.. .1} uely and unary function g such. . . . for any x i . ..• • •.. /(^(xi.x n .. given M = {0. gi(xi. / ( x ))J ) for any xui. . the uniqueness of generation of the members in S is required. . Let h:M h:M hi:S S ni ni li --+S >S -+S ->S (i = l . that is. . the members in an inductively defined set erally. . The general case of the principle of definition by recursion is as follows. . By induction on n. when certain members of S have this property. . 0(0) = The member 0 G S is not uniquely generated: 0 € M or 0 = g(l). { f / ( x ) = h(x) (x) for any x G M . For instance. members of the given set M) has this property. The induction step is to prove that the given functions gi preserve this property.. .. > > Then. Then S = {0.. xn< G 5 . . . . that g(0) = 1 and g(l) = 0.. . .. . When G the definition by recursion of / and the principle of definition by recursion are involved. i(/(xi). the members generated from them by means of gi have this property as well.) G T. .n being the number of times of applying the second equation before f(n') is computed. / ( x n J ) for any x i .. S are not necessarily uniquely generated. 3S of generation of the members in S is required.. The general case of an inductive definition of a set 5 is as follows. . . i ( / 0 * i ) . □ The second equation in the definition by recursion may be of the fol lowing form: f(ri) = h(nj{n)) where h is a binary function of n and f(n)..k) are given./c) be given functions... . . x n . Suppose S is the inductively defined set described above. ..1}. but generally. £ M . Suppose a set M and n^-ary functions gi (i = 1 . .14 Mathematical Logic for Computer r Science Proof. f(gi(xi. . . .x'n . in an inductive proof of a proposition that every member of S has a certain property. . the basis of induction is to prove that every member of S which is generated outright (that is.f{xni n z . . . Inductive definitions and definitions by recursion will be used repeatedly d J J • _ r i in the description of the syntax and1 semantics_ of r formal ilanguages.. Then there exists a unique function / such that here \X\.. . xXnniJ ) = fti(/(xi). . ..

... and "Corollary" respectively. a reference such as "Definition 2.. "Lem". n are propositions.. Exercises in each section have another system of numbering.\ j A! => A2 = » • • • => An !. and <=> for "iff". and those in a proof or in an example are denoted by "(1)". and "Ai => 2. certain formulas and statements in a section are denoted by "1)". A\ ^=> A2 ^=> . •...3.. when it appears immediately after a theorem.3" means the third numbered item which is a definition.. The symbol = > is used for "implies". .. . . to indicate that the proof is immediate and accordindly omitted. . For instance. etc.. An-i => An". etc. . in Section 2. "2)". Suppose jAi. and "Cor" are abbreviations of "Definition". We write A\... For reference. The symbol □ is used to denote the end of a proof or. Each chapter is divided into sections.. "Theorem". An-i => An". "(2)".An-l <=> An". » for "Ai => A2... «=> An for "Ai ^=> A2j.A\n. NOTATIONS The following standard conventions in mathematics will be used throughout this book. . \. Definitions and theorems (includ ing lemmas and corollaries) in each section are numbered consecutively. We also use <= for the converse of =>.2. "Thm". Reference to the bibliography is made by citing the author and the year of publication of the work. "Lemma". "Def".2 of Chapter 2.. • •• .Prerequisites lies 15 1.

2 CLASSICAL PROPOSITIONAL LOGIC Classical logic is to be introduced in Chapters 2-5. 17 . The logical forms of compound propositions are determined by connectives. Classical propositional logic is first introduced in this chapter. Truth and falsehood are values of a proposition. in studying the logical forms of propositions. In propositional logic. For any proposition A. which are either true or false. simple propositions are taken as a whole. Hence propositional logic may also be called the logic of connectives. because the correctness is determined by the logical forms of compound propositions. The characteristic of propositional logic is that. For instance. where "A or S" and "not A" are logical forms of compound propositions. the proposition "A or not A" is true. only the logical forms of compound propositions are analysed to see how they are composed from initial components — simple propositions. Propositional logic studies the deducibility relations between premises and conclusions which are compound propositions or unanalysed simple propositions. a proposition is either true or false. In propositional logic. while the logical forms of simple propositions are not analysed. is a correct inference. the following From "A or B" and "not A\ B is deduced. To see the correctness of the above inference. Propositional logic is a part of mathematical logic. A proposition takes one of truth and falsehood as its value. It includes only a part of logical forms and principles. According to the viewpoint of classical logic. compound propositions are composed from simple ones (as basic units) by using connectives. we need not analyse A and B.

T h e following compound propositions are formed by the common connectives: Not A.18 Mathematical Logic for Computer Science Science 2. T h e initial components of compound propositions are not compound. AiSB. t h e component of 1) is "2 is odd". T h e components of a compound proposition may or may not still be compound. . Non-compound propositions are called simple propositions. (Not t h a t 2 is odd. AittB. T h e connectives most commonly used are "not". For example. PROPOSITIONS AND CONNECTIVES Propositions formed by means of connectives are called compound propositions. "if then". If A t h e n B. "Not" is unary. by "0". A proposition is either true or false. while one component of 3). t h a t of a false one is falsehood. "a pair of opposite sides of a quadrilateral are parallel and equal". A and B. B. Usually t r u t h is denoted by " 1 " and falsehood falsehood. We shall consider how the values of these compound propositions are determined.) 3) If a pair of opposite sides of a quadrilateral are parallel and equal. and "iff''''. then it is a parallelogram. AOTB.B. is still a compound proposition. (2 is even and 2 is prime. "or". T h e following are some examples of compound propositions: 1) 2 is not odd. "and". T r u t h or falsehood is the value (or truth value) of a proposition.) 2) 2 is even and prime. AovB. Let A and B be arbitrary propositions. which is not compound. Simple propositions are not formed by means of connectives. T h e value of a compound proposition is determined by the values of its components and the connectives used.1. while the other four are binary. T h e value of a t r u e proposition is truth.

It may be interpreted in the inclusive sense of "A or 0 or both". According to the usual meaning of the word "or". The situation can be described by the following table: A 1 0 not A 0 1 "A and B" is true iff both A and B are true. "A or 0" is true when one of A and 0 is true. then" and "imply" (or their translations in other natural languages).Classical Propositional Logic 19 Obviously A is true iff "not A" is false. When both A and 0 are true. and is false when both A and 0 are false. hence the values of "A or 0" are determined as follows: A 1 1 0 0 B 1 0 1 0 AOTB B 1 1 1 0 "If A then 0" (or "A implies 0") calls for more explanations. or in the exclusive sense of "A or 0 but not both". The last column gives the corresponding values of "A and0". as used in everyday speech. Hence we have the following table: A 1 1 0 0 0 1 0 1 0 A and 0 1 0 0 0 We have in the table one row for each of the possible combinations of values of A and B. The English words "if. seem often to denote a . In mathematics the inclusive sense of "or" is commonly used. The meaning of A is irrelevant. the value of "A or 0" is to be determined according to the interpretation of "A or 0" adopted.

—3 respectively yields the combinations "truth and truth". One use of these words is adopted here. and these are the circumstances which. According to this meaning. irrespective of the value taken by x. For instance. The combination "truth and falsehood" is impossible. In the other two rows. The difficulty arises with the value 1 assigned to "if A then B" in the cases where A is false. Their possible meanings when employed in this way are difficult to fix precisely. we shall be interested in deduction and proof. then x2 > 9.20 Mathematical Logic for Computer Science Science relation between the propositions they connect. —4. "falsehood and truth". Taking x = 4. A very common sort of mathematical proposition can serve to illustrate this. "falsehood and falsehood". because 4) is true. principally in mathematics. since A is false. The point to remember is that the only circumstance in which "if A then Z3" is false is when A is true and B is false. One might also gain the impression that such propositions are not useful or meaningful. Consideration of examples of implicational propositions "if A then B" in which A is false might perhaps lead one to the conclusion that such propositions do not have a value at all. the following proposition 4) If x > 3. according to the above table of the truth values of "if A then B". . "not that A is true and B is false" is true. Different values of x give rise to all possible combinations of truth values for "x > 3" and "x 2 > 9" except that combination "truth and falsehood". Hence "if A then B" is true when A is false. in which "if A then B" means "if A is true then B is true" or "not that A is true and B is false". the values of "if A then £" is determined by the table: A 1 1 0 0 B 1 0 1 0 if A then B 1 0 1 1 The first and second rows in the table are obvious. In this context the significance of an implicational proposition "if A then S" is that its truth enables the truth of B to be inferred from the truth of A. is true. give 4) the truth value 1. However. and nothing in particular to be inferred from the falsehood of A.

then the sun rises in the West. the connectives are truth functions.0} as its range is called an (n-ary) truth function.Classical Propositional Logic 21 In set theory we have verified that 0 C 5 is vacuously true for any set 5 S j C S means: For all x. and if B then A'. Generally." Of course. it yields no inconsistency with everyday speech. then x G S. the speaker understands that "Z comes" has no connection with "the sun rises in the West". "if. A formal language is a collection of symbols. Thus. since in such case the verification of "if A then B" does not require doing anything to deduce B from A. 2. PROPOSITIONAL LANGUAGE £P In this section the propositional language Cp is to be constructed. "Not" is unary. which should be distinguished from symbols of the metalanguage used in studying them. then". and "iff" are binary truth functions.2. "A iff Bn is the same as "if A then S. "or". Hence its truth values are determined by the table: A 1 1 0 0 B 1 0 1 0 AiSBB 1 0 0 1 An (n-ary) function with the set of all ordered (n-) tuples of truth values as its domain and the set {1. his whole proposition is true. What he intends to assert is that "Z comes" is false. Since he is sure of the falsehood of "Z comes". somebody may say: "If Z comes. Such use of "if. whenever A is false. if x G 0. . then" as illustrated above is familiar in mathematics. For instance. This is true since "x G 0" is false. It is the formal language for propositional logic. "and". "if A then B" is vacuously true. Although it may seem unusual.

and -i(pVq) are expressions of C . 2. are arbitrary members in the sequence. then (imply) iff (be equivalent to) English name negation negation conjunction conjunction (inclusive) disjunction implication implication equivalence The third class includes two punctuation symbols. Two expressions U and V are equal. for the empty set is used for the empty expression. pq. (r). Therefore the notation. Hence p and q may be different or the same. respectively. We use the roman-type small Latin letters: p q r (with or without subscripts or superscripts) to denote arbitrary proposi tion symbols. For instance. written as U = V.22 Mathematical er Logic for Computer Science Cp consists of three classes of symbols. . It is the empty expression. pA — > p q. r.etc. p. iff they are of the same length and have the same symbols in order. which cannot be written. The first class includes an infinite sequence of proposition symbols. Similarly for q and r. or the fifteenth. and 6. Expressions are finite strings of symbols. The empty expression is analogous to the empty set. 3. 4. There is one special expression of length 0. For instance. p may be the first. The lengths of the five expressions given above are 1. or simply punctuation: ( ) which are called left and right parentheses. q. p. 0. or simply connectives: -i A V -► <-» Their oral reading and English names in standard use are respectively as follows: Oral reading not and or (and/or) if. The second kind includes five connective symbols. etc. The length of an expression is the number of occurrences of symbols in it. But different occurrences of p in the same context must be the same proposition symbol. The infinite sequence of proposition symbols are not specified. or the thirty-seventh.

then V is a segment of U. abol In this and the next section. and it is a proper one if V is non-empty. W i . where U.2. then (A * B) G Form(Cp).A) G Form{Cp). then V is an initial segment of U. Form(C i(D>) Definition 2. Formulas (also called well-formed formulas) correspond to gramma tically correct sentences in natural languages. U0 = 0U = U for any expression U. the symbol * is used for any one of the four binary connectives. If W is non-empty. . W is a terminal segment of U.2. If V is a segment of U and V ^ U . B G Form(Cp). V. The expression formed by concatenating two expressions U and V in this order is denoted by UV. V [3] If A. Similarly. (Form(Cp)) An expression of Cp is a member of Form (Cp) iff its being so follows from [l]-[3]: [1] Atom(Cp) C Form(Cp). The sets of atoms and formulas of Cp are denoted by Atom{Cp7) and ) Form(£pp)) respectively. then V is a proper initial segment of U. Form(Cp (CP) p [2] If A G Form(C )y then (-. and W are expressions. The above definition can be formulated equivalently as follows. V. Every expression is a segment of itself. where U. If U = W1VW2.2 are the formation rules of formulas of Cp.1.2.2. We may also say that an expression of Cp is a formula of Cp iff it can be generated by (a finite number of applications of) the formation rules. and W2 are expressions. the scanning of symbols in expressions proceeds from left to right. '). [l]-[3] in Definition 2. (Atom{&)) )) (Atom(Cp Atom(£P) is the set of expressions of Cp consisting of a proposition Atom(Cp) symbol only. then V is a proper segment of U. Definition 2.Classical Propositional Logic 23 Unless otherwise stated. Obviously. The empty expression is a segment of every expression. If U = VW.). Atoms (or atomic formulas) and formulas are to be defined from expres sions. Similarly for three or more expressions.

In the generation of the above formula. in generating a formula. ((p V q) -> (H>) H ( q A r))) (by I (by Def 2.2 [3]. r (by Def 2. The generation of this formula from p.2 [2]. (H>) *+ (qAr)) (by Def 2. . Similarly (5) may be placed before (3) and (4). (1)). C.2 [1]).2 [1]). (pVq) (by Def 2. q (by Def 2.2.2 [3]. the order of Steps (3) and (4) may be exchanged.2.2 [3]. (2)). (Form(CP)) (Form(Cp)) p Form(C ) is the smallest class of expressions of Cp closed under the {CP) formation rules of formulas of Cpp.2. q and r by applications of the formation rules can be illustrated more clearly by the following tree: It is obvious that.2 [1]).p)<->(qAr))) is a formula.2. (qAr) (by Def 2. and (5) must be placed before (6).2.2 [3]. which can be generated as follows: (1) (2) (3) (4) (5) (6) (7) (8) p (by Def 2. We use the roman-type capital Latin letters: A B CC (with or without subscripts or superscripts) for any formula. But (1) and (2) must be placed before (3).2. because (p V q) is not a segment of (->p) and nor is (-<p) a segment of (p V q). H ? ) (by Def 2. (3). (2). Example The expression ((pVq)-»((-.3. (7)).2. (5)). (1).2. which is a segment of the formula generated. we obtain at each step a formula.. (6)).24 Mathematical Logic for Computer Science \er Definition 2. (4).2.

.1. 2. then R{{^A)). Suppose R is a property. we prove (~>A) has property R.Classical Pro-positional Logic 25 A. If [1] For any p < Atom(£p). B. [3] Ak = (Ai * Aj) for some z. C. suppose they have property R (induction hypothesis).2 and 2. .2.2..2. Definitions 2.2.• □ Applying Theorem 2. [2] Ak = (-iAi) for some i < k.4.3 are inductive definitions. The above inductive proof is called a proof by induction on the structure of the generation of formulas of Cp. Exercises 2. since the set of symbols of Cp is countable and iC formulas are finite in length. Show that an expression is a formula of Cp iff it has a formation sequence. C. Different occur rences of A in the same context must be the same formula. The induction step is to prove the formulas generated by using connectives preserve property R. . . B G Form(Cpp ) . (Refer to Section 1. for any formulas A and B. (Compare them with Definitions 1. .2. iif R{A) and i?(B). which will be dis cussed in the next section. A n is a formation sequence of A iff A n = A and for k < n. pp Form(C ) ) is countable. This is an inductive proof. if [3] For any A .2.? or simply. then R(A) for any A £ Form(Cp). .2. hence we have the following Theorem 2. p [2] For any A £ Form(C ). then R((A * B)).) Formulas have some important structural properties. for any formula A.2. we prove (A * B) has property R.4. 2.2.) T h e o r e m 2.1 and 1. suppose it has property R (induction hypothesis).2. E R(p).1. The basis of induction is to prove any atomic formula has property R. we can prove all formulas of Cp have certain property R. ).if R(A).3 in the previous chapter. may be different formulas or the same. ? R(P). Such explana tions will be omitted later.2. a proof by induction on the structure of formulas of cpp. That is.4. A i .2 and Theorem 1. etc. j < k. Afc satisfies one of the following: [1] Ak e Atom{Cp).

-> (£») 2. [2] Give examples of A such that < or = holds in [1].4. he will be at home. The reader may omit the proofs at first reading. [8] If it rains. 2. V. Show that m = n + l. otherwise he will fail. otherwise he will go to the market or school. [4] He must study hard. [1] Show that deg(A) < the number of occurrences of connectives in A. Translate the following propositions into formulas (use atoms for simple propositions): [1] He is clever and diligent. [9] The sum of two numbers is even iff both numbers are even or both numbers are odd. Suppose the number of occurrences of atoms in a formula A is m and that of occurrences of A.3.1. unless it rains. [7] He will go home. Lemma 2. [2] He is clever but not diligent. or the letter was lost.2. deg(B)) + 1. unless he studies hard. [3] He didn't write the letter. 2. [6] He will go home. [10] If y is an integer then z is not real. —>. and <) is n.3. STRUCTURE OF FORMULAS In this section some structural properties of formulas will be discussed.26 Mathematical Logic for Computer Science 2.2.2. and understand the prop erties intuitively from the examples.2. The degree of complexity of A e Form(Cp) is defined by recursion: ({: deg(A) = 0 for atom A.3. Every formula of Cp has the same number of occurrences of left and right parentheses. deg((^A)) = deg(A) + 1. [5] He will fail. □ . deg((A * B)) = max{deg{A). only if it rains. provided that x is rational.

We obtain AAB) = AI V B I ) . (-"A). (1) is obvious from Definition 2. then A = A x . Proof. or ( A o B ) .A) = (-. which is impossible. If (A * B) = (Ai * Bi). (A A B).3. Any two of the six forms are not the same. An atom is a single symbol.A) = B * C ) . Then A and Ai begin with the same occurrence of a symbol. This theorem consists of four parts: (1) (2) (3) (4) Every formula is of one of the six forms. and in each case it is of that form in exactly one way. Every formula of Cp is of exactly one of the six forms: an atom. If (-. Proof of (2).2. Any non-empty proper initial segment of a formula of Cp has more oc currences of left than right parentheses. otherwise one of A and Ai will be a proper initial segment of . and we must have A = Ai. By induction on the structure of formulas. Proof.2. □ Theorem 2.2. Suppose (-. Delete the first symbol on each side. Hence (~iA) is different from (B * C). (A V B). hence it is different from the other five forms.3.3. Thus neither a non-empty proper initial segment nor a non-empty proper terminal segment of a formula can itself be a formula of Cp. obtaining -.Classical Propositional Logic 27 Lemma 2.A) = (B * C). (A -> B). Any non-empty proper terminal segment of a formula of Cp has less occurrences of left than right paren theses.Ai). then A = Ai and B = B x . Suppose (AAB) = (Ai VBi). Then B begins with ->.

3. U2. If (-. since the numbers of occurrences of left and right parentheses in these expressions are not the same (by Lemma 2. □ Example Suppose C = ((p Vq) -> ((-»p) < (qAr))).3.3. the generation of formulas of Cp is unique. If (A * B) = (Ai * Bi). then A = Ai as in the proof of (2).1). C is not an atom. but > > ■ not by the other -Vs. Remarks. - Ui V! V.) Since Theorem 2. which is impossible. it > > can be generated from (p —• q) and (p — r) by the -» between them. Thus A and V are identical.3. then obviously A = A x . or A. Proof of (4). «->. V. nor can it be generated by the -» in it. C is generated from A and B by the —• between them. (See the explanations in the example after Definition 2.> ( h p ) + * ( q A r)) ). . and V 2 are not formulas.3.A) = (--Ai). Suppose C » is generated by V. Similarly for any two binary connectives. Hence. Besides. u2 v2 Then U. Ui.> ( N H ( q A r ) ) ) . C is of the form of (A -> B): ► ((p V q ) .2. C = (U2 A V 2 ) = ( ( p V q ) . Consider the formula ((p — q) — (p —> r)). Vi. By the above arguments.28 Mathematical Logic for Computer Science the other. r) V U V u C = (Ui <> Vi) = ( ( p V q ) . and accordingly the *'s on both sides are the same occurrence. By Theorem 2.» ( h p ) Q ( q A r ) ) ) .3 asserts the uniqueness of each of these forms. contradicting Lemma 2. Hence B = B!. Hence it is of that form in exactly one way. Vq)-> r ■"V—- A B That is.2. that is. Proof of (3). C can be of the form of (A -» B) only. Hence (A A B) is different from (Ai V Bi).3. if the order of certain steps in it is not considered. C C = (UVV) = ( ( p V q ) ^ ( N ) H ( q A r ) ) ) . we have the following definition.

Consider any * in A. B is the scope of that -> in A. Consider any -< in A. It is the disjunction of A and B.4. (Scope) If (->A) is a segment of C. and C in Definition 2. It is the conjunction of A and B. Ci = Ci and C 2 = C 2 . Proof. Theorem 2.>n. The scope of -> is thus unique. If (A * B) is a segment of C. (A V B) is called a disjunction (formula). both ( _. By Lemma 2.3. A and B are called the antecedent and consequent of (A — B). both the left and right scopes of * are unique. Equivalence) tion.2. (A — B) is called an implication (formula).2. Disjunction. A and B are called the conjuncts of (A A B). by Lemma 2. Since the *'s between Ci and C2 and between C[ and C 2 are the same occurrence in A. Definition 2.3. It is the implication of A > and B. Since the ->'s on the left of B and B' are the same occurrence in A.3. Ir Implican. Ci and C^ end with the same occurrence of a symbol of A.3. and C2 and C 2 begin with the same occurrence of a symbol of A.5. Thus. then A is called the scope in C of the -< on the left of A. Similarly for the left and right scopes of binary connectives. > (A «-)• B) is called an equivalence (formula). Any -« occurs in A by an application of the formation rule concerning -i. By Definition 2. B.Classical Propositional Logic 29 Definition 2. We shall now prove the uniqueness of scopes. Any * in any A has unique left and right scopes.3. Conjunction. Any -i in any A has a unique scope. Then both (Ci *C2) and (C'a *C 2 ) are segments of A.6. B) and ( _| B / ) are segments of A. It is the negation of A. It is the equivalence of A and B. then A and B are called the left and right scopes in C of the * between A and B. Note that A.5. Suppose both Ci and C[ are its left scopes and both C2 and C 2 are its right scopes in A. (Negation.5 are formulas. □ . A and B are called the disjuncts of (A V B).3. (AAB) is called a conjunction (formula). Suppose both B and B' are its scopes in A. Hence there is some B such that (-»B) is a segment of A.3. B = B'. Eq (->A) is called a negation (formula).

[1] If A is a segment of (~»B). B) and is not a formula. otherwise A begins with -i. Suppose A contains the -i on the left of B. that of the second -i is p. [2] If A is a segment of (B * C). which states that. Hence the ('s on the left of the two -Vs are the same occurrence in A. both (-» B) and (-> B') are segments of A. but we cannot derive that the )'s on the right of B and B' are the same occurrence in A. A must contain the initial (.) on the left and right sides are respectively the same occurrences of symbols. then A is a segment of B or C. [1] states that.-*. Proof. then A is a proper initial segment of (-<B) and accordingly is not a formula. The left and right scopes ► of A are p and q. we derive A = Ai directly from (~»A) = (->Ai). and the -i's on the left of B and B' are the same occurrence in A. The scope of the first -« is ► ((p A q) V ((-^p) — r)). Theorem 2. which is impossible. Then A is a proper initial segment of ( -. nor derive B = B' directly. then A is a segment of B or A = (-•B). those of -» are (-ip) and r.3. If A contains the first symbol ( of (~>B).30 Mathematical er Logic for Computer Science le Example Suppose A = (-*( ( p A q ) V ( (-^p) — r ) ) ). A is a segment of B. if A is a segment of B.3. then A is a proper terminal segment of (-•B) and is also not a formula. Therefore we cannot derive (^B) = (-'B').3. if A is a proper segment of (~>B). . it can easily be seen that. (2) By the uniqueness of the generation of formulas of Cp and the unique ness of the scopes of connectives in formulas. But in the proof of Theorem 2. A contains none of the three symbols. then A is a segment of B or a segment of C or A = (B * C). that is. if A is a proper segment of (B * C). then A is a segment of B. since the symbols (. All the three cases contradict the well-formedness of A. Now we are to prove [2]. In other words.7. then any connective of A has the same scope (or scopes) in A as in B.6. Now suppose A is a proper segment of (->B). If A contains the last symbol ). RemarksS (1) In tne part of proving (3) in the proof of Theorem 2. Therefore. We can verify the uniqueness of these scopes after reading this section. those of V are (p A q) and ((-^p) -> r).3.

Let U be an expression of Cp. However.5. whether or not the member possesses some given property. If the second symbol is -i. the last symbol ). By Definition 2. then necessarily A = ( _ 'B). and A is a segment of (B*C). and the -> on the left of B.7. this * has scopes in A. A may be p. A contains none of the three symbols. and the * between B and C. or (q V r).Classical Prepositional Logic 31 If A contains the first ( or the last ) of (B * C). A contains (Bi * Ci) as its segment. any proper segment of (-•B) containing one of these symbols is not a formula. A may be a segment of B or C. However. D Example Suppose A is a segment of (-•B): (-B) = H P A(H0-*r))). Step 2. if A contains any one of the three symbols of (-"B): the first symbol (. we have (B * C) = A = (Bi * Ci). r. . that is. An empty expression is not a formula. One algorithm for deciding whether an expression is a formula of Cp is given as follows. that is. Suppose A contains the * between B and C. q. hence (B*C) = (Bi * Ci). contradicting the supposition that A is a proper segment of (B * C).3. if A contains any one of the three symbols of (B * C): the first (. The left and right scopes of this * in (B * C) are B and C. Since A is a formula. q. which yields a contradiction. say Bi and Ci. otherwise U is not a formula. we have B = Bi and C = Ci. A is a segment of B or C. A single symbol is a formula iff it is a proposition symbol. U must be (^V). That is. By the remark (2) before Theorem 2. A may be p. for each member of a set.3. ((-q) — r). A may be a segment of B. the last ).or > B. Since (Bi * Ci) is a segment of A. then A is not a formula (as seen in the proof of [1]). Step 3. In other words. (-»p). r. then necessarily A = (B * C). U with more than one symbol must begin with a left parenthesis. Suppose A is a segment of (B * C): (B*C) = ((-p)*(qVr)). An algorithm is an effective procedure by means of which it can be decided (in a finite number of steps). (~<q). Therefore. Step 1.

These belong to the syntax of a formal language. scan U from left to right until reaching (V. we want to introduce some conventions for omitting the parentheses in formulas to facilitate reading. where V is an expression with the same number of occurrences of left and right parentheses. (If the end of U is reached before meeting such a V. Return to Step 1. (pAq)->(pVr). otherwise U is not a formula. The outermost parentheses are usually omitted. Parentheses may be used together with brackets and curly brackets: ( ) [ ] { } } Thus ((p A q) -> (p V r)) t» (-q) may be written more clearly as [(pAq)->(pVr)]«-(-Ki).32 Mathematical ter Science Logic for Computer Science where V is an expression. otherwise U is not a formula. where W is an expression.) U must be (V * W). Then the question of well-formedness of U is reduced to the same question on shorter expressions V and W. In this and the last sections. then U is not a formula. the above procedure ter minates after finite steps. The outermost parentheses are usually omitted. It is left to the reader to verify that the above steps do constitute an algorithm for deciding whether a given expression is a formula of Cp. ((pAq)'->(pVr)) ((pAq)-->(pVr)) ((PAq)'->(pVr)) is usually written as is usually written as (pAq)-»(pVr). Return to step 1. . Because every expression is finite in length. because they are not concerned with the meaning of symbols and formulas. If U begins with a left parenthesis but its second symbol is not ->. For instance. Then the question of well-formedness of U is reduced to the same question on a shorter expression V. Before finishing this section. Step 4. For instance. formulas are defined and their structural properties are discussed.

2.3. or 6. 3. Exercises Exercises 2. Suppose U.4.» ( ( p A W ) V r ) ) « q ) with all its parentheses omitted. We shall not always omit the maximum number of parentheses which our conventions would allow. Hence it is perhaps more profitable to write 1) as h P "► (P A -»q) V r ] H q . It is said that • has priority over +. but any other length is possible. SEMANTICS In this section we want to explain how to interpret the propositional language Cp and make the formulas express propositions. When we want to decide whether an expression is a formula. we should write it in its original (unabbreviated) form with no parentheses omitted. Show that no formula of Cp is of length 2. but aim at securing maximum readability. V and W are non-empty expressions of Cp. subject to the convention of priority. . 2. It has been mentioned above that the aim of omitting parentheses in formu las is to facilitate reading. 2.> p A . 2. Show that at most one of UV and VW is a formula.Classical Prepositional Logic 33 We also often omit the parentheses.1.3. Accordingly the formula 1) may be written as 2) -ip . In algebra x -f y • z means x -f (y • z).3. We first give some intuitive illustrations. In the following sequence: -i A V -> <* each connective on the left has priority over those on the right.i q V r <-> q ( (((•( N .

as shown in the following tables: A 1 0 A 1 1 0 0 B 1 0 1 0 -A 0 1 AAB 1 0 0 0 AVB 1 1 1 0 A ->B 1 0 1 1 A^B 1 0 0 1 These tables are called the truth tables of negation. deducibility is not concerned with the matter of premises and conclusions. conjuction. "and". then". disjunction. A — B. The connectives have their intended meanings: negation. Ac and B. implication. as men tioned in the Introduction.4 Ai or S. and "iff'. and A o B are determined by ^ those of A and B. Atoms are intended to express simple propositions. "if. . A B. Formulas have no values but we may assign to them the values of the propositions they express.34 Mathematical Logic for Computer Science Science Formulas are composed of atoms (proposition symbols) and connectives. then the following non-atomic formulas on the left express the corresponding compound propositions on the right: -•A AAB AVB A -> B A^ R A -H-: ^B Not A. A V B . Hence. AiSB. disjunction. Then the value of -iA is determined by that of A. We need not know what propositions A and B are. "not". conjunction. A HA B. The above illustrations lead us to the following definitions. and equivalence express. and the values o f A A B . "(inclusive) or". A B. respectively. . implication. if formulas A and B express propositions A and B respectively. If A\ then B. > iffK 4 AiAiSB. and equivalence. because.

.3. .1. \t _ ^ 0l otherwise. t1 iiAt = B \ [6](A**B)* = | ifA* = B t \f l 0 otherwise. ^ 0 otherwise. * p* 1. (Truth valuation) (Truth valuation) valuation) A truth valuation is a function with the set o all proposition symbols tion of as domain and {1. \ 0 otherwise.o}. f 1 if A* = 1 or B' = 1. «e{i. (Values of formulas) The value assigned to formulas by a truth valuation t is defined by recursion: [i] P *e{i.o>. 1 or B' = 1. A* G {1. P K ^ y. MO*.1. \ 0 otherwise. By induction on the structure of A.4. [3] (A A B)* = f l i f A * = B * = l. i{V) Proof.0}.4. a truth valuation assigns a value to every propo sition symbol simultaneously. f l1 ifA* = B* = l. \ 0 otherwise. Definition 2. nduction Q A truth valuation assigns a value to each proposition symbol. \t _ / l0 if A* = 0 or B* = 1.2. is concerned only with the values the which t assigns to the proposition symbols occurring in A. [ 4 ] ( A v B ) ' = ^ 0 otherwise. .0} as range. For any A G Form(£p) and any truth valuation^.. or B* = 1. By Definition 2..4.4. Theorem 2. / 1 lfA itA 0 ' = °' ^ 0 otherwise. The value which t assigns to any formula A (to be defined below) is written as A*. [ 4 ] ( A v B ) ' = f 1 if A* = . / if A* = 0 [5](A-»B)*: \ otherwise. Example Suppose A = pVq—>-qAr and t is a truth valuation such that (1) p« = q* = rr* = 1. which t assigns to a formula A. We use the italic small Latin letter t (with or without subscripts or superscripts) to denote any truth valuation. f l0 otherwise.Classical Propositional Logic 35 Definition 2. But the Lation B value A*.

r*1 = 0 in (2) is also unnecessary.4. then 2 A*2 = 0. l. because the satisfiability of E requires a single truth valuation satisfying all the formulas in it. = = = = l. In fact. 1 =0. sufficient for A* = 1.1. p* = 1 in (1) is unnecessary. the satisfiability of E implies that all the formulas in it will be satisfiable. because q* = 1 and r* = 1 are sufficient for A* = 1. p* = q'1 = r*1 = 0. A' = l. A' 1 . When E* = 1. 0 qAq (qAr)*>=0. B* = 1.. not that for all B e E.4. We use the capital roman-type Greek letter E (with or without subscripts or superscripts) to denote any set of formulas. h Suppose t\ is another truth valuation such that Suppose t\ is another truth valuation such that (2) (2) Then we have Then we have p*i1 = q *i = r*1 = 0. E denotes all the formulas in it. l. A* = 0. If t2 is a third truth valuation such that p*2 = 1 and r*2 = 0. t is said to satisfy E. But the converse of this implication does not hold. then If t2 is a third truth valuation such that p*2 = 1 and r*2 = 0. (pVqJ'^O. p' 1 = q'1 = r*1 = 0. 1 ( q A A'1 . Obviously. uations assign to a formula may or may not be different. Note that E* = 0 means that exists B £ E such that B* = 0. (( p V r )J'^'^=O . (Sa\ (Satisfiability) E is satisfiable iff there is some truth valuation t such that E* = 1. r) A*^ E* = t _ f 1 if for each B E E. We define (pVqJ'^O. B* = 0. That is. \ 0 otherwise. r*1 = 0 in (2) is also unnecessary.36 Mathematical Logic for Computer Science Then we have (pVq)' (pVq)* (qAr)* (qAr)* A* = l. because q* = 1 and r* = 1 are In fact. l. A* = 1. p* = 1 in (1) is unnecessary. Definition 2. The above example illustrates that the values which various truth valThe above example illustrates that the values which various truth valuations assign to a formula may or may not be different. .1.

4.1 is assigned to p. .Classical Prepositional Logic 37 Definition 2. the values of (p — r) are written below the —». q. the values of each segment being written below the connective used in forming it. the value A* is concerned only with e the values which t assigns to the different proposition symbols p i . m mis taDie wnetner A is a tautology or a contradiction or neitner. in the third case: 1. A* = 1. .5. For instance. Contradiction) A is a tautology iff. . Example The truth table of (p V q -» r) < > (p ->• r) A (q -> r) is «-> (p ->• r) A (q -> r) is H p q r 1 1 1 1 0 0 0 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0 (p 1 1 1 1 0 0 0 0 V q 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 -> 1 0 1 0 1 0 1 1 ± 1 0 1 0 1 0 1 0 <-> _(p_ — ► r) A 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 i l -> ll 1 1 0 0 1 1 0 0 1 0 1 1 1 0 1 1 1 0 1 0 1 0 1 0 The table is formed as follows.In different i ~ r A :~ ~ i each of thee 2 nn cases the value of A is obtained effectively. . for any truth valuation £. For instance. Then the values of the various well-formed segments of the entire formula are obtained in order of increasing length of the segments. for any truth valuation t. and r (on its left). The values of A L 2 ca in all the 2 n cases form a table. (Tautology. the question whether a formula is a tautology or a con tradiction or neither. r respectively. A* = 0 . By definition. It can be seen 1 the 2 n < in this table whether A is a tautology or a contradiction or neither. .5. and also its e luirnuj three atoms p. q. called the truth table of A. Finally. which is used in the last step of its formation. S.0. There are 2 n different truth valuations for P i . .) However. (Tautology. A is a contradiction iff. p n . In each case. . p n occurring in A. is concerned with all the truth valuations which are infinite in number. (A formula is satisfiable iff its negation is not a tautol ogy. the values of the entire formula in each c case are written in a column below Q «->. r are written below them. Contradiction) 4. as mentioned before. . wh > j —». First the formula is written. q. The 2 33 = 88 different truth valuations J 2 for p. which is used in forming it. . the values of the atoms are copied below each occurrence of them in the formula.

because 1 and 0 are not symbols of the formal language. They are used here for the provisional purpose of evaluating formulas. but is intended to denote the value of a formula. in the following table are not expressions. 1 0 1 A A 0 0 1 1 A A 1 A -. In fact. but another one to be introduced is perhaps more efficient. a formula containing n different proposition symbols corresponds to an n-ary truth function. The "expressions" A A 1. In general. etc. 0 V A.38 Mathematical Logic for • Computer Science Science From the above example. the A occurring in them does not denote a formula. n The above procedure is generally applicable. -. it is easily seen that a formula containing three different proposition symbols corresponds to a ternary truth function.A 1 A A -i A ->o A A1 1 AA A AO OA A A V1 1VA A VO 0 VA A-> 1 l-> A A->0 0-> A A H I 1 f+ A A H O Oo A -A .

q) A ( - . KSJ t*£s^sxjr xxxg c*xx ^ / V O O I W I V o i m ^ i i i i v t i o i u i i o g x v Vsxx xxx u u u cfciufv^v^ table. Thus.42. For each of the following formulas decide whether it is a tautology or a contradiction or neither: ] [i] ( p V q . each yielding a new formula or a value.> q A r ) —>■ A (-. Now we are in a position to describe the procedure. Then we have > > > Therefore A is a tautology.p V q) [2] (p A -.> r ) . written as i\ ^j = 1. Then set p = 0 and make the evaluation of A. say p. A value is called a terminal. The value of A may be 1 or 0 or may equal that of a new formula with no p occurring in it. The given formula is a tautology if all the terminals are 1. Exercises 2.> ( p . Assign 1 IU one of tiie atoms. Therefore we may replace the "expressions" on the left by the corresponding ones on the right to simplify the evaluation. . we begin with A and obtain two branches by setting p = 1 and p = 0. /assign 1 to one oi the aiums. occurring in A. X C U U ^ L / U O C C* formula X A is given. we continue the branching process described above. written as is given. J J T U H U U W V J. For a non-terminal new formula. Example Let A = (p A q — r) A (p -> q) — (p — r). Suppose a XVJXXXXU-LCb 11UYY W ^ M I C X X C* L^ISOXUXVJXX l/W U ^ O ^ l l U ^ l»XX\^ L y X ^ V ^ \ J . U .4. or a contradiction if all the terminals are 0. occurring in f\. A. However. The process terminates when values (terminals) occur in all the branches. those on the right are simpler. or neither. say p. Evaluate A by applying all possible simplifications given in the above p — J.1.Classical Propositional Logic 39 Such "expressions" in the above table have the same value as those on the right.

• •A is J\\.)->A .. For what n is the iuiiiiuia biie formula (.) 2.40 Mathematical Science Logic for Computer Science [3] (P ~> q) ^ (q -> Pj M (p -> q) <+ (q -> p) (p [4] (I -> r) A (q -> r) <-► (p V q -> r) [5] (p-J-r) VV (q -> r) <-> (p AA q -» r) [5] (p -> r) V (q -> r) <-> (p q -» r j 15] U> -> r) 2. that A is a tautology iff each atom occurs an even number of times ber o in A... . (Ax V ..5. . .? An. . . The two tautologies mean that <-> satisfies commutative and associative laws. (z l 2 5 TAUTOLOGICAL CONSEQUENCE . j = 1 .4. . -»• B. Prove <-►.4. . p n . . (Hint Use the tautologies <-> q) <-> (q ** P ) . \u A .. n ) . ( p n _ 1 ** Pn) • . ••)fiU £ is a truth valuation. .((A->A)->A)... /In .. ..4. . and A aare propositions.2.)« = 1 (t = l . .3. . . .n). v v v n n — ' a tautology? tautology? 2. . V An)< = 1. . 2. .. • ) ) and Pi n Prove that A* = 1 iff p* = 0 for an even number of i's (i = 1 . . Deductive logic studies « 4) • «/Wij whether A is deducible from A\.4. < d A Suppose' ^A l i . . . ( (Hint Use the tautologies> given in the above hint and the given in fact that if B is a tautology thenI B H CC is a tautology iff C is a B «->• tautology. . [(p ** q) ** r] <-> [p < (q < r)] ► ► (P or by induction on n. . . (Bi/ hat (Bi t Prove that (B* -> A*)' = 1 (i = 1 .. Suppose A is a formula containing only the connective^ «-*. A*)* n). ( B i A B j ) t = 0 f o r z ^ j (». . A = p i <-> (. . . •. •An.) le 2.•.4... icy. Suppose A = pi «-» (.•.4. yj.2.i <-> p n ) . Suppose (ki^Bif^l (i = (A. hence any permutation of the proposition symbols in A does not change the truth value of A. n ) . . n).^1 r *->iJ J.

For two formulas. . it B G 0. we write ANB to denote: "A |= B and B | \=A " . A n and A. . {Tautological I consequence) (Tautological consequence) Suppose E C Form(Cp) and A G Form(Cp). Since 0 consists of no formula. E (= A is a proposition (in the metalanguage) about E and A. Hence "if 0* = 1.Classical Propositional Logic 41 (that is.A. . . Tautologically equivalent (=| formulas are assigned the same value by any truth valuation. .. This makes us con sider the following relation between { A i . . When E is the empty set.1. . since different truth valuations may assign different values to the same formula.5..0f=Ais 2.i± ucLwccii \ ^ T . . .1. we obtain the important special case 0 \= A of tautological consequences.n/}i n jandi uAIs\i t u i i c o p u u u o KJKJ LUC ucu-ii^iuniL^ iciaLHj.. then A* = 1" >^ £d J. 0 |= A means that the truth of A is unconditional. 1 • ai Formulas are assigned values by truth valuations. if B G 0.5. equivalent) iff A N :B holds. then B' = 1. where 0* = 1 means 2) For any B. . 0 h = A i s 1) For any t. E I— A means that the truth of the formulas in E |= is the sufficient condition of the truth of A. 2) For any B. . .5. This leads us to the following definition. this relation should be stated more precisely by requiring the truth valuation to be arbitrary. .O va in l) is cquivaiciiL to> A* = x. alent (or simply. . E* = 1 implies A* = 1.An implies that of A) holds. written as E f= A. JLIIU» 0 |= A means LIICLL A is a L a u n j i u g j . Thus V f— i\ incciiio that n* 10 a tautology. Definition 2. then it assigns truth to A. A and B are said to be tautologically equivB = A". We write E ^ A for "not E |= A". . . of the formulas in E). the truth of Ai. ill 7 intr V Intuitively speaking. . . hence A is a tautology. . valuation t such that 2/ = 1 and A = u. there exists some truth valuation t such that E* = 1 and A* = 0. That is. . then A* = 1. E is any set of formulas.. .. A n . A is a tautological consequence of E (that is. Suppose A\. iff for any truth valuation £. However. |= may be read as "logically implies". Because B G 0 is false. By Definition 2. 1) is equivalent t u nA * = 1.. 2)i is vacuously true. . Then the question raised is: what kind of relation between { A i . then B* = 1. = 1. A n } and A corresponds to the deducibility relation between {Ai. icn Note that the notation f= is not a symbol of the formal language and hence E (= A is not a formula. . if 0* = 1. • •. A n } and A: if a truth val uation assigns truth to each of A i . An and A are expressed respectively by formulas Ai.1.

If we begin with (1). (B A --C)* = 1. to prove E \fc A) we must construct a truth valuation satisfying E but not satisfying A. then the proof is more complicated.42 Mathematical Logic for Computer Science Science We now show how to prove or refute a tautological consequence. Thus.-. That is. to prove E | = A w e must show that any truth valuation satisfying E satisfies A. Tiftnt.B) V C)* = 1. (-. we begin with (3) because we can deduce (4) and (5) from it. ^ A. AA«-»• L. Then we have ((A -»• -. and C* = 0. ((A -J. v <J. Hence the tautological consequence is proved.A A (B ->• C))* = 0. In general. a A . Let t be a truth valuation such that A' = 0. which proves the statement.C)* = 1. B -* C ^ A — C. ' 7 B->C^A->C.. . and deduce from it that "A* = 1 and B* = 1" or "A* = 0 and B* = 1" or "A4 = 0 and B* = 0". I v Proof. and from B* = 1 and (2) we have C* = 1. To refute E (= A (that is. Example A->B.C H C p= A AB -> C). C* = 0. (A -> C)* = 0. B' = 1. 1 (A +» C)* = 1.B) V C)* = 1. B A -iu. there is a truth > valuation t such that (1) (2) (3) By (3) we have (4) (5) A* = 1. (B -> C)* = 1. (B A -. Remarks In the first example above.A A (B -> C))* = 0. ( A ->• -its. Example (A->--B)VC. which contradicts (5). Suppose A -* B. (p C V).-A ( (B 4 -> ) . ( A ^ B ) ' = l. c^ Proof. (-•A I (-. the tautological consequence is easily proved. (A <+ C) = 1. By (1) and (4) we have B* = 1.

. ( A B .B H A' f> B'. . . An \= A iff 0 |= Ai A . . then A' = 0 is obtained from (A «-» C)' = 1.A H . ( A V B ) V C H AV(BVC). AVB|—|BVA.5.2. V An without parentheses and alter the order of the conjuncts and disjuncts.9 in the next section): A A B |—| B A A . (AVB)VC|—| AV(BVC). . A A n Ai V . A n | = A i f f 0 | = A i . Thus. [3] A V B | = ) A ' V B ' .> A ) . These laws also hold in formal deducibility (see Theorems 2. Conjunction and disjunction satisfy both the commutative and associa tive laws (the proofs are immediate): AAB H B A A . . [5] A -H. . .Classical Propositional Logic 43 Similarly in the second example.A ' . A V B H B V A.6. [1] A x . Theorem 2. . . . it is convenient to first make t satisfy (B A ->C)' = 1.6. [2] A 1 . ( A A B ) A C H AA(BAC). . . ) . .8 and 2. [3] [4] [4] A -> B H A' -> B'. If A H A' and B H B'.3. Lemma 2. . then [1] -. from which we get B* = 1 and C* = 0. A A n -*■ A. we may write Ax A . (A A B) A C H A A (B A C). D [5] □ . [1] [2] [2] A A B H A ' A B ' . .5.> ( . . .

5.7). the theorem holds as stated above. If B ^ A. Ai ->• A 2 . By induction on the structure of A. -.3. ( A' is the dual of A. (by Lem 2. A. then B is a segment of Ai (by Theorem 2. □ Exercises 2. Proof. Suppose A = Ai * A 2 .5. Induction step.If B |=j C and A' result from A by replacing some (not necess* )lacing necessarily all) occurrences of B in A by C.44 Mathematical Logic for Computer Science Science Theorem 2. (Duality) Suppose A is a formula composed of atoms and the connectives ->. . □ That is.) Proof.5. Ai ->• A 2 . A is one of the five forms: ->Ai. A2HA2 Ai * A 2 H A.4. Let A[ results from Ai by the replacement stated in the theorem. then C = A'. Then A' | = | ->A.5. then A' = A[ * A 2 . (* denotes any one of A. This theorem thus holds.7). If B ^ A . Then B = A. the theorem is proved. V. Ai V A2.3 [2]-[5]).. If B = A. A H A'. the theorem holds. Basis.1.) If B = A. A H A'. Ai A A2. * A 2 (byindhyp). We have AiHAi.Ai H -"Ai That is.3. then B is a segment of Ai or A 2 (by Theorem 2. — . Suppose A = -1A1. then A |=| A'. By the basis and induction step.3 [1]). «-». then A' = ->A'x. (Replaceability of ■equivalent (Replaceability equivalent equivalent formulas) formulas) formulas) li. Prove Theorem 2. or Ai «-» A 2 . 2. Let A[ and A 2 result respectively from Ai and A 2 by the replacement stated in the theorem. or Ai «-» A 2 . (by Lem 2.5. r_ A u. We have A xi H A ! A NAi (byindhyp).5. If B = A. A is an atom. Theorem 2. ► the theorem holds as in the above case.5. and A' results by exchanging in A A for V and each atom for its negation. and V by the formation rules concerned.5. By induction on the structure of A.5.

> C f = A . [2] A -4 (B V C) £ (A -> B) A (A -> C). . That is. 2. we cannot mechanically check their correct ness.6.2. » [] (AAB)^CH(A-+C)V(B^C). Then. Prove the following: [1] ( A . .• C). A -> (B V C) H (A -* B) V (A .5.> C ) [ t A ^ ( B A C ) .A A ^ ( B A C ) H ( A ^ B ) A ( A .( V B) H -A A -B. Hence 2) noias. nence Z) holds. either of the proofs is correct. A is true and C is false. and cannot even check whether they are proofs. Prove the following: [] 1 [] 2 [] 3 [] 4 -(A A B) H -A V -B. 2) is proved as follows. thus yielding a contradiction. but "if A then C" is false.4 C). 6 [7]A4(B-^C)HBoBA(A«AAC).> C ) ^ ( A v B ) .5.> C. Consequently. FORMAL DEDUCTION We have mentioned in the Introduction that Leibniz looked for a calculus of reasoning. The proof of 1) in the last section is analogous to that of 2). Suppose 2) does not hold. while 2) is concerned with propositions. We proved in the last section 1) A->» B . Undoubtedly. The distinction between them lies in that 1) is concerned with formulas. Then j . 2. [4] ( A ^ C ) V ( B .> C ^ ( A ^ C ) A ( B ^ C). a contradiction.> C . both "if A then B" and "if B then C" are true. B is true and C is true too. B . The correctness of formal deduction can be checked mechanically.Classical Propositional Logic 2.) B ) V ( A . It is the formal deduction to be formulated in this section. [3] ( A A B ) . 1) corresponds to 2). ) L U I i copiuit-ia Ito j . . because we have not denned the concept of a proof. 5 [] (AVB)^CH(A^C)A(B->C).3. B and C. A- Suppose A. l i e i i 1) corresponds U 2) From "if A then £" and "if B then Cn we deduce "if A then C". However. B and C express respectively the propositions A.

A 2 . Formal de ducibility is a relation between E (a set of formulas which are the premises) and A (a formula which is the conclusion). the metalanguage) about E and A. (->| » (-^-introduction) If E | . respectively. E' — A. the order of the A2. E'. I f \^I>VI I bill VUlllVXJ I til (->-) (-►+) IfE. E — A is a proposition | | (in tne metalanguage. | ~i J „ J i. First of all some notational conventions will be introduced. ->A h ->B. Accordingly. The im portant point is that formal deducibility is concerned with the syntactic structure of formulas and its proof can be checked mechanically. Suppose E = {Ai. (Ref) A | .A . .A A B . because E is a set. E h A. then E f. p ^in | 1 1 i Formal deducibility will be defined by rules of formal deduction. A 3 . (A-) . A and E. . .B . In propositional logic there are eleven rules of formal deduction formulated as follows. ^A \. (->| (^-elimination) U11V/U i—l I J_f.A. .B. A 3 . then E \— A. (— (-'-elimination) If £ | . .46 Mathematical Logic for Computer Science Science We want to define another kind of relation. then E. Note that — is not a symbol of | the formal language and E — A is not a formula. A2. "|—" may be read as yields . about L. however. E may be written as a sequence Ai. ana A. (Reflexivity) (Reflexivity) (+) If E h A. then E — B. called formal deducibility. } . . E. "— may be read as "yields".. 'Written in this way. then E — A — B. A | . We use the symbol — to denote the relation of formal deducibility and | write Eh A to mean that A is formally deducible (or provable) from E. For convenience. The significance of the word "formal" will be explained later.A.: (Addition of premises) (—) -) If S.> B . . irrplpvant. the sets E U {A} and E U E' may be written as E. h p r a r members is: irrelevant.

E|-A. E. (V-) (V-elimination) (V+) (V -introduction) (<->•-) HE|-A«B. because E is any set of formulas. the rule applied and the preceding steps concerned (if any) form a justification for this step. E. but a scheme of rules.A. B. Examples are first given to explain how the rules are applied. | (^-introduction) («•+) Each of these rules is not a single rule. then E — A. E |I— A. (A-.) ^ n i a t ID. ( A | (A-introductiori) If E. and are written on the right. then E — A f-» B. Step (2) is generated by the rule (+).A <-> B. At each of the steps. E|-B. A h C. | If E | .B V A. The following sequence: ( l ) A |h A A (by(Ref)).E'|-A (That is.Classical Propositional Logic 47 £ — B.j consists of two steps. and C are any formulas. | (A-elimination) (A+) If E h A. then E | . Example Suppose A G £ and E' = E — {A}. EhB. These steps are said to form a proof of the last step. and A. then E. {*>-> | (^-elimination) If E. (**-. B \. then £ — A A B. B h A. Step (1) is generated directly by the rule (Ref). which is applied to step (1). E | . .C. then E h B If E | . A h B . A V B — C. z-* .r±. (2)A. (by (+).A V B.(1)).

( . (1).A .-. It contains (Ref) as a special case. E |. (c) also generates schemes of formal deducibility directly. A ( 3 ) A ^ B .48 Mathematical Science Logic for Computer Science Hence. (<->-). E of 5). (5) A -+ B. A demonstrated E — A may be called a scheme of formal deducibility. one of the eleven rules or (e). from w< 3) 4) we can generate 5) A |. (6) A -> B.> C | . and (V+).B E|-A by applying! (->-).B E.B -> C (by (e)).> B . B . B (4) A -> B. For instance. These steps form a proof of A -> B. which has just been proved. results by deleting the leftmost -> of -iA in the . consists of six steps. using the notation for membership. A h C (by (-> . is the E in the premises of 3) and (—) 4). (4). At each step. (2)).A holds. and two steps are concerned in the —• application of (->-). (Ref) is the only one which gener ates schemes of formal deducibility directly.> . On the right are written the justifications for the steps.) . A h B (by (-► .. (V-). is applied. A | . it is proved in this example that when A E S. | Among the eleven rules stated above. No preceding step is concerned in the application of (Ref). A h A (by(e)). . ( 2 ) A . 1 The conclusion.A | . A h A -> B (by (e)). B >C B -. (A+).> C . ( > + ) . (3)). . Rules of formal deduction are only concerned with the syntactic struc tures of formulas. (5)). Example The following sequence (1) A -> B.) . B ^ C .> C which is generated in the last step.B -» C h A -> C (by (->+).) .B -> C. One step is concerned in the application of the rules (+). and (**+). It is denoted by (e).A ^ B E.B -> C.• The premise. (A—). B -> C. A of 5).n B i A | .

E | . "B we obtain C. implies C . we obtain B.B.Af-B.B. hence C is obtained from "*4 implies #". E \.► —): > ->-): If £E ^ A ^ B . (V—) expresses the method of proof by cases. > It should be pointed out that in (V—) it is the V between A and B in A V B that is eliminated in the conclusion C.B—»C|— A — > C i n the foregoing example expresses a proof in the informal reasoning: from "A implies 23". Now we state the definition of formal deducibility. and (—>+) call for some explanations. then this proposition is deducible from the premises (denoted by E f. In (—►+): If then E. the — between A and B in the conclusion A —> B is introduced. Therefore.Classical Prepositional Logic 49 premises of 3) and 4).B). "B implies C" and A. A \. it can be checked mechanically whether the rules are used correctly. .A). E h A. which is generated by this rule. but those of (""—).A -> B. (->—) expresses the method of indirect proof in informal reasoning: if a contradiction (denoted by B and ->B) follows from certain premises (denoted by E) with an addi tional supposition that a certain proposition does not hold (denoted by -vA). (V—). For instance. «B implies C" and A. from "23 implies C" and B Bv. . ID a n u u separately. uieii s\ IUUUWS l i u n ID UI C". (—»+) expresses that to prove an implicational proposition "if A then B" from certain premises (denoted by E — A — B). Then we can see how the proof ofA—>>B. The B of 3) and 4) is an arbitrary formula. then A follows fromi "B or L.) : ( . If proposition A follows from B and C separately. and accordingly "*4 implies C" is obtained from "A implies B" and "B implies C". The intuitive meanings of most of the rules are quite obvious. it is sufficient to prove | > B from the premises together with A (denoted by E. in (— . then the -> between A and B in A — B is eliminated in the conclusion B of > E |. The ehmination (introduction) of a connective means that one occur rence of this connective is eliminated (introduced) in the conclusion of the scheme of formal deducibility generated by the rule.

.50 Mathematical Logic for Computer Science Mathematical Science .. there are two terms | Efc.A n A .6..A holds iff there is a finite sequence 6) Ei h A i i . . if E& — A& is gener | ated by (V—). where B is an arbitrary formula. | means that in the subsequence 7) A . . however. It is signifi cant. In another example. then there are in 7) two terms E'. E C C |A A c .:. E f. B V C = E/-. iff E | .f * where B and C are arbitrary formulas such that E'. written as E |. Per haps.A. (Formal deducibility) al deducibility) Definition 2. ^ '. .EEc^ -ii hAfc-i which precedes E& — A& in 6)..A".. The sequence 6) is called a formal proof.-AfchB. This is done by checking whether the rules of formal deduction are correctly applied and whether the last term of the formal proof is identical with this scheme. say (->—)... .f _ E x | " A ii. To say E^ — A^ is generated by one rule of formal deduction.1. It is a formal proof of its last term E n — A n .. . In this sense.A for "not E |. one may not know how to construct a formal proof of it. Now the significance of "formal" has been explained in full.. rules of formal deduction and formal proofs serve to clarify the concepts of rules of inference and proofs in informal reasoning.An is E | .-Afch-B. that any proposed formal proof can be checked mechanically to decide whether it is indeed a formal proof of this scheme. Efc.A (that is. n) iin 6) is generated by one rule of formal deduction and E n \. .A* ( fc = 1. E n | . E n = E and A n = A). | [/We write E ty.BhAfc. h . . such that each term E* | . .A is generated by (a finite number of applications of) the rules of formal deduction. The word "formal" may sometimes be omitted if no confusion will arise. (Formal ded A is formally deducible from E... A scheme of formal deducibility may have various formal proofs. By the above definition.

2 of Form(Cp) to see that schemes of formal deducibility correspond to formulas. | Basis. If E \. Statements concerning formal deducibility can be proved by induction on its structure (of generation). The premise A of A f.A) are different matters. We distinguish ten cases.1). a connective used for forming formulas. We may compare this definition [i2. has a certain property.2.AvB|-C c has also this property. (2) Both tautological consequence and formal deducibility are studied in the metalanguage by means of reasoning which is informal.A. (3) f= and — are not symbols of Cp.2. Induction step. while the latter belongs to syntax.6. T h e o r e m 2.> B i s a > tautology and A |. we suppose E.A -> B. But there is a connection between f= (or |-) and — such that A ( = B i f f A . For instance.6. They should not be confused with -». By induction on the structure of E — A.A.A generated by (Ref) is itself finite. which | is a symbol of £ p .Classical Pro-positional Logic 51 Remarks (1) Tautological consequence (E |= A) and formal deducibility (E \. in the case of (V—). rules of formal deduction to formation rules. The basis of induction is to prove that A|-A which is generated directly by the rule (Ref).2. Proof. The induction step is to prove that the other ten rules preserve this property.Bf-C have this property (induction hypothesis) and want to prove that E.2 Form(CP) with Definition 2. then there is some finite E° C E such that E° |. Definition 2. and formal proofs to formation sequences (see Exercise 2.2. The former belongs to semantics.B iff 0 | . .A|-C C C £.1 is an inductive one.

{^A} C E. ^ 1 . we have E'. E.> . we prove: (1) There is some finite Ei C E such that Ei. we obtain from (1) and (2) Ei. . E 2 is a finite subset of E. First. Then Ei.A . there is some finite E° C E such that E° — A. then E' . ZJI Z . 2. h 'B. By the induction hypothesis. 2 -Af-B.. E 2 is a finite subset of E. E' h A. EJ2 . there is some finite E' C {E. -. we can prove: (2) There is some finite E 2 C E such that E 2 . where E i .> B . Then E i .A h .2 2 \~ A . ~^A h ">B. By the induction hypothesis. By (+) we have Ei. ->A} such that E' h B. Ei. By (+). Ei. Suppose ->A £ E'. thus obtain (1) by setting Ei = E' — {-»A}. | E° is also a finite subset of E. E 2 .52 Science Mathematical Logic for Computer Science Case of (+): If then E|-A. E . Case of (-1—): If E.A h B. B. . E h A. By (+). -iA — B. . Case of ( . then E h A. there are finite subsets Ei and E 2 of E such that Ei h A -> B and E 2 h A. --IlAA|— --1JD. E 2 h A.A h B. where Ei.) : If then EhA->B. then E' C E. we prove: r irsi.. we obtain (1) by setting Ei = E'. E h A. | By the induction hypothesis. E 2 h B.-B. E 2 | . E'. E h B. Suppose -. We thus obtain (1) by setting Ei = E' — {-»A}.A G E'. Similarly.

A n -> A (analogous to (7)). . we stipulate to write E (. . (4)). this theorem is proved.Ai -> (.•••) . when E \. ( A n .6. [1] A -+ B. A \.) (by ( . A n G E').6. . we use in the proof only a finite number of them. then E — A.3.i | . . since by Theorem 2..A ( A i . (4) 0 (.E' for "for any B G E'. ( 5 ) E h A i ^ ( . . (6)). we have A i . . . . A n G E' (by Thm 2. E |. .. [1] has been proved in an example. (8) E | . .E' is written in a formal proof. .A n -> A (by (-►+). □ — r 1 — j. | (by (10) E h A (by (->_). (2)). In a scheme £ — A of formal deducibility. . A n h A. [2] is proved as follows: (1) E' — A (by supposition)..E' consists of an infinite number of schemes. A n . | (2) A i . . .—. which contradicts Definition 2. A -► B h A -> C.Classical Propositional Logic 53 The proof of the other cases is left to the reader.2. .—. E \. [1] E | . . (A n -► A ) . where A i . .) ( b y ( + ) . When a number of schemes have the same premise. ) 0 (analogous to (3)).A from E' |.6. (9)). .6. ( A n ^ A ) . (Transitivity of deducibility) | Proof. [3] A -> B. . (3) A!.2. . S'hA. A n | . .B -> A. [2] A |.B". D The rule of transitivity of deducibility is denoted by (Tr). [2] I f E h S ' . and the conclusion consists of one formula. B -> C h A -> C. Theorem 2. .4.6. (9) E — A n (by supposition and A n G E').A in the case A G E.+ . Theorem 2.B. .) .1. . the premise is a set of formu | las. . [4] A -» (B -> C). ( 7 ) E h A 2 ^ ( . (5). (6) E — Ai | (by supposition and Ai G £'). •••) . (1)). Thus when E' is infinite. .— . (8). .> A ) . . By the basis and induction step. it does not mean the formal proof contains infinite steps. Remarks Although E — E' in the supposition of (Tr) may contain an infinite | number of schemes. Hence.

A -> B.A | . [4] A.A . [1] ^ h A. [2]. (4).5 [1]). A h . Proof of [3]. — A \.— A (by Thm 2. (5) S. (2)).54 Mathematical Logic for Computer Science Science Proof.B . (2)£. The rest are left to the reader.-AhE (3) — A | . (3) A \. (2).6. n A h . ->->A \. . □ . and [4] are left to the reader. [3] has been proved in an example. A — B (by supposition). then E — -^A. E.A (by (+). Proof of [1]. ^ A h B (by (IV). Therefore. Theorem 2. Proof of [2]. the terms in a formal proof should be generated by the rules of formal deduction.-). the rules are axioms of formal deduction. .A |. (7) E h . [Reductio ad absurdum) | (Reductio [3] A h — A .A (by Thm 2. But in writing formal proofs we can use the demonstrated schemes of formal deducibility.A (by (6)).. (3)).A (by (-.6. (6) S. Proof.A (by(e)). (1). [2]. ^ A h . while the schemes are theorems.->B (analogous to (5)).5. h-A (3) ^ A h A (by (-. (1)). ( 2 ) A . AI--1-. ( 2 ) .5 [2]. (5).B . A h . . because they can be reduced to the rules.-). (4) E. (1) E.A (by (6)).-A (by (e)).A . I^ A ( l ) . [2] HE. [5] A \.6. We choose to prove [1].A -> B. □ By definition. and [3]. The proofs of [1]. ( 1 ) A . (2)). | (by E (by(e)). (1). (6)).A h B. [6] .

When (->—) and (->+) are both available. .A .B (.7. B . [2] A -> .B -> -. A -*■ . but different in strength. [3] A -► B.> B | .A . Proof of [1].6. We choose to prove [1] and [6].B.A (by (-►+).6.A. (2)). [8] If .> A | .-nA. then . (4)). the rule of indirect proof. [7] If -. A h B (by (+). if (-»—) is replaced by (-»+) in the rules. a scheme provable by (-1+) is neces sarily provable by (-•—). Theorem 2.► .( A -> B) I.I A -> B | . [5] .B . [4] i A -> -nB I. (5) A . [3] . . But. (3).B ..-iB. We choose to prove [1]: (1) A ^ B . -iB h .A h B.A h ..A \. are similar in shape. Since (-»—) is stronger than (->+). n A . Proof. but a scheme provable by (->—) is not necessarily provable by ("•+). (4) A -»• B. [ 4 ] A ^ B .-iB -> A. D Theorem 2.B | .. [2] A -> -iB I.B (by (e)).A .A (by (-.A .A. [6] --(A -¥ B) | .6. (-1+) is also called ^-introduction. (2) A -> B.A. [1] n A . . it is usually more convenient to use (~H-)..> B h B.A . (3) A -» B. [6] If A h i B .B -> A.6. This concerns the notion of independence.Classical Propositional Logic 55 The rule of reductio ad absurdum is denoted by (->+). which will be discussed in Chapter 5. (1)). A h B (by Thm 2.4 [1]).B . then -nB (. (->—) is stronger than (-H-). [1] A -> B h -OB -» . (-•+) has been proved above. {-"+) and (-■—). then (-1—) cannot be proved.+). [5] If A \. then B f. Proof. A h . then B h A.

(3)). (2) B | .6. (1) . B h .56 Mathematical Logic for Computer Science (1) -.A (by Thm 2. A (3) A -> --B.-.> n B (by (-»+).4 [2]). [3] A A B |—| B A A. A . [6] -.+ ) . (3).A -> B (by Thm 2. We choose to prove [5]. (1)).A -»• A h A (by (-n-).B (analogous to (2)).A (by(e)). Proof of \. (2)). A A B | .B . [2] A. we write □ AHB for "A — B and B — A".4 [1]). We write — to denote the converse of |—. A and B are said to be syntactically equivalent | | (or simply equivalent if no confusion will arise) iff A |—| B holds. B h A A B (by (+).--. Proof of [6].4 B ) . B ( 4 ) ^ ( A A B ) . [7] 0 — ->(A A .A A B (by this theorem [2]). (A-(A-commutativity) [4] (A A B) A C |—| A A (B A C). (A-associativity) [5] . . ( 2 ) .B (by (-. B \. (1).-((A A BB) (by (e)). [1] A A B h A. B. Proof of-| of [5].( A . (2). A A ) ( 3 ) n ( A A B ) .6. AAB ( 2 ) n ( A A B ) . B . (1) A A B | . -. A h -.A | .of [5]. (1) A.A ) .6. ( 2 ) A ^ .A -> B (by (+).+). (1)). (Law of non-contradiction) f Proof. B ( 4 ) ^ ( A ^ B ) h --B (by ( .( A -* B) (by (e)).A -> A.(A -> B) H A A ^ B . A . B |. . B h . (2)).» A.( A -> B). A A B h-A ( b y ( + ) . A (3) .8.A .. (A-. B \. (1)). A . For two formulas A and B.A (by this theorem [1]). | Theorem 2.A \. (3) .B ( 5 ) n ( A A B ) [ .( A A B) H A -> . (4)).A A B.

A (by ( .. (6)).A ^ B . .1 A . (8)).-. We choose to prove [2] and [4]. ( 9 ) .) .> B . -. A h "-(A V B) (by (e)).B . . [2] A V B |—| B V A. [1] A ^ . A A B \. ( 6 ) A .B.9.A .) .B V A (by this theorem [1]).A -+ B.> . B V A . (2)). (2) B \.of [2].) . D B) Theorem 2. B ( 3 ) A Y B h . (1)).(A VB) |.-> -B (by (e)).6. (4)). (De Morgan's Law) [7] -.(A A B) |—| -. | -iA.o f [4].. (7) -iA-► B.(A V B) |—| -iA A -iB. (3). [5] A -> B |—| -iA V B.-). A (2) .A -s. (5)). . (3)--A-»■ B. . (-| of [2] is the same as |-. ( 3 ) A V B h B V A (by ( V .A. A h A V B (by (V+).A -> B.A -+ B.Classical Prepositional Logic 57 (4) A -». (3)). (4) .A V -. (7). (1) A |.( A V B) h .A V B .( A V B) h B (by (-> . (De Morgan's Law) [8] 0 — A V-. Proof of (. (5). ). (2) B | .(A B ) ( 8 ) .6.B | . . -. (6) .+ ) . (2) is distinct from (7).-. (1). ( 1 ) . n ( A v B ) h .A -»• B (by Thm 2.B (by («)).. (2).-iA -> B (by Thm 2.(A V B ) h .) (1) A \. ( A V B ) . (2)). and (3) is distinct from (8). A A B | .B (by (-> . (1).( A V B).B . Proof of-| of [4]. i ( A V B). (V-associativity) [ 4 ] A V B H . [6] -.A -^>B (by ( V .B.) . (Law of excluded middle) Proof.A ^ B h A v B (by (-. (4). j B (5) ..5 [5]).6. . (5) A -»• .+ ) .A -> -.4 [2]). D AVB Note that in the above proof.B V A (by this theorem [1]). (V(V-commutativity) (V[ 3 ] ( A V B ) V C H A V ( B V CC). A | -■ A (by(e)).( A VV B) (by (c)).A V B (by (V+).( A A B ) (by ( . (2)).A ^ BB. Proof of | .

(«■>+) (*++) KE HS|-A->B.Ao .C |—| A «-> (B «-» C) (^-associativity) (^--associativity) C .10.B ->■ A.6. A -»• (B A C) H (A -> B) A (A -> C).B).58 Mathematical Logic for Computer Science Up to now the steps of formal proofs have been written in detail.11.6.A ->• B. (A V B) -> C I—| (A -> C) A (B -+ C). Theorem 2. A A (B V C) H (A A B) V (A A C). \<-> B.6.A + B. » E |.(A «-> B) H .A A -. (<r+-commutativity) (<r±-commutativity) -■A ** --. The justifications for formal proofs will be omitted as well. [10] A H H A | . [1] [2] [3] [4] [5] [6] A V (B A C) I—| (A V B) A (A V C). \-> E h B -)• A. The proof of Theorem 2.A.A.A V B) A (A V -.B) -H.(A *+ B) V (A o -. Theorem 2. Hence forth. [ 3 ] A « B |—j -. [ 7 | A « B |—) (A A B) V (-.B. A -> (B V C) H (A -> B) V (A -> C). (A A B) -> C H (A -> C) V (B ->• C).B \—| B -H. then E |. -B [5] -. Therefore the rules ► of deduction concerning «-> may be stated as follows: (*+-) H E .B).10 is left to the reader. The proof of Theorem 2. A h B. H . [6] A <r> B |—| (-. [8] (A -H.B). -> A.(A « B ) H A H -iB.A *» B.. then E [.6.A < .11 is left to the reader. B « C |h A « CC. some of them will be omitted for simplicity since they are more or less obvious. [11] 0 \.A *<->B .B.A —| A o [4] -. ■ [2] A f4. A «-»• B may be considered as (A — B) A (B ->• A). [ 9 ] A e B . [ l j A ^ B . If E | \. B |. A * > B. «► B .B .

m ^napter o.6. A. . The laws of non-contradiction ->(AA-A) and excluded middle | A V -iA are instances oi iormairy provaoie iormuias.6.6. If A H A ' a n d B H B . then A |—| A'. . [5] A <-> B I—| A' <-> B'.5. .5. . by a formally provable formula.). ) . and similarly for first-order logic.13.2. . Lemma 2. If B |—| C and A' result from A by replacing some (not necessarily all) occurrences of B in A by C. .A ' . l^J A1. (An -► A ) .15. A n — A is equivalent to a formally | provable formula. [3] A V B H A ' V B ' .6. .Ai A . constructive logic. • LJn When the premise is empty. D (Replaceability Theorem 2. .2 in the last section.J **n h ^ m v0 Ih ^ 1 ^ I..5.A iff 0 f. then [1] ^A H ..12.• . .Classical Propositional Logic 59 The following lemma and three theorems correspond respectively to Lemma 2. [4] A -> B H A' -> B'. .• • V ^ n —rJTLj. we have the special case 0 — A of formal | deducibility. . Now A is said to be formally provable when | 0 — A holds.6. A n r A iff h M -> (.•. The significance of formally provable formulas will be seen in the discussion of soundness and completeness in Chapter 5. and modal logic in later chapters) express naturally and intuitively the rules of informal . [1] Ai. A n \. (Replaceability of equivalent formulas) formulas) i_ • / J. Obviously 0 — A iff E — A for any E. [2] ^ 1 > .4. Ai. Then A'H-'A. □ Theorem 2. A v -iA are instances of formally provable formulas. 2. (Duality) Suppose A is a formula composed of atoms and the connectives -i.6. and V by the formation rules concerned and A' is the dual of A. .. A A n -> A. Hence the formal deducibility between E and A can be expressed.14. □ Theorem 2. [2] A A B H A ' A B ' .5.15. By Theorem 2.. in a sense. | | It has been mentioned before that A is said to be formally provable from E when E — A holds. .5. the premise E of E — A can be reduced to a finite | set. and 2.3 and Theorems 2. and by Theorem 2. . Since the rules of formal deduction (for propositional logic in this chap ter.

Prove (->—) by (->+) and the following: [1] If E | .5.-) by (Ref).— A . [2] If E \.— A . B.B . Prove Theorem 2. the formal deduction based upon these rules is called natural deduction. Exercises Exercises 2. (+).6. [11].-.A.-iA. (+).B . B. then E | .6. then E | . then E f. Prove the following: [1] [2] [3] [4] (A -* B) -> B \. (A -► B) -> C | .6. Prove (-.A. . (->+). then E | .(B -> A) -> A.60 Mathematical Logic for Computer Science reasoning. . which will be intro duced in Chapter 4.A.B . [10].8. B -> -.6. 2. and the following: [1] If E |.9 [5]. Prove (-i-) by (Ref). [3] If E | . then E | . It has been seen that to write formal proofs out in full is rather tedious because the same formulas are often used repeatedly.4. A -> -iC h A -> Ai.A -> B. Prove Theorem 2.6. [2] If E \.6. A simpler and clearer form of formal proofs to facilitate writing and reading will be introduced in the Appendix. 2. (-++).1. (A -» B) -> C h (A -> C) -> C. and the following: [1] If E p -"A -► -^B. [8].6. (+). and the following: [1] If E | .6.6. .-iA. 2. A A -.A. [6].A.A . (+).6.6. and the following: [1] If E | . There is another type of formal deduction.(C -+ A) -> (Ai -+ A).A -> . (-> + ) .) by (Ref).. 2..3.7.A -> B. 2.A. 2.A.6. 2. 2.11 [4]. Prove ( i .-i-iA. (->+). then E \. then E [. [2] If E \.B -> Ai V C. Prove (-.-) by (Ref). then E |.2.A.— A . then E | .

. . clause) Atoms and their negations are called literals. In this section. A^Example Observe the following formulas: (1)P (2)-. (Disjunctive. called a disisjuncts is junctive junctive normal form. .2. .. . j = 1. V A l n i ) A . A (Afci V . A A f c n J ( A n V . clause) (Literal.. .1. (Literal.. V (Akl A . It is a disjunctive normal .7. two kinds of normal forms in propositional logic will be discussed: the disjunctive and conjunctive normal forms. . Definition 2. V A f c n J where Aij ( i = 1.. It is also a conjunction with only one conjunct.. It is a disjunction with only one disjunct. Hence it is a disjunctive or conjunctive clause with one literal.. . Disjunctions (conjunctions) with literals as disjuncts (conjuncts) are called disjunctive (conjunctive) clauses.pVq (3) ->p A q A ->r (4) -ip V (q A -n) (5) -»p A (q V -«r) A (-iq V r) (1) is an atom. A A i n i ) V . . .7. k.Classical Propositional Logic 61 2. DISJUNCTIVE AND CONJUNCTIVE NORMAL FORMS Formulas can be transformed into normal forms so that they become more convenient for symbol manipulations. .. (Disjunctive. conjunctive normal form) normal form) h A disjunction with conjunctive cla clauses as its disjuncts ii . Definition 2. . Disjunctive and conjunctive clauses are simply called clauses. Hi) are literals.7. Disjunctive and conjunctive normal forms are respectively of the follow ing forms: ( A n A . .. . and therefore a literal. A conjunction with disjunctive clauses as its conjuncts is called a conjunctive normal form.

(2) has the value 1 iff 1.q A r r. If A is a contradiction. (3) is a conjunction and a conjunctive normal form. 0.3. and the value of A is 1 iff 1. 1 are assigned. It is also a conjunction with one conjunct. If A is not a contradiction. A is tautologically equivalent to the disjunctive normal form p A -<p. the following three conjunctive clauses: (1) (2) (3) p A qq A i rr. and a disjunctive normal form with two clauses. It is also a disjunction and a disjunctive normal form.7. 1 are assigned. and (3) as clauses): (p A q A . two literals. (5) is a conjunctive normal form. T h e o r e m 2. Therefore we form in order. pA A. (2). we can without loss of generality prove the theorem by considering an instance of A. 0 are assigned to p. q. 0. 1 are assigned to p. then (4) becomes a conjunctive normal form and (5) a disjunctive one. we form a conjunctive clause with three literals. r respectively. for the above assignments. 0. (2) is a disjunction with two disjuncts. (4) is a disjunctive normal form.. (3) has the value 1 iff 0. It is also a conjunctive normal form with one disjunctive clause p. (A has the value 1 for at least one such assignment. q.62 Mathematical Logic for Computer Science Science form with one conjunctive clause p. 0. -ip ->p A -»q A r. 1 or 0. and r occurring in it.) For each of the above assignments.r ) V (p A -<q A r) V (-ip A ->q A r) is tautologically equivalent to A. p being any atom occurring in A. Therefore the following disjunctive normal form (with (1). each with one literal. Obviously (1) has the value 1 if! 1. and a conjunctive normal form with one clause which consists of two literals. p A . q. 1. Similarly. Suppose A is a formula with three atoms p. . Proof. If V is exchanged for A in (4) and (5).- p ->q A . r. 1. 0. but not a disjunctive one. but not a conjunctive one. each being one of the atoms or its negation according to whether this atom is assigned 1 or 0. Any A 6 Form (Cp) is tautologically equivalent to some disjunctive normal form. or 1.

D Remarks mrks KemarKs After reading the Completeness Theorem st* readi stated in Chapter 5. the normal forms of A formed in the proofs of Theorems 2. every atom occurring only once in each clause (in the form of an atom or its negation). and the clauses of which are all different. The following theorem and corollary obviously hold.7.5.3. iff complementary literals occur in each of the (disjunctive) clauses of its conjunctive normal form. If A is neither a tautology nor a contradiction.7. Proof. )rm(Cp) taut Any A € Form(Cp) iis tautologically equivalent to some conjunctive brm. □ A full disjunctive or conjunctive normal form of a formula A is one which contains all the atoms of A in each of its clauses. where p is any atom occurring in A.4. A formula is a contradiction.3 and 2. we can :ify verify that the disjunctive and conjunctive normal forms are also syntacti lv enuivaleri cally equivalent to the original formula. Analogous to that of Theorem 2. iff complementary literals occur in each of its (conjunctive) clauses. A disjunctive (conjunctive) normal form equivalent to a formula A is called a disjunctive (conjunctive) normal form of A.Classical Propositional Logic 63 For a tautology A. iff complementary literals occur in each of its (disjunctive) clauses.7. normal form. Theorem 2. each being the complement of the other. A disjunctive normal form is a contradiction. □ Corollary 2. A formula and its negation are called complementary formulas.4 are full disjunctive and conjunctive normal forms.7. □ Theorem 2. with modifications. . iff complementary literals occur in each of the (conjunctive) clauses of its disjunctive normal form.6. A conjunctive normal form is a tautology.7. A formula is a tautology.7. the required disjunctive normal form may simply be p V ->p.

Such redun dant disjuncts and conjuncts may be literals in clauses. we can replace the By the replaceability of tautological eqmvalences. V -. (-. 3) 4) 5) 6) 7) By the replaceability of tautological equivalences. V An) H --Ai A . .^ B H . . A A (B V nB V C) H A. V (B n A A).A H A. By 7) we eliminate V from the scope of A. For instance. By l)-3) we eliminate -» and «-K By 4)-6) we eliminate -». By A V ( A A B ) H A. .B A C ) ( = j A. . . the clauses with complementary literals can be deleted in normal forms. V (A A B n ).-. . . A An) N -»Ai V . -i(Ai A . -«(Ai V . A. . . and V from the scope of ->. Bv D—3) we yield a formula tautoloericallv equivalent to the original one. the following tautological equivalences AVA(=J A AAAH A can be used to delete the redundant disjuncts and conjuncts. . A ++ B H (A A B) V (-. . . A (B n V A). 8) A V (Bi A . .A A -iB). A from the scope of V. Certain tautological equivalences may be used to simplify the trans formation process or to obtain simpler normal forms.A n .A n . the longer clause can be deleted. A B n ) V A H (Bi V A) A . . . By A V ( B A . and by 8). (Bi V . if all the literals in one clause of a normal form occur in another clause. -. A B n ) H (A V Bi) A .A V B . V B n ) H (A A Bi) V . or clauses in normal forms. A A ( A V B ) H A. A . V B n ) A A (=) (Bi A A) V . . . . We have the following tautological equivalences which can easily be proved: 2) A H B H H 1) A . such that any -> has an atom as its scope. A (A V B n ). .64 Mathematical Logic for Computer Science We now introduce another method of forming normal forms of formulas. we can replace the above formulas on the left with the corresponding ones on the right to above formulas on the left with the corresponding ones on the right to vield a formula tautologically eauivalent to the original one. (-iAvB)A(AVnB). (Bi A . . Disjunctive and conjunctive normal forms are then obtained. . A A (Bi V . .AVB)A(AV->B). . . .

Find the disjunctive and conjunctive normal forms of the following formulas: [1] (A -» A V B) -> B A C ^ -. Exercises s2. 2. because A V B is tautologically equivalent to -iA -> B.A A C [2] (A <+ B A A V -iC) -> (A A . Suppose A is a non-contradiction with n distinct atoms in it. and also n-ary con nectives for n > 2. An .7.7.7.3. 2. . In this section we shall use two italic small Latin letters / and g (with or without subscripts) to denote any connectives.[(-IA < C) ► ► ► [4] . the normal forms obtained by the method described above are also syntactically equivalent to the original formulas. and B is a full disjunctive normal form of A. 2. . Prove Theorem 2. We have up to now mentioned one unary and four binary connectives.4.7. Then —• is > > said to be definable in terms of (or reducible to) -i and V. Formulas A — B and -<A V B are tautologically equivalent. We shall write / A i . Similarly V is definable in terms of -< and —>. Prove that A is a tautology iff the number of clauses in B equals 2 n .C)] .( A A .C) -> (B < -. In fact there are more unary and binary connectives.7.2.7. by the replaceability of syntactical equivalences. 2 8 ADEQUATE SETS OF CONNECTIVES .A ) 2.1. Therefore..B -> C) [3] (A <-» B) < • [(-A -B. The problem of simplification of normal forms will not be discussed in this book.Classical Propositional Logic 65 We can easily verify that syntactically equivalent formulas are obtained by replacing |=j with |—| in the above tautological equivalences.

Two n-ary (n > 1) connectives are identical iff they have the same truth tables. . . Suppose #1. They have the following truth tables: A 1 0 /iA 1 1 /2A 1 0 M 0 1 /4A 0 0 where / s is negation. ••• ? An. Their truth tables are as follows: A 1 1 0 0 B 1 0 1 0 <7iAB 1 1 1 1 £ 2 AB 1 1 1 0 p 3 AB 1 1 0 1 p 4 AB 1 0 1 1 #>AB 0 1 1 1 p 6 AB 1 1 0 0 g7AB AB 1 0 1 0 SsAB 1 0 0 1 59AB 0 1 1 0 SioAB 0 1 0 1 <7uAB 0 0 1 1 912AB 1 0 0 0 S13AB 0 1 0 0 014AB 0 0 1 0 P15AB 0 0 0 1 SieAB 0 0 0 0 where g2. 981 and p 1 2 are V. ^ 15 is usually denoted by I.66 Science Mathematical Logic for Computer Science for the formula formed by an n-ary connective / connecting formulas Ai. and /4 are distinct unary connectives. /2. there are 2 ( 2 ^ = 4 distinct unary and 2^2 ) = 16 distinct binary connectives. there are 2^ n ^ distinct n-ary connectives. Hence for any n > 1. . usually denoted by |. / 3 . . and A respectively. £4. ^5 is called Sheffer stroke. For instance. . #16 are distinct binary connectives. Suppose / i . —>. <->.

(A—). —>. obtained by deleting from Cp three connectives V. (+). we can obtain a disjunctive normal form tautologically equivalent to / p i . iDDOse Form(£%) and A G Form(£S). Note that only -i. ^we define (by recursion) their s follows: translation AQ and EQ into £? as X7Q- . {-». . ->} are adequate. 1 1 0 0 1 0 1 0 A set of connectives is said to be adequate iff any n-ary (n > 1) connec tive can be defined in terms of them. (-"—).A. but upon an adequate set of connectives.0 A implies E | . V} is an adequate set of connectives. . Let £? be a sublanguage of £ p . For A G Form(Cp) and S C j E Form(Cp). p n . A. .3. and (A+). and V occur in a disjunctive form. Form(Co) is the set of formulas of £?. {-». for instance. By the method used in the proof of Theorem 2. Then E ( . .1. Suppose / is any n-ary connective. . which is formed by / connecting the atoms pi. t(£P) (£»). V}. and |—0 is the formal Suppose E C Form(C^) a deducibility defined by the rules (Ref). A}. and <-*. Form(£p). . □ □ Now we turn to consider propositional logic based not upon the five common connectives. Corollary 2. Theorem 2.Classical Propositional Logic 67 One of the 2^2 ) = 256 ternary connectives is if-then-else which has the following truth table: A 1 1 1 1 0 0 0 0 B 1 1 0 0 1 1 0 0 c 1 0 1 0 1 0 1 0 If A then B else C. and {-•.7.8. Form(£p ).2. {-». A. p n . Obviously i(£?) Form(Cp0) C Form(£P). {-.A}. Hence we have the following theorem.8.

8. V} is not adequate. . Prove Theorem 2. A and V cannot be defined in terms of -». 2.8. Exercises 2.8. (A -> B) 0 = .8.3. E (£»).(-1A0 A . {«->. {A. (-iA)o = -»A 0 . (A <+ B) 0 = (A -> B) 0 A (B -> A) 0 = .8.7. 2.8. (£*) So I o A 0 ZJ0 Then E | .2. E0 = {A0 | A e £}.4.i ( .3 is left to the reader.8.68 Science Mathematical Logic for Computer Science A 0 = A for atom A. Then we have the following Theorem 2.( A 0 A -Bo). 2.A iff The proof of Theorem 2.5..i ( A 0 A -1B0) A .8. 2. 2.8. £9} is not adequate. 2. (AAB)o = A 0 A B 0 . The following sets of connectives are adequate: [1] {->.6.8.3.8.1.S14> [2]{|} [3] {1} 2.i A 0 A B o ) . ( A V B ) 0 = -.<714} {->. I and 4 are the only binary connectives which are adequate by them selves.3. B o ) . «-» cannot be defined in terms of ->. Suppose E C Form(Cp) and A < Form(Cp).

(Conclusion) the premises and conclusion are simple propositions. For instance. the restricted functional calculus. relational calculus.3 CLASSICAL FIRST-ORDER LOGIC In propositional logic only the logical forms of compound propositions are analysed. 69 . (Premise) There is a prime number greater than 2 1 0 0 . and the deducibility relations about them will be studied. In this chapter classical first-order logic will be constructed. in which the logical forms of simple propositions will be analysed. in the following inference: ( For any natural number n there is a prime number greater than n. The correctness of this inference depends upon the interrelations of their logical forms. the restricted predicate calculus. connectives and quantifiers will be used to form more complicated propositions. etc. (Premise) 2 100 is a natural number. In first-order logic. First-order logic is known by various names: predicate logic. elementary logic. A simple proposition is an unanalysed whole which is either true or false. however. the theory of quantification with equality. Firstorder logic seems to be in fashionable usage today. In propositional logic. the logical forms of simple propositions are not analysed and hence the correctness of this inference cannot be explained.

. the relation = (equality). and functions) constitute a structure. and • (multiplication). there are typically a domain of objects. Then the four ingredients (a domain. e is the designated individual which is the unit element.e. x2 > 0. written as Af = (N. relations.. which is a non-empty set (its members being the elements of the group). Mathematical propositions are concerned with the domain. relations. and functions of the structure studied.0. relations.70 Mathematical Logic for Computer Science Science 3. Certain individuals.> where G is the domain. For instance. called individuals. 2 2 For all x and y. anu. and • is the operation of multiplication. = is the equality relation.y = and in expressing conditions which the individuals may or may not satisfy. the designated individuals. X+ X = X• X expresses the condition that when the value of x is added to itself the result is the same as when it is multiplied by itself. the designated individual 0 (zero). Variables ranging over the domain are used. This condition is satisfied only by 0 and 2. which we intend to study. for instance. =.'. and functions may be designated in terms of which others are defined. x . and the functions ' (successor). designated individuals.1.+. Similarly. the structure Af of natural numbers consists of the domain N (the set of natural numbers). x2 — y2 = (x + y){x — y). in making general statements about the individuals such as For all x. Various structures are studied in mathematics. PROPOSITION FUNCTIONS AND QUANTIFIERS 5 When we develop a scientific theory. For instance.it. • 10 unc upcicttiun ui liiuiLipii^auiuii. cicij. Relations and functions on the domain are also studied.->. — io uiic equality iciauiuii. The structure Q of a group is 0 = <G.=. + (addition).icj. The domain is a non-empty set.

x is even. The significance of the quantifiers calls for some explanations. For every natural number x. i obtain x to 1). 1) is called a proposition runction. {1. 1) a quantifier of x to 1). x is even.0}. the universal quantifier. which is not a proposition and has no truth value. 5) 4) The above are propositions. In addition. These terms are quantifiers. in 1). 4 and 5 being individuals in N.0}. There is some x such that x is even. 5 is even. An n-ary proposition function on a domain D is an n-ary function mapping Dn into•{1. there exists some S > 0 such that if |x . a proposition function. They occur. 2) and 3) mean. 'The x in is . the existential quantifier. 1) is a unary proposition function on N. 5 is even. signifies the whole of the domain. because x is a variable. 1) is a kind of function which is defined on the domain and becomes a proposition when some individual is assigned to x as its value. Then 4 is even. Replacing 4 and 5 by a variable x ranging over iV. we obtain 1) x is even. respectively. in the definition of a limit l i m ^ a f(x) = b: For every e > 0. Connectives are still used in forming compound propositions. the terms "for all" (or "for every") and "there exists some" (or " there is some") are frequently used in mathematical propositions. for instance.a\ < S then |/(x) -b\ < s. There is some natural number x such that x is even.1 is satisfied iff the value assigned1 to y is the square of that assigned tox. we Prefixing a quantifie 2) 3) For every x.Classical First-Order Logic 71 x•x = y x= y 4. I Obviously the meaning of the variable x in 2) and 3) differs from that 2) and 3) i no longer a variable ranging over the domain. N. "For all". * i. meaning that there exists (at least) one individual in the domain having a certain property. 2) and 3) : Since x ranges over• N. are propositions. Suppose N is the domain. "there exists some". signifies a part of it.

However. where R is a property. the value of which is determined only by x. and quantified variables are bound variables. and R(ak). in which x is still free. The universal and existential quantifiers may be interpreted respectively as generalization of conjunction and disjunction. Free variables are real. Suppose the domain is the set of real numbers. . By quantifying x universally in 7). . The range of quantifiers may be restricted to a subset of the domain. we obtain the false proposition For every x and y. x2 > 0. . say D = { a i . . . is a binary proposition function on N. while bound variables are apparent. Quantifying y universally in 6). There is some x such that R(x) iff R(ai) o r . the following equivalences hold: For every x R(x) iff R(ai) and . . x divides y. it is natural to use quantifiers for doing this. In case the domain D is finite. Obviously 7) becomes a true proposition iff 1 is assigned to x as its value. a*}. Variables occurring in proposition functions are free variables. then 6) x divides y. There is some x < 0 such that x2 < 0. o r R(ak). . we obtain 7) For every y. 7) means x divides every natural number.72 Mathematical Logic for Computer Science It has been quantified. Consider the following statements: 8) 9) For every x ^ 0. 7) is a unary proposition function. . y. x divides y. . if we want to make such statements about an infinite domain. Another example of quantification: suppose N is still the domain.

x ^ 0} C {x 2 0}. variables for subsets of the domain and its Carte sian products (that is. variables for relations on the domain) are allowed. {x |I x ^ 0} C {x | Ixx2 >>0}. the variables range over individuals of the domain.Classical First-Order Logic 73 Note that the range of the universal quantifier in 8) is restricted by "T^ 0" to the subset of non-zero real numbers. x^0 and x22 > 0 . which is weaker than 9). 0 and x2 < 0. In first-order logic. 0 and x2 < 0. 8) and 9) can be restated as follows: 8) and 9) can be restated as follows: 10) For every x. if x ^ 0 then 11) There is some x such that x < 11) There is some x such that x < 8) imeans 8) 8) means x2 > 0. Statements with restricted quantifiers assert that every or some individual in aa certain category of the domain has aa certain property. while in 11) the existential quantifier is used with conjunction. 9) is false because there is no real number x < 0 veaker tna 1 b hut. rep which is obviously stronger than 8). Note the two patterns 10) and 11) for translating the restricted quanti fiers. but any non-negative real number makes "if x < 0 then tha 2 x2 < 0" vacuously t acuously true. 111 certain category 01 me domain nas certain property. 9) means There is some a such that x < 0 and at the same x time x2 < 0. Infii i_ The quantifiers are interpreted in the familiar way as "for all individuals of qua the domain" and "there exists some individual of the domain". i__ i_. if x ^ 0 then 10) For every x. ivalent which is equivalent to 11). In 10) the universal quantifier is used with implication. anv ni such that x2 < 0. x2 > 0. and that of the existential quantifier in 9) is restricted by "< 0" to the subset of negative real numbers. dorn In second-order logic. 10) must not be replaced by For every x. > 0. They are called restricted quantifiers or quantifiers with restricted ranges. . 11) must not be replaced by There is some x such that if x < 0 then x2 < 0. which is equivalent to 10). 0}.

and H. Relation symbols are classified as unary. etc. will be allowed. in the following propositions. consists of eight classes of symbols. which is not associated with any structure. Individual symbols include an infinite sequence of symbols. We use the roman-type small Latin letters a b c (with or without subscripts or superscripts) for any individual symbol. Function symbols are an infinite sequence of symbols. etc. binary. variables and quan tifiers for sets of sets. we have to take all subsets of the domain into consideration and require variables and quantifiers for sets. The romantype capital Latin letters F G H (with or without subscripts or superscripts) are used for any relation sym bol. C containing « is called the first-order language with equality.2. In order to emphasize the speciality of the equality symbol. There is a special binary relation symbol called the equality symbol. The roman-type small Latin letters f g h .74 Mathematical Logic for Computer Science For instance. we stipulate that it is denoted by none of F. 3. C may or may not be associated with a structure. C may or may not contain « . In higher-order logic. written as « . FIRST-ORDER LANGUAGE First-order language C is the formal language for first-order logic. G. Each non-empty set of natural numbers has a smallest element. sets of sets of sets. Relation symbols include an infinite sequence of symbols. First-order language (in a general sense). Each bounded non-empty set of real numbers has a supremum.

and x y z v w for any bound variable symbol. relation symbols. When associated with a structure. and function symbols should be in one-one correspondence with the des ignated individuals. Connectives -> A V -> <-> are the same as in Chapter 2. binary. quantifier symbols. 3x and 3z are existential quantifiers. 3x is the existential quantifier of x and is read as " there exists some (value of) x (in the domain) such that". punctua tion: ( ) which are the left and right parentheses and the comma. We use the roman-type small Latin letters (with or without subscripts or superscripts) u for any free variable symbol. x is the bound variable symbol for quantification. these classes of symbols (excepting « ) may differ from one first-order language to another. with n-ary relation symbols and function symbols corresponding to n-ary relations and functions. Vx is the universal quantifier of x and is read as "for all (values of) x (in the domain)". Free variable symbols and bound variable symbols are two infinite se quences of symbols. The quantifier symbols V 3 are the universal and existential quantifier symbols. or simply. and punctuation) and « are called logical . and are usually called non-logical symbols. etc. and functions of the structure. but the three classes of individual symbols. C consists of the same classes of sym bols as above. For instance.Classical First-Order Logic 75 (with or without subscripts or superscripts) are used for any function sym bol. Therefore. Function symbols are also classified as unary. A quantifier consists of a quantifier symbol and a bound variable symbol. The last class includes three punctuation symbols. The other classes of symbols (free and bound variable symbols. connectives. relations. Vx and Vy are universal quantifiers.

Then we have £(A0 = (a. ' .t t „ ) e i€Term(£).76 Science Mathematical Logic for Computer Science symbols. • respectively. and two binary function symbols g and h corresponding to -f and -. +.«. Definition 3. For convenience. .f. There is no restriction on the size of the set of non-logical symbols of a first-order language. in all first-order languages with equality). the equality symbol « corresponding to =. h as 0. suppose C{M) is the first-order language associated with the structure Af = (iV. It usually is finite or countably infinite.'. the sets of terms. • in C{M) are individual and function symbols. g. the equal ity symbol « . ttnn G Term(£) and f is an n-ary function symbol. . . Atom(£). . . f. They are denoted respectively by Term(C). a first-order language may be regarded as consisting of the non-logical symbols only. and formulas of C are to be defined. Atom(C). The first-order language C{Q) associated with the structure Q includes an individual symbol e corresponding to the unit element e of G. n) .->. . •). and a binary function symbol • corresponding to multiplica tion. = . The non-logical symbols of C(J\f) in clude an individual symbol a corresponding to 0. From the expressions of £. in the case of « . then f ( t i . while those in M are individual and functions.g. an individual symbol or free variable symbol standing alone is a term of£). If we write a. and Form(C). + .. a unary function symbol f corresponding to '. + .•>• However. The equality symbol may or may not be included. Thus we have £(£) = <e. we obtain C(Af) = {0. For instance.. .+. £ [2] If t i .h). u G Term (£) (that is. (Term(C)) Term(£) is the smallest class of expressions of C closed under the fol lowing formation rules [1] and [2] of terms: [1] a. '. '. .0. it should be noticed that 0.«. They are assumed to be the same in all first-order languages (or. «. atoms.1.2.

and is a segment of the term generated.g(u. '('(0))) +(■('(<>). g(u.-(u.('(0). and ti • t2 (t.b). if '(t)./c/\ _ / i \\ The expression f(g(f(a). Thus a. ti +12. Inductive method can be used to prove any member of Term(C) has certain property. and t2 being terms). f(b). The definition of Term (C) is an inductive one.( t i ^ ) are abbreviated respectively as t'.u). t i . It is left to the reader to see how it is formed.t2). The basis of induction is to prove any term containing no function symbol (that is. This is called a proof by induction on the structure (of generation) of terms. In the languages C(N) and C(Q).b)))\ •is a term of C./ \ 7 \ 7 are terms. +(ti. . and . They can be abbreviated to O ' u + 0" and e• (u • e) respectively. The roman-type small Latin letter t (with or without subscripts or superscripts) is used for any term. '('(0))) \ \ \ /> / ' \ \ 11/ 1 and •(e. and u.e))/ .b)) are not. u). the expressions mi _ +(. g(a. The expression obtained at each step in the generation of terms is a term.f(b)) are closed terms. any individual symbol or free variable symbol) has this property. The induction step is to prove any term generated by means of function symbols preserves this property. f(g(f(u).Classical First-Order Logic 77 Example • _ ct . Terms containing no free variable symbols are called closed terms.

78

Mathematical

Science Logic for Computer Science

Some notational conventions will be stated for defining Form (£). Sup pose U, V i , . . . , V n are expressions and s i , . . . , s n are symbols of C. We write

U(Si,...,Sn)

for U denoting that S i , . . . ,,S nn occur in it. If U ( s i , . . . ,,s„ ) occurs in the s s sn context, then U(Vi,...,Vn) which follows is the expression resulting from U ( s i , . . . , s n ) by simulta neously substituting Vi for s^ in it (i = 1,,......,,r a ) . = l n). Example Suppose U(a,u) = F(a) -> G(a,u). Then U(u,a) = F(u) -> G(u,a). U(u,a) is obtained from U(a,u) by simultaneously substituting u for a and a for u in it. If we substitute first u for a, obtaining F(u) -> G(u,u), and then substitute a for u in this intermediate expression, we shall obtain F(a) -> G(a,a), which is not correct. — G(a,a), > Definition 3.2.2. (Atom (£)) An expression of £ is a member of Atom(C) iff it is of one of the following two forms: [1] F ( t i , . . . , t n ) , where F is an n-ary relation symbol and t i , . . . , t n G Term(C) (n > 1). [2] « (t!,t 2 ), where t i , t 2 € Term(C). [2] « ( t i , t 2 ) , where t i , t 2 G Term(C). We write ti « t t2 for « ( t i , t 2 ) . We write ti « t 2 for « ( t i , t 2 ) . 2 2 Definition 3.2.3. (JFbrm^)) Form(C) is the smallest class of expressions of C closed under the fol lowing formation rules [l]-[4] of formulas of C: [1] Atom(C) C Form(C). [2] If A G Form(C), then (-.A) G Form(C). [3] If A, B G Form(C), then (A * B) G Form(C), * being any one of A, V, -», and «-». -», £), [4] If A(u) G FormiC), x not c occurring in A(u), then VxA(x), 3 xA(x) e Form(C).

Classical First-Order

Logic

79

**Example r The formula Vx(F(b) -► 3y(V zG(y,z) V H(u,x,y))) is generated as fol lows:
**

mi

Remarks definition (1) The fi formation rule [1] in Definition 3.2.3 of Form(C) corresponds [1J in Definition 3.2.: p Defi] ion to [1] in Definition 2.2.2 of Form(CC"). Neither < Form(Cp). Neither connectives nor quantifiers ). Neit :ur ato] jfinition occur in atoms. [2} and [3] in Definition ^3.2.3 are the same as those in .] in Definition 3.2.3 iinition 2.2.2. [4] is used to generate new formulas by means of quan Definition 2.! tification. It is obvious from [4] that free variable symbols cannot be used together with quantifier symbols and a bound variable symbol x occurs in a formula iff Vx or 3x occurs in it. (2) In generating a formula, we obtain at each step a formula which is not necessarily a segment of the formula generated because rule [4] requires substituting bound variable symbols for free ones. This is not the case with OU.XSOl>ll;U.l<.U.Xg L/V^ LXXXVJ. V a i i C * L » i C OJT XXXIL/VSXO X.VJL I l C t VSXX^O. J Farm(Cp).). Forra(£ p (3) By the condition " x not occurring in A(u)" in rule [4], 3xV yF(x,y) and VxV yF(x,y) can be generated from VyF(u,y), but neither 3yVyF(y,y) nor VyVyF(y,y) can be generated. Therefore the x and y in 3xVyF(x,y) and VxVyF(x,y) must be distinct bound variable symbols, while those in 3xG(x) V VyH(y) may or may not be distinct. (4) Since it is stipulated in [4] that x does not occur in A(u), we see that A(u) contains u but not x, A(x) contains x but not u, and the occurrences of u in A(u) and those of x in A(x) correspond to each other. Besides the occurrences of u and x, the symbols of A(u) and A(x) are exactly the same. If it is not stipulated in [4] that x does not occur in A(u), then the occurrences of x in A(x) do not necessarily correspond to those of u in A(u).

i

J_

_

A

_

r.

80

Mathematical

Logic for - Computer Science Science

The definition of Form(C) is an inductive one. The roman-type capital Latin letters A B CC are also used for any formula of £. Formulas with no free variable symbols are called closed formulas or sentences. Thus F(a,b), VyF(a,y), 3xVyF(x,y) are sentences, while F(u,v), 3yF(u,y) are not. The set of sentences of £ is denoted by Sent(£). Terra(£), Form(£), and Sent(C) are countably infinite. By Definition 3.2.3, VxA(x) and 3xA(x) generated from A(u) are formu las. But the segment A(x) from them is not a formula because it contains x without any quantifier of x. A(x) is an expression resulting from A(u) by substituting x for u in it. The structural difference between such an expression and a formula lies in that the expression contains some bound variable symbol without any quantifier of it. Such expressions are called quasi-formulas. Quasi-formuals are also denoted by A, B, C. Inductive method can be used to prove any formula of £ has certain property. The basis of induction is to prove any atomic formula has this property. The induction step is to prove any formula generated by means of connectives or quantifiers preserves this property. This is called a proof by induction on the structure (of generation) of formulas. by induction on the structure (of generation) of formulas. Since the connectives of £p are contained in £, and the semantics and formal deduction of propositional logic are contained in first-order logic (see Sections 3.3-3.5), propositional logic is usually regarded as a part 01 ;araea as a part of first-order logic. This does not mean that propositional logic is completely logic is completely contained in first-order logic. For instance, £ does not contain proposition :ontain proposition symbols. We may add proposition symbols into C and stipulate that propoipulate that propo sition symbols are atoms of C. Then £p C £ and Form(£p)P) C Form(C). *(£") C Form(£). But £ has its own atoms, hence this is not necessary.

Classical First-Order

Logic

81

Propositions can be translated into formulas of C proposition,

For instance, the

For any natural number, there is a prime number greater than it. can be restated as: For every x, if x is a natural number, then there is some y such that y is a prime number and y > x. Suppose F and G are unary relation symbols and H is a binary relation symbol such that F(x) means " x is a natural number", G(x) means " x is a prime number", and H(x,y) means " x is greater than y". Then the above proposition is translated into the formula Vx[F(x)->3y(G(y)AH(y,x))]. Now we state without proof some structural properties of terms and formulas of £, which are analogous to those discussed in Section 2.3 of Chapter 2. Theorem 3.2.4. Any term is of exactly one of three forms: an individual symbol, a free variable symbol or f ( t i , . . . , t n ) , where f is an n-ary function symbol; and in each case it is of that form in exactly one way. □ Theorem 3.2.5. If t is a segment of f ( t i , . . . , t n ) , then t is a segment of any t* (i = l , . . . , n ) or t = f ( t i , . . . , t n ) . □ Theorem 3.2.6. Any formula of C is of exactly one of eight forms: an atom, (-"A), (A A B), (A V B), (A -» B), (A <-» B),VxA(x) or 3x^4(x); and in each case 3XJ4(X); and it is of that form in exactly one way. □ Definition 3.2.7. (Universal, existential formula) formula) V xA(x) is called a universal formula. It is the universal formula of >rmula. A(u), u not occurring in A(x).

u not occurring in A(x).8. (Scope) If V xA(x) or 3xA(x) is a segment of B.y. :„ n„Tr»/ Vy is 3zF(x.2. Any universal or existential quantifier in any formula has a unique scope.x). and if the scopes of a connective occur in the scope of a quantifier. The algorithms for deciding whether an expression of C belongs to Form(C) are omitted.z). the scope of 3x is Vy3zF(x. These scopes are all quasi/y formulas. D Theorem 3.z). that of w_. Theorem 3. Translate the following propositions into formulas of C (select suit able symbols): [1] All rational numbers are real numbers.2. A(x) is called the scope in B of xA(x) the Vx or 3x on the left of A(x). □ It is obvious that the scope of a quantifier is not a formula but a quasiformula.y.1.9. then they may be quasi-formulas.z). [2] All real numbers are not rational numbers.2.82 Science Mathematical Logic for Computer Science 3xA(x) is called an existential formula.x)).y.z).10.y. In the formula 3xVy3zF(x.z). In the formula 3x(G(u) — H(u. [4] Not all real numbers are rational numbers. It is the existential formula of A(u).2. > > while the right scope is a quasi-formula H(u. Definition 3. Exercises Exercises 3. the left scope of—» is a formula G(u). 3.2. then A is a segment of B(x) or A = VxB(x) or 3xB(x). [3] Some real numbers are not rational numbers. and that of 3z is F(x.y. If A is a segment of V xB(x) or 3 xB(x). en Example formi 3xVy3zF(x. [5] Every number is either odd or even. .

2. and 0i denotes zero. Suppose F(x) means "x is a person". you will need more than one»translation): [1] Zero is less than any number. [2] None likes everyone. [2] If any number is prime. [6] There is no number such that no number is less than it. G(x) means "x is prime". than zero is prime.y) means "x is less than y". [2] He can'ti uu any j o u right. [3] No number is less than zero.3.4. Translate the following proposi tions into formulas of C [1] Someone likes everyone.j xie ucin do any job i i g n i . 3. This is accomplished by interpretations. [3] One can't fool all of the people at all of the time. Suppose F(x) :means "x is a number". are intended to express propositions. [2] One can fool all of the people at some of the time. [4] Any non-prime number with the property that all smaller numbers are prime is prime. F(x) means "x is a job". . Translate (if the proposition is ambiguous. 3. y) means "one can fool x at y". 3. [8] If some trains are late. 3. however.y) means "x can do y right". The formulas of £. SEMANTICS The first-order language £. then all trains are late. you will need more than one translation): [1] One can fool some of the people at all of the time.5. even though associated with a structure. is a syntactic object of no semantic significance. G(x) means "x is a time". 3. Suppose a denotes somebody.2. denot< H(x.y) means "x likes y".2.2. and G(x.2. Translate (if = t ran si ambiguous. and H(x. [5] There is no number such that all numbers are less than it. Translate: [1] He can't do every job right. Suppose F(x.Classical First-Order Logic 83 [6] No number is both odd and even. [z. [7] 5 is divisible only by 1 and 5.3.

.CO 111\-»1C V^ICIOO^O KJL OJT l l l k 7 U H O C111V1 I I C I I V . If C is not associated with any structure. .X CbX XClXXg. . .tn) is interpreted as the proposition OL\ . the connectives will be interpreted as in Chap ter 2. and terms t i . In such cases. We stipulate further. . .. a domain is still required for each interpretation. otn are in relation R. the sentences (closed formulas) are intended to express propositions about the structure. if an n-ary relation symbol F is interpreted as an n-ary relation R on a domain JD. The meaning of quantifiers has been explained intuitively in the last section. . They consist of assigning values to the proposition symbols. Then individual symbol. and terms t i . The equality symbol denotes the relation of equality.11C 111 U ^ l J-»l CI/CIU l U l l O 1\-»1 XV CI>1 ^ more complicated. . which maps individual symbols. Punctuation symbols serve just like LJ U-LXVsb UXXUXVSXX XXX XXCb U U. . are interpreted as the designated individuals. If an m-ary function symbol f is interpreted as an m-ary total function / on D. This is an interpretation for C in that domain. (n-ary) relation symbols. Free variable symbols will be interpreted as variables ranging over the domain. To sum up.XXC interpretation. U G b g ^ X LLXXlsblXCIibXl/XX O J U l U U i O O C 1 V t J U O l ) XXX\A^ punctuation in natural languages. and functions of the structure. . relations. an in D. . a m in . t n are respectively interpreted as individuals a i . different symbols of the same kind may have different or the same x x x U C i p i C L a L l U x x . in the case where C is associated with a struc ture. t m are respectively interpreted as c*i.O ... .84 Mathematical Logic for Computer Science Science Interpretations for the propositional language are simple. any (n-ary) relation and (m-ary) total function on the domain. Accord ingly. and (m-ary) func tion symbols respectively to individuals in the domain. Note that in such cases.. (n-ary) relation symbol. . The non-logical symbols.. The first-order language includes more classes of symbols and hence the interpretations for it are 111^1 UA-4. (n-ary) relations and (m-ary) total functions on the domain.. . however. . But it should be emphasized that the binary equality symbol is always interpreted as the equality relation on the domain. . and (m-ary) function symbol are respectively interpreted as any individ ual in the domain. l l t l V C UxxxCICxxb UI LUC 3CU. the domain is merely an ar bitrary non-empty set. then the atomic formula F(ti. ^ L. with which they are in one-one correspondence. Of the logical symbols. . an interpretation for C consists of a domain and a function..

the individual symbols a.Classical First-Order Logic 85 D.c)) ■c)) are respectively interpreted as 4. and c ii term f(g(a). the interpretations of b. and the interpretations of the symbols in the closed formula(sentence) f(g(a). b. f and g in the term 1) f(g(u)). . It . Let N be the domain. Let N be the domain. and c in the closed 1 symbols a..f(b.g(c)) * g(b) are the same as in the above example.tm) is interpreted as the individual / ( a i . . Then the above closed formula is interpreted as the false proposition 4 2 + 62 = 52 . we obtain the value of 2) for x and y at these individuals.7a m )) OLm) »m in D. the binary and unary function symbols f and g are respectively interpreted as addition and squaring. . hence 2) contains free variables. then the above closed term is interpreted as 4 2 + (5 + 6) which is the individual 27 in N. Since 1) contains free variable symbols..f(b. However. the cases with non-closed terms and non-closed formulas are quite different. . such that 2) is not an individual in N. but a binary function on N. Let JV be the domain. b. . Assigning individuals in N to x and y.. Then 1) is interpreted as 2) x22 + (5 + y) where x and y are free variables with range N.w)) are the same as in the above example. We first consider the case of terms. then the term f(ti. 5 and 6.

we need an interpretation plus such an assignment. and an assignment of individuals to a different set of free variable symbols in connection with another term or formula. we obtain an individual in the domain as the value of the term. we prefer to work with assignments that assign an individual in the domain to all free vari able symbols at once. This is feasible. Here there is a slight technical problem: different terms or formulas may involve different free variable symbols. (Different or same individuals may be assigned to different free variable symbols. the formula 3) is interpreted as 4) x22 + y2== 5 2 f(g(u). but also upon assignment of individuals to free variable symbols contained in terms or for mulas. Suppose N be the domain. we obtain a true or false propo sition as the truth value of 4) for x and y at these individuals. to obtain the value of terms and the truth value of formulas. but technically not convenient. By the interpretation in the above example. By interpre tation together with an assignment of individuals in the domain to the free variable symbols. In general. The value of terms and the truth value of formulas of C depend not only upon interpretation. we should distinguish between the interpre tation of individual symbols as individuals in a domain and the assignment of indivduals to free variable symbols.) And we shall arrange matters so that in . but a binary proposition function on N. Instead. In general. we obtain truth or falsehood as the truth value of the formula. a formula containing n different free variable symbols is interpreted as an n-ary proposition function on the domain. a term containing m different free variable symbols is inter preted as an ra-ary function on the domain. Now we turn to the case of formulas.g(w)) « g(b) which is not a proposition. By the above explanations. It is called the truth value of 3) under the above interpretation together with the as signment of certain individuals in N to u and w in 3). Thus.86 Mathematical Logic forr Computer Science Science is called the value of 1) under the above interpretation together with the assignment or certain individuals in iv to u and w in 1). so that we would have to consider an assignment of individuals to one set of free variable symbols in connection with one term or formula. assignment of certain individuals in N to u and w in 1). Assigning individuals in N to x and y. By interpretation together with an assignment of individuals in the domain to the free variable symbols.

Even if the domain remains unchanged. relation symbols. function symbols. Definition 3. while the latter are the valuation which v gives to the symbols. and u v are determined by v. F . [3] F : D m -> D. [2] P C D " . But the case with « is quite different. I I I . a v . iti-dLLy luiiuiiuii s y m u u i . J .1. a v . « . « v . C . and \i change with v. F .yeD eD iand x = y} or {{x. the binary equality relation is {(x. F . v(i) and VL v(\i) (a. « w . and free vaiiauie symbol). we have [1] a v . « v becomes equality relation on another domain. C . and u should be distinguished respectively from a v . difference. F. The italic small Latin letter v (with or without subscripts or superscripts) will be used for any valuation. v(«). F . f. and uv V respectively for v(a).3. F v . F. a n u n e e variable c syiiiDUi. and u v . uv E D.x)\x e D} which is a subset of D . D™ Remarks (1) a. ( Valuation) A valuation v for the first-order language £ consists of a domain D and a function (denoted by v) with the set of all individual symbols.Classical First-Order Logic 87 evaluating any given term or formula the individuals assigned to free vari able symbols which the term or formula does not involve will not in fact make any U .y)\x. When the domain of v remains unchanged. F v . &v={(x1x)\xeD}C D} C D2. U I C . and free variable symbols as domain such that. the domain of which is the same as that of the interpretation.r v ^ any An interpretation together with an assignment is called a valuation. m o . CD2. F v . 2 . changes with the domain of v. f and u being respectively any individual symbol. m-ary function symbol. only when the domain changes. The valuation caused by v changed. writing a v . v(F). We define valu ation as follows. F . x)\xeD}CD2. &v is always the equality relation on this domain. n-ary relation symbol. v v srent. We recall (see Section 1.1) that an n-ary relation on domain D is a subset of D n . The former are symbols in £.

o. (3) We mentioned before that we should distinguish between the in terpretation of individual symbols as individuals and the assignment of individuals to free variable symbols. . □ Theorem 3..88 Science Mathematical Logic for Computer Science (2) The domain of P is Z?m. T » ^ same as v. Suppose v is a valuation over domain D.1. J . . t „ r = ^ ( t i . relation symbol F. . and t G Term(C)... xiieorem o.3. The value of a term t under a valuation v is denoted by tv.. The truth value of a formula A under v is denoted by A". uv G D. Hence we cannot regard individual symbols and free variable symbols as of the same kind from a v G D and uv G D in Definition 3..2. for any individual symbol a. except Jthat u * ^u^aa^) = a.o.3. ( Value of Terms) The value of terms of C under valuation v over domain D is defined by recursion: [1] a". Proof. f ( . and free variable symbol w.. t „ r = ^ ( t Y • -.3. . function symbol f. t eD. if w = u v u a fa v(u/ct) f Of wv^(u/a) = \ 0 L w ( / ) = v \ w otherwise.3. By induction on the structure of t. t«>. . which : ~ the uv ( u / = a That is. Suppose a G D. we introduce the fol lowing notational convention. Then To define the value of formulas under valuations. we have av(u/a) _ &v pv(u/a) _ pv ru(u/a) *) = rv f w = if W == U .4. T _ _ for a valuation — u : ~ " L is exactly.t«). Av Definition 3. that is. n [2] f(ttxx. (Truth value of formulas) The truth value of formulas of C under valuation v over domain D is defined by recursion: . Definition 3. n(C). f is an ra-ary total function on D. v tv ' eD.. We write v(n/a) v(n/a) (u/a) »-:~_ xi_ ±.3.-..

3. /. i .Classical rirst-Urder Logic Ulassical First-Order Logic 89 [lj * ( t 1 ? . . [2] (-A)" = ^ I. since A(x) is of finite length and free variable symbols are count ably infinite in number. . otherwise. . . otherwise. t « > e F " .. (ti. = 1.t£) ) G F » " in Definition 3. A™ = B" = 1. otherwise. for every a G D. X v B if Aiv■-= 0 or B v = 1. .. otherwise. there exists a G D. if A = 0 ni otherwise. . — — ■*■■> ■*■■> Remarks Remarks ks (1) « t . [ ] (AAB)" = 3 r i / . constructing A(u) from A(x) (taking u not occurring in A(x)).. This is feasible. (. 0 otherwise. . o if. it is stipulated that. . (. tne v(u/ot) _ i such that A(u)^ u / a > = 1. . . r . -{i fl ifA» = l or B» = l.. . i ( r i1 if f(t t j . .. tvj2. A(x)). Hence A(x) and A(u) have .< \I. according to the construction of A(u). . "t\ = t^" means that tj and t£ are in equahty relation &v. and the symbols of A(x) and A(u) other than the occurrences of x and u are exactly the same. 0 otherwise. t n ) (l .4 [7] and [8]. 0 otherwise. . \[ 0 otherwise. f 1 if A" = 0 0. A(u)-<-/-) = 1. .t£ are 0 in relation F v .«t2)w = otherwise. ^ 0 otherwise. As explained before. A" = . x does not occur in A(u). . (2) In Definition 3. we take free variable symbol u not occurring in A(x). f \v [5] (A -> B)« _ /\I{0 = r li v [6] (A*»B)» =1{0 \ 0 [7] VxA(x) v = i fl 1 [8] 3xA(x) v = J { {1 0 I0 ( 1 i 0 if AV = B". constructing -t\\u) iroin A ^ X . there exii .3. . t « € F v ( i ) " ((tVi . . Besides. . fr i1 iff tt\ = ts.. 0 otherwise.4 [1] means that t\. if... if(t?. 0 otherwi 0 otherwise. -x W A V B ' = s = f ! if■Av = Bw = 1. the occurrences of x in A(x) and those of u in A(u) correspond to each other. (taking u A(u) from A(x) ^ not occurring ini A(x)). in constructing A(u).

a valuation may be regarded to assign individuals only to the free variable symbols involved in it. m e ndividual iis is value \ ual (that is. v s value). and require v. we have A ( u ) v = 1. then the srtain t h e n the . no matter what individual in D idividual u c i wxj. no He: i a o uxxxo \JL U^/CJ o m a t t e r wl dual v L matter what individual \iv is in D (that iis. constructing A(u)). = L respectively in [7] and [8]. e the (3) VxA(x) and 3xA(x) are generated from A(u). Hence. the v assignment uvv :is to he assignment uv : to cover a part of D. 3xA(x). As and explained before. Thus./xA(x) ad 3xA(x)vv means some individual (or x) individual in D has this property. yet for a given term or formula. 3xA(x)v = 1 means that h re A(u) = 1.au xxxvxi v xvx u. A(u) may contain occurrences of free variable symbols. L1\J XXX< (4) VxA(x) and 3xA(x) may contain occurrences of free variable sym var bols.4. that is. v v v in obtaining A le uv in obtaining Al( u ) = 1 in t h e case of VxA(x) == 1. then v(u/a) is to assign not only to these free variable symbols. we have A ( u ) v = 1. 1 and (// A u) There exists some a G £>. A(u) l bXXGbb XO. A U For every a G D. although assignments are stipulated to assign simultaneously an individual to all free variable sym bols. Hence. and 3xA(x) v meansS ssome individual (or 1 3: L some indi v Hence.(u)v .90 Mathematical Logic for Computer Science Science the same intuitive meaning. )m v v v some dospeaking. if the proposition A(u) v means the individualI uv in i le A ( u ) means the individual u v in some do meai idual vv position VXJ [x) means every the proposition VxA(x)v m< proposition VxA(x) v mea means every main D has certain property. for each A(u).. In order to express this precisely. which does not occur in VxA(x) or 3xA(x). VxA(x) and 3xA(x) a 4. 3xA(x ) v xA(x mea: v assigns to u as its A(i ig such t h a t . but also to the free variable symbol u. As explained in (3). we use the i :he valuation i>(u/a) to wisely. while in the case of 3xA(x) = 1. su sing supposing v assigns this individual 1to u as its value). say w (which o say w (which occur originally in VxA(x) or 3xA(x)). hence in tn< recursive zlxA(x) generated tience in vthe v v are defined from A ( u ) v Intuitively v z)vv are defined from A(u) v . such that A( ( uv)(vu u aa)) = 1. =l . VxA(x)v = 1 means t h a t no individuals) in. VxA(x) v = 1 means that. In ord replace the original valuation v. 1 (5) Valuation v(u/a) is used for evaluating. in evaluating any given termL or formula the individuals or formula th assigned to free variable symbols which the term or formula does not in volve will not in fact make any difference. A ((u ))vV((uU/ QQ))= 1. require replace the orig / }. But now the problem is. if v is to assign to the free variable symbols in VxA(x) or 3xA(x). hence in addition to the free variable symbol u (which is used in which bols.3. VxA(x)1' and 3xA(x) v . the assignment u v needs to cover the ise needs to cover 1 whole domain D . Intuitively Definition 3. supposing nv is this i t su] Dsing \iv is th individ I there exists some individual in D such that. :Ir \.. . D has this property. A(x) talks about x in exactly the same way as A(u) talks about u.. w v should be the same as v assign to w in VxA(x) or sign w (if any) in A ^ (if any) in 3xA(x). But the case with u occurring in A(x) is quite different.

A v = 1.4. and they an agree on the individual symbols. By induction on the structure of A. By induction on the structures of t and A . relation symbols. r u v =uv u f _ _ . •Then e n(C).3. F . □ re □ —^ We note that valuations are analogous to but not the s tine as 1truth ous t same be that valual valuations defined in Se defined in Section 2. (Satisfiability) S C Form(C) is satisfiable iff there is so rm(C) some valuation v such that T. 0(IV Proof. we say v satisfies E. Suppose v' and v' are two valuations over the same domain. ve In evaluating a term t or a formula A under valuation v.3.3. and indi ree symbols free variable symbols contained in term t and formula A. such that A(u) v ( u / a > = 0. Av a 1 } . and the "otherwise" in [8] means for every a eG D. ( Satisfiabi ion 7.8. uppose E •ose We define «-{! v _ J( 1 if for every B G E. ( Validity) A G Form(C) is valid iff for every valuation v.e riat v = t*v [1] tv = =tv'. and u denote the non-logical symbols and free variable symbols occu mote the nonin t or A.3. Two valuations v an< v' over the same domain are said to agree on noniluations and igree logical symbolLa((or F. Bv = [ 0 otherwise.. d A. Theorem 3. ibol a f) if av (or v = o = F = F') o ru" =uv'.Classical First-Order Logic 91 (6) The "otherwise" in Definition 3. Theorem 3. S. and u v . Definition 3. A(u) occurring in £A[x)). Suppose v is a valuation over domain D and A G Form(C).4 [7] means there exists some a G £>. . Proof. occurring in A(x)).B V = 1. = t . B D □ Suppose 5 C Form(C).7.6. V=AV [2] AvtV= A " '\. Then jyml . we need only uating a term where the finite amount of information concerning a v .v = 1. f or free variable symbol u ifa v = av ' ([orr F v = Fvv \.5. i A =AV\ jf. A(u)1v ( U//a ) = 0 (constructing A(u) from A(x) and taking u not D .: 3. Definition 3.3. where a. When E v = 1. function symbols. F v . imount of infc ols occurring f. roof. A V G {/1 . F..

The truth of (1) is determined by the matter. Church [1936] established that there is lO XXX gC^XX^X. However. in order to know whether a formula of £ is valid. irrespec tive of the meaning of the non-logical symbols and free variable symbols yielded under interpretations and assignments. v is any valuation. vali a In the case of an infinite domain Z}. b)v = 5. v that a v = 3. Hence satisfiability corre sponds to the informal notion of truth of propositions which follows from the matter. . the truth table). of B.92 Science Mathematical Logic for Computer Science Validity is aisu called uimuw &ui validity. (See Definition 3.ulas) A satisfiable formula (or set of formulas) iis one that is true relative to rr-nmoT some particular interpretation and assignment. f is addition. but there is one important difference. 'The sim ilarities between them are obvious. In fact. the individual u v . the matter. i\ w m ue false. Then. the not finitary. (1) Hence A is satisfiable. To decide whether a formula of Cphis a tautology. v a n u i i y is also ca-iieu universal uuuuiuy. v is ar proposition v \iv Uv\ has or has not the propertyrF . a Valid formulas in. v is a valuation over domain N such f(g(a). iorm in aostraction from the matter. the property Fv. Then Avv is k the true proposition 3 + 4 = 5 . we set u = 6 in tiie a u u v c vaiuauiuii.g(u))«g(b).) It is sometimes possible to decide for certain formulas of £ wl whether f they are valid or not. Bv is Suppose B = F(u) V -■F(u). ] follows from the logical form which justifies the validity yFvV It . v We are not provided with a method for evaluating VxA(x) or 3xA(x) v in g v u a finite number of steps. They will be studied further in Chapter 5. because it presupposes the values A(u)v <u / a ) for ( s infinitely many a G D. Satisfiability and validity are important semantic notions which are closely related to each other. i . A valid formula is one that is true on account of its form alone. But A is not valid. . algorithms are used (for instance.4.g(u)) « g(b). or u".3. However. we have to consider all valuations over domains of different sizes. t] procedure is in general not nnitai in D.se. u v = 4. Validity is intended to cap ture the informal notion of truth of proposition with attention to the logical form in abstraction rrom tne matter. Bv :i the true B = F(u) V i F ( u ) . and gv is squaring.. Av will be ifcu. Example pie Suppose A = f(g(a). £ are the counterpart of tautologies in Cp. Fv (2) 2 2 2 The truth of (2) is not concerned with the domain. there are other valuations which make A true. If we act bv — u ni the above valuation.

The notation |= ifor tautological consequences is also used for logical consequences.1. $e E C Form(C) and A G Form(C). Hence Vx->A(x) (= -i3xA(x). pie Example Vx(A(x) -»■ B(x)) \= VxA(x) -»• VxB(x). s \£ are Two formulas A and B are called logically equivalent (or equivalent for short. Suppose Vx-<A(x) \£ -»3xA(x). {Liogxcai consequence) consequence) Suppose E C Form(C) and A G Form(C). (2) (-3xA(x)) v = 0.±. there is some valuation v over domain D such that v over aomam u sucn mat (1) Vx-A(x) v = 1. a branch of mathematical logic not contained in this book. A = l. Logical consequences in C.Classical First-Order Logic 93 no algorithm for deciding the validity or satisfiability of formulas of C.5. 3 4 LOGICAL CONSEQUENCE . A is valid. Definition o. involve semantics. hence (3) V(U For every a € D. u not occurring in A(x). We will show with examples how to prove or refute a logical consequence. (-nA(u)) v(u/Q) = 1 for every a G D. 0 |= A. that is. The notations ^ and |=) £ used in the same way as in Chapter 2.4. i i £. which are the counterpart of tautological p consequences in C . Proof. By (1) we obtain Form A(u) from A(x). i: on £?. ls\nos*nl nnnn oortmonr\r>o r\r A is a logical consequence of V T*rrM"H-*an as V |= A. contradicting (3). This is analogous to the case of tautological consequences in Section 2. A{u)vWa) / Q ) = 0. (Logical consequence) xion 3. iff for any valuation E. if no confusion will arise) iff AHB1 A f=) B holds. In the special case of 0NA. written o o E — A v v u v.3xA(x). .4. This topic belongs to recursion theory. Example Vx-nA(x) (= -.. By (2) we obtain 3xA(x) r = 1. E = 1 implies A" = 1.

A ( u ) v ( u / a ) = 1. For every a e D. B ( u ) v ( u / a ) = 0. irrelevant to what members it contains. and (4) we obtain respectively (5). we obtain F(u) v = 1. there -> is some valuation v over domain D such that (1) (2) By (2) we have (3) (4) VxA(x)v = 1. In the following example a logical conse quence is to be refuted. = Yv . Form A(u) and B(u). F" = F* = {a}. if 1) and 5) are used. (3). 2) \iv = /(3. = 1. Then uv may be 1) or L). Suppose Vx(A(x) -> : B(x)) ^ VxA(x) -» VxB(x). contradicting (7). Then. if 1) and 3) are used. Fv may be one of 3)-6): 3) 4) 5) 6) F v = {a. We need to construct a valuation in the refutation and determine its domain. We explain it with example. -+ In the above examples logical consequences are proved. . 3. Take the set {a. (6) and (7): (5) (6) (7) For every aGD. (VxA(x) -> VxB(x))v = 0. By (5) and (6) we obtain B(u) v ( u / a > = 1 for every a E D. For some a e D. u not occurring in A(x) or in B(x). etc. VxB(x)v = 0. (A(u) -► B(u)) v ( u / a ) = 1. its size). F v = {/3}. rv = F = 0. 1 ose j£ -> that is. We want to explain that what is to be deter mined about the domain is its cardinal (that is. we obtain F(u) v = 0. We need not construct valuations in the proofs./?}. Suppose we want to construct a valuation v for the atomic formula F(u). Therefore Vx(A(x) -> B(x)) |= VxA(x) -> VxB(x). 2): 1) uv = a. By (1). We explain it with example. Vx(A(x) -+ B(x))w = 1.0. members it contains./?} with two members as its domain.94 Mathematical Logic for Computer Science Science Proof.

By (5) and (7) we obtain ./?}. = 1./?'}.(u/a) = G(uf( ) = Q./?'}. where G(u)"^u/. Then we are to prove VxF(x) —• V xG(x) \£ > Vx[F(x)-+G(x)]. F(u) v ' = 0./?} can be obtained with {a'. The (1) (2) (3) (4) (5) (6) (7) p( u )«(n/a) F(u)"< u/a > = j . Example Example VxA(x) -> VxB(x) ^ Vx(A(x) -> B(x)). Form F(u) and G(u). F(u) v = 1. (VxF(x) -» VxG(x)r = 1 (by (4)). (F(u) -+ G(u)r<"/°> = 0 (by(l). F = 0.< af and /?' irespectively. To refute a logical consequence. F"'={a'. Vx[F(x)->G(x)]. Let a and /? correspond t. F»' = {a'}. Then u v :may be 1') or 2'): {a'. crucial point oi tiie uoiiiam oi valuation is its cardinal. w When 1') and 3') are used. F"' = {(3'}. Then we obtain the following: VxF(x)" = 0 (by (2)). ( u / / 3 ) = 0. F(u)" u/Q G ( u )t. v' over M ' 1') V 1) 2) Fv' may be one of 3')-6') : 3') 4') 5') 6') 6') uv = a'. 0. We a a c< rpsnnnH to a' construct a valuation v' o\ domain K.Classical First-Order Logic 95 We may take another domain {a'./?'}. F ( u )«(»/« = 0.(3)). Vx(F(x) -» G(x))« = 0 (by (6)). etc./?'}./3^ is irrelevant to the question. where a' and &' are different a! and ff from a and /?. Set D = {a. Suppose the quasi-formulas A(x) and B(x) are atomic quasi-formulas F(x) and G(x) respectively./?'}. when 1') and 5') are used. Thus we explain intuitively that the crucial point of the domain of valuation is its caruinai. Construct a valuation v over domain D such that Fv = {a} and Gv = {/3} or 0. VxF(x) ->• VxG(x) £ Vx(F(x) ->• G(x)). Fvv' = 0 . Proof. we need only to refute a special example of it. u« = (3'. We see that the result of constructing a valuation for F(u) with domain {a.

Then A7. -. VxC(x) H VxC'(x). and then \/xC'(x) = 1. Xn in B and C. and [7] is left to the reader.. Similarly for the proof of VxC'(x) |= VxC(x). Generally.F(x) --F(x) • > /-i B (=ji C is meaningless because B and C are not formulas.v) C / = -. By (1) we obtain (2) For every a G D. we write. Suppose v is any valuation over domainD.v) and B' (=) C . B H B . B H C ifor BB' H c C . C ( u ) v ( u / a ) = 1. x n without quantifiers of them and B'. Suppose A H A'. . . . C are formulas resulting from B. Suppose (1) VxC(x)v = 1. . Form C(u) and C'(u).4. u not occurring in C(x) or in C'(x). A4BHA'->B'. [2] [3] [4] [5] [6] [7] [7] AABHA'AB'. . Q Suppose B and C are quasi-formulas. AVBHA'VB'. B | = | C is intended to mean B' |=j C . v(u/a)«) By (2) and the suppositions of the lemma. AoBHA'^B'. C by simultaneously substituting any free variable syn >ols ui. In such a case. . 3xC(x) H 3xC'(x). x occurring in them without quantifiers of it.x) >se B a and C = _i F(x) — G(u. . 3xC(x) H 3xC'(x). Lemma 3.96 Mathematical Science Logic for • Computer Science Note that the statement in this example cannot be proved in a domain with only one individual. B = F(x) V G(u.. if B and C are quasi-formulas containing xi. B' [1] -IAH-A'. . Hence VxC(x) f= VxC'(x).F(v)->G(u. we obtain Cf(u)v}^u^a^ = 1 for v every a G £>. . .x). for instance. n respectivi c for xi. [l]-[5] are the same as those in Section 2. We shall prove [6]. . Proof. we obtain formulas B' and C': B' = F(v)VG(u.2. rite B |=| C r ' H ' BH H . Substituting any free variable symbol v for x in B and C. . u n respectively for symbols U l . and C(u) H C'(u). .5..

3 may be quasi-formulas. and A' (the dual of A) results from A by exchanging A for V. (Replaceability of equivalent for nt formulas) Suppose B | = | C and A' results from A by replacing some (not neces sarily all) occurrences of B in A by C.5. Prove the following logical consequences: [1] -iVxA(x) H 3x-iA(x) [2] -. Then A' (=j ->A.2.4.y)hVy3xA(x. Theorem 3.y)^3xVyA(x.3xA(x) H Vx-A(x) [3] Vx(A(x) A B(x)) H VxA(x) A VxB(x) [4] 3x(A(x) V B(x)) H 3xA(x) V 3xB(x) 3.4. By induction on the structure of A.2.4. Proof. A. the connectives ->.1.3. By induction on the structure of A. Prove Theorem 3. 3.4.y) [6]Vy3xA(x.4. Prove the following: [1] 3x(A(x) A B(x)) (= 3xA(x) A 3xB(x) [2] 3xA(x) A 3xB(x) ^ 3x(A(x) A B(x)) [3] VxA(x) V VxB(x) |= Vx(A(x) V B(x)) [4] Vx(A(x) V B(x)) V. . Then A (=| A'. V. FORMAL DEDUCTION The formal deduction in first-order logic is analogous to that in propositional logic except that it is defined by additional rules of formal deduction.Classical First-Order Logic 97 (Replaceability Theorem 3.VxA(x) W x B ( x ) [5]3xVyA(x.. and the two quantifiers by the formation rules concerned.y) 3.3.4.4.4. (D\ {Duality) (Duality) Suppose A is a formula composed of atoms of £. V for 3 and each atom for its negation.4.4. Proof.4- 3. □ □ Exercises 3. using Lemma 3. Note that B and C in Theorem 3.

u not occurring in E or B. (V-< elimination) | (V-elimination) If E — A(u). The u's in (V+) and (3—) may be replaced by t. A(u) — B. | then E. 3xA(x) — B. however. but the formulas occurring in them are now formulas of the first-order language. Such replacement extends the range of application of these rules. which should be distinguished from substitution. where A(t2) results by replacing some | (not necessarily all) occurrences of ti in A(ti)by t2( « . because the set of terms contains the set of free variable symbols as a proper subset. I (Vthen E — A(t).elimination) | ( 3 (3-elimination) IfE|-A(t). However.elimination) ( ~ + ) 0 — u « u. then E — A(t2). since . | then E — VxA(x).) IfEhAOn). another kind of replacement is employed.98 Science Mathematical Logic for Computer Science The eleven rules in propositional logic are included in first-order logic. (3-introduction) (V+) (3—) (3+) ( « . (^/-introduction) | (^/-introduction) (VIf E. u not occurring in E. (3. E|-ti«t2. The additional rules concerning the quantifiers and equality symbol are as follows: (V-) If f E h V x A ( x ) . then E — 3xA(x). « | (« —introduction) Remarks -ks In (V—) the formula A(t) results from A(x) by substituting t for all occurrences of x. where A(x) results by replacing some | (not necessarily all) occurrences of t in A(t)by x. It is the same for the cases of (V+) and (3—). In (3+) and ( « —).

A(u) (. The conditions "u not occurring in E" in (V+) and "u not occurring in E or B" in (3—) call for some explanation.xn 3 x i .A ( u ) (by(Ref)) l) (1) 1 ( (2) •A ( u ) h V x A ( x ) (by(V+). (Formal dedi idAeFc Suppose E C Form(C) and A G Form(C). For a sequence of universal (or existential) quantifiers. The arbitrariness of a means that the choice of a is independent of the premises in the deduction.2. not necessary. . nal deducibility) Definition 3. This is similar for the case of (3—). In fact. we write Vxi. This point is expressed in (V+) by "u not occurring in E". For instance.Classical First-Order Logic 99 the above original formulations are sufficient.6.. . This can be proved after reading Soundness Theorem in Section 5. .2 holds in classical first-order logic as well.5.. Theorem 2. xn for V x i . (1)) 2) f(l) \(2) A ( u ) | .1. it is sufficient to demonstrate this statement for any point a on the perpendicular bisector. A is formally deducible from £ i] first-order logic iff E — A can be Tom E in | generated by the seventeen rules of formal deduction.VxA(x) and 3xA(x) — A(u) do not | hold. in order to demonstrate that every point on the perpendicular bisector of a segment AB is equidistant from A and B. where u expresses a and E expresses the premises. The following sequences: ioiiowmg sequences: f ( (1) -A ( u ) | . the replacement of u by t is not necessary. Note that the t's in (V—) and (3+) should not be replaced by u. The rules of formal deduction for quantifiers can be generalized as fol lows: . The rule (V+) means intuitively that from "any member a of a set has a certain property" we can deduce "every member of the set has this property". .A ( u ) (by (Ref)) (by(Ref)) 3xA(x)|-A(u) (by(3-). . 3x n respectively. . the proof of which is left to the reader.(l)) A(u) do not form (formal) proofs because the rules (V+) and (3—) are used incorrectly in them. Vxn and 3 x i .

. u i . In (V-f) and (3—). . . x n ). x n A ( x i . . Obviously. VxyzF(x. . x n ) | . . . z) \. t i . . . . . . .t2. u n ) . . VxxA(x.. . . . VxyzF(x. | (3+) If E h A ( t i . . t n may or may not be distinct. [3] VxA(x) h VyA(y). . . . otherwise we shall have. .100 Mathematical Logic for Computer Science (V-) (v-) IfEh-Vx1. For instance. . | (3—) (3-) If E. .5. . [2] A ( t i . for instance. . . x n A ( x i . .. A ( u i .XnA(xi. . x n A ( x i . 3 x i . t i . .A ( t i . . t n ) by x* (i = 1 . otherwise we shall have the same symbols in x i .xnA(x1. . where A ( x i . which is not a formula. . . In the above generalizations.. .t2. .z)hF(t1. . . . VxVxA(x. but the formulas occurring in it should be replaced by formulas of C T h e o r e m 3.. . . where A ( x i . x n A ( x i . . . x n ) . . . . .VxyzF(x. and accordingly Vxi. . x n ) . .y. . . K th then E — 3 x i . n)..y. ... from VxyzF(x. .F ( t i . . . x n A ( x i . t n ) . . . . u n ) | . .B . . x n ) | results by replacing simultaneously some (not necessarily all) occurrences of t* in A ( t i . u i . .A ( t i . . t n ) . t n ) by X* (i = 1. . . x n ) and 3 x i . . | (v+) then E — V x i . .n). . t n ) \. t h e n E f. . . [1] V x i . y. ... . . .x) (that is. But in (V—) and (3+). . .t2). y. x i .z) \. . then E . . .z)hF(t1. . .t3).. . . . . x n . . . every scheme of formal deducibility which holds in propositional logic holds in first-order logic as well.y. . u n should be distinct. t n ) . x n A ( x i . . .2..xn). (V+) If E — A ( u i . . u n not occurring in E or B. t i ) . . .Xn) results by replacing simultaneously some (not necessarily all) occurrences of ^ in A ( t i . . z) we can have VxyzF(x. . .. .x n ) — B. . . x)). x n should be distinct. u n not occurring in E. . . . . . . u i .. .3 x i . .x n ) will not be formulas. . .

Another method is to obtain E |.A(u) (use u not occurring in A(x)). Proof of [4]. (2)). (1) A(u) f.y) h VyxA(x. (1) (2) (3) (4) -»A(u) — 3x-iA(x) (use u not occurring in A(x)).3x-A(x) (by (3)).y). We choose to prove [4] and [5]. i3xA(x) h .3. Proof of | . (2) A(u) h 3yA(y) (by (3+).3yA(y).y) (by (V+). u) -. (1)). [2] -GxA(x) H VX-HA(X).3xA(x). (1) VxA(x) | . (3) E)xA(x) h 3yA(y) (by ( 3 . v not occurring in A(x. Proof.5.A(u) (use u not occurring in A(y)).Classical First-Order Logic 101 [ ] 3xA(x) |. Proof of-| of [1]. [1] -VxA(x) H Bx-iA(x). (3) 3x-A(x) h -VxA(x) (by ( 3 . (2) VxyA(x. Proof. (1) VxyA(x. 4 [5] VxyA(x. Proof of [5]. D Theorem 3.y)h3yxA(x.y).y)|-Vy3xA(x. -VxA(x) |.) . (2)). H VX-HA(X).) . -3xA(x) h B E.y). (2) -A(u) h -VxA(x) (by (1)).3x-iA(x) h VxA(x).y)hVyxA(x.y) |.A ( (u) ( b y ( l ) ) . [8] 3xVyA(x. D Remarks rks E — 3xA(x). | ^ 3 x ^ A ( x ) | .Such proof is called constructive. We choose to prove [1]. may be proved | from E |—A(t) by using (3+).y)).v) (use u.A(u. where 3xA(x) is an existential formula.B . (1)). [ ] 3xyA(x.of [1].3xA(x) from E. 6 [7] VxA(x) \.

x not occurring in A. (4) (5) (6) (7) (8) (9) (10) (11) (12) -i(A(u) -» B) | . (3)). the — part | of [1] has no constructive proof. ^3x(A(x) -> B) h A(u) (by (1). VxA(x) -+ B.4. [3] Vx(A(x) -> B(x)). A(u). x not occurring in B. by Soundness Theo | rem (see Section 5. VxA(x) -» B. [1] Vx(A(x) -> B(x)) | . > [6] VxA(x) -► B |—| 3x(A(x) -» B). (2) Vx-i(A(x) -> B) |. In fact. .2).VxA(x) -> B.Vxi(A(x) -+ B). if x occurs in A.5.. □ Remarks ks In [4] and [5] of Theorem 3. -3x(A(x) -» B) \. x not occurring in A. VxA(x) -+ B h 3x(A(x) -+ B) (by (11). -n3x(A(x) -+ B) h VxA(x) (by (5)). then some quantifier of x would occur in A and accordingly Vx(A — B(x)) and 3x(A — B(x)) > > > would not be formulas.B (by (10). (2). | (1) i3x(A(x) -> B) |. x not occurring in B.) If we can establish ->VxA(x)|— ->A(u). VxA(x) -> B. Vx(B(x) -» C(x)) | . (2). We choose to prove — of [6]. (9)). VxA(x) -» B.3xA(x) -> 3xB(x). [7] 3xA(x) — B |—| Vx(A(x) -» B).i(A(u) ->> B) (use u not occurring in (1)). ^ Proof.B (by (1). The roman-type capital Latin letter Q (with or without subscripts) will be used for the quantifier symbol V or 3. [4] A -» VxB(x) |—| Vx(A -+ B(x)). ->3x(A(x) -» B) \. It is similar for [6] and [7].-. -Gx(A(x) -> B) h VxA(x) (by (7)).VxA(x) -> VxB(x). -3x(A(x) -> B) | . [5] A -» 3xB(x) |—| 3x(A — B(x)). | (Constructive logic will be studied in Chapter 7.B.4. Theorem 3. But we have ->VxA(x)^= _. This gives a constructive proof of the — part of [1]. (8)). Hence. [2] Vx(A(x) -> B(x)) | . The above proof of the — part of [1] is non-constructive.B (by (6)).102 Mathematical Logic for Computer Science by using (->—).5. ^3x(A(x) -+ B) h . (use (3) -H(A(U)->B)|-A(U). -i\/xA(x)|— _i A(u) does not hold. then we obtain -<VxA(x)|— 3x->A(x) from it by using (3-f).Vx(A(x) -> C(x)). (4)).

Vx(A(x) <* B(x)).Classical First-Order Logic 103 The proofs of the following Theorems 3. Vx(B(x) -> A(x)) | . y not occurring in A(x). [5] Vx(A(x) o B(x)) h Vx(B(x) -+ A(x)). We write 3!!xA(x) 3!xA(x) for for Vxy(A(x) A A(y) -> x « y).5.Vx(A(x) -> B(x)). [5] QixA(x) V Q 2 yB(y) |—| QixQ 2 y(A(x) V B(y)). 3x[A(x) A Vy(A(y) -> x » y)]. 3!x is read as "there exists exactly one x such that".3xA(x) A 3xB(x). [1] A A VxB(x) |—| Vx(A A B(x)).7.5. It means "there exists at most one individual in the domain such that".5. 3. [4] Vx(A(x) ^ B(x)) [. x not occurring in A. — [3] VxA(x) V VxB(x) I. Theorem 3. [4] 3x(A(x) A B(x)) |. [2] A A 3xB(x) |—| 3x(A A B(x)). [2] A V 3xB(x) f | 3x(A V B(x)). x not occurring in A. Vx(B(x) *» C(x)) | .5.Vx(A(x) V B(x)). . It means "there exists exactly one individual in the domain such that".6. and 3. [5] QixA(x) A Q 2 yB(y) \-\ QixQ 2 y(A(x) A B(y)).5.6. y not occurring in A(x). [2] Vx(A(x) <-> B(x)) | . Theorem 3.7 are left to the reader. Theorem 3.5. x not occurring in B(y). [1] Vx(A(x) «-> B(x)) | . [3] VxA(x) A VxB(x) |—| Vx(A(x) A B(x)).Vx(A(x) ++ C(x)).VxA(x) <-> VxB(x). 3!!x is read as "there exists at most one x such that". [3] Vx(A(x) <-> B(x)).3xA(x) ^ 3xB(x). [6] Vx(A(x) -» B(x)). It does not mean "there exists". [4] 3xA(x) V 3xB(x) (-| 3x(A(x) V B(x)). x not occurring in B(y).5. [1] A V VxB(x) |—| Vx(A V B(x)). x not occurring in A.5. x not occurring in A.

(5) A(t) f . [4] ti « t 2 . t 2 « t 3 | . [9] 3!xA(x) H 3xVy(A(y) o x « y). Proof. | I (use u not occurring in A(t)). Proof of . . where A(t2) results by replacing some (not | necessarily all) occurrences of ti in A(ti) by t2[2] 0 | .A(t) (by this theorem [1]). B (-| B'. [1] A(ti). t. □ Lemma 3. We choose to prove [6]. (3) A(u). (4) u « t A A(u) h A(t).of [6]. [2] A A B H A ' A B ' .3 x ( x * t A A ( x ) ) . [6] VxC(x) |—| VxC'(x).5. [7] 3!xA(x) \.t « t.5. and C(u) H C ( u ) .A H . where A(x) results as in [5]. [5] A <+ B H A' o B'. Suppose A I—| A'. u « t | . [7] 3xC(x) H 3xC'(x).ti « t 3 .A ' . [3] ti « t 2 h t 2 « t i .9. 3!!xA(x) | . (4)). [6] A(t) |—| 3x(x « t A A(x)).t « t (by this theorem [2]).3!xA(x). where A(x) results by replacing some y (not necessarily all) occurrences of t in A(t) by x. Proof of |.u « t.104 Mathematical Logic for Computer Science Theorem 3.ti « t2 — A(t2). (5) 3x(x « t A A(x)) h A(t) (by ( 3 . [5] A(t) |—| Vx(x « t — A(x)). [3] A V B I—| A' V B'. [4] A 4 B H A ' 4 B'.3!!xA(x). (3) A(t) h A(t). (4) A(t) f .t « t AA(t). (1) 0 | .| of [6].8.t « t. (2) A(t) \.) . [8] 3xA(x). Then [1] . (use (2) u « t A A(u) f.3xA(x). (1) u « t A A(u) — A(u) (us< u not occurring in A(t)).

5. (Replaceability iof equivalent for ility lent formulas) Suppose B |—| C and A' results from A by replacing some (not neces sarily all) occurrences of B in A by C.VxC(x) *» VxC'(x) (5) 0 | .4 [5]. [7]-[9]. C as in the last section.6. (3) 0 | .5.2 [8].5. .A. Prove Theorem 3. the connectives -». and the two quantifiers by the formation rules concerned and A' is the dual of A. using Lemma 3. Prove Theorem 3. We want to prove [6] and [7]We have the following: (1) C(u) H C'(u) (by supposition). Thm 3.5. By induction on the structure of A. □ Exercises 3. By induction on the structure of A.2. (Duality) □ Suppose A is a formula composed of atoms of £.3 [2].3.5. Proof. [7]. 3. Then A |—| A'.5. Proof. 3.5. □ Then [6] and [7] follow from (4) and (5) respectively.5.8 [3]. V.5. A.V x ( C ( x ) o C ' ( x ) ) . Suppose B and C are quasi-formulas and B'. 3. 3.5.Classical First-Order Logic 105 Proof.10.11. [l]-[5] are the same as in Section 2. Theorem 3. C are formulas resulting from B.5. Prove Theorem 3. (by (3).3xC(x) o 3xC'(x) (by (3). Thm 3.7 [1]).5.7 [2]). Then A' |—| -. (4) 0 \.5. Prove Theorem 3. (2) 0 h C ( u ) ^ C ' ( u ) .1.9. We write B |—| C for B' f | C — Theorem 3.4.5.

By (1) and the replaceability of equivalent formulas. x not occurring in A. . Then A j=j A' and A f | A'.6. (Prenex normal foi A formula is said to be in prenex normal form if it is of the form Q i x i .2 is proved. Therefore x occurs in QxB(x) exactly in the same places as y occurs in QyB(y).106 Science Mathematical Logic for Computer Science 3. 3xA(x) V 3xB(x) H 3x(A(x) V B(x)). A formula with no quantifiers is regarded as a trivial case of a prenex normal form. Proof.1. vx-iA^x. y does not occur in QxB(x). n) is V or 3 and B is quantifier-free. QnxnB where Q* ( i = 1. . . Bx-nA(x). Q n x n is called the prefix and B is called the matrix. Every formula is equivalent to some formula in prenex normal form. . First we want to prove () (1) K f QxB(x) H QyB(y). Hence (1) holds no matter whether QxB(x) and QyB(y) are formulas or quasi-formulas. — Proof.n V x A ( x )\ H I Bx-n 3x^ A ( x ) . I QxB(x) H QyB(y). Obviously x does not occur in QyB(y). . A A QxB(x) f=| Qx(A A B(x)). otherwise A' is not well-formed.6. . . Theorem 3. (Replaceability of bound variable sy bility symbols) Suppose A' results from A by replacing in A some (not necessarily all) occurrences ofQxB(x) by QyB(y). A V QxB(x) (=j Qx(A V B(x)). The string Q i X i . . We have the following: Proof.n V x A ( x )) H H .6. A A QxB(x) (=| Qx(A A B(x)). x not occurring in A. . Every formula is equivalent to some formula in prenex normal form. Theorem 3.. PRENEX NORMAL FORM rial form) Definition 3. x not occurring in A.2. □ Theorem 3.6. VxA(x) A VxB(x) H Vx(A(x) A B(x)). We have the following: -axA(x) H I W -•uxApg F=| Vx^A(x).3.6. -axA(x) H Vx^A(x). .

Q lX A(x) V Q 2 yB(y) H QixQ 2 y(A(x) V B(y)). x. x. By the theorems of replaceability of equivalent formulas (Theorems 3. 3. y) A -G(z.6. A. which is equivalent to the given formula.1. V not to occur in the » scopes of -». y) A 3y(-G(y. v) A -H(x))] H Vx[3yF(u. where the notation f=| can be replaced by |—|. x. x not occurring in B(y). The above equivalent formulas help to move the quantifiers out of the scopes of the connectives and make them initially placed. ses Exercises 3. v) V H(x)) H Vx3yF(u.4. A prenex normal form equivalent to a formula A is called a prenex normal form of A. A. x. x not occurring in B(y).x. y not occurring in A(x).3 and 3.x. v) V H(x)) H Vx[3yF(u. v) A -H(x)].v) V H(x))] H —Vx3yF(u. y) A Vx3y-(G(y. x. Then a prenex normal form is obtained.10) and by the equivalent formulas in classical propositional logic.y) A 3z(-G(z.v) -► H(x))] H -hVx3yF(u.x)^VyG(y) [3] Vx[F(x) -4 Vy(F(y) -> (G(x) -> G(y)) WzF(z))] .Classical First-Order Logic 107 QixA(x) A Q 2 yB(y) \=\ QixQ 2 y(A(x) A B(y)). y) A -3xVy(G(y. v) V H(x)) H Vx3yF(u.y) V 3x(—VyG(y. Certain bound variable symbols should be replaced when necessary. v) A -H(x))] H Vx3y3z[F(u. y not occurring in A(x).6.5. The matrix of a prenex normal form can be further transformed into a disjunctive or conjunctive normal form. y) A -3x(VyG(y.y) -» 3x(-VyG(y. Transform the following formulas into prenex normal forms: [1] (-3xF(x) V VyG(y)) A (F(u) -> VzH(z)) [2]3xF(u. □ Example lie -[Vx3yF(u. V and make ->.x. we can replace — and <-> by -».

• A) -A > * (Ax3) (Ax4) AAB-y A (Ax5) A A B . 4. It consists of some axioms and rules of inference. In the following we shall introduce one of such systems for first-order logic with equality. and the rules of inference generate formally provable formulas from given ones. the axiomatic deduction system.A.• ((A -y B) -► (A -► C)) > (Ax2) ( .4 AXIOMATIC DEDUCTION SYSTEM We shall develop in this chapter another type of formal deduction.> B (Ax6) A ^ ( B ^ A A B ) (Ax7) A->AVB (Ax8) A->BvA 109 .• ((-A -* -. (Axl) A -> (B -■ A) > (A -» (B -> C)) .-> B) . E |. Axioms.1.B) . As will be seen. AXIOMATIC DEDUCTION SYSTEM The axiomatic deduction system of formal deduction to be developed in this chapter is essentially based upon formally provable formulas. the axioms are formally provable formulas. It is denoted by the notation |-.A will be demonstrated to be equivalent to E | . which is essentially based upon formally prov able formulas.

. (Rl) Prom A -> B and A infer B. . j < fc. n) satisfies one of the following: [1] A* is an axiom. .B(x)) ->> (A -> VxB(x)). (E f A) E [ A (A is formally deducible or provable from E) iff there is some sequence A i . x not occurring in A. An such that each A^ ( k = 1. A(t 2 ) resulting from A(ti) by re placing some (not necessarily all) occurrences of ti in A(ti) by t2. . . A(x) resulting from A(t) by replacing some (not necessarily all) occurrences of t in A(t) by x. and A n = A. x not occurring in B. . ti « t 2 -> (A(ti) -> A(t 2 )). (Axl)-(Axl2) and (Rl) belong to propositional logic. Vx(A(x) -> B) -> (3xA(x) ->• B). Definition 4. [2] Ak e E.1. . . u« u (Axl8) Rules of inference. .110 Mathematical iter Science Logic for Computer Sci (Ax9) (AxlO) (Axil) (Axl2) (Axl3) (Axl4) (Axl5) (Axl6) (Axl7) ( A ^ C ) ^ ( ( B . (R2) Prom A(u) infer VxA(x). The sequence Ai.1. . A(t) -> 3xA(x).^ C ) . A* = B(u) and Ak = VxB(x). . . A^ = Aj — A^. The axioms and rules of inference are schemes.> ( A v B . .> C)) (A *-> B) -» (A -> B) ( A o B ) ^ ( B 4 A) (A -> B) -+ ((B -> A) -► (A ^ B)) VxA(x) -> A(t) Vx(A ->. A n is called a formal deduction (or a formal proof) of A from E. > [4] For some i < k and B(u) such that u does not occur in E. [3] For some t.

(1) (A -» (B -> C)) -+ ((A ->■ B) -4 (A -+ C)) (by (Ax2)) (2) [(A -> (B -> C)) -> ((A -> B) ->• (A -> C))] -»• {(B -* C) -► [(A -» (B -+ C)) -> ((A -»• B) ->■ (A ->• C))]} (by (Axl)) (3) (B -> C) -> [(A -+ (B -* C)) -> ((A -»• B) -+ (A -»• C))] (by (Rl). (6)). the (by . We have seen in natural deduction (in Chapters 2 and 3) that the rules of formal deduction and the formal proofs resemble those of informal rea soning. (4).Axiomatic Deduction System 2771 111 A is said to be formally provable iff 0 |. (2).A -> A. (4)). (5).(B -> C) -> ((A -)• B) -> (A -> C)). (3)) (6) (B -> C) -»• (A -> (B -> C)) (by (Axl)) ( 7 ) ( B _> C) -> ((A -> B) -4 (A -> C)) (by (Rl). Example 0 | .B . Proof.> B . In the next section we shall prove the Deduction Theorem: IfE. (1)) (4) A -> (A -> A) (by (Axl)) (5) A -»• A (by (Rl). For instance. A | . (3). Proof. This will be illustrated by the following examples.A holds. (2). (1) A -► ((A -» A) -+ A) (by (Axl)) A (2) [A -> ((A -> A) -> A)] -+ [(A -> (A -> A)) -> (A -> A)] (Ax2)) (3) ( A -> (A -»• A)) -»• (A -> A) (by (Rl). (1)) (4) {(B -> C) -»■ [(A -»• (B -* C)) -* ((A -»■ B) -> (A -»• C))]} -»• {[(B -> C) -> (A -> (B ->• C))] -> [(B -> C) -> ((A -> B) -> (A -»• C))]} (by (Ax2)) (5) [(B -> C) -> (A -> (B -»• C))] -»• [(B -> C) -► ((A -> B) -> (A -► C))] (by (Rl). By Deduction — Theorem the formal proofs can be simplified greatly. Example 0 |. t h e n £ ^ A . It is analogous to the rule ( > +) in natural deduction. But the axioms here do not express the traces of informal reasoning. and hence the formal proofs of formally provable formulas are not natural nor intuitive.

We introduce here the axiomatic deduction system of formal deduction because it appeared earlier than natural deduction in the historical devel opment of mathematical logic and is still adopted in the literature.> B . 4.(B -> C) -» ((A -> B) -> (A -► C)) can be given as follows. After reading Chapter 5. we shall see that the set of formally provable formulas coincides with that of valid ones.> B . A . A .2.112 Mathematical Logic for Computer Science formal proof of 0 I. we prove B .A . A . A l-C by the sequence of formal deduction: B . Formulas in a formal proof of E |.1 J B -► C K A -> B) -* (A -> C). We have mentioned at the beginning of this section that the axioms of the system developed in this chapter are formally provable formulas. A . First. B .* C . Then we obtain successively by the Deduction Theorem: B .> C .A are formally provable (or equivalently valid). Formulas in a formal proof of 0 |. if those in E are formally provable (or equivalently valid). RELATION BETWEEN THE TWO DEDUCTION SYSTEMS In this section we shall demonstrate the equivalence between the two types of formal deducibility: E|-A iff E s |-A. C 1.A are formally provable (or equivalently valid).> C .> C 1.> B | . . 0 K B -> C) -> ((A -» B) -+ (A -> C)). Hence the formal deducibility |deals with formally provable formulas (or equivalently valid ones). and the rules of inference generate formally provable formulas from given ones.

A.B is a formal proof of B from £.A -> B by induction. . . Case of (-> —).Axiomatic Deduction System 113 Lemma 4. We can prove E — A& (k = 1 . If E \.1. (.. the result obtained holds. If B is an axiom or belongs to E.. Proof. . Hence E — A. .D/.) . . . . . . . Let Ci. . Then C i . formal proofs of A — B and A from E (the D's are formu > las). B „ ( = B ) B is a formal proof of B from E and A. or B is obtained by means of (Rl) or (R2) from formulas preceding it in (1). If E h A.. .A.A. n) | by induction. Proof. By E |. and ( 3 . The following subcases need to be considered: B is an axiom or belongs to E. A f B... . then E (. We choose | to prove for the cases of (-> —). By induction on the structure of E — A..Cfc. We will prove E |.2. □ | Lemma 4. . . We want to prove > E [ B.2.. and (1) Bi1 . (-»+). we suppose A i . Suppose E. Suppose E f A — B and E |. . B is A.2.1 -). Hence E f B.. the following sequence: . We have to prove that | each of the rules of formal deduction has or preserves the property that if the symbol — in it is replaced by |-. Case of (—»+). The rest are left to the reader.D/(=A) be. A n (= A) is any formal deduction of A from E.A.. . then E ^ A .Di..Cfc(=A->B) B) D1.. respectively.

we have E [ A — C(u).Dfc. .A -> (C -> B) and E f A -> C. > > K B is A. . . .B->(A-*B). — . (A ^ (C -> B)) -> ((A -> C) -> (A -> B)). Adding the following > three formulas: Vx(A-*C(x)).Ei.. then u does not occur in E nor in A. D j b ( = A . we have E |. and B = VxC(x). we obtain a formal proof of A -> B (= A -> VxC(x)) from E.A -» B... the following five formulas: [A -+ ((A -+ A) -> A)] -► [(A -> (A -► A)) -> (A -> A)].. A -> VxC(x) after a formal proof of A -> C(u) from E. Suppose D i .> BB)) )) Ei. respectively. Then the following sequence: D i . formal proofs of A — (C — B) and A — C from E (the > > > E's are formulas)... Vx(A -» C(x)) -> (A -► VxC(x)). Hence E |. Hence E f A -> B. . Hence E [ A — B. A -> (A -> A).A->B B forms a formal proof of A -> B from E. (A -> (A -> A)) -> (A -> A). > Suppose B is obtained by means of (Rl) from two formulas C — B > and C. ■ ► Suppose B is obtained by means of (R2) from a formula C(u) which precedes B in (1).E|(=A-^C) C) are. Then E |.A->B forms a formal proof of A — B from E. which precede B in (1).. .A — B. (A->C)-^(A^B).114 Mathematical Logic for Computer Science B B. A-+A form a formal proof of A — A from E.E/. . Then the proof for the case of ( > +) is completed.> ( C ... By the induction hypothesis. A -> ((A -+ A) -> A). By the induction hypothesis.

-. E |. 3xA(x) |.Axiomatic Deduction System m 115 Case of ("•—). .Cfc..Di. .Dj. (-»A -» B) -» ((-A -> . formal proofs of -«A — B and -iA — -iB from E.. From the result obtained in the case of ( > +). . . Vx(A(x) -> B) -► (3xA(x) -> B). .B" is called the Deduction Theorem. Hence E. Case of (3-). We want to prove E (• A. Cfc (= A(u) -» B) is a formal proof of A(u) — B from E.A -> -. .A. we have E |.A ->.. Then > > the sequence C i .-A|-B. B )) are. — > Suppose C i .A -> B. □ .B.A -> -nB. We want to prove E. . ..-. .. Suppose £.n A . Suppose Ci.Cfc(=-iA->B). respectively. Suppose E. D | ( = . D "If E. By the result proved in the case of (-> + ) .A iff E f A. then E |.A|--. > > Then the sequence C i .B.> . Cfc.B is a formal proof of B from E and 3xA(x). A(u) |. 3xA(x) ->B. E [ .B. D i .A(u) —• B. . . Theorem 4.. 3xA(x) |.2.B.. Hence E |. . A is a formal proof of A from E.. A |.3. .B.3xA(x). we have E I. . (-.B) -> A. . E.B ) -» A). . Vx(A(x) -» B). . u not occurring in E nor in B.

which is defined in terms of valuations. Then formal deducibility is said to be sound for informal reasoning. corresponds to (informal) deducibility and involves semantics. It is signified by 1) that what formal deducibility expresses about premises and conclusions also holds in informal reasoning. Logical consequence. hence formal deducibility covers informal 117 .5 SOUNDNESS AND COMPLETENESS We have mentioned in the Introduction that mathematical logic is the study of logical problems and that the (informal) deducibility relations between the premises and conclusions are established by their truth values. Conversely. suppose 2) sE ^ A = ^ E h A for any E and A. is concerned with the syntactical structures of formulas and involves syntax. which is defined by a finite number of rules of formal deduction. Formal deducibility. Suppose 1) E h A = > E f= A for any E and A. hence formal deducibility does not go beyond the limit of informal reasoning. 2) signifies that what holds in informal reasoning can be expressd in formal deducibility. and 1) is called the Soundness Theorem.

x n A ( x i .x n ) is satisfiable. 5. x n ) is valid. . . and (1) is proved. [2] A ( u i . v ( u / V ) is identical with v. Then formal deducibility is said to be complete for informal reasoning. and establish the equivalence between them. uv G D. [2] A is valid iff ->A is unsatisfiable. SATISFIABILITY AND VALIDITY Satisfiability and validity are important semantical notions which are closely related to soundness and completeness. . T h e o r e m 5.A is invalid. . . . Suppose A(u) is satisfiable. u n ) is satisfiable iff 3 x i . . . Obviously. that is.2. Proof. there is some valuation v over domain D such that A(u) v = 1.1. and 2) is called the Completeness Theorem. Then there is some a G D such that A(u) v ( u / Q ) = 1. . . u n ) is valid iff V x i . and A(u) v ( u / U ^ = 1.1. [1] A ( u i . the following: (1) A(u) is satisfiable iff 3xA(x) is satisfiable. . . Proof. Hence A(u) is satisfiable. Immediate by the definitions. .118 Mathematical Logic for Computer Science reasoning. . . Definitions of these notions have been formulated in Section 3. □ .1. . For simplicity we will prove without loss of generality. instead of [1] and [2]. [1] A is satisfiable iff . Soundness and completeness associate the syntactic notion of formal deducibility with the semantic notation of logical consequence.1. Suppose 3xA(x) is satisfied by some valuation v over domain D. (2) A(u) is valid iff VxA(x) is valid. . . We first prove (1). x n A ( x i . .3 of Chapter 3. Theorem 5. Then we have 3xA(x) v = 1 and 3xA(x) is satisfiable. .

[1] E is satisfiable in D iff there is some valuation v over D such that E v = 1. A(u) is unsatisfiable <<=> 3x~iA(x) is unsatisfiable <=^> -A/xA(x) is unsatisfiable <==> VxA(x) is valid. . .1.Soundness and Completeness 119 (2) can be proved in an analogous way..4. (Satisfiability. we have Theorem 5. A ( u i . .3.1 and (1) as follows: A(u) is valid 4=> . . A is satisfiable in D <=> The prenex normal form of A is satisfiable in D. It can also be proved by Theo rem 5. . .1. . A is valid =>» A is valid in D. x n ) is satisfiable in D. . A is valid in D 4=> The prenex normal form of A is valid in D. A is valid in D <^=> -<A is unsatisfiable in D. [1] A is satisfiable iff the prenex normal form of A is satisfiable. x n A ( x i . u n ) is satisfiable in D 4=> 3xi • • • x n A ( x i . . . A is satisfiable in D <==> ->A is invalid in D. . Suppose E C Form(C). v Obviously we have the following corollaries: E is satisfiable in D = > E is satisfiable. and D is a domain. . [2] A is valid in D iff for every valuation v over D. validity in a domain) llity.1. Aiv = 1. x n ) is valid in D. . A ( u i . A € Form(C). . . . . [2] A is valid iff the prenex normal form of A is valid. u n ) is valid in D ^=> V x i . . . D Because any formula A is equivalent to its prenex normal form. □ Definition 5.

then by [2] we have (t V l )* = ( a V l ) * = a v»I i =t "i\ Similarly for the case of t = u. 7 if f / 3 * £>'. ./3. uj 1 = (uj 1 )* (j = 1 . . Construct a valuation Vi over D\ satisfying the following conditions 2)-5): 2) aVl = (a v )'. k).u/. ' i . Suppose Dr C D\ such that D and D' are in one-one correspondence and a G D corresponds to a' G D'.e£ / 5) F o r a n y / 3 1 . <(ft. Suppose [1] The individual symbols and free variable symbols occurring in a term t are included in a i .7.JnGA.. Then. u i . . . (/3^.120 Mathematical Logic for Computer Science Now we want to prove Theorem 5. Suppose A is satisfiable in D. . . . .. [3] (t Vl )* = t v i . Proof. .. . . . y ?i . For the simplicity of descrip tion we may consider without loss of generality only one individual symbol a and one free variable symbol u occurring in t.. Basis. . . By induction on the structure oft.1. . . 4) For any / 01:. . there is some valuation v over D v\ such that AvV = 1./?*> G F v . [2] v\ is a valuation over D such that a^1 = (a^1 )*(z = 1 ... For every (3 G D\.1.A. . . > l fL .) . Suppose D and D\ are two domains such that \D\ < \D±\.ft. . Z).. . L e m m a 5.5. If t = a.. t = a or t = u. . / 3 n ) =: f l . . and v\ agrees with v on all the function symbols occurring in t. .. a unique /3* G D is assigned as follows: 1) P --{ { ' a if/3 = a' e D'. that is. For this purpose we will need to have the following preparations. 3) uVl = (u v )'.. .. . .afc. / 3 n G A .. . P 1 ( / 3 l . including two lemmas. Hence [3] holds. . . Suppose 7 is an arbitrary element of D. / ? n ) e F ^ iff </??.

. Suppose [1] The individual symbols and free variable symbols occurring in a formula A without the equality symbol are included in a i . [3] A v i = A v i . Then..5) >t"> € v (by <=> i G F <=* tv* e F"i (by [2]) ^=> I G F < (by [2]) <=3> F(t)v= = 1. We will prove [3] for the cases of -iB. B A C.) Then.1. (For simplicity we regard f as unary.. A is an atom F(t). B -> C. . VxB(x). . (For simplicity we regard F as unary. [2] Same as in Lemma 5. By induction on the structure of A. . Ui. . or 3xB(x). Basis. Induction step.1. and 3xB(x) and leave the rest to the reader. t = f(ti). IV Hence F(t) V l = F ( t ) ^ and [3] holds. B o C. We distinguish seven cases: A = ->B.1.Soundness and Completeness 121 Induction step.. i ) ) « = ( f ( ( t .6. Proof. ' )•))'* (by 5)) =f((trr) (byi» = F(t?*) = f*(t?) = f(t1)»I.Uj. . B V C. <=> F(t)w* * 1. a&. (f(tiD* = ( = Cp i ( t .5 except that v$ agrees with v on all the function and relation symbols occurring in A. B V C. Hence [3] holds.) Then. □ (byindhyp) (by [2]) Lemma 5. F(t)*1 F(t) Vl = 1 «=» t"Vl € FVl <=> t 1 e F V1 ^ ((t V(ff1 )*G F"v (by 4)) f l)e F * v <=> tt">elF"v (by Lem 5.

that is. by induction hypothesis. We are to prove 3xB(x) Vl = 1 iff 3xB(x) v * = 1. Then. Choose any v not occurring in 3xB(x) and form B(v) from B(x). . we have v «r(v//n _ p* _ ^(v/My a_ (v/0h* Hence the relation between v*(v/0*) and i>i(v//3) is the same as that between v\ and v\.which is exactly the same as v\ except that vvi(v/P*) = /?*. Hence 3xB(x) v i = 1. Prom /? G D\ we obtain /?* G D. Then. in addition to the non-logical symbols and free variable symbols occurring in 3xB(x). which is exactly the same as v\ except that W v ^ ) = /3. v C"i = 1 where v\ (v//3) is a valuation over D\. (3) There is some aeD D such that B(v) v * ( v / a ) = 1. suppose 3xB(x) v i = 1. where /?* G D. (B V C)Vl = 1 l 1 <^> B" 1 Vl = 1 oror C CVl= = 1 1 <£=> B = 1 <^> B v ! = 1 or ^(BVC) i' =1. that is. Construct a valuation v\(y/f3*) over Z}. Suppose 3xB(x) Vl = 1. Case of A = B V C. From (1) and (2) we obtain B(v)vKv//3*> = 1. vj(v//?*) and vi (v/P) are respectively the result of extending v{ and v\ from the valuation of non-logical symbols and free variable symbols in 3xB(x) to v (v occurring in B(v). (1) There is some /? G £>i such that B(v) V l ( v / / 3 ) = 1. (-nB)Vl = 1 <^> BV1 = 0 «=>• B lv* = <F=>B"i = 00 (by ind hyp) B (by ind hyp) ^=> (-B)< = 1. Case of A = 3xB(x).122 Mathematical Logic for ComputerIT Sc: Science Case of A = ->B. we have (2) B ( v ) v i ( v / / r ) = B(v) V l ( v / / 3 ) . To prove the converse. For v. B(v) contains one more free variable symbol v. but not in 3xB(x)).

For v we have _ a v «I(v/a) = a vi(v/a'))* _ a _ Q /* _ ( v t»i(v/a'))* ^ = Qi* Hence the relation between v\(v/a)a) and vi(v/a') is the same as that W) ■T(v/.6. [2] If A is valid in Di.. we have by (3). Construct a valuation vi(v/a') over domain D\. Prom (3) and (4) we obtain B(v) Vl ( v / Q ') = 1.1.. (4)u? = (u^r = (u3fy = uj c? = i o- Since v^ agrees with v on all the function and relation symbols occurring in A.3. [3] is proved in the induction step.fc).7. □ .5 and 5. Then AVl1 = 1 by (2). (5). (3) a j 1 = ( a y i ) * = ( 0 / * = a? (< = l. we have (4) B(V)VI(V/Q) = B(v)Vl(v/Q'}. and (1). □ Theorem 5. we have (2) A v i = A<. (4) and Theorem 3. then A is vahd in D.1. by induction hypothesis. then A is satisfiable in D\. that is.." proved. By the conventions. As in the previous case. where a' G Dx. Proof. Suppose A contains no equality symbol and \D\ < \D\\. [1] If A is satisfiable in £>. notations. Suppose A is satisfiable in Z).Soundness and Completeness 123 Prom a E D w e obtain a' G D\. there is some valuation v over D such that (1) Av = 1. Hence A is satisfiable in Du and [1] is A.. (5) A v i*=A v . between v\ and vi.1. Then. and results stated in Lemmas 5. [2] follows immediately from [1]. Hence 3xB(x) Vl = 1 . i>jf(v/a) and v\(v/af) are respectively (v/a') the result of extending v\ and V\ to v.6.

1. two individuals. at least three individuals. The sentence Vx3yF(x. The sentences [1] 3xVy3z[(F(y.1. x) A Vxyz(F(x. at most three individuals. As counterexamples: Vxy(x « y) is satisfiable in a domain with one individual. Construct a sentence such that [1] It is valid in domains with one individual but invalid in larger ones. three individuals.x) f* F(y. y) A F(y. 5.y))] is valid in domains with no more than three individuals but invalid in domains with four individuals. z) -> F(x.1. z)) -> 3xVyF(x. [3] It is valid in domains with one or two or three individuals but invalid in larger ones.1. x) A Vxyz(F(x. but unsatisfiable in domains with more individuals. 5.y) A -F(y. y) A Vx-iF(x. but invalid in a domain with one individual. 5.124 Mathematical Logic for Computer Science Note that the formula in Theorem 5.5.1. z) -> F(x.z) -+ F(x.x) -+ (F(x. 5. The sentence 3xVy[F(x.z)) -► (F(x.4.1. [2] It is valid in domains with one or two individuals but invalid in larger ones.7 contains no equality symbol and a set £ can be used instead of A in [1].x) -> F(y. . y) V F(y.1. 5. z)) is satisfiable in infinite domains but unsatisfiable in finite ones. 3xy->(x « y) is valid in domains with two or more individuals.1. y) are valid in finite domains but invalid in infinite ones.3.x))] [2] VxF(x. *es Exercises 5. Construct [1] D has [2] D has [3] D has [4] D has [5] D has a sentence satisfiable in a domain D iff one individual.2.

If AvV = 1. SOUNDNESS Theorem 5. Case of (+).AvB|=C. 3xA(x) \= B. -iA f= ->B. We shall prove: If E. (V—). Case of (3—). We shall prove: If then E. then by E. Case of (V—). (That is. | (-•—). A(u) (= B. E' |= A. and (3—). A \= C we have Cw = 1. then . i A f = .A. (+). Case of (Ref). It is also obvious that if E |= A. Then (-^A)v = 1.? E |= A. then by E. A |= A is obvious. The rest are left to the reader.2.B . then 0 |= A. -iA |= B and E. E.) Proof.Soundness and Completeness 125 5. Hence Cv = 1 and accordingly E. E. We will prove the cases of (Ref). That [ is. _ Then AvV = 1 or B{vv = 1.BHC. then E |= A. Since E. which is a contradiction. Suppose E ^= A.2. [1] will be proved by induction on the structure of E — A. then Suppose v is an arbitrary valuation such that E v = 1 and (A VB) V = 1. [2] If 0 | .-Af=B.A^=C.1. every formally provable formula is valid. E . We shall prove: v If E. that is. we have B v = 1 and ( _| B) V = 1. v V . (5c (Soundness) [1] If E | . B (= C we have Cv = 1. Hence E \= A.A. we are to prove that each of the seventeen rules of formal deduction of first-order logic has or preserves the property: the statement obtained by replacing — by |= in each rule holds. Case of (-1—). A V B | = C . If Bv = 1. then E.u not occurring in E or B. E. there is some valuation v such that E v = 1 and A = 0.

126

Mathematical Logic for Computer

Science

Suppose v is an arbitrary valuation over domain D such that E v = 1 and 3xA(x) v = 1. Then there is some a G D such that A(u) v ( u/a > = 1. Since u does not occur in E, we have £"( u / a ) = E v = 1. By £, A(u) (= B, we /a have B v < u / a ) = 1. Since u does not occur in B, we have Bv = Bv(<^^ ) = 1. Hence E, 3xA(x) f= B. Thus, [1] is proved. [2] is a special case of [1]. □ Remarks ks In the case of (->—) in the above proof we have proved ( IIf f (1) E,-Af=B,

I <

E,-iA^-.B, S,-A^B,

[ then E (= A. v

which expresses the method of indirect proof. In proving (1) we have used the method of indirect proof. It seems that the method of indirect proof is proved by itself. In fact (1) is the method of indirect proof expressed in the object language, while what we have used in proving (1) is the method of indirect proof which takes place in the metalanguage. It is similar for the case of (V—). Definition 5.2.2. (Co (Consistency) E C Form(C) is consistent iff there is no A € Form(C) E | - A and E f- - A . Note that consistency is a syntactical notion. Theorem 5.2.3. (Sc (Soundness) If E is satisfiable, then E is consistent. Proof. Left as an exercise. □

such that

Theorem 5.2.1 is the Soundness Theorem formulated in terms of logical consequence (a semantical notion) and formal deducibility or provability (a syntactical notion). Theorem 5.2.3 is an equivalent version of the Soundness Theorem formulated in terms of satisfiability (a semantical notion) and consistency (a syntactical notion). Theorem 5.2.3 illustrates why in mathematical practice the consistency of a theory is established by exhibiting a model. (A model of a theory, denoted by E, is a valuation satisfying it.)

Soundness and

Completeness

127

Exercises 5.2. tes 5.2.1. Suppose E is finite. Prove "E | - A = > E (= A" from "Every formally provable formula is valid". 5.2.2. E is consistent iff there is some A such that E [/- A. 5.2.3. Theorem 5.2.1 [1] is equivalent to Theorem 5.2.3. Theorem 5.2.1 [2] is equivalent to "Every satisfiable formula is consistent". 5.2.4. Which of the following sets are consistent?

[1] { {* A A ( B - ^ C ) , A - > ( B A C ) , - B H C }

[2] { A - » B , B - * C , C - » C i , C i - > - i A } 5.2.5. E is said to be independent iff for each A e E, E — {A} \f- A. Prove in propositional logic [1] Each finite E has an independent A C E such that A — A for | all A G E . [2] Let E = {Ai, A 2 , A 3 , . . . }. Find an equivalent set A = {Bi,B 2 , B 3 , . . . } (that is, for all z, E — B* and A — A*) such that B n + i — | | | B n but B n \f- B n + i (n > 1).

5.3.

COMPLETENESS OF PROPOSITIONAL LOGIC

The proof of completeness of propositional logic, based on the truth table method, was first made by Post in 1921. Since then a number of different proofs have been published. The proof mentioned here is an adap tation to propositional logic of the method used by Henkin in proving the completeness of first-order logic. We begin with the notion of a maximal consistent set (of formulas) and some of its properties. "Consistency" and "consistent" will sometimes be abbreviated as "consis", and "maximal consistency" and "maximal consitent" abbreviated as "max consis". Definition 5.3.1. (Maximal cons' mat consistency) E C Form(Cp) is maximal consistent iff {£?) [1] E is consistent. [2] For any A e Form(Cp) ) s <&) such that A 0 E, E U {A} is inconsistent.

128

Mathematical Logic for Computer

Science

[2] in Definition 5.3.1 is equivalent to "there is no consistent set which contains E as a proper subset". Lemma 5.3.2. Suppose E is maximal consistent. Then A G E iff E — A. | Proof. If A G E, then E — A by (e). For the converse, suppose E ( A | — and A 0 E. Since E is maximal consistent, E U {A} is inconsistent by Definition 5.3.1. Then E — -iA and E is inconsistent, contradicting the | maximal consistency of E. Hence A G E. □ E is said to be closed under formal deducibility if E — A implies A G E. | L e m m a 5.3.3. Suppose E is maximal consistent. Then [1] -.A G E iff A g E. [2] A A B G E iff A G E and B G E. [3] A V B G E iff A G E or B G E. [4] A -► B G E iff A G E implies B G E. [5] A < B G E iff A G E iff B G E. ► Proof. We will prove [1] and [3]. Proof of [1]. Suppose ->A G E and A G E. By (e) we have E f- A and E f- -»A, that is, E is inconsistent, contradicting the supposition that E is maximal consistent. Hence ->A G E => A 0 E. For the converse, suppose A 0 E and -»A 0 E. Then we have E U {A} is inconsistent.

Eh-A

-.A G E

(by (-,+)).

(by Lem 5.3.2).

**which contradict ->A 0 E. Hence A £ E = > -iA G E. Proof of [3]. By Lemma 5.3.2 and (V+) we have AGE=>Ef-A=^E|-AvB=>AvBGE. IE.
**

B G E = > E | - B = > E | - A V B = > A V B G E E. .

Hence "A G E or B G E" implies A V B G E.

Soundness and Completeness ness

129

For the converse, suppose A V B G E but not "A G E or B G E". Then we have

A,B0E.

i A , -.B G E -.A A i B 6 E E |- -.A A -.B. Eh-(AVB). (by Lem 5.3.3 [1]). (by Lem 5.3.3 [2]).

B E f-AVB

(byAVBGE).

Thus E is inconsistent, contradicting the maximal consistency of E. Hence A V B G E implies "A G E or B G E". □ Lemma 5.3.4. Suppose E is maximal consistent. Then E — -<A if! E y~ A. |

□

Lemma 5.3.5.. (Li (Lindenbaum) Any consistent set of formulas can be extended to some maximal con sistent set. Proof. Suppose E is consistent, and

(1)

Ai,A2,A3,...

is an arbitrary enumeration of Form(Cp). Construct an infinite sequence i{0>). p (£P) as follows (n > 0): of sets E n C Form(C )

(2)

r E0 = E < _ J E n U {A n +i} I

S n +1 =

if E n U {A n +i} is consistent, otherwise.

I En

Then we have (3) E n C E n +i. (4) E n is consistent. where (3) is obvious, and (4) can be proved by induction on n.

A formal language may be nonCp 0 £ countable such that the set of its formulas is non-countable. .. D Note that since the enumeration (1) in the above proof is arbitrary. Therefore E* is maximal consistent.A/3. contradicting (4). Hence E* is consistent. 6<0 . . .. Then £* U {B} is inconsistent because E m C E*.. the E* constructed is not unique. We first prove that E* is consistent. By (2) the set E m U { A m + i } (that is.} (0 <a).Bfc e Eifc and i — max(i\. ) . . . . suppose for every ordinal 8 < /?. A 2 .Bfc} of E* which is inconsistent. . . . . . . Then Up is defined as follows. Then E. By (3) we have { B i . 2 . A i . . For any /? < a. Remarks ks p (and C as well) is countably infinite. (J3 < a) as follows. C E/3 C . t E7 otherwise. . that is. Suppose E* is inconsistent. . We want to prove that E* is the maximal consistent set required in this lemma. Sup pose Bi G E i i v .Bfc} C Ei. 1 . .fc ).i. . . Set E/. 2) Suppose P is a limit ordinal. . . B 0 E n (n = 0 . Set E/9 = f E 7 U {A^} if E 7 U {A 7 } is consistent. . in (1). E^ is defined and consistent. we define increasing consistent sets E 0 C Ei C E 2 C . Suppose B £ E*. {P Beginning with a given consistent set E of formulas. B is a formula. is inconsistent. Then there is some finite subset { B i .. In such case its formulas can be arranged as a well-ordered set (suppose its order-type is a) { A 0 . 1) Suppose P is a successor ordinal 7 + 1.130 Mathematical Logic for Computer Science Suppose E* = ||S neN IN n . . . Set £ 0 = E.. .. say A m +i. E m U {B}) is inconsistent.= [jE«..

Then for every A G Form(Cp). By Lemma 5. Lemma 5. The other cases are left to the reader. Extend E to some maximal consistent set E*. Case of A = ->B. □ Theorem 5. Proof. Readers may refer to books in set theory about them. A' = 1 iff A G E*. Case of A = B V C. v Proof. Suppose E is consistent and A G E.. □ Thus.Soundness and Completeness 131 We define E* P<a u £». Basis. Hence E is satisfied by t. p* = 1 iff pG E*. B AC. E* can be proved to be maximal consistent. Then A G E*.3.6.3. A* = 1.3 [3]) C* = 1 (by ind hyp) . We distinguish five cases: A = ->B.3. B—» C or B <-> C. By induction on the structure of A. (Cor (Completeness) If E is consistent. proved.3. The lemma holds by supposition.6. B VC. Non-count ability and well-ordering are concepts not contained in this book. -iBGE* <=> B g E* 4=> B* = 0 (by Lem 5. the induction step is C G E* (by Lem 5.3. B V C G E* ^ B G S * * or * «=* B* = 1 or 4 = > ( B V C ) ' = 1. A is an atom. Induction step. P) Suppose E* C Form(Cp) is maximal consistent and t is a truth val uation such that for every atom p.7.3 [1]) (by ind hyp) <^=> (-B)* = 1. then E is satisfiable.

3. Suppose A contains distinct atoms p i . Prove by Exercise 5.7.p n and t is a truth valua tion. every tautology is formally provable.3.• • > A n — -<A.8 is equivalent to Theorem 5.132 Mathematical Logic for Computer Science Theorem 5. A* = f Pi tfp' = l> » \ ->Pi otherwise.3. Exercises 5.3. .4.6.3. □ Theorem 5. . . let r p» ifpi. :es 5. Prove by means of normal form that every tautology is formally provable. . . One is formulated in terms of satisfiability and consistency and the other in terms of logical consequence and formal deducibility or provability. then 0 | . [2] is a special case of [1].. (That is. Suppose E is closed under formal deducibility. A 1 .A holds and [1] is proved.3.3 that every tautology is formally provable. { Prove [ljA* = l = * . Hence E | .5. .1. 5. . {Co (Completeness) . then E I|.3.3. Suppose E \= A. Prove that E is maximal consistent iff there is a unique truth valuation t such that E* = 1. . | 5. 5.3. By Theo rem 5. [2] If 0 (= A. A „ | . \-« [1] If E (= A.) Proof.2.3.7. .A. . Prove that E is max imal consistent iff for any A.3.3.A.A .7 and 5. For i = 1 . 5. E contains exactly one of A and -iA. Suppose E C Form(Cp) :is closed under formal deducibility. [2]A* = 0 = > A 1 . .3. . .8. and [2] is equivalent to "Every consistent formula is satisfiable". . n.3. Prove that [1] of Theorem 5. E U {-•A} is inconsistent. Then E U {-»A} is unsatisfiable.8 are equivalent versions of the Completeness Theorem. 5. A. .3. i(£P) 5.

Of course d does not occur in Eo.4. which are sets of terms. 3xA 3 (x). 3xA 2 (x). {E-. we can find some d which does not occur in it. and hence is called Godel's Completeness Theorem. {E-property) Suppose E C Form(C°). the subset of existential formulas of Form(C) is countable. E is said to have the existence property (abbre viated as E-property) iff for every existential formula 3xA(x) in Form(C°). Suppose E C Form(C) and £ is consistent. and Form(C) are proper subsets of Term{C°). The romantype small Latin letter d (with or without subscripts) is used for any one of such new symbols. £ can be extended to some maximal consistent £* C Form(C°) such that E* has the E-property.. Proof. Since Form(C°) is countable. Of course the x's in (1) may or may not be different symbols.4. We will extend the first-order language C without equality to C° by adding to C an infinite sequence of new free variable symbols. Construct an infinite sequence of E n C Form(C°) (n > 0) as follows. . Since 3xAi(x) is finite in length. atoms... and formulas of £° respectively. Let E 0 = E. (E-jyt Definition 5. COMPLETENESS OF FIRST-ORDER LOGIC The Completeness Theorem is the most important and profound the orem of first-order logic. Then Term(C). Now suppose (1) 3xAi(x). Atom(C).Soundness and Completeness 133 5.2. and Form(C°).4. It was first proved by Godel [1930]. Equality will not be treated for the time being. because Eo = E C Form(C). Take the first existential formula 3xAi(x) from (1). Lemma 5. The proof stated here is due to Henkin [1949]. Atom(C°). Form A(d) from A(x) and let E1 = E0U{3xA1(x)->A1(d)}. if 3xA(x) £ E then there is some d such that A(d) £ E.1. . is an arbitrary enumeration of them.

3. Suppose 3xA(x) G Form(C°). 3x Suppose 3xA(x) G E*.3. •••> ^n have been constructed. E° can be extended to some maximal consistent E* C Form(£°). . ' We will prove by induction that £ n (n > 0) is consistent.5 [4]. □ We will use the maximal consistent set E* in Lemma 5. Then we can find some d which does not occur in 3xA n +i(x) nor in E n .134 Mathematical Logic for Computer Science Suppose £o. . E n \. we can always find a fresh d availble for this purpose. Actually T is the same as Term(C°) except that t in Term(C°) is written as t' in T. By (2).Vy(3xA n+ i(x) A .3xA n + i(x) A -.A n +i(d). A ( x ) .3xA n + i(x) A -«3xA n +i(x).> A n + 1 ( d ) } . Suppose E n is consistent but E n + i is not. It can be easily proved that E° is consistent. which contradict the induction hypothesis that E n is consistent. £2.-. So is consistent by supposition.4. E n | .3xA n + i(x) A -n3yA n+ i(y).A n + 1 ( y ) ) . there is some d and k such that 3xA(x) -> A(d) G £& and accordingly (2) 3x. . Hence E* has the E-property.3xA n +i(x) A Vy-. We take the set T = {t'l {t'\teTerm{C°)} to be the domain. E n | . .) Let ^n+ — ^n-\-l 1 — ^ n U { 3 x A n + 1 ( x ) . the maximal consistency of E*. (Since we have an unlimited supply of new symbols and as at each stage only a finite number of them has been used. Let E° = U En. E i .A n+ i(y).(3xA n + i(x) -> A n +i(d)). E n \. Hence En_(-i is consistent. We have the following: E n f.2 to construct a valuation. Finally we will prove that E* has the E-property.5. By nGN Lemma 5. By the above construction of E 0 . E n | . Take 3xA n +i(x) from (1). and Lemma 5.* A ( d ) G E * . we have A(d) G E*. Then a valuation v over domain T is constructed satisfying the following: .

and then (by Lem 5. The conventions stated above will be used throughout this section. . tvV = t7 G T.4. uv = u' G T. For the five cases concerning the > connectives.3. suppose 3xB(x) v = 1. . We have (1) There exists t' G T (that is. Lemma 5. '). we have = t' (2) B(t) v =B(u) v ( u / tV ) = B ^ ) ^ ^ ^ ) .We distinguish seven cases: A = -VB. Lemma t 5. A is an atom F ( t i . or 3xB(x). Proof. tfn) = f ( t i .tny G T . □ Proof.Soundness and Completeness 135 1) For any individual symbol a and free variable symbol u in C and any new free variable symbol d in £ ° . By induction on the structure thisA. Proof. t' n ) G F v iffF(ti.. °). V .. A. an existential formula. . By induction on the structure of t. For the converse. By induction on the structure of t. Av = 1 iff A G E*. .6. □ Lemma A G Form(£°). . .2) (by ind hyp) . In of case the lemma is proved by Basis. For any t G Term(C°).. VxB(x). t'n G T. . € f(ti. T7»__ J_1_ _ J_1_ _ B Induction step.4. Since tv= t' (by Lemma 5. We shall prove the lemma for the case of A = 3xB(x) and leave that of A = VxB(x) to the reader. _ T > distinguish / _ .. a v = a' G T. . . t'n G T.4.. 3) For any n-ary function symbol f and any t' a . In this case the lemma is proved by 2) and Lemma 5. such that B^)** 11 ^') = 1. For any A G Form(C°).4. .. W _We/ _ _ \ B — C.. and d v = d' G T. t G Term(C°).. t n ) ... _ For any G Term(C°).3)... Form B(t) from B(x). □ Proof.vV = 1 iff A G E*. where u does not occur in B(x). P ^ . tv = t' G T.3. The conventions stated above will be used throughout this section.. t n ) . the proof is exactly the same as that for Lemma 5. t G Term{£°)).i ' e :eT. t = structure of t. .3. Form B(u) from B(x). . For any By induction on vthe t' G T. B A C..4. B A C.. .4.4. •B V C. . For any 5. B V C. B <-» C.l _ _ T > seven cases: dA = -VB.4. . Lemma 5. 2) For any n-ary relation symbol F and any t[. \ .. we have the following: Since A is an existential formula.3.tn)€E*. on the structure of A.4. . we have the following: 3xB(x) G E* => B(d) G E* for some d => B(d) v = 1 =► = * 3xB(x) v = 1. ( t i .

(Completeness) Suppose E C Form(C).4. A is formally provable. Since T is countably infinite.4. If E is consistent. then E (.6. Hence if A is valid. Hence if E |= A.4.4.4.A.136 Mathematical Logic for Computer Science 3xB(x) v = 1 = * There exists t' G T. E" = 1 implies AvV = 1.A. Theorem 5.5 and 5. Henkin [1949] extended E to uncountable sets. such that B ( u ) v ( u / t / ) = 1 =>B(tr = l = » B(t) G E* => E* h B(t) = » E* h 3xB(x) = > 3xB(x) G E* (by Lem 5.A. E is countable. every valid formula is formally provable. (That is.4.6 can be stated more precisely as follows. Q Theorem 5.4. Theorems 5. {d (Completeness) If E is consistent. (C.5. then E is satisfiable. (Cc (Completeness) [1] If E |= A in a countably infinite domain. □ (by(2)) (by ind hyp) (by (1)) Thus the induction step is proved. E is satisfiable.6. Then [1] If E (= A. then E | . then E is satisfiable in a countably infinite domain.3. □ . Hence if E is consistent.5. then E |.) □ According to Godel [1930]. [2] If A is valid in a countably infinite domain. Theorem 5.2).A. [2] If 0 |= A.4. E |= A is said to hold in domain D if for every valuation v over D.4.2 and 5. □ Theorem 5. then 0 f. By Lemmas 5. Proof. then A is formally prov able. {Co (Completeness) Suppose E C Form(C) and A G Form(C).

Let X = {u « v}. ~ is an equivalence relation. t 2 . where u and v are different free variable symbols. For instance. We have t ~ ti iff t = ti. The proof is left to the reader. Suppose ti and t 2 are different terms. ti ~ t 2 => t 2 ~ t i . 2/ 2 iff ti«t26E*. By 2)-4). Hence E can be extended to maximal consistent E*. however. We define a binary relation ~ on Term(C°) by 1) t i ~ t C2 iff 22 ti«t2€E*. By 1) we can prove that for any t i . ti ~ t 2 and t 2 ~ t3 = > ti ~ t3. 2) 3) 4) ti ~ t i . COMPLETENESS OF FIRST-ORDER LOGIC WITH EQUALITY As mentioned in the last section. Hence 2) is not available for proving the completeness of first-order logic with equality. and then u « v G E*. E is consistent. if the relation symbol in 2) were the equality symbol. t3 G Term(C°). t[ ^ t 2 . For every t G Term(C°).Soundness and Completeness 137 ks Remarks In the construction of the valuation v. Thus (1) may be false. Obviously E is satisfiable. it may be true that ti « t 2 G E*. that is. 5. we first extend a given consistent E C Form(C) to some maximal consistent E* C Form(C°) such that E* has the E-property. suppose ti = u and t 2 = v.) the . Since E* is con structed before v. By Soundness Theorem. ^-equivalence class of t is t = {ti G Term(C°)\ t ~ t i } .1. the requirement would be (1) t i = t . Then u' ^ v'. the equality symbol is contained in C and C°.5. We will still let T = {t'| t G Term(C°)}. In this section.(See Section 1.

n ) . n). . . . G 12) For any t x .. . t n ) G T. . . t ° ) G £ * . . . . .. . then 6) 7) 8) F ( t ! . . where t» may be (by 8)) any member of t^ (i = 1 . .. . .. We will explain why tf may be any member of ti (i = 1. n). . Then we have 5) 0 < \T\ < \T\. . . . . The converse will be proved similarly. . 13) For any t i . . .. . n) in 12) and 13). t n G T. . . . We have 9) E 2J E** h F ( t ! . .2. By the supposition t» ~ t°. We want to prove that if U ~ t° (z = 1. f f( We shall prove 6) and leave the proof of 7) and 8) to the reader. t x = t 2 ) iff t x « t 2 G E*. . . . . dv = d G T. . . because T is countably infinite. . t n ) .. . . . t n G T. . . ff<( t ! .138 Mathematical Logic for Computer Science Let T={i\teTerm{C°)}.t i « t ? (i = l . Now we use E* to construct a valuation v over domain T satsifying the following: 11) av = a e T. t n ) G E * iff F ( t ? . . . By 9) and 10) we have £* \. . . uv = u G T. where ti and t 2 may be (by 7)) any member of ti and t 2 respectively. . . .. . . F and f are any n-ary relation symbol and function symbol. t i « t 2 e E ** iff t J ^ t ^ G E * . . t°) and accordingly F ( t f . For any t i .F ( t f . . . t n ) = f ( t a . . . . f ( t i . .2. Suppose F ( t i . Thus T is (non-empty) finite or countably infinite. . and by 1) and the maximal consistency of E* we have 10) E* | . .. t n ) . . ( t a . . . . where U may be (by 6)) any member of t* (i = 1 .f ( t ? . t n ) G E*. . . (ti. t n ) G Fv iff F ( t i . t 2 G T. t°) G £*. ')}• 2(£°)}. t ° ) . t2> ^ ^ v (that is. . . t n ) G E*. . . n). .

A.5. . v For any t G Term(C°).. then E is satisfiable in a countably infinite domain or in some finite domain. (C<(Completeness) I. [1] If E |= A in a countably infinite domain and in every finite domain.4. then E is satisfiable. then E | . £°)..t 2 ) € &v (that is. Theorem 5.. If E is consistent.h'<AvV = 1 iff A G E*. □ Theorem 5. we have (ti. then A is formally provable. t[ and t'2 are different individuals in T).4.2. For any A G Form(C°).5.Soundness and Completeness 139 Suppose t° € t* (z = 1. (Cc (Co (Completeness) Suppose E C Form(C) and A G Form(C) with C being the first-order language with equality..ti = t 2 ) «=> ti ~ t 2 ^ = > t i « t 2 € E*.4. when ti « t 2 G E*. given any t i . then A is formally provable. Hence t^ may be any member of t^ in 12) and 13). Hence if E is consistent. yet since ti ~ t 2 . t 2 G T.A. ti and t 2 are the same individual in T. z°).t°). This means. where C is the first-order language with equal ity. althought ti and t 2 may be different members in Term (C°) (that is. Hence if E (= A. D . □ Since the domain T for valuation v is countably infinite or finite.. ra). 2 . .. we have the following completeness theorem for first-order logic with equality. Hence if A is valid.tn)=f(tf. Analogous to the proof of Lemma 5. (Cc Suppose E C Form(C). . tttvV = t e T.) . for the equality symbol « .then E | . and accordingly 6)-8) and f(ti. Since ~ is an equivalence relation on Term(C°). Then we have t* ~ t°. U Lemma 5. hence. = :°). .5.5.. KV :°) A _ h Proof. Lemma 5.3. °). [2] If A is valid in a countably infinite domain and in every finite domain.1..

Suppose each rule in the system other than (R) has either a certain property (if it generates schemes of formal deducibility directly) or preserves this property (if it generates schemes from given ones). have the property that there is at most one formula in the premises.Bh A there are two formulas in the premises. Then the result | 0 f. This gives a general method of an independence proof. Hence F(u) — F(u) does not have the property 1). Hence the requirement of independence is more of aesthetic sig nificance than necessity.A(u) implies 0 (.VxA(x). Hence (+) is independent.A holds. 0 f. For instance. It is easy to see that each rule other than (Ref) has or perserves the following property: 1) Suppose E — A occurs in the rule. Suppose (+) is deleted. and accordingly (Ref) is inde | pendent. the only two rules (Ref) and ( « +). .6. Case of (+). We prove the independence of the rules of formal deduction of first-order logic as follows. But in the case of F(u) — | F(u).140 Mathematical Logic for Computer Science 5. and a dependent one is redundant. Hence they preserve the above property. (V+) preserves this pro perty because 0 |. But in the scheme A. | Then E — A cannot be derived from the remaining rules and accordingly | (R) is independent. INDEPENDENCE A rule of formal deduction is said to be independent iff it is not derivable from the remaining ones. Replace E by 0. Suppose a system of rules of formal deduction are given and (R) is one of them. we may preserve some dependent ones for certain reasons. ( « +) obviously has this property. Case of (Ref). An independent rule is indispensable. In the remaining part. which generate schemes directly. and there is some scheme E — A of this system which does not have this property. The schemes generated by the other rules have the same or a smaller number of formulas in the premises than the given ones.F(u) does not hold becasuse 0 (= F(u) does not hold. Although it seems natural to require each of the rules of formal deduc tion to be independent.

> B .A occurs in the rule. we obtain (A -► B)v = 1 and Av = 11. we shall prove the independence of (->—) and (—>>+) while the rest will be left to the reader. . ^ But here we stipulate that But here we stipulate that A (-A) v = l for A v = l or AvV = 0. ( 0 otherwise. V _ V 7*v If S v = 1. The value of -»A has been defined by 1 ifAA.) Accordingly we have V E v = 1 = > Bv. = . 1. = v ^v Then E v ^ 1. o <-*)•-(»'f 0 otherwise. Case of (-» +). and v is any valuation.) : If E f . then AvV = 1. Then each rule not concerning implication will have or preserve the property 2). we may set AvV = 0 and have (->->A)v = 1 such that 3) does not have the property 2). Case of (-1—). { Then each rule other than (-«—) has or preserves the following property: 2) Suppose £ f.A . Hence (-»—) is independent. We make the stipulation 4) (A->B)v=0 if AV = 1.v = = 0. we suppose E v = 1 => (A -> B)v = 1 and V J S v = 1 ==> Av = 11. This is obvious because this stipulation is concerned only with negation.> . But in the scheme 3) —A h A v .Soundness and Completeness ness ess 141 In the rules concerning the connectives. (If V>tJ = 1. then E | .COI Ev = C( contradict ing 4).B. For the rule ( . E h A.

For (V+): If E — A(u). V we may let AvV = BvV = 1 and have (B -> A)v = 0 such that 5) does not have the property 2).y)) -> Vy(F(x. Then E' — A' holds. Thus each rule other than — (—►+) has or preserves the property 2). then the resulting scheme E — VxA(x) in it after the replacement becomes | E' \.142 Mathematical Logic for Computer Science Hence ( > —) also preserves the property 2). But in the scheme 5) A \.VxA(x). Hence 7) does not have the property 6).y) -» F(x. | | This is because the above replacement of A by A' is not involved in such a rule. But the scheme 7) after replacement becomes Vx(F(x) -> F(x)) \. then A' = Vx[Vy(F(x. Suppose A' results from A by replacing each segment VxB in A by Vx(B -> B).F(u) which does not hold because Vx(F(x) -> F(x)) |= F(u) does not hold. Then each rule not concerning V has or preserves the following property: 6) Suppose E — A occurs in the rule. Hence (V+) preserves the property 6). For instance. Case of (V—).Vx(A(x)' -► A(x) / ) which obviously holds. Suppose S' = {A' | A G S } . which proves the independence of (V—). Thus each rule other than (V—) has or preserves the property 6). u not occurring in E. Hence (-»+) is independent.y) -> F(x.y).B -+ A u . VxF(x) \. | E f.F(u) . if A = VxyF(x.y))].

8).» u « v | . Hence 8) does not have the property 6) and accordingly («—) is independent. The independence of ( « +) can be proved in a similar way with suitable modifications. and (3+) can be proved in a similar way as that for (V—). u « v f .A -» B) -> ((-A -> -. which form an adequate set of con nectives (see Section 2. But the scheme 8) after replacement becomes F(u). Now we turn to consider the independence of the axioms in the system of formal deducibility of another type described in Chapter 4.» u « uu which obviously holds. Suppose A' results from A by replacing each atom ti « t2 in A by t i r>i t2 — t\ tt t2 y and suppose £ ' = {A'| A e £ } . u « v . we will consider the subsystem of propositional logic based upon negation and implication. with suitable modifications. The three axioms are: (Axl) (Ax2) (Ax3) A -> (B -> A) (A -+ (B -+ C)) -+ ((A -> B) -> (A -» C)) (-. (3—). Then each rule other than (~ —) has or preserves the property 6).B) -> A) F F( ( u ) .Soundness and Completeness less 143 The independence of (V+). For simplicity. essentially in an analogous way.F ( v ) and the one rule of inference is (Rl) From A -» B and A infer B. Then each rule which does not concern the equality symbol has or preserves the property 6).F(v) which does not hold because F(u). ( ~ + ) after replacement becomes 0 | . .u « u . They will be proved. Case of ( « —).* u « v f = F(v) does not hold. u « v .

C in it. New "truth tables" for negation and implication are then stipulated as follows: — > 0 0 2 0 1 2 2 0 2 2 0 0 -. 2 assigned to A.) But if 0 and 1 are assigned to A and B respectively. 1. (Axl) will have the value 2. . more values are adopted instead of the original truth and falsehood. according to these tables. 2. Hence (Axl) does not have the property 9). 2 0 0 0 1 2 It can be verified that. (Ax2) and (Ax3) have the following property: 9) The whole formula always has the value 0 for any values of 0. and (Rl) preserves this property.144 Mathematical Logic for Computer Science The truth table of implication: A 1 1 0 0 B 1 0 1 0 A->B 1 0 1 1 can be written in a simpler form and combined with the truth table of negation as follows: -> 1 0 1 1 1 0 0 1 0 1 For the proof of independence. which proves its independence. which are not intended to denote truth or falsehood. Here four values 0. (The verification is left to the reader. 1. B. and 3 are adopted.

respectively. 5. For the independence of (Ax3). (The verification is left to the reader. Hence (Ax2) is independent. (The verification is left to the reader. Hence (Ax3) is independent. to A and B. 5.Soundness and Completeness eness ess ss 145 For the independence of (Ax2). 2 are assigned.) But (Ax3) will have the value 1 when 1 and 0 are assigned. we construct the following truth tables: -> 0 1 0 0 0 1 1 0 —1 0 0 according to which (Axl) and (Ax2) have the property 9).6. to A. according to which (Axl) and (Ax3) have the property 9).6.6. the following truth tables: ->• 0 1 2 3 0 0 0 0 0 1 1 0 0 0 2 1 1 0 0 3 3 0 3 0 3 0 0 0 are constructed. and (Rl) pre serves it.6 of Chapter 2. C. 1. ses Exerciseses I 5. respectively. Prove the independence of the axioms of the following system of propositional logic: . Prove that ("•—) in the rules of formal deduction cannot be replaced by (-»+)> as mentioned in Section 2. and (Rl) preserves it. B.6. ises8 5. Finally the rule (Rl) is independent because no formulas of forms other than those of the axioms can be derived without it. Complete the proof of independence of the rules of formal deduction of first-order logic.2.1.3.) But (Ax2) will have the value 1 when 1.

146 Mathematical Logic for Computer Science Axioms: (1) A -> (B -> A) (2) (A -> (B -> C)) -> ((A -» B) -> (A -> C)) (3) (-IA -> .B ) -> (B -> A) The rule of inference is (Rl). .

1. d 2 .2. and Herbrand's Theorems.6 COMPACTNESS. Proof. Suppose E is satisfiable in any finite domain. □ Corollary 6. .1. If E is inconsistent. d i . Suppose every finite subset of E is satisfiable. V and C are 147 . } be some countable set of new free variable symbols. Hence E is consistent. . COMPACTNESS THEOREM Theorem 6. LowenheimSkolem's. that is. . By the Soundness Theorem. then E is satisfiable in an infinite domain. LOWENHEIM-SKOLEM AND HERBRAND THEOREMS Many important results can be obtained by applying the Soundness and Completeness Theorems.1. every finite subset of E is consistent. then some finite subset of E is inconsistent. If E C Form(C) is satisfiable in any finite domain. (Con (Compactness) E C Form(C) is satisfiable iff every finite subset of E is satisfiable. The converse is obvious. 6. Proof. Let 2? = { d o . By the Completeness Theorem. E is satisfiable. yielding a contradiction.1. among which are Compactness.

for some k. [2] E containing equality is satisfiable iff E is satisfiable in a countably infinite domain or in some finite domain. If for each valuation v over D there is AG E such . 6. In Exercise 6. .148 Mathematical Logic for Computer Science disjoint. The formulas ->(dm « d n ) in E° are satisfiable in any domain with at least k + 1 elements.1. 6. □ es Exerciseses ( 6. then there are B i .2. then Bi V • • • V Bk is valid in D. By the Compactness Theorem. . [1] E not containing equality is satisfiable iff E is satisfiable in a countably infinite domain. . Since d o .1. say. .1.2.2.1.) (Not use 6. .d& do not occur in E. . . the two parts of E° can be satisfied simultaneously by the same valuation over this domain. Bk 6 E such that Bi V • • • V Bk is valid. Then A (= A for some finite A C E . suppose D is finite and delete the supposition that E does not contain equality symbol. Since any finite domain is not available for this case. Any finite subset E° of E' will involve at most d o . Consider the set E' defined by E' = E U {^(dm « d n ) | m< n}. . . E' must be satisfiable in an infinite domain.1. Suppose E |= A. dfc of X>.2.6. 6. LOWENHEIM-SKOLEM'S THEOREM Theorem 6. .1. E' is satisfiable. E is also satisfiable in this domain. Suppose E C Form(C) does not contain equality symbol and D is an infinite domain. By supposition. . Theorem 2. . (Lot (Ldwenheirrt-Skolem) Suppose E C Form(C).2.1.3. that AvV = 1. and so is E. .

Skolem [1920] established the complete proof of the theorem and extended E to countable sets. we use any free variable symbol u not occuring in A or in this procedure.1 was first proved by Lowenheim [1915] for finite E. . but the proof had several gaps. First of all we shall transform a prenex normal form to an 3-free prenex normal form by deleting the existential quantifiers. Lowenheim-Skolem's Theorem can be formulated in terms of validity. . □ Theorem 6.Xn) for y in the matrix of A. [2] A containing equality is valid iff A is valid in a countably infinite domain and in every finite domain. [1] A not containing equality is valid iff A is valid in a countably infinite domain. and substitute f ( x i . In this book only countable sets are considered. If V x i . is called an 3-free prenex normal form of the original formula. . we have to begin with some preliminary definitions and theorems. Suppose 3y is the left most existential quantifier in a prenex normal form A. Lowenheim-Skolem's Theorem will have stronger forms (downward and upward Lowenheim-Skolem Theorems) if sets of any transfinite cardinality are considered.2. Then 3y is deleted. Theorem 6. . □ 6. . we use any n-ary function symbol f not occurring in A or in this procedure.2. The formula. . . Vxn occur in this order on the left of 3y.2. Hence the formal languages and the domain of valuations are at most count ably infinite. When no universal quantifier occurs on the left of Ely. (Lot(Ldewenheim-Skolem) Suppose A G Form(£). which results after deleting all the existential quantifiers in a prenex normal form.Compactness. By the Soundness and Completeness Theorems.3. In order to formulate Herbrand's Theorem. . HERBRAND'S THEOREM Herbrand's Theorem is the basis of one of the approaches of automatic theorem proving in artificial intelligence. Lowenheim-Skolem and Herbrand Theorems 149 Proof. and substitute u for (all occurrences of) y in the matrix of A. .

x 3 ). we may suppose without loss of gener ality A = 3xVy3zB(x.X4). y.xi. Then the 3-free prenex normal form of A is (1) VyB(u. which do not occur in A. x 3 .y 2 .2.y5. f(xi).y. let A = 3yiy2Vxi3y3Vx2x33y4y5Vx4 B(yi. By Theorem 5.1.3. that is. xi.x 2 . for every a £ D.x 4 ) is an 3-free prenex normal form of A. To prove this theorem. v.X2. Use free variable symbols u and v.f(y)) where u and f do not occur in A.h(xi.y. f(y)) v = 1. Suppose (1) is satisfiable by a valuation v over D. Then Vy B(u.x2. unary function symbol f. Theorem 6.y3.z).x3.z) is satisfiable in D.x 3 ). (3) *) 0 B(u. A prenex normal form A is satisfiable in a domain D iff its 3-free prenex normal form is satisfiable in D. hence A is satisfiable iff its 3-free prenex normal form is satisfiable. It may be written simply in the form VxiX2X3X4B'(xi.x 4 ). A is satisfiable in D iff (2) Vy3zB(u.y4.X3.v. Then Vxix2x3X4B(u. x 2 .f(v))^ v / a > := l a) where v does not occur in B(u. We have f(v) v ( v7Q ) := P ( a ) € D. / a) .y. Proof.150 Mathematical Logic for Computer Science For instance. We want to prove that (2) is satisfiable in D iff (1) is satisfiable in D. g(xi.f(y)).1.y.x 2 . and ternary function symbols g and h.

for any formula A. suppose Vy3zB(u. z)v = 1.Compactness.z) v ( v / Q > = l.v. By (5) we have (6) Since (7) f( v ) v '( v / a ) = f ' ( a ) = v w B(u.y.v. (Herbrand unive Suppose A is an 3-free prenex normal form.v. an arbitrary free variable symbol is to be used. ((v/a) = B ( u .f(v)) v. Let v' be any valuation over D such that v1 agrees with v except that P (a) = (3. w ) v . there is some (5 G D such that (5) B(u. v. ( v / a ) ( w / p '(a)) = 1. /> ^*)) > and accordingly VyB(u.3. ( a )) = l. The set {t . y. there does exist such a domain. and function symbols occurring in A. Accordingly 3zB(u. we obtain by (6) and (7) v /v ) v //aa ^ . Hence (1) is satisfiable in D. □ By definition. (If no individual symbol or free variable symbol occurs in A. free variable symbols.w) v '( v / a )( w / r .z) v = 1 and (2) is satisfiable in D.f(v)) v ( v/a'a)) -= 1 > where w does not occur in B(u. | t is a term generated from the individual symbols. for every a G D. For the converse. . rand universe) Definition 6. ^v/a^w/r(Q)). a)) B(u.2. where v and w do not occur in B(u.v. y.v.w) v < v / a >< w/ « = l. v . f(v)).)} is called the Herbrand universe of A and is denoted by HA or simply by H. a formula A is unsatisfiable iff it is false under all valua tions over all domains. Since it is inconvenient and impossible to consider all valuations over all domains. that is.y.v. it would be of great help if we could fix on some special domain such that A is unsatisfiable iff it is false under all valuations over this domain. Indeed. w ) v ( v / a « w / r ( Q ) ) = B(u. which is the Herbrand universe of A. Ldwenheim-Skolem and Herbrand Theorems 151 Since (4) f ( yv v v vv/ /aa)) = f ( aa ) = _ fu( j _ f ( j) (( (v/a)( w / f (Q))j w w( v / a ) ( w / f '( Q ) ) j w« we obtain by (3) and (4) //a _ " B(u. Then Vy3zB(u. z).f(y)) v = 1.

.}. .y)).. ....f(b). f(g(b)). Definition 6. If A = Vx(F(u) A F(b) A F(f(x))). . Similarly for the equality symbol: (ti « t2) v = (ti w t2) v . . any individual symbol. . t'n G H. that is.F(t'ly. . v = F ( t i .f(b). .. t . f(u). If A = Vxy(F(x) V G(x. ( t . (Herbrand valu rand valuation) Given an 3-free prenex normal form A. f(g(u)). » • }• H = {u. b. tn) . suppose A is false under all Herbrand valuations. F ( t i . O G F vw F iff v (tf. then ^ = {u. .. f are. u.f(u). then H = {u}. f(b). 1 that is. '/• If A = Vx(F(f(u)) V G(b. It is obvious that the unsatisfiability of A implies its falsehood under all Herbrand valuations.. .3.g(g(u)).f(f(b))..b.g(g(b)). v satisfies (1) For any n-ary relation symbol F occurring in A and any V t .» * * where a. then H = {u. f(f(u)). f(f(b)). A valuation v over the Herbrand universe if of A is called a Herbrand valuation if it satisfies [1] and [2]: [1] a v = a' G H. free variable symbol. 1 . .f(u). .. T h e o r e m 6... . tn) We want to prove AvV = 1. . g(f(u))..f(f(b)). . Proof.b.3. . .152 Mathematical Logic for Computer Science Example. H [2] For any t' a .•}}.}. respectively.2.3.. G f f .3. . An 3-free prenex normal form A is unsatisfiable iff A is false under all Herbrand valuations.. .4.. where u is an arbitrary free variable symbol. g(u). . uv = u' e H.t^)GF^. .t'n) = f(*i» • • • >*n)' ^H.V Obviously tvv .f(f(u)).. g(b). We construct a Herbrand valuation v such that..3. . there is some valuation v' over domain D such that Avv' = 1 .g(f(b)).3. .f(f(u)). For the converse.. and suppose A is satisfiable..g(x))). besides the conditions in Definition 6... • * 5 v . then If A = Vx(F(f(u)) V G(b. then If A = Vx(F(u) A F(b) A F(f(x))).= t' G H for any Herbrand valuation v and any term t described in Definition 6...g(x))). and n-ary function symbol occurring in A (u may be used arbitrarily in H).

B(t n ). Hence A is unsatisfiable. . where B(x) is quantifier-free. .. . B(t n ) are any finitely many instances of B(x). suppose the given formula is VxB(x).. By the Compactness Theorem. we have (3) B(u) v . (Herbrand) An 3-free prenex normal form V x i . For the converse. . . it is obvious by (1) that Cv =CVt / . where B(x) is quantifier-free. where t i .'(u/t"') t»'(u/f' B ( u ) *(u/t') = B ( u )«<u/t") = B ( t ) W = B(ty' i-V = B(uy'Wt ')►»s = 1. suppose VxB(x) is unsatisfiable.3.. Proof. . / ) = l where u does not occur in B(x) or t. .Xn) be given. we may without loss of generality suppose A = VxB(x). t^ are elements of the Herbrand universe of the given formula.AB(tn). ( u / t . x n ) is unsatisfiable iff there are finitely many instances of the matrix which are unsatisfiable. By an instance of the matrix B ( x i . Lowenheim-Skolem and Herbrand Theorems 153 / For any atom C.Compactness. . If A contains quantifiers. .5. . (H. . Then the satisfiability of VxB(x) implies that of B ( t ) . contradicting the assumption that A is false under all Herbrand valuations.. _ and accordingly AvV = VxB(x)v = 1.. (2) For any quantifier-free A. . > x n ) we mean a formula B ( t i .^' (u/t = 1? = 1. Since B(u) is quantifier-free. t n are any terms such that t[. T h e o r e m 6. x n B ( x i . .. We have VxB(x)hB(t1)A. Take any t' £ H. Hence if there exist finitely many instances of B(x) which are unsatisfiable. . Accordingly. . . □ Suppose an 3-free prenex normal form Vxi.. .' G D. V Thus A = 1 is proved by induction. . Since Av')' = VxB(x)v' = 1. without loss of generality. .. Suppose B(ti). .. we have by (2) and (3): v / \1J . . t n ) obtained from the matrix by substitution. x n B ( x i . VxB(x) is unsatisfiable. the set {B(t)|t'€iJ} . . and any finitely many instances of B(x) are satisfiable. . v . then tv . We may. . . . . V AvV = Av' = 1. . . . .

for any t' G H.Ai A . Since tvV = t'. hence it becomes the basis of one approach of au tomatic theorem proving in artificial intelligence. _ Take any t' G H and u which does not occur in B(x) or t. Sub stitution of terms of higher degree of complexity generates more instances. contradicting the assumption that VxB(x) is unsatisfiable. hence it is more possible that the instances generated are unsatisfiable. The proposition to be proved can be expressed as A i . and accordingly VxB(x)v = 1. D Remarks ks KS Herbrand Theorem reduces the unsatisfiability of VxB(x) to that of finitely many formulas. . Then the proposition is proved. . .4) such that B(t) v = B(t) v ' = 1 by (1). we can construct a Herbrand valuation v (see the proof of Theorem 6. Hence there exist finitely many instances of B(x) which are unsatisfiable. we have v B ( u )*(u/t') = B ( u ) V (u/t") == B(ty ■r--1 1 (t) w = 1?1. and further trans formed into an 3-free prenex normal form. where H is the Herbrand universe of VxB(x). 1) can be transformed into a prenex normal form. there is some valuation vf such that.3. A A n -> A. Since B(t) is quantifier-free. A A n . the question becomes to find a finite number of instances of its matrix which are unsatisfiable.> A). (1) B(t)«' = 1. . . An — A | or equivalently 0 |. Then the question is to prove the unsatisfiability of 1) -<Ai A . . . according to the number of occurrences of function symbols in them. That is. . Such terms can be classified into different degrees of complexity. The generation of instances is to substitute the terms in the Herbrand universe of the 3-free prenex normal form for the bound variable symbols in the matrix. .154 Mathematical Logic for Computer Science of all instances of B(x) is satisfiable. By Herbrand Theo rem. Then the question is to prove the unsatisfiability of an 3-free prenex normal form.

The other is that such unsatisfiable finitely many instances do not exist at all. the above approach is not a decision procedure. that is.Compactness. Lowenheim-Skolem and Herbrand Theorems 155 For each stage before the unsatisfiable finitely many instances are ob tained. The above approach is usually called a semi-decision procedure. and more instances need to be generated. and to give a proof in case it holds. which requires to decide whether the proposition holds or not. Hence. The one is that they have not yet been obtained in that stage. . there are two possibilities. the proposition does not hold.

We choose to introduce constructive logic of the first group and modal logic of the second in this book.7 CONSTRUCTIVE LOGIC Non-classical logics are to be introduced in the present and following chapters. while in proving 1) in the usual interpretation we need not make such a construction. In proving this claim we have to find (construct) some particular prime number which is greater than n. a prime greater than n can be found. This chapter is a brief introduction to constructive logic. For instance. Statements in constructive reasoning are interpreted in a constructive way. there exists a prime greater than n.1. 157 . and the resulting system will be compared with the classical system developed in Chapters 2-5. can be interpreted in the usual sense of "existence". those that rival classical logics and those which extend it. Roughly non-classical logics can be divided into two groups. 7. Constructive logic is the logic for constructive reasoning. or as 2) For any natural number n. CONSTRUCTIVITY OF PROOFS Existential statements in mathematics can be interpreted in different ways. the following statement 1) For any natural number n. The claim by 2) is that a certain construction can be made.

Hence from the constructive point of view. Then p is the required prime. since then ab = 2. (\/2) V2 is either rational or irrational. while the other kind of interpretation and proof mentioned above are nonconstructive.158 Mathematical Logic for Computer Science The prime greater than n can be constructed as follows. Obviously a constructive interpretation conveys more infor mation and a constructive proof requires more effort than a classical and non-constructive one. Let R be a property such that.A holds. certain arguments in classical proofs are not acceptable. The interpretation of 1) as 2) and its proof are constructive. if D is finite. p does not divide n!. One more example to show the distinction between these two kinds of reasoning. . we may take a = b = \/2. A typical example is the proof of the following statement: 3) There are irrational numbers a and b such that ab is rational. A classical proof can be given as follows. The clause "(y/2)'** is either rational or irrational" is an example of the law of excluded middle 4) A or not-A From the classical point of view. from the constructive viewpoint. and find the least prime p which divides n\ + 1. in the second case. we can determine whether it has the property R or not. therefore 4) is not necessarily valid from the constructive viewpoint. we can examine every element of D and either verify A or verify not-A But if D is infinite. In order to prove 5) There is some element in D having the property R. Hence. But a constructive proof of " A or B" consists of specifying a proof of A or a proof of B. Find n\ + 1 from n. Suppose A is "There is some element in D having the property R" and not-A is "Every element in D does not have the property i?". we may take a = (v^) 'y/2 and b = V^2. such verification is no longer possible. hence p is greater than n. In the first case. 4) is valid since one of A and not-. Then. for every element in D. This proof is classical because it does not determine which of the two cases holds and accordingly it does not actually construct the required a and b. the law of excluded middle is not acceptable for infinite sets.

for the convenience of description and notation. not attempt to discuss the philosophical background of these viewpoints. 3. Of course the distinction between the corresponding terms should be kept in mind. What we shall introduce here is due to Kripke. There are various kinds of semantics for constructive logic. atom. Hence the definitions of term. and 5. which is regarded not acceptable. We will. But the case with constructive logic is quite different. In the foregoing we have explained the basic distinction between con structive and classical reasoning.2. But both the semantics and formal deduction for constructive logic are different from those for the classical. In Chapters 2. tautology will be called valid formula and tautological consequence will be called logical consequence.Constructive Logic 159 we may assume every element in D does not have the property R and deduce a contradiction. allows 5) to be deduced from 6). we establish the formal deduction rules which coincide with informal reasoning. however. but not the constructive. truth valuation (denote by t) for Cp was dis tinguished from valuation (denoted by v) for C Prom now on. We will give some intuitive explanations before the definition. The formal deduction rules in constructive logic is obtained by weakening the rule (->—) in classical logic. 7. In classical logics we have an intended interpretation for the formal language and the truth values of formulas. for mula. The semantics of constructive logic is established later. truth valuation will also be called valuation and denoted by v. the classical reasoning. we have 6) Not that every element in D does not have the property R. which is distinct from the classical logic studied in Chapters 2 to 5. In the meantime. and sentence remain unchanged. SEMANTICS The languages for constructive propositional and first-order logic are the same as Cp and C respectively. We first treat semantics for constructive propositional logic. According to the intended in terpretation. which is fairly simple. By reductio ad absurdum. The logic for constructive reasoning is the constructive logic. Then. .

. vV3 = 0. Suppose A is a formula and v is a valuation. but a set of valuations. Now AvV = 1 means that A has been assigned truth by v. Now we come to the definitions of a constructive valuation for Cp.^1 = 0. . Each v G K is called a constructive valuation for CP which is a function with the set of all proposition symbols as domain and {1. Prom v\ we may proceed to v2 or 1/3. it is possible for us some time or other to proceed to v$ and obtain rV5 = 1. (Constructiveive valuation for Cp) Suppose K is a set. But now what determines the value of a formula is not a single valuation._ L = pVln = 1.1. q. qVl'1 =rr. . r are atoms. However.0} as range. Vl Vi Vi . In fact. For instance. . we will not be able to have the value 1 assigned to r. and A may be assigned truth by some valuation occurring later. and hence it is supposed to imply that A will be assigned truth by every v valuation occurring later in the succession of time. In classical logic . In the following diagram: we have written some atom at a valuation v if v assigns the value 1 to this atom. and the value of formulas under such valuations. and v$ precedes v± and V5. and which satisfies the condition that. iV2 = 1. but they are different. From v 3 we may proceed to v4 or v 5 . u* seems to be like V3. We will illustrate the above ideas by an example. The diagram shows that Vi precedes v2 and v 3 . 1} V Suppose v\. They are not identical because qV2 = 0. qV3 = 1. vs are five valuations and p.160 Mathematical Logic for Computer Science In classical logic each valuation determines the value of a formula. for every proposition symbol p and every v1 e K. some of which are regarded as situated in a succession of time. AVV : 0 means that A \ = has not yet been assigned truth by v (but not that A has been assigned falsehood by v). if pv = 1 and vRv'. if we are at V4. We omit it at v if v assigns the value 0 to it. then pv' = 1. But the situation is not the same in the constructive sense. Hence we note that 1 and 0 do not denote truth and falsehood in the constructive sense. AvV = 1 means that A is assigned truth by v and AvV — 0 means that A is assigned falsehood by it. .2. : Definition 7. R is a reflexive and transitive binary relation on K. when we are at V3.

2. The value of formulas under v G K is defined by recursion: [1] p ' G { l . [' P . Definition 7. 1 if for every vf G K such that vRv'. the following. I G vRv'.1. 1 if AV = BW = 1. which consists of a domain D(v) which is peculiar to v and a function (denoted by v) with the set of all non-logical symbols.v' G K and vRv'. in [6]. otherwise. n-ary relation symbol F and function symbol f. free variable symbol u. \ 0 ot v { lif f Remarks Constructively. Each v G K is called a constructive valuation for £. A for every v' € K such that i/ift/. 1v [2] a". (Constructive (Co tive valuation for C) Suppose K and R are given as in Definition 7.2. 0 } . Avv' = Bvv' .Constructive Logic 161 Definition 7.i •Avv' = 0 or not). then D(v) C D(v'). [4] (A -» B) v = { i { 0 [5] {A^B)VB)v = { 1 l1 1 lif fi every vf e K such that viit/. If v.2. [2HAAB)--/1 * » = " ^ ^ 0 otherwise. are satisfied: [1] If v. [l]-[4]. since it clearly appeals to the law of excluded middle in clauses [4]-[6] (for instance. The forthcoming Definition 7. \xv G D(v). then av = a ^ u " = uuV '.2.3.2. f for ft otherwise.2. and free variable symbols as domain such that for any individual symbol a. either for every v'. = 0 otherwise. Now we turn to treat semantics for constructive first-order logic.2. the equality symbol. Definition 7. Av = 1 v implies Bv ' = 1. otherwise otherwise. { [3] (AVB)« = | J {■ 1 if Avv = 1 or Bvv = 1. if A = 1 or B = 1. [6] v(-A) = ( LJ . Avv = 0 .1. 0 otherwise. (Value of for ffc formulas) Suppose K and R are given as in Definition 7.5 and proofs of Soundness and Com pleteness Theorems are also non-constructive. v' G K and vRv'.2 does not work.

v' G K and vi?i/.. [2]-[6] Same as in Definition 7. . [2] f ( t i . (Value of terms) Suppose K and R are given as in Definition 7. t n r = P ( t 5 [ . .2. A(u) v '< u / a ) = 1.>t«>€F«> otherwise. . uv G D. A contains non-logical symbols or free variable symbols not in £). tvV G v v V D(v). if f l1 iii f t j = t 5 . (VaZixe of formulas) Suppose If and ii are given as in Definition 7. If v. .2.).2. The value of terms under v G K is defined by recursion: [1] a v . If v. V 0 Suppose v is a valuation for C. t n J (tl « t 2i)v" = ) v. AfScV occurring 0 otherwise. . 1 if for every v' € K such that vRv\ and for every a G D(v'). K [4] F: D{v)n -> D(i. A(u) v ( u //aa) = 1. The value of formulas under v G K is defined by recursion: [1J * ( t i . \ 0 otherwise. then P = P'\D{v).. Theorem 7. Definition 7. .4. u not if for some a G D(v). A(u) v ( u ) = 1. then t = t '. and v e K.1. u not [8] VxA(x)v = < = { < occurring in A(x). t S ) . . For any t G Term(C).6. V Suppose K and i? are given.1.2. vf G K and vRv'. . . .2. .5. . [7] 2xA(x) 1 (f 1 if for some a G D(v).< ^0 i if<t.>. u not occurring? in A(x). AvV is said to be undefined.162 D Mathematical Logic for Computer Science \n V n [3] Fv C D(v)n.2. .? then Fv c F V C V 2 V « C D(v) . then « C « v ' obviously. If A £ Form(C) (that is. otherwise. D Definition 7. If v.2.v' G K and vifr/. K V ^ ' G K and vRv'. .

K will always be a certain set of valuations and R a reflexive and transitive relation on K. R. Av = 1. iity. r C-validity. (C-satisfiability. satisfiable in the constructive sense). and v £ K such that E v = 1. Suppose K and R are given. Definition 7.8 is also available for E C Form(CC') «and )) p A G Form(C ). FORMAL DEDUCTION The rules of formal deduction for constructive logic differ from those for classical logic only in that the rule (-»—) is replaced in constructive logic . which are constructed respectively from v and v'.Constructive Logic 163 Theorem 7. E is C-satisfiable (that is. h C-logical lity.2. They are not in K. JR.v' G if and vRv\ then A v = 1 implies A v ' = 1. and v G K. 5 E v = 1 implies A v = 1. AvV G {0. Throughout this chapter. E (= A in the constructive sense). t □ a Remarks fcs (1) Theorem 7. > quence) B) conse Suppose E C Form(C) and A G Form(C).1}. p Of course. Definition 7.2. and v G K.7 is to be proved by induction on the structure of A. £ (=c A (that is.7. If v. valuations v(u/a) and i / ( u / a ) . and uv(u/a) _ a a _ uv 7 (u/a) "> we obtain v(u/a)Rvf(u/a)/a) from v-Rt. (2) Since v(n/a) and v'(u/a) may be different respectively from v and v' only when u is valuated. will be used. 7.2.3. but we may regard K to be extended to contain them.'. and v G K. For any A G Form(Cp)P ) lU CP) Z Form(C).8. valid in the constructive sense). In case A is VxB(x) or 3xB(x).). iff for every K.2. iff there are some K. A is C-valid (that is. iff for every K. R.

f. Eh-A.should be replaced by h e hi the rules of formal deduction.B ) -> i A ) . (formally) provable in the constructive sense. Then we can define E |-c A.c A and E |—c ""A. Formal deducibility in constructive logic is denoted by the notation h e Hence f.^A. the constructive systems can be obtained by replacing the axiom (-IA -> B) -> ( ( . (Refer to Chapter 4. E is C-maximal consistent (that is.will be used instead of |—c in the formal proofs for constructive logic.B.A|--B. then H :-) E | . A is called C-formally provable or simply Cprovable. E. and prove that for any E and A. If E h A. A h B .164 Mathematical Logic for Computer Science by the following two weaker rules: (1+) If E . The definition of E |—c A will be omitted. that is. then * E | .A -> (A -> B). and in the formal proofs for constructive logic. But for convenience. Corresponding to the classical axiomatic deduction systems described in Chapter 4. . consistent in the constructive sense) iff there is no A such that E | .) . where (-») signifies that from contradictory premises any conclusion can be deduced. in the schemes of formal deducibility. When 0 f-c A holds. maximal consistent in the construc tive sense) iff E is C-consistent and E U {A} is not C-consistent (or is C-inconsistent) for any A ^ E. E is C-consistent (that is.I A -> S) -> A) by two weaker axioms: (A -> B) -> ((A -+ . E h e A iff E h A.

c A. [24] VxA(x) h e ^3x-.(A V B) H e . [5] A -> B h e -"B -> . But we can adopt in constructive logic all those schemes of formal deducibility of classical logic which are established without the aid of (-«—). [15] A A B h e -1("'A V -.A .A ) .( A A . [19] A A B h e ->(A->->B). E' h e A. [22] -3xA(x) H e Vx-. . [10] 0 h c .B . for any E and A. [17] . then E h e A. [3] If E h e E'.' . [14] -^AV-B h e -i(AAB). [9] 0 h e . then E h e A. then there is some finite E° C E such that E° | . [23] 3xA(x) h e -Vx-iA(x). [12] -.( .' A A .' ( A V .^ B ) .A -> B.A A .3.A(x). [1] If A € E. [6] A -» B h e — A -> -v-iB.B h c . [13] A V B h c .1. [7] If A h e B. The converse of 1) does not hold.^ B h e -»(AAiB). [4] A h e — A ..B. [21] A A .( A .A V B h e A -> B.A(x). [11] 0 h e ->->(-i-A -> A). [18] -.B). then — A h e — B. Theorem 7.A ) . [16] A V B h e .Constructive Logic 165 Since each of the rules of formal deduction for constructive logic holds in classical logic.B h e --A. We shall list in the following theorem an interesting part of them. then -. we have. [2] If E | . 1) E h e A =► E h A. [8] If A h e B.(A A B) H e A -> -. [20] A .c A. 25 3x-A(x) h e -VxA(x). B ) .

1 [2] is analogous to Theorem 2.A -> -»B h e B -> A 0 |-c A V -iA i(-»A A -.1 [1] and [3] are still written as (e) and (Tr) respectively.-.(-iA V -. [1] [2] [3] [4] [5] — A H e -A. .2.6.-i(A o B) H e — A < -. ► -.3 and 7. Theorem 7.2.166 Mathematical Logic for Computer Science Theorem 7.(A A -iB) he A -> B -n(A -» B) h e A A -iB -nVx-nA(x) h e 3xA(x) ^3x-nA(x) h e VxA(x) -A/xA(x) h e 3x-A(x) do not hold. (1) A A B | . B.3.1 is left to the reader.B) h e A A B -i(A A B) h e -»A V -iB -.3.-.-iB. It will be pointed out that the following: iA -> B f-c -'B -> A -.B) he A V B -. — ( A A B) H e — A A -.A(x). The proof of Theo rem 7. For a proof of this.VxA(x) h e Vx-. Although the converse of 1) does not hold. the formal deducibility in classical logic can be translated into constructive logic in certain ways. We shall prove [2] and [5].3.A . -.3.-.B.A -» B h e A V B A->B he ^AVB -i(A->-. The rest are left to the reader.3.3. Proof.B) he A A B -. -ri(A -> B) H e " " A -» -mB. These will be formulated in Theorem 7. L e m m a 7. Proof of [2]. refer to the notion of independence in Section 5.6.7.

1 [3]. i ( A A B). A | .Constructive Logic 167 (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) — ( A A B) h — A . -.B (by (5).-i-JB.i E |— c .1 [5].. -i—'E. (1) (2) (3) (4) 3x-A(x) h -VxA(x) (by Thm 7.Vx-i^A(x) (by Thm 7.-.B. — A A -HB. A then E — A. -i(A A B).. .-.3.3.3. . We distinguish eleven cases for the rules of formal deduction of classical propositional logic.3. -i-i-A | .A A -1-.( A A B).B (by (3).^B (by Thm 7.1 [22]). (6)).A A B.-. A. The converse is | to be proved by induction on the structure of E |—A. (1)).I E ' . -. (8)).1 [8]. (3)). —VxA(x) h Vx—A(x) (by (2).-.3x-«A(x) (by Thm 7. The rest are left to the reader. B f. □ Let -iE = {-A|A G E } . For propositional logic. ^3x-A(x) | .A (by (7). E — A iff -<-iE |~c -"-A.-.1 [25]). B f.c -"--B. Then we have the following theorem due to Glivenko. — A A -. .. For the cases of (Ref) and (+) the converse is obvious. (1). — ( A A B) H — A A -1-. Proof of [5].I A | . — A A -. (11)).A . then . A. B | .I . .B h " " ( A A B) (by (9). -i-i-iA — -i-iB (by supposition).-nVxA(x) f.3.( A A B).( A A B) h . Case of (-1—).-. A h . use finite E' C E). | (2) . — A A — B.i . . — ( A A B) h — A A — B (by (2)).( A A B).(A A B) (by (4)). . T h e o r e m 7.-©.(A A B) h — A . (1)).^ .B (by Thm 7. — A A — B . . | Proof. The proof is as follows: (1) -v-iE. -.B.3. We shall prove If -i-iE. 1-. -. A. —i-1—iA \— c ~~'-■-"B.3. (10)). From among the other cases we choose to prove for that of (->—). It is obvious that if -i-iE |—c ~ .-A A -.

£. (3xA(x))° = -Vx.168 Mathematical Logic for Computer Science (3) (4) (5) (6) (7) (8) A (by Thm 7. . -A h — A -.6. By Theorem 7. -r-iE.S . Proof. The converse ->->A° — c A° is to be proved by induction on the structure of A. called the Godel translation of A.3. (AVB)° = -i(-iA°A-iB°).7. By E° | . EhAifTE0 |-cA°. -. (AAB)°=A°AB°.. (Godel tntranslation) el The Godel translation of formulas of C is defined by recursion: [1] [2] [3] [4] [5] [6] [7] [8] A0 = -. .1 [4] we have A° | .°.. A° H e — A°. there are BJ.-nS.1 [4]). D For first-order logic. (A<->B)°=A° f*B°. B°k e E° such that B.3. AH A °.3. .A)° = nA°. .B2|-AO.5. □ ( □ Theorem 7. (7)). -.. Lemma 7.A°.A h . .c A° we have E° | .3. (-. | .2.. (4). (VxA(x))°=Vx(A(x))°..^ S |.c A° = > E \. .A h — A ^A (by (3)). .A. a formula A is translated into A°. E° Proof.A h — B (by (5).c ->-A. We first prove E° | . -iA — -i-i-iB (analogous to (6)).4. By Theorem 2. (2)). (6)." E ' (by (e)). Then let E° = {A° | A G E}.-.3.□ Lemma 7.A for atom A.-.3. (A->B)° = A°->B°.6. .— A (by ( . Definition 7.+ ) .1 (A(x))°.

6).A.1B° (by (3)).B°) j .A° | .B ° I.Constructive Logic 169 By Lemma 7.A 0 A -. E°.c A° will be proved by induction on the structure of E — A. E°. -iVx-. -. (5) E°.A°(u) (by (1)).C 0 E°.A°(x) h -.A°|-cCo. (3xA(x))° | ~ c B° (that is. | The converse S |.B ° ) h e C°). We shall prove (writing A°(u) for (A(u))°): If E°. (2) E°. (3) E°. We shall prove: If E0.(AVB)° h c C ° (that is.( . . Case of (V—). and (~—)• The rest are left to the reader. . then . . we distinguish seventeen cases.—C° (by (2)).B° (by supposition). A°(u) \.C° (by supposition).-Vx-nA°(x) h e B°). (4)). E°. from among which we shall prove the cases of (V—).C° h -TA° A -.3. (4) ^C° I. AHA°. B° |. E°. . E°. The proof is as follows: (1) E°.) . .A ° A . (3—). Bfc H Bfc. .5 we have Bi H H B. A° (u) | .B°|-cC0.c B°.C° (by Lem 7. .(->A° A . Case of ( 3 .3. The proof is as follows: (1) (2) (3) (4) E°. E°. E°.A ==>• E° | .. -. u not occurring in E° or B°.B ° ) h C° (by (3).Vx-A°(x) (by (2)).B ° h -. then E°. Then we obtain B j .(-. Bfc |. -.B° (by (1)). and accordingly E — A. For the rules of formal deduction of non-constructive | first-order logic with equality.

For propositional logic. We can prove that (*) is equivalent to (**) A°(t 2 ). (6) E°. Exercises 7.(t a « t 2 ) h " " ( t a « t 0 (by Thm 7. (5). (1)).. S° h e (ti « t 2 )° (that is. . A°(t2). >es 7.3.7. (2)). Case of («—).(t1wt2)|-A0(t2). A°(t 2 ). — (ti « t 2 ) h e A°(ti).-. Similarly for the proof of (*) from (**). 7. A°(t 2 ).1.-.3. | | 7. ( t l « t 2 ) h A ° ( t 0 (by (4).. S° h e A°(t a ).3.-. It can be reduced to proving (*) A A°|^ t x ) . Hence we will prove (*) and (**) simultaneously. Prove (*) (simultaneously with (**)) as stated in the case of ( « —) in the proof of Theorem 7. □ The theorems of replaceability of (both logically and syntactically) equivalent formulas hold in constructive logic as well.6).-. then £° h e ->--(t1 « t 2 )).B° (by (4).3.1 [8].3. h -. (5)).2.-.(t 2 « tx) h A ° ( t 0 (by (*)).3. The proof is by induction on the structure of A(ti) and is left to the reader.B 0 h B° (by Lem 7. -. — ( t 1 « t 2 ) h c A ° ( t 2 ) because it can be obtained by (*) and (TV). We shall prove: If E'hcA^ta). Prove for propositional logic ->£ — ->A iff ->£ — c -^A. The proof of (**) from (*) is as follows: (1) (2) (3) (4) (5) (6) A°(t 2 ).3. -.3.(t! » t 2 ) h -""• (t 2 « t 0 (by (3)). let A' be defined as: .-.170 Mathematical Logic for Computer Science (5) -. ti « t t22 h * 2 « t i . -Vx-A°(x) | .

> Case of (->+)• We shall prove: If then E.2. there is some v' € K such that vRv' and Avv' — 1. we shall prove [1] for the cases of (-»+). 7. [2] E h A iff E' h e A'. The rest are left to the reader. Case of (—>>+). and some v G K such that E v = 1 and (A -> B)v = 0. (A V B)' = A' V B'. then E f= c A. Hence E |=c A — B. Bv' = 0. From among the eighteen cases of the rules of formal deduction of constructive first-order logic with equality. that is. and (V+). E | = c -.A H e A'. [1] If E | .1). SOUNDNESS Theorem 7.Ah=c-B. A being V-free.1. Since vRv'. Accord ingly. We shall prove: If then E. [2] if A is C-provable. by Definiton 7. then A is C-valid. (So* (Soundness) Suppose E C Form(C).2.A. Proof. thus yielding a contradiction. It will be proved by induction on the structure of E \-Q A.2.Af=cB.A^cB. (-*)' = ^A'. and let E' = {A' | A G E}. (-H-). (A -> B)' = A' -+ B'.4. [3] If E is C-satisfiable. there are some K and R (see Defini > tion 7. then E is C-consistent. we have E v ' = 1 and then Bv' = 1. (A ^ B)' = A7 <-» B'.4. (AAB)' = A'AB'. E (= c A -> B. Prove [1] -1-. A G Form(C).Constructive Logic 171 (1) (2) (3) (4) (5) (6) A' = -i-iA for atom A. . E. Suppose E ^=c A — B.c A. Only [1] needs to be proved. E and A being V-free.

Hence (p V -<p)v = 0. that is. R.5. [2] E | . v1 is any valuation in K such that vRv\ and a is any member of D(v'). which is a contradiction. COMPLETENESS For simplicity of description we will omit the equality symbol in C. we have (-^p)v = 0. Suppose E v = 1. [4] is the existence property (see Defintiion 5. Hence E \=c VxA(x). 7.172 Mathematical Logic for Computer Science Suppose E \^c "'A. and v G K. E | = c VxA(x). Since vRv1. Accordingly A(\I)V'(U/Q>>a ) = 1 and VxA(x)v = 1. v'} and R be a reflexive and transitive relation on K such that vRv. Suppose p V ->p (p being a proposition symbol) is (Im provable. [3] A V B G E implies A € E or B G E. Hence E |=c -*A.5. Besides that. contradicting the C-validity of p V -»p.1./ and A v ' = 1. ? we have E v = 1 and accordingly B v = 1 and (^B)^ = 1. Then. it is C-valid.3). Then E v = 1. R. then Given any K. Definition 7. Let K = {v.u not occurring in E. there are some K. This is analogous to the case of classical logic treated in Chapter 5. In the above definition. and v G K such that E v = 1 and (-nA)v = 0./ > and v'Rv'. Case of (V+).2.2. D Now we can show that the law of excluded middle does not hold in constructive logic. Since u does not occur in E. Then. . (Strong\g coiconsistency) E C Form(C) is strong consistent iff E satisfies the following: [1] E is C-consistent. [4] 3xA(x) G E implies A(t) G E for some t G Term(C). let pv = 0 and p v / = 1 . Since > pvv' = 1.c A implies A 6 E. there is some v' € K such that vRvf. we have E v '( u / a ) = 1. [2] is the property in which E is closed under C-formal deducibility (refer to Section 5. The completeness of constructive first-order logic with equality can be estab lished with the aid of that of the system without equality. vRvf. and [3] is called the disjunction property.4.1). by the Soundness Theorem. by Definition 7. We shall prove: If E f=c A(u).

We will prove Then E C E'. Afc e E' such that A i . . B n .B2. Form(C') is countable. Obviously. C 2 |Ac A. Ci [Ac A. Let E' = nEN E„ C Form(C').c A. then E n . . [3] If E n . Then there are | A i . B n . Lemma 7. [2] If E n ..) Proof. .Ci ^ En. since only finitely many elements of V occur in E n and B n . B n [Ac A and B n is not a disjunction nor an existential formula. . Ci [Ac A or E n . Construct an infinite sequence of E n C Form(C') as follows where n > 0. E C Form(C) and A € Form(C) such that E [Ac A. . . Then E f can be extended to some E' C Form{CC) such that E' is strong consistent ) and E' [Ac A. if E n . . Suppose C = C U V. then. Suppose E' — c A. . . .Constructive Logic 173 Note that strong consistency should not be confused with maximal con sistency. |J neN (3) En fa A. Suppose (1) Bo. [4] If E n .Bi. To define E n +i from E n we distinguish four cases: [1] If E n . Let Eo = E. Then E C E'.2. (Form(E') is the set of formulas of £'. B n ¥~c A and B n is a disjunction Ci V C2. Afc | ..C2 if ^n. .5. B n . Suppose Ai € E i x . C2 |Ac A. C(d). . we can find some d € P such that d does occur in E n or B n (of course d does not occur in A) and E n . we have E n C E n +i and Obviously. B n .Bn. B n . set E n +i = E n . Set ^n+l _ / ^n>B n . is an arbitrary enumeration of it. C(d) [Ac A. B n h e A. Ajt G .. We will prove E' \/-c A and the strong consistency of E'. we have E n C E n +i and (2) Let E' = | J E n C Form{C'). B n [Ac A and B n is an existential formula 3xC(x). set £71+1 — s n . B n . B n . V being a countable set of new free variable sym bols not in £. Set E n +i = £ n .

Ei can be extended to some E 2 C Form{C2) such that E 2 is strong consistent and E 2 \/-Q A. contradicting (4). Let D{vn) = {t'lt{t'\teTerm(£n)} be the domain of vn. Then A i ? . Therefore. B m \/-Q A.c C -> A and then £ ' | .5. . sets of formulas of £ n and £'. . C \f-c A. are pair wise disjoint. Let Co = £. we have £ ' | .1. c By Lemma 7. contradicting (3). .5.1. and E n C E n + i . (If E m .2. . . and £ ' is strong consistent. are countable sets of new free variable symbols and £. | . we have B m G £ m + i and accordingly C G £'. E 0 can be extended to some Ei C Form(Ci) such that Ei is strong consistent and Ei [Ac A. and E |^c A. contra . U Then Term(Cn) and Term(C') are respectively. Ci V C 2 h e A. (If E m . C | .c A and hence £ ' f-cc A. □ Suppose Do.5. Suppose C G Farm(£f) 0 and £ ' | . P i .c A.c A because E m C £'. Then E m . . sets of terms of £ n and £'. and £ ' satisfies [3] of Definition 7. Suppose Ci VC 2 G £ ' and Ci VC 2 is B m in (1). p p = U -' N neN £ = C u P.c C. P i . (If £'. £n+l=AiUPn(n>0). . By [4] we have C(d) G E m + i for some d G V and C(d) G £'. and £. Let E 0 = E. Suppose 3xC(x) G £ ' and 3xC(x) is B m in (1). Hence Ci G £ ' or C 2 G £'.. ). C | . . E n \/-Q A. Suppose E C Form(C). . 3xC(x) \/-c A. . Accordingly.) By [3] we have Ci G E m + i or C 2 G E m + i . Po. then £'.. . Then £ m . A G Form(C).c A. . Ci VC 2 \/~c A.c A.174 Mathematical Logic for Computer Science £ifc and i = max(ii. we have E'.. P 2 . A* G £ . Similarly. . etc.k dicting (2). Form(Cn) and Form(C') are respectively. P 2 .1. . . B m |—c A. For Cn (n > 0) we construct a valuation vn as follows.) By [2]-[4]. Hence E' satisfies [4] of Definition 7. Then £ m . .i.) Suppose C is B m in the enumeration (1).5. for n > 1. £ ' is C-consistent and satisfies the condition [1] in Definition 7. Hence we have (3). thus contradict ing (3). we have E n C Form(Cn) such that E n is strong consistent..5.1. Ci V C 2 | . Hence £ ' satisfies [2] of Definition 7. Then we have (4) £'. .

ind hyp). Suppose BVa = 1. . B h e C. The conventions described above will be used throughout this section. let (ti. . let fUn (t^. The rest are left to the reader. Since vnRvs. .^2. . That is.. f c ) G F v » iff F ( t i . .. let uVn = u'.t .. ► Then we prove: (B -> C)Vn = 1 = > B -> C G E„. En h e B -> C E n . and tVn = tVs for any s > n.t£. Case of A = B -> C. We first prove: B -> C G E n = > (B -> C)Vn = 1. . We have B -> C G E „ E s h e B ^ C. t*) G E n .. . . C G E5 C° = 1 v (by strong consis of E 5 ).^1.. Then tVn = t' G D(vn) for any t G Terra(£ n ).. Hence if (with its elements) and R satisfy the conditions in Definition 7. t'fc G D(vn). For n > 1.3. . . Suppose B -> C G E n .Constructive Logic 175 For any individual symbol a. (by strong consis of E n ) . we have (B — C) Vn = 1.. Suppose B —• C £ E n .. . Suppose (B -> C) Vn = 1..t fc ) v « = l'iff F ( t i . . from among which we shall choose to deal in detail with the cases of A = B -» C. Lemma 7. S s he C. AVn = 1 iff A G E n . and VxB(x). t f c ) G E n ..-• •} and R be a binary relation on K such that Viiivj iff i < j . Take any vs such that n < s. Let K = {^0. G D(vn). -<B. Then E n C E s . For any fc-ary relation symbol F and any t r . For any fc-ary function symbol f and any t' x . For any free variable symbol u in £ n . Then we have > n).. 3xB(x).2. for any t i . F ( t 1 ? . . Suppose A G Form(C'). .c B. Suppose V{RVJ.3. Fv< C F v ' and P< = I°*\D(vi). . let aVn = a'.. then (B -> C)Vn is not undefined and accordingly B ^ C G Form(£n). (by ind hyp). t f c G Term ( £ n ) . . . . Proof.f • Ob viously we have D(vi) C £>(^). S s | . . By induction on the structure of A. BGES (by Bv* = 1.tky.. .. We distinguish eight cases. Then R is reflexive and transitive. . .5. t'k) = f(ti.

C ^n+i = = BVn+1 Since vnRvn+1.176 Mathematical Logic for Computer Science By Lemma 7. we have (B -> C)Vn = 0. Suppose ( ^ B ) ^ = 1.2.)• Hence 3xB(x) v .= 1 = > 3xB(x) G E n .> --B B En. where tv" G D(yn).B h e . (by B ^ . B^ES 0E S B Vs (by strong consis of E s ). By Lemma 7. u being a free valuable symbol of Cn not occurring in B(x) or t. B^n+1 = 1. We then prove: 3xB(x) v . (by strong consis of E n ) . Suppose 3xB(x) v . Form B(u).= 1. B can be extended to some E n +i C Fo Form(Cn+\) such that £ n + i is strong consistent and E n +i Y~c C. by the induction hypothesis. Then B G E n + i and. B can be extended to some E n +i C Fen Form(Cn+\) such that E n + i is strong consistent (and E n +i Y~c ""B. We first prove: 3xB(x) G E n = * 3xB(x) v . then 3xB(x) Vn is not undefined and accordingly 3xB(x) G Form(Cn). A). Case of A = -»B. Then C ^ En+i. We first prove: ->B G E n = > (-iB) v " = 1. E n . Suppose -iB G S n .= 1. we have (S)B)VnVn = 0. o (by ind hyp and (B -> C) v " not undefined). We have E n Kc ~'B (by strong consis of E n ) . we have B(u)v»<u/t. which is not to be used). contradicting the supposition. contradicting the supposition.. Take any vs such that n < s.n> = B(t) v . E n ^ c B . n+l> Case of A = 3xB(x).2.5. .= 1. 0 G = 1 (by ind hyp and B G E n +i). Since BVn+1 = Vn \ vnRvn+\. we have (->B)Vn = 1.Suppose -iB 0 E n . We then prove: {-^B)Vn = 1 = > --B € E n . (by ind hyp and Bv° not undefined). Suppose 3xB(x) G E n . = 0 Since vnRvs.= 1.B^c-B. E n . then (->B)Vn is not undefined and accordingly -•B G Form(Cn).B ) . We have B(t) G E n B(t) v " = 1 for some t G Term(Cn) (by ind hyp). We have -JB e E s .5.

(by ind hyp and B(t) Va not undefined). Take any t' G D(va). u being free variable symbol of Cs not occurring in B(x) or t. that is. u being free variable symbol of Cn not occurring in B(x) or t. B(t) G E 5 B(t) Vs = 1 (by strong consis of E s ). We have (1) E s. B(t) Vn = 0 (by ind hyp and B(t) v . Form B(u). Suppose VxB(x) 0 E n .)• Then « we have (2) E n \f-c B(d). We first prove: VxB(x) G E n => VxB(x) v . We have E n fa B(t). '71 + . We have E s h e B(t). Then E n \/~c 3xB(x) by the strong consistency of E n . t G Term(Cs). then E n — c VxB(x).) We may regard | E n Q Form(£n+i) 1 ) and VxB(x) G F o r m ( £ n + i ) . Note that d does not occur in E n or in VxB(x) (because E n C Form(Cn) and VxB(x) G Form(Cn)).2. we have VxB(x) G E s and E s |~ c VxB(x). Suppose VxB(x) v . we have B(u) v '( u / t# > = B(u) v ^ u / tVa > = B(t) v * = 1. then VxB(x)Vn is not undefined and accordingly VxB(x) G Form(Cn).not undefined). Since vnRvs. contradicting the supposition. Since tv» = t'. By (2) and Lemma 7. Suppose VxB(x) G E n . Case of A = VxB(x).= 1 => VxB(x) G E n .= 1. Hence 3xB(x) Vn = 0. Since tv° = t'. Since E n C E 5 .Constructive Logic 111 Suppose 3xB(x) ^ E n . we have VxB(x)Vn = 1. Take any t' e D(vn). B(t) £ E n .. (If E n |—c B(d). t G Term(Cn). we have B(u)v*<u/t'> = B(u) v *( u / tV ") = B(t) v . Take some d G Vn. Then we prove: VxB(x) v . Form B(u).= 1. Take any vs such that n < s. and that B(d) G Form(Cn+1) ) and B(d) £ Form(Cn).5. that is. h c V x B ( x ) n by the strong consistency of E n . contradicting (1).= 0.

178 Mathematical Logic for Computer Science E n can be extended to some E n + 2 Q Form(£n+2) consistent and E n + 2 ]/-c B(d).4. □ Theorem 7. then A is C-provable. we have VxB(x)Vn = 0. Suppose E ty-c A. (C. By Lemma 7.2. □ .5. and [2] is proved. Then there is some A G Form(C) such that E Y~c A. where dVn+2 G -D(t>n+2). [1] If E is C-consistent. contra dicting the supposition. By Ei \/-c A we have A £ E x . We have proved above Ei \/-c A and E Vl = 1. We have B G E x .c A. [2] If E \=c A. then E j . Then we obtain such that E n + 2 is strong B(d) £ E n + 2 . B(d) V n + 2 ( d / d V n + 2 ) = B(d) Vn+2 = 0. Since E Vl = 1 and AVli = 0. E can be extended to some Ei C Form(C\) such that Ei is strong consistent and Ei ty-c A.3. Hence E Vl = 1 and E is C-satisfiable. BV1 = 1. and then AVl = 0. Suppose E is C-consistent.5.5. by Lemma 7. then E is C-satisfiable. [3] If A is C-valid.(Completeness) Suppose E C Form(C) and A G Form(C). Take any B G E. Since vnRvn+2.5. Then [1] is proved. We need to prove [1] and [2] only. By Lemma 7. B(d) Vn+2 = 0 (by ind hyp and B(d)v»+2 not undefined). Proof. we have E ^ c A.3.

Given any proposition A. Given any proposition A. This proposition will be true when A is necessary. Necessity and possibility are basic modal notions. distinguish propositions which are necessarily true from those which -are not. unlike negation. In classical logic. and necessarily false propositions are said to be impossible. But in modal logic we shall. propositions are either true or false.. Propositions which are not impossible are said to be possible. and among false propositions. 8 1 MODAL PROPOSITIONAL LANGUAGE . We shall study modal propositional logic in the present chapter and modal first-order logic in the next one. it is not truth179 . Propositions with and without modal notions are of different kinds. distinguish necessarily false propositions from those which are not. Necessity is a unary modal operator which can be applied on a proposition to form a new one. we can form the proposition UA is necessary". hence modal and non-modal logics are differ ent as well. but. Necessarily true propositions are said to be necessary. and false when A is not. Necessity and possibility are modal notions.8 MODAL PROPOSITIONAL LOGIC Modal logic is the logic of modal notions. In this sense it seems to be like negation. we can form the propositions " A is necessary" and " A is possible". Hence possible propositions include all true propositions (necessary or not). among true propositions. which means that it is necessary to have A.

Then the modal propositional language C1™ is obtained by adding L to the propositional language Cp. According to Chang and . FormiC^).')• The set Form(Cp7n)l ) of formulas of £ p m is the smallest set of expressions of Cprn closed under the following formation rules of formulas of Cprn: [1] Atomic?"1) ') C For. ->. For simplicity of description. This proposition is formed by the unary modal operator possibility. prn [2] If A G Form(£ ). we will use L as the primitive symbol and introduce M by def inition. and <->. which means that it is possible to have A. Modal logic is the logic of necessity and possibility. Modal logic is also classified into classical and constructive systems. yet from the truth of A we can assert neither the truth nor the falsehood of "A is necessary".A).2. 8.').180 Mathematical Logic for Computer Science functional. A world is a conceivable state of affairs. (LA) G Form(CpTn). SEMANTICS Usually the term "world" is used in the discussion of semantics of modal logic. Although from the falsehood of A we can assert the falsehood of "A is necessary". then (-. The set Atom{Cprn) ) of atoms of Cpm is the same as Atom(Cp). Prom the truth of A we can assert the truth of "A is possible". We shall use the roman-type capital Latin letters L M for the necessity and possibility symbols respectively. then (A * B) G Form(Cprn)1 ). ). Since classical model logic receives more attention in the literature. [3] If A. B G Form(Cprn). * being any one of A. Similarly for "A is possible". but from the falsehood of A we can assert neither the truth nor the falsehood of "A is possible". we shall confine ourselves in this book to the discussion of such modal systems only. V. The details of the structure of formulas of £ p m are left to the reader.

Modal Propositional Logic 181 Keisler [1973]. we will use "valuation" instead of "world" in the study of modal logic. /.0} for atom p. Av' = 1.1. Definition 8. we have used "valuation" for interpretation of both the propositional and first-order languages. a necessary proposition is one which is true not only in a certain designated valuation. where p is any > v proposition symbol. the semantics of modal logic is estab lished after formal deduction. V r . Then (LA)V = 1 iff for every valuation v'.0} as range. (p — p)v' = 1. [2] (-A)« = f 1 if A" = 0. Suppose a proposition A is expressed by a formula A. m Since Cpm contains one more symbol L than £ p . The whole set of valuations may be regarded as all those in a certain collection K of valua tions. we consider the formulas p and p — p. As in the case of constructive logic. As explained in Section 7. which is a function with the set of all proposition symbols as domain and {1. 1 J {0 otherwise.2. We begin with some intuitive explanations. According to a familiar and natural idea which is often credited to Leibniz. Suppose v is an arbitrary valuation. value of formulas) Suppose K is a set. ► Therefore the truth value of LA is not determined by a certain des ignated valuation v. x f l if AW = B . { . The formal deduction systems of modal logic are obtained by adding rules concerning necessity and possibility symbols to classical logic. The value of formulas under valuation v G K is defined by recursion: V [1] pv € {1. Therefore. But (L(p -> p)) v = 1 because for every v'. Each element of K is called a valuation for £ p m . Then LA expresses "A is necessary". (Valuation. but in all other possible valuations as well. but by all valuations including v. "world" is synonymous with "interpretation". (A A B)vV = [3] A A B 3 0 otherwise. For instance. \ 0 otherwise. Then we have the following definitions.v = 1. the valuation for CpTn will be constructed by adding the valuation for L to that for Cp.2. Then we have (Lp) = 0 because there is some v' such that p v ' = 0.

Av' = 1. Definition 8.1. A G Farm(Oym).2. val validity) prn Suppose E C Form(C ). ).2. [6] (A*»Br = [7] (LA)" = { * {.3. Avv' = 1. | 0 0 otherwise. 1 if f A v = B v . E is satisfiable iff there are some set K of valuations. and every v G K. [5](A->B)» = { 1 V ( 1 if Av = 0 orB" = 1. formulas) Suppose if is a set and R is an equivalence relation on K. Kty. AvV = 1 in the sense of Definition 8.3.1.2.2. Definition 8. Av = 1 in the sense of Definition 8.2. ' for every vf G K such that vRv'. (Satisfiability. (Valuation.3. val Suppose E C Form(Cpm). value of for 971. otherwise. E is satisfiable iff there are some set if of valuations and some v G K such that £ v = 1 in the sense of Definition 8. A G F o r m ( £ ^ n ) . ).4. The value of formulas under valuation v G K is defined by recursion: [l]-[6] Same as in Definition 8. i { J otherwise. A is valid iff for every set K of valuations. every equivalence relation R on K. Each element of K is called a valuation for Cprn as in Definition 8. and some v G K such that E v = 1 in the sense of Defini tion 8. validity) llity. * n . A is valid iff for every set K of valuations and every v G K. otherwise.2. 0 if for every v' G K. {0 Definition 8. "><">-{.1. some equivalence relation Ron K.2. We will define valuation and value of formulas in another form.2.182 Mathematical Logic for Computer Science [4] (A V B)v = | { 1 0 if Av = 1 orB v = 1. otherwise.2.2. (Satisfiability.2.1.2.£ Then we formulate the following definition which is equivalent to Defi nition 8.

The valuation. Let R be a binary relation on K such that for any v.2 iff E is satisfiable in the sense of Definition 8. Then we have some K.2. Hence E is satisfiable in the sense of Definition 8. and validity in S5 are called S5-valuation. v' G K. some equivalence relation Ron K. Suppose E is satisfiable in the sense of Definition 8.2 iff A is valid in the sense of Definition 8.2. Suppose E C Form(Cprn)n) and A G Form(Cpm). Then R is an equivalence relation on K.5.2.2.2. [2] A is valid in the sense of Definition 8. Then v G K'.3.2.2.2. while Defini tion 8. [2] can be proved in a similar way.1. Other systems of modal propositional logic can be constructed by mod ifying the requirements of the relation R on K.4.2.2 is not. For the converse.2. Let K' = {v'\ vRv'}. Proof.3. R may be merely reflexive.4. vRv'. [1] E is satisfiable in the sense of Definition 8. sat isfiability. □ The distinction between the two equivalent definitions is that Defini tion 8. The various systems of modal propositional logic thus obtained are listed as follows: Modal propositional logic T Requirements of R reflexive reflexive and transitive reflexive and symmetric equivalence relation s4 B s5 . or reflexive and symmetric.2. we have E v = 1 in the sense of Definition 8.2.2.2. or reflexive and transitive.2.2. Hence E is satisfiable in the sense of Definition 8. £5-satisfiability. suppose E is satisfiable in the sense of Definition 8. We shall first prove [1].Modal Propositional Logic 183 Theorem 8.4. By K' and v. and S5-validity. Then we have some set K of valuations and some v G K such that E v = 1 in the sense of Definition 8.1.4 is concerned with an equivalence relation R on K. For instance. It is easy to prove that E v = 1 in the sense of Definition 8. and some v G K such that E v = 1 in the sense of Definition 8. The system of modal propositional logic corresponding with the seman tics formulated in the above definitions is called S5.4.2.

and L . nor is it implied by. or EN. and both S4 and B are stronger than T. We use the notations [=T. The reader is refered to Hughes and Cresswell [1968] for the names and historical notes of the systems of modal logic. Obviously we have the following statements: A is T-valid ==> A is B-valid J ) = > A is Ss-valid. and T (S4 . every . Then we have the notions of T (S4.2.184 Mathematical Logic for Computer Science Note that B is here a system of modal propositional logic due to Brouwer. E |=g5 A is defined as follows: E \=s5 A iff for every set K of Ss-valuations and every v E K. B)-valuation. Logical consequence in these modal systems is defined as in the classical systems (in Chapters 2 and 3) with suitable modifications.5 A E (=s iff for every set K of Ss-valuations. Then we have ( I Hence S5 is a stronger system than both S4 and B. every iff for every set K of Ss-valuations. E f=T A. a equivalence relation R on K. (=s4? f=B> |=S 5 for them. E of Definition 8.B)-validity.1. L in S5 is a stronger notion than that in S4 and B. Bvalidity (B-satisfiability). E (=s4 A. and E (=B A are defined in a similar way with modifi cations of the requirements of R. E is c {i E is S4-satisfiable 1 E is B-satisfiable J I But S4-validity ^-satisfiability) does not imply.2. { { A is S4-valid 1 E is Ss-satisfiable = > => E j T-satisfiable.en< R on K. For instance. B)-satisfiability.3. E'vV = 1 = > AvV = 1 in the sense of Definition 8. T (S±. Their definitions are left to the reader. and every v v(EK.) E v = 1 = > AAv = 11 in the sense v < K.

Then A f=j A'. Of the modal systems mentioned above.6 holds in each of the systems T. because (LA)V = 1 signifies in S5 that Av / = 1 for every v' G K. □ Theorem 8. the semantics for S5 seems to be the most natural. for the case of A = LAi. 8. The crucial step is to prove. (Replaceability ty of equivalentit for formulas) Suppose B | = | C and A' results from A by replacing some (not neces sarily all) occurrences of B in A by C. By induction on the structure of A. inspired the semantics for constructive logic. Kripke [1965] stated that the semantics for modal logic. The proof is left to the reader. FORMAL DEDUCTION To define formal deducibility for the modal systems. But S4 has important applications in temporal logic.3. For the rela tions between modal and constructive logic. nor is B stronger than S4. The six rules concerning L and M are formulated as follows: . Proof. B. Ax H A'i = * LAx H LA'j. Theorem 8. (See Manna [1982]. another modal symbol M will be introduced.Modal Propositional Logic 185 in S 4 and B is stronger than that in T.) The semantics presented in the foregoing is due to Kripke. together with the known mappings of construc tive logic into the modal system S4.2. Each of these modal systems contains all the eleven rules of non-modal propositional logic and some additional rules concerning the modal symbols.2. we need to intro duce the rules of formal deduction for them.6. S4. The formula (MA) which is formed by means of M is defined to be (-<(L(->A))). and S5. But S4 is not stronger than B. The formulas (MA) and (->(L(->A))) may be abbreviated as MA and ->L->A. Firstly.

then 0 — LA.MA. ■ and those of T(S^ S5. and (L+M) are distinct from each other. then E | . The notations |—x. B)-maximal consistency are left to the reader.> B ) . | | The definitions of E | . We will assert in advance that both (L+L) and (LM+) hold in S 5 . T(54. B)-formal provability. E h LA. B)-consistency.A.LMA. E \-$s5 A. | (L-elimination) (->-(L)) I If f E | .T A. and (LM+) respectively. then £ — A. | If E | . and T(54.LA.A. then E — LB. h" s45 h~ s5> and |—B are used for formal deducibility in these modal systems. Now we are in a position to give the rules of formal deduction contained in these modal systems. then E — LLA. ( » — (L)). in the scope ofL) (L+) (L(L-introduction) (L+L) (L-introduction (L- to L) (L+M) (L-introduction to M) (LM+) (LM-introduction) (LM- It should be pointed out that (—>—(L)) is distinct from (-»—).186 Mathematical Logic for Computer Science (L-) If £ h LA. First. nor does (LM+) hold in S4. 5 . the premise in (L+) must be empty. ( If E |. and B contain. S5. (L+M). and E | . Then S4.LMA. but that (L+L) does not hold in B. (| (-^-elimination If 0 | . Ss. Besides. in addition to the rules of T. the weakest system T contains the three rules (L—). then E | . and that the three L-introduction rules (L+).L ( A .55. (L+L). (L+L). If E | .B A. and (L+) in addition to the eleven rules of non—• modal propositional logic. E |~s 4 A. Hence we have But E — s4 A does not imply and is not implied by E — B A.

(Thaf'is. or \-B to indicate the system in which the theorems hold. (2) L(A A B) \. (2)). Theorem 2.T LB.LA. LA | . L(B -> A). 0 | .) .3. LB (by Thm 8..T LA +» LB. and [6]. we will write h~T.. \~s4> \~s5. (1) A A B | . L(A -> B). 0 h L(A -> B) (by (L+).LAn |—x LA.A (by ( L . . (1) (2) (3) L-. LA | .2 also holds in modal logics.An|-TA. ( 5 ) ) .L(A -> B). (6) L A f . L ..LA A LB. A h -nL-A (by (2)). . B.) Proof of [6]. Proof of [4]. - Proof. A (. A \-T MA. ( 4 ) . then LA |—|T LB.L B ( b y ( .B (by supposition).A | .. K If A H T B .3.A h ..( L ) ) . (3) L(A A B) \. (1)).A -»• B. The rest are left to the reader. then LA | . then LAi. (1)). [1] [2] [3] [4] [5] [6] [7] IfAhrB. Proof of [1].1.A . L(A A B) H'T Li A LB. But we may omit "T" " S 4 ' \ "S 5 ". We shall prove [1].6. and "B" in the proofs if no confusion will arise.> .LA. L(B -> A) | .1 [1].Modal Propositional Logic 187 In the following theorems concerning formal deducibility.. [4]. Theorem 8.MA. (1) (2) (3) (4) (5) A \.. IfAi.L-nA. H LA L(A <> B) H T L(A -> B).

A. Proof of [1]. = ^ L A 1 H T L A / **!> 1/. L(A A B) H LA A LB (by (3).LA.L(A A B) (by Thm 8. H — L — A (by Rep eq.1 [3]. ML-. LB |.A A B. Proof.3. LLA H T -MM-A.) . (Replaceability of equivalent ility ntfo formulas) Suppose B |—|T C and A' results from A by replacing some (not neces sarily all) occurrences of B in A by C. LA A LB h L(A A B) (by (Tr). T M-nA I—)T -LA. H T ILL-IA. LA H -M-iA. (1) LA H (2) —LA (3) LA H (That -"LA. which has been established by Theorem 8.188 Mathematical inter Science Logic for Computer Sci< (4) (5) (6) (7) (8) A.3.1 [2]. — L . [5] MMA LL-A H T -MMA. Theorem 8. is. A H T -LMA. (6). LA A LB \.3. By induction on the structure of A. A HI -"-A). (7)). IT Proof.3. We choose to prove [1] and [4]. LM-A H TT -MLA. (5)). IT MM^A H TT -LLA. □ For simplicity we shall sometimes write "Rep eq" for the theorems of replaceability of equivalent formulas. and the rest are left to the reader. [1] [2] [3] [4] [6] [7] [8] [9] LA H T -M-.2. The crucial step is to prove A 1 H T A . B |.3. (2)). LB. L-iA H T -MA. Then A |—|T A'. (4)). LA.m A (by (1). □ Theorem 8.

(2) -iL(->A V .Modal Propositional Logic 189 Proof of [4]. M(A A B) |. (5). (4) (5) (6) (7) (8) -.3 [3]). (7)).4 [6]). H T T M(A V B) |—|T MA V MB.A V . LA |.4.A)) H T L-. (1) LLA H -M-. LA.A (by Rep eq. M-(-.( . (3) ->L(-.(-.B ).A.3 [3]).3.A V L--B) |—| . M(A A B) \-T MA A MB.M A V -.MB -> M(A A B) (by Thm 8.A V ->B) (by Thm 8.T B.B ) |.T L(A -> B). I HT L(A ->• -. . (2) -.A V -iB) |.(L-. (3) LLA H . A | .T MB. L-.MB) (by Rep eq). (2)). L(A -> B) f-T MA ->■ MB.3.MA V -MB) I—| MA A MB.-. Thm 8.B ) |—| M(A A B) (by Rep eq).5.M-.3. □ Theorem 8.4 [3]).MB) (by (3).3.-. We choose to prove [7]: (1) L-nA V L . If A | . L(B -> A A B) | . L-.(L->A V L-B) (by (1)).3 [1]).A A B . [1] [2] [3] [4] [5] [6] [7] L(-iA ->■ A) H T LA. D Theorem 8.A V ->B) (by Thm 8.M M .A.MA A MB (by (6). M-.MA V -. LAVLB|-TL(AVB).L(B -»• A A B) (by Thm 8.(-. Proof. then MA |—|T MB.3.(-. [1] [2] [3] [4] [5] [6] [7] ->M(A V B) H T . -.M A A -. E A )—|T B.1 [1].LA H "-MM-.A (by (1). (4)). H T IT H IT T LB.3.3. Proof.A V ->B) |—1 M-.B -► A A B. MB (-T M(A A B). (2)). L-A.3. then MA | .A | . B | .(-.LA (by Thm 8.L(-. (2). T -A IT L(A -»• B) A L(-A -> B) L(A ->• B) A L(A -> ->B) LA \-r L(B -»■ A).MB. We choose to prove [7]: (1) (2) (3) (4) A.

B. □ Theorem 8. Proof. If E |-s 5 A.6. LA H s 5 MLA. LA H s 4 LLA. If E |-s 5 LA.6 [7]). (4)). then S |-s 5 LMA. MA (-Is.7 and 8. [2] MLA (-B A. [1] A |-B LMA. [1] [2] [3] [4] [5] [6] MA |-s 5 LMA.A (by Thm 8.A |—I LMLM-.7.M(A A B) (by (5)). LMA |-s 4 LMLMA. then A |. MLA h s 5 LA. MLMA \-Si MA.3.8. D Theorem 8. then E \-St LLA. LM-iA 1 I -MLA. — LMLM-. LMA.3. (L+L) (LM+) Theorem 8.3. The proof of Theorems 8. We choose to prove [8]: (1) (2) (3) (4) (5) LM-. LMA Hs« LMLMA. (6) LA. -MLA H -MLMLA (by (2). MLA H s 4 MLMLA. MMA |-s 4 MA. MLA |—I MLMLA (by (4)). [3] If MA |.3. Theorem 8. MA |—|s4 MMA. and S5 as well. [1] [2] [3] [4] [5] [6] [7] [8] LA hs 4 LLA.B LB.3.A H -MLMLA. (1).8 is left to the reader. MB |.190 Mathematical Logic for Computer Science (5) LA h MB -^ M(A A B) (by (3). (3)).B B.3.2 holds in S4. .3.

LMA. and 6) is equivalent to 7) in S5. hence 11) 12) MA H LMA. 6) and 7) hold in S5. hold in S4. Therefore S4 can be obtained by adding the rule (L+L) to T. MMA |. which enable us to shorten certain sequences of modal symbols. and S5 can be obtained by adding (L-fM) to T. MA \. 9)-12) are called the reduction laws. and B are obtained by adding axioms and rule of inference about modal sysbols to the .LA. MA |—| MMA. hold in S5.MA.Modal Propositional Logic 191 The following i) 2) 3) 4) hold in T. LA | .LA. S5. S4. In fact. LMA |. but 5) 6) 7) 8) do not hold in T Since 5) and 8) hold in S4. 9) 10) LA H LLA. LA | . 5) is equivalent to 8) in S4. LLA | .LLA.MLA. That certain rules of formal deduction do not hold in certain systems is a problem of independence (see Section 5. MA (.MMA. LA |—I MLA.6). and accordingly hold in S5. MLA (.MA. The axiomatic deduction systems of modal systems T.

4.1. |—|T LA [3] 0 | . 8.T A. in addition to the axioms of T. [2] M(A -► B) h L. SOUNDNESS Theorem 8.3. . and A € Fori Form{Cpm). 8.2.A V MHB V M(A V B). Each of T. A -> LMA.3. and B contains one rule of inference about model symbol: From A infer LA. T contains the following two modal axioms: LA-> A. ses 8. The natural deduction system and axiomatic deduction system of model logic are equivalent to each other. ) [1] If E | . S4.S5. L(A -> B) -> (LA -+ LB). MA -> LMA. [2] 0 (-s 5 L(LA -»• LB) V L(LB -> LA).192 Mathematical Logic for Computer Science axiomatic deduction system of classical propositional Logic (see Section 4.1. Prove [1] L(A -s.T M-. the following model axiom respectively: LA -> LLA. then E ^ T A. Exercises 8. -> MB.B).3.1 of Chapter 4). M(A A C) |-T M(B A C). S^Ss.4. (Soundness of T) pm\ a Suppose E C Form{Cpm)nl ) . and B contain. Prove [1] LA V LB |—|s4 L(LA V LB).

R. Since R is reflexive. Case of (L+). We shall prove: —• If E h r L(A -> B). [3] If E is T-satisfiable. [1] will be proved by induction on the structure of E |—T A. [2] is a special case of [1]. □ . Take any vff G K vv' such that vRv'. we have vRv. i?. Hence E |=x A. Then we have (2) (L(A -> B))v = (LA)V = 1. By (1) we obtain Avv _ 1. Suppose K. and take any v G K.Modal Propositional Logic 193 [2] If A is T-provable. then 0 |= T LA Suppose K. (that is. Take any v' G K such that vRv'. A is T-valid). and v are given as in the previous cases. LA is T-valid).' = 1. Hence (LB)V = 1 and E |= T LB. (—>—(L)). Then we have (1) (LA)" = 1. Suppose E v = 1. [3] follows immediately from [1]. Suppose K is any set of T-valuations. Hence (LA)V = 1 and LA is T-valid. E |= T LB. Then [1] is proved. then E (= T A. Case of (L—). R is any reflexive relation on K. = Case of ( > — (L)). The other cases are the same as in non-modal logic. We shall prove: If E ^T T LA. We shall prove: If 0 t= T A (that is. Since A is T-valid. then E is T-consistent. and v are given as in the case of (L—). and (L+) need to be treated. Proof. we have Ay. E then H=T LA. only the three cases of (L—). Of the fourteen cases of the rules of formal deduction of the system T. By (2) we have (A -> B)v' = Avv' = 1 and ' V * then Bv' = 1. and E v = 1. then A is T-valid.

that is. then E is B-consistent.2.194 Mathematical Logic for Computer Science Theorem 8. (Soundness of S4) pm\ n Suppose E C Form(CpTn) ))<and A G Form{Cprn). [2] If A is Ss-provable.4. then A is B-valid. that is. It will be proved by induction. then E is S4-consistent. As indicated in the proof of Theorem 8.) . (-» . The proof is left to the reader. E f=S6 L-1L-.2. (Soundness of S5) pm\ Suppose E C Form(Cpm) ) and A G Form(Cpm). As in Theorem 8. we prove: If E h s 5 MA (that is.A). Proof. then E |=s 5 LMA (that is.4. Then we have (->L-«A)t. R is any equivalence relation on K. the cases of rules of non-modal logic need not be treated. only [1] needs to be proved.1.B A. □ Theorem 8. Suppose K is any set of Ss-valuations. [3] If E is S5-satisfiable.4. As indicated in the proof of Theorem 8. Proof. □ then is to be proved.4.1.4. . [3] If E is S4-satisfiable. If E H4LA. then E f=B A. and (L+) can be treated as in T with modifications on the requirements of R. [1] If E | . = 1 and (L-A) v = 0.4. [3] If E is B-satisfiable. then E is Ss-consistent. Suppose E v = 1. [1] I f E h s 5 A . then A is S4-valid. E E (=s4 LLA.( L ) ) . E h s 5 -L-.4. then A is Ss-valid. and take any v G K. t h e n S ( = S 5 A .3. (Soundness of B) 'pm\ Suppose E C Form(Cpm) ) and A G Form(Cprn). Theorem 8. we need to prove [1] for the rule (L+M) only. Hence there is some v' G K such that vRvr/ and a) W ' = o. [1] If E h s 4 A.A). [2] If A is S4-provable. [2] If A is B-provable. Hence we need to prove [1] for the rule (L+L) only. then E h=s4 A. The cases of ( L .

C n } is T-consistent. A C n ) (by Thm 8. Thm 8. .LC n } is Tconsistent. In the above proof.3.M ( B A Ci A .. . . .. then {B. . □ Exercises 8.1. . . Then the proof proceeds as follows.2. (5)). A LC n ) (by Rep eq. A C n )) (by (3). Definition 8. and then v"Rv' because R is transitive.4- 8.5 [7]). . COMPLETENESS OF T Lemma 8.LCi.1 which is not concerned with i?. .1 [6]).. 0 |-T . A C n ) h r M(B A Ci A . C i .1 and (1).Ci..( M B A LCi A .5. . . A C n ) (by (L+).2. . . C n } is not T-consistent.')• If {MB. Hence E ^=s5 LMA. By Definition 8. 8. Suppose E v = 1.( M B A L(Ci A . A C n )) (by (4)).5. . . but {B.LCi. Prove the soundness of S4. . . .3. We have v"Rv because R is symmet ric.3 are adopted. Ss-valuations and values of formulas in the sense of Definition 8. Take any v" e K. . We have (->L-iA)v = 1 and (L-<A)V = 0.2. C i .ACn). Suppose B. we have (L-iL-iA) v = 1 by (-. Then (L-iL-A) v = 1 follows from (2) and vRv". 0 l-T . Since v" is any valuation of K. Hence there is some v' G K such that (1) holds.Modal Propositional Logic 195 Take any v" G K such that vRv".( M B A L(Ci A . C n G Form(Cprn). . 0 \-T -M(B A Ci A . . Hence E f=s5 LMA. 8.L^Af" = 1 and Definition 8.. . . Suppose {MB. . Then we have: (1) (2) (3) (4) (5) (6) (7) 0|-T-(BACiA. Take any set K of Ss-valuations and any v G K. L(Ci A . we have (L-»A)V" = 0 and (-tL-iA)v = 1. Prove the soundness of B. . A C n ) \~T . (1)).4.(B A Ci A . .LC n } is T-consistent.1... . Proof. 0 h r L-.1. .2. A C„) (by (2)).2.4. .. . may also be adopted. MB. . . By (1) and vffRvfy we have > (L-«A)V // = 0 and accordingly (2) (-iL-iA) v " = 1.

Thus for each MB G E* we have constructed some £J. E* is T-maximal consistent. . These conventions stated above will be used throughout this section. . there is some T-maximal consistent set EJ G A such that E*su6£j*. = { B } u { C | L C e E * } . . We ex tend Ej to some T-maximal consistent set £J in the standard way already described. and for every MB G E*. written as E?su6£*|. we construct a valuation Vi such that p Vi = 1 iff p G E* for every proposition symbol p. L C i . Thus every finite subset of Ej is T-consistent. Since E | is T-consistent. We proceed as fol lows. C n } is T-consistent. so is { M B .LCi. . we have described how to construct A = { E i .. E*. . C n } .. First. .5). .. } such that for each E* in A. . Then R is reflexive.) Then {MB. . for every E* G A. where £J. Having obtained EJ we then construct for each constructed £* G A (including E^ itself). . C i . . LC n }.. . let E.. . . B G £J. . . C i . Now. C n } C E j . . Suppose { C i . C n } is T-consistent. to prove the completeness of the modal system T. . . . . Accordingly. . In the foregoing paragraphs.5.E:. C n } is any fi nite subset of Ej. .1. We will show that Ej is T-consistent. □ In the proof of the completeness of classical propositional logic we have constructed a maximal consistent set from a given consistent set of formulas (see Section 5. . .196 Mathematical Logic for Computer Science Since (7) contradicts the T-consistency of {MB. . C i . Each of such E^ is called a subordinate of EJ. .. . By Lemma 8. a series of T-maximal consistent sets. we will construct A = {EI>. are T-maximal consistent sets. .3. . {B. we need to construct a system of maximal consistent sets instead of a single one. and C G £J for every LC G £*. L C i . . .}. .LC n } C E*. . . For each MB G E*.3). and hence so is E j . We have { B . But now. . . and let R be a binary relation on K such that ViRvj iff E* = EJ or E*su6£J (for every vu Vj G K).. . . B need not be added. . C n } is T-consistent. . . . E * . . { C i . . (If B is already in { C i . . we extend E to some T-maximal consistent set EJ by adding om successively all those formulas of Cpm which do not cause T-inconsistency (see the proof of Lemma 5. Let K = {Vi\ E* G A}. .. L C n } . .. Beginning with a given T-consistent set £. we con clude that {B.

For every A G Formi^D*"1) and every Vi G K. E^ G A such that E* = E!. We have B G £!• (by Lemma 8. Hence (LB)V< = 1. (byE* = E*). E* = E^. Proof.2. For the second case. (by Lem 5. (by T-max consis of EJ).5. For the first case.3). we have B G S*. Then E* = EJ or E*5tx6E^. by LB G E* and the construction of E*J.3).Modal Propositional Logic 197 Lemma 8.B (by T-max consis of EJ). } Proof. □ Lemma 8.5.or E*su&E!-. and suppose L B G E * . E* (-T LB -> B. LB -> B G E* LB G E* B G E* BGE* (by supposition). ThenBGE*. We have -iLB G E* -nLB 0 |-T |-T (by T-max consis of E*).B G E* . M-«B . B -» C. Suppose LB G E*. B V C. We distinguish between two cases.L B -> M-. We need to prove for the case of A = LB. E* |-T -nLB -> M--B G E* M . we have the following: LB \-T B. First.3. Take any VJ G K such that VIRVJ. (by Lem 5. By induction on the structure of A. 0 |-T LB -> B. Suppose E*. suppose (LB)Vi = 1 and LB 0 E*.3.2) and Bvi'j = 1 (by the induction hypothesis). The cases of A being an atom. AVii = 1 iff A G E*. Elsii&E!-. -iB. B A C. Then for the converse. or B «-» C are routine and are left to the reader.3.L B -> M^B .5. we shall prove LB G EJ => (LB)V< = 1.

SsJ-consistent set E of formulas. We 8. (by ind hyp). S 5 The proof of the completeness of S4.5. Then we obtain A = { E J . [2] follows immediately T-consistent. Vj Vi That is. and [3] is a special case of [2].T A. and then construct a series of E^ from every constructed S4(B.6 in the proof of the completeness of non-modal propositional logic. [3] If A is T-valid. □ 8.5. and we have LB G E*. yielding a contradiction. .ess of T) Suppose E C Form{£pTn»m\ and AG FtForm(Cprn). then E is T-satisfiable. S5)maximal consistent E | such that E*J is S4 (B. [2] If E f=T A. COMPLETENESS OF S 4 .5. } . we first extend E (in the same way as in the case of T) to some S4 (B.4. Then we obtain B £ E* B ' = 0 v (by T-max consis of E*). E * . . . Theorem 8. By Lemma. E can be extended to some TG A as described above. It is analogous to Lemma 5. then A is T-provable.. is proved. . . {Completeness i. Suppose E is maximal consistent set SJ have A G EJ. ) l) [1] If E is T-consistent. Proof. Take any A G E.as follows: .198 Mathematical Logic for Computer Science By M-iB G E* there is some S * G A such that E*sufrE. because the distinction between the semantics of these systems and that of T consists only in the different requirements of the relation R on the set K of valuations. AVl = 1 .6. For n > 1.3. Hence E is T-satisfiable and [1] from [1]. and S5 is essentially analogous to that of T.3. B. Hence (LB) = 0. B. Given any S4 (B. .S5)-maximal consistent set E*.(and hence ViRvj) and -<B G £!•. . □ Lemma 8. there is some Vj G K such that Vi VIRVJ and B = 0.3 is crucial in the proof of completeness. Ss)-maximal consistent and EJsti&EJ. we define E*sufrnE!. then E | .

6.3 for T.2 and 8. Then.s 4 LLB. We distinguish between two cases.1 and 8. For every E* G A. and S5. In the first case. Then B G E^ is to be proved by induction on n. we have B G E^ by Lemma 8. Lemma 8. Proof.2. we derive B G E*.3. E* 6 A such that and EJsu&EJ. there is some E*5tz6fcE. (by Lem 5. and then state simultaneously the completeness theorems for S4.1. These conventions are the same as those in the last section. Y.Modal Propositional Logic 199 EJstifciEJ EJsu&fc+iE^ iff iff E*su6E*. S* 6 A such that E* = E^ or EiSi/6nEJ for some n > 1. Induction step. we construct a valuation vi such that for every proposition symbol p.means that there is some E* G A such that E*sii6fcE* and E*six6E^.3). Basis. Suppose E-. EJsu&fc+iE!. Vj G K.6. E* = E!-.5.means E*su6E^.5. h 1 . 0 h s 4 LB -> LLB. B. R is reflexive and transitive.5.+subY. B. E*5ix6nE^ for some n > 1. (by Y^subkL*. In the following. Then B G S*. (by supposition). E*SIA&IE!. □ By LB G E*. In the second case. AVi = 1 iff A G E*.^ and Lemma 8.2 are for S4.5.2.6. we will first formulate and prove the lemmas for S4. pVi = 1 iff p G E*.6. p) Vi For every A G Form(Ciyrrim \) and every Vi G K. ind hyp). EJ h s 4 LB -> LLB. where R is supposed to be a binary relation on K such that for any Vi. ViRvj iff E* = EJ or E*sw6nE^ for some n > 1. then B E S • is obtained by Lemma 8.5. LB -» LLB G E* LB G E* LLB G E* LB G EJ (by S 4 -max consis of EJ).2.2. Let K = {vi | E* G A}. Lemma 8. and S5 which correspond to Lemmas 8. The following Lemmas 8. and suppose LB G EJ. Then we have the following: LB | .

E* is B-inconsistent.or 'i £!-sit&£*. contra dicting the B-maximal consistency of E*.1) and Bv* = 1 (by the '3 induction hypothesis).3. we need to prove for the case of A = LB only. Hence B G S*.6.3.2.4.3.B (-B LM-B -nB | . . suppose B ^ E J . (by EJau&EJ). In the cases of EJ = E^ or EJsu&EJ. Then R is reflexive and symmetric.*.LB. M-. Then B G E * .B L^LB 0 |-B . Then we have ^B G E* (by B-max consis of E*).B -> L-LB.6. B Proof. (by Lem 5. The converse is to be proved in the same way as in the case of T in Lemma 8. . > ■ ) Proof. AVi = 1 iff A G EJ.B ^ L .5. Lemma 8. For every A G Form(Cpm) and every Vi G K. (by (LM+)). □ Lemma 8.B |—|B ^LB).4 are for B.3 and 8. . By ->LB G E* and the supposition LB G E*. we need to prove for the case of A = LB only.B -«B -> L-. As indicated in the proof of Lemma 8. By induction on the structure of A. we obtain B G E* by Lemma 8. By induction on the structure of A. E* | .5. Suppose E*. (by Rep eq.i L B G E ** (by B-max consis of L-iLB G E* -LBGE* E*). and suppose LB G £*. We have E | = £!• or £*stz&nX^ for some n > 1. we shall prove LB G EJ = > (LB)Vi = 1. First.3).6.6. As stated before.3. >pm\ Vi Vi . Suppose LB G £*. EJ G A such that EJ = E} or EJswftEJ or E*su6E*. where R is suppose to be a binary relation on K such that V{RVJ iff E* = E^ or E^su&E!. □ The following Lemmas 8.6. Hence (LB)Vi = 1. Then we obtain B E S ** (by Lemma 8. Take any Vj G K such that ViRvj. In the case of EjSubY.5.200 Mathematical Logic for Computer Science Proof.

6 for S5 are based on the semantics formulated in Definition 8.Modal Pro-positional Logic 201 First.or E^sw6nE^ for some n > 1 or EJsu&EJ.2. We have E* = E} or E*su6E* or E*su6E*. and suppose LB G E*. . □ Lemmas 8. Suppose LB G E*.3.5 and 8.6.6. Then B G E*. Take any VJ G if such that ViRvj. which is used in proving Lemma 8.3) and Bv* = 1 (by the induction hypothesis).6.6.5. where R is suppose to be a binary relation on K such that ViRvj iff E* = E^ or E*sti6nE^ for some n > 1 or Ei-subE*. Hence (LB)Vi = 1. By induction on the structure of A. Hence (LB)Vi = 1. We then obtain B G E* (by Lemma 8. We need to prove for the case of A = LB only.E A such that E* = E!.8 are for S5.6. G K. Suppose LB e E*.5. L e m m a 8.or E*su6nE!.6. The converse can be proved in the same way as in Lemma 8.6.for some n > 1 or E*su6E*. Take any Vj G K such that ViRvj.6. The following Lemmas 8. Lemma 8. which is concerned with an equivalence relation. we shall prove LB G E* => (LB)Vi = 1.6. E.6.6.6 can be re-established (see Lemma 8.5.3.5) and Bv* = 1 (by the induction hypothesis). □ The following Lemmas 8. 1 AVi = 1 iff A G E*. B G E ** will be obtained as in Lemma 8.or E*su6 n E^ for some n > 1.8) according to the semantics formulated in Definition 8. H For every A G FormiC?"1)i ) and every v. 3 because the rule (LM+) of the system B.3.3. Proof. We have E* = E!.6. we shall prove LB G E* = > (LB)V* = 1. B G E ■ is obtained by Lemma 8. In the cases of E* = E!.7 and 8.1. In the case of E*jsubE*.6. holds in S5. Then R is an equivalence relation. Then we obtain B G E ** (by Lemma 8.1 which is not concerned with any equivalence relation.3. The converse will be proved in the same way as in the case of T in Lemma 8. First. □ Lemma 8.5 and 8. Suppose E*.6.6.6 are for S5.2.6. • Ui Proof.

Then we have the following: -»LB G E* (by Ss-max consis of E | ) . We need to prove for the case of A = LB only.and every Vi G K. E* G A such that E* = £!• or £*siibnX*.6. E*su6fc+iE^ means that there is some E* G A such that E*subkZ. Suppose (LB)Vi = 1 but LB ^ E*. Then we have LB G Ej (by supposition). AVii = 1 iff A G E*. Suppose S*.B G E* M--B G E* (by S 5 -max consis of EJ).B . Now we will first prove (LB)Vi = 1 = > LB G EJ. Proof. 0 | . (by (L-fL)).5. f Proof.6. E*5i/6fcE*. -LB |-s5 M-B 0 \-s5 --LB -> M->B E* h s 5 . EJsu&iEJ means EJsufcEJ. Induction step. By Lemma 8.3). □ Lemma 8. basis).202 Mathematical Logic for Computer Science Lemma 8. Then B € EJ.7.2. B G E* is to be proved by induction on n.3). B € E* is derived from LB G S*. and EJsubEJ. (by Lem 5.3. and the induction hypothesis. By induction on the structure of A. -nLB -> M-. and suppose LB G EJ. pm) For every A G Form(Cprn) ) .for some n > 1. Then B G E* follows from LB G E} as in the third case in the proof of Lemma 8. .3. for some n > 1. LB -> LLB G E* LLB G E* LB G EJ (by Lem 5.L B -> M . The first case is E* = EJ. (by S 5 -max consis of £*).3.6. In the second case. Basis. we obtain B G E*.8. By LB G £*.s 5 LB -> LLB E* h s 5 LB -> LLB. E*su6nE!. (by EJswftEJ.

suppose LB G E*. contradicting (LB)Vi = 1. By Lemma 8. S5)-provable. We have LB -> LLB G E* LLB G E* (by S 5 -max consis of E*). S5)-valid. We have EjSii6 m E^ for some ra > 1. We have B ^ E^ (by the Ss-maximal consistency of E p and B V J = 0 (by the induction hypothesis).7 hypothesis.Modal Propositional Logic 203 By MHB G E*. then A is S 4 (B. S5)-satisfiable. [2] K s Ns 4 (B. (Completenessess of S 4 . * we obtain B G S *3 from LB G EJ.6.1.•).9. ^^/ [1] If E is S4 (B.6. For the converse. D . Hence (LB)Vi = 1. Take any Vj G K.s 5 ) A [3] If A is S 4 (B. Then (LB)Vi = 0. 5s) Suppose E C Form{CpTn). we obtain LB G E£ by Lemma 8.S 5 )-consistent.7.3.6. Hence LB G E*. A G Forn/ ^ ( r ^ ) . Then we derive BvVj = 1 b.3). (by Lem 5. B.s 5 ) A > 5 t h e n sS hs 4 (B. Q T h e o r e m 8. the induction B* by the . there is some E * G A such that EJsuftEJ and -^B G E*. Since Ei$u6 n E* for some n > 1. then E is S 4 (B.

205 . then VxA(x). ). S4. e Fo FormiC The details of the structure of formulas of £ m are left to the reader. m The set Form(Cm) ) of formulas of £ m is defined to be the smallest class of expressions of Cm closed under the following formation rules of formulas of £ m : ■) [1] AtomiC171)) C Form(Cm). 9. We shall construct var ious systems of modal first-order logic corresponding to the systems T. But the situations with modal first-order logic are more complicated. (LA) G F( FormiC171). B e Form(Cm).1. <> . * being any one ') of A. MODAL FIRST-ORDER LANGUAGE The modal first-order language C171isis obtained by adding the necessity symbol L to the first-order language C. in essentially the same way as modal propositional logic is constructed from classical propositional logic.9 MODAL FIRST-ORDER LOGIC Modal first-order logic is constructed by adding modal notions to clas sical first-order logic.h x not occurring in A(u). V. ->. 3xA(x) Form 171). m The sets Terra(£ m ) and AtomiC171)) of terms and atoms of Cm are the same as Term(C) and Atom(C) respectively. -> [4] If A(u) e FormiC171). [2] If A e FormiC™). then (-A). [3] If A. S5. and B. then (A * B) G FormiC171).

S 4 Q(BF). [4] P : D(v)n —> D(v). of which v is a member. uiv e D(v). S4. S 4 Q.1. 9. and B are TQ. We will consider the first case in Definition 9. and BQ(BF).1.206 Mathematical Logic for Computer Science The systems of modal first-order logic corresponding to the systems T. which consists of a domain D(v) assigned peculiarly to v and a function (denoted by v) with the set of all non-logical symbols and free variable symbols as domain such that [1] If v. f being any n-ary function symbol. for instance. Hence TQ. Then we may have different domains associated with different valuations in K or have a single domain for all valuations in K. and B are TQ(BF). BQ)-valuations are defined analogously by making the famil iar modifications of the requirements of R such that R be reflexive and transitive for S 4 Q. v' e K and vRv\ then D(v) C D(v'). is the system T with quantification. The meaning of BF will be explained in the next section. Each element v e K is called a TQ-valuation for £ m . the semantics for modal first-order logic is constructed by combining those for modal propositional logic and classical first-order logic. But we are faced with the following question. In the case of classical logic. .6. V [3] Fv C D(v)n. Definition 9. modal first-order logic without equality will be considered first.2. In the following sections.2. [2] a v . Other systems of modal first-order logic corresponding to T.n 7 F being any n-ary relation symbol. S 5 Q(BF). S5. while in modal logic it is concerned with a set K of valuations or with certain valuations in K. S 4 . a and u being any individual symbol and free variable symbol respectively. the value of formulas under a certain valuation v is concerned only with v itself. and BQ respectively. S5. SEMANTICS Essentially. be an equivalence relation for S5Q. v S4Q(SsQ. and be reflexive and . S5Q. and systems with equality will be studied later in Sec tion 9. where Q means quantificational or with quantification.2. (Val {Valuation) Suppose K is a set and R is a reflexive relation on K.

r [2]-[7] Same as in Definition 8. < 0 otherwise. [8] VxA(x)v = ^ u not occurring in A(x).1. and some v G if.. and validity. . The value of terms under valuation v G K is defined by recursion: [1] a".•. •. va validity) E C For7n(Crn) ) is TQ-satisfiable iff for some set K of TQ-valuations. and every t.2. SAQ (S$Q.BQ)-satisfiability'ity and S4Q (S$Q. E |=S 5 Q A. . i [1] F(t i .2. Now we turn to the second case of the semantics of modal first-order logic mentioned at the begining of this section. lity. u v G D(v).•. satisfiability. E |=s4Q A.BQ)-validity are defined ity analogously with modifications of the requirements of R. and E |=BQ A are defined as in non-modal systems with suitable modifications.. . A(u) v ( u / a > = 1. Replacing D(v) for each v G K by a sin gle domain D and deleting the requirements of D(v) in Definition 9. . V fi u [2] f(t! ?..3. .. . . u not occurring in A(x). .3.Modal First Order Logic 207 symmetric for BQ. . . (Satisfiability. ( S5Q-valuation can also be defined independently of R. otherwise. bility and S5Q-validity can be defined independently of R.. . formulated as follows.) Logical consequences E (=TQ A.2. Definition 9. some reflexive relation R on K. V [9] 3xA(x) v = ^ 1 1 0 if for some a G D(v). f 1 if for every a G D(v).2..1. (Value of terms and formulas) Suppose K and R are given as in Definition 9. E v = 1.• . tn) — < »a> 0 otherwise. A(u) v < u / a ) = 1. in which we have one single domain for all the valuations in if. i n j 1 u The value of formulas under valuation v G K is defined by recursion: l if f ( t ? .?i t«). every reflexive relation i? on if. .) Definition 9. G if. t » ) e P ' . ? A v = 1.2. we obtain new definitions of valuations.11t w )« = *^(tY . This is left to the reader. > A G Form^171) ) is TQ-valid iff for every set if of TQ-valuations.2.. (« (S$Q-satisfia(.

2. TQ(BF) (S4Q{BF). S 5 Q(BF). n n S NTQ(BF) A.3. A ( u ) v '((uu//Q ) = 1. According to the semantics based on Definition 9.4. Take any v e K over domain D.208 Mathematical Logic for Computer Science Definition 9. which consists of a domain D (which is available for every valuation in K) and a function (denoted by v) with the set of all non-logical symbols and free variable symbols as domain such that [1] a". The distinction between these two kinds of valuations defined in Defi nitions 9.2. and E [=BQ(BF) A are defined in a similar way.1. BF is TQ(BF) (S 4 Q(BF). uv G D. (LA(u)) v = 1. (LVxA(x))" (LVxA(x)) = . Then. S5Q{BF). Suppose VxLA(x)v = 1. Suppose K is any set of TQ(BF)-valuations. [3] F : Dn -> £>.2 except that D is used instead of D(v).1 and 9. \/xA(xf '' = 1. BQ(BF))-validity Ity are defined in terms of TQ(BF) ls4Q(BF). Then.4 can be explained by means of the formula BF VxLA(x) -> LVxA(x) which is named the Barcan formula.2.BQ(BF))-valid. for /l every a G D and every v' G K such that vRv'. we have: f ( uv{n/a)Rv'{\i/a) and u a) (LA(u))" (( u // a ) = 1. [2] Fv C Dn. S5Q{BF). (Valuation) Suppose K is a set and R is a reflexive relation on K. BF is not TQ-valid nor is it S4Q-valid.4. R is any reflexive relation on K. But according to the semantics based on Definition 9. due to Ruth C. " a) A(u) ' = 1. E hs4Q(BF) A.2. Barcan. u not occurring in A(x).) The value of terms and formulas under valuation v G K will be defined in the same way as in Definition 9. 0. u not occurring in A(x). E f=s5Q(BF) A. 1. Each element v G K is called a TQ(BF)-valuation for £ m .2. BQ(BF))-val\mtions ions in the same way as in Definition 9. These assertions are demonstrated as follows.2. TQ(BF) BQ(BF))-satisfiability ility and IF) (S^Q(BF).1. / VxA(x)1V = 1. S5Q(BF). S±Q(BF) (SsQ(BF)^ BQ{BF))-valuations are defined analogously with modifications of the requirements of R.2. VxA(x) = v . (SsQ(BF)-valuation can also be ition defined independently of R.

Similarly for S 4 Q(BF). u V 2 = /?. Since D(vi) contains only one member a. Hence (VxLF(x) -+ LVxF(x))Vl = 0. where F is a unary relation symbol. Take any free variable symbol u and let uVl = a. Since v\Rv2. Suppose K = {vi^v2} binary relation on K such that 1) viRvi. VxF(x)V2 = 0. S 5 Q(BF). Suppose D(Vl) = {a}. or BQ(BF). D(v2) = {a. Note that since R is not symmetric. FV2 = {P}. but not symmetric.(3}. BF is SsQ-valid and BQ-valid. To refute the TQ(S 4 Q)-validity of BF. F V1 = {a}. we have not refuted the SsQ(BQ)validity by the above arguments. 9.Modal First Order Logic 209 Hence VxLA(x) -> LVxA(x) is valid in TQ(BF). we obtain (LF(u)) Vl = 1. BF is not TQ-valid nor is it S4Q-valid. We have D{v\) C D(v2). In fact. we have VxLF(x)Vl = 1. Since R is reflexive and transitive. FORMAL DEDUCTION The rules of formal deduction of TQ include the three rules (L—). and R is a Then R is reflexive and transitive. not V2RV1. we take an instance of BF: VxLF(x) -> LVxF(x). we derive (LVxF(x))Vl = 0 by 3). (-» — (L)). viRv2l v2Rv2. and (L+) (which are added to classical propositional logic to obtain . By 2) and 1). Then we have 2) 3) • F(u) Vl = F(u) V2 = 1.3.

B Q A.3. The formula BF can be formulated as a rule of formal deduction: (BF) If E|-VxLA(x).1 in the next section.2.8 [3]. But (BF) need not be added to S5Q or BQ. 5)). we have £ hs5Q(BF) A £ l~BQ(BF) A iff iff E | . 0 \.1) and the TQinvalidity and S4Q-invalidity of BF (see the proof in the last section). which is based on the semantics formulated in Definition 9. with the equality symbol not considered for the time being.1. if we add (BF) to S 5 Q and BQ to obtain S 5 Q(BF) and BQ(BF).210 Mathematical ter Science Logic for Computer Sc T) in addition to those of classical first-order logic. BF is not formally provable in TQ or S4Q.VxA(x) (by 4)). then E \. 3)). The definitions of formal deducibility. MVxLA(x) h A(u) (by 2). Then the rules of S 4 Q. E |. MVxLA(x) I.LVxA(x) (by Thm 8. Then by the foregoing explanations we may add the rule (BF) to TQ and S 4 Q to obtain stronger systems TQ(BF) and S 4 Q(BF). 1)). and maximal consistency with respect to the various systems are omitted.S 6 Q A.2. The formal proof is as follows: 1) 2) 3) 4) 5) 6) 7) VxLA(x) — LA(u) (take u not occurring in A(x)). respec tively. That is.4. Soundness and completeness of the various systems of modal first-order logic (without equality) will be studied in the following two sections. (L + M). and BQ are obtained by adding. We may state in advance: [1] TQ and S4Q are sound and complete with respect to the semantics formulated in Definition 9.3.3.4 [4]. S 5 Q. consistency. | MVxLA(x) \. VxLA(x) (. the rules (L + L).VxLA(x) -> LVxA(x) (by 6)). But BF is formally provable in S5Q and BQ. formal provability.8 [2]). .LVxA(x). and (LM+) to those of TQ.MLA(u) (by Thm 8. By the soundness of TQ and S4Q (see Theorem 9.A(u) (by Thm 8. because it can be derived in these systems. MLA(u) \.

[3] If E is TQ-satisfiable.2.4. then E is TQ-consistent. BQ) m Suppose E C Form(Cm: ) and A G F o r m ( £ m ) . The proof of the above theorems is left to the reader. 9. SOUNDNESS Theorem 9.4. and BQ.4.2. [2] If A is TQ-provable. S 5 Q(BF) (which is equivalent to S 5 Q).3. Then ) [1] If E |-TQ(BF) A. (Soundness of TQ.2. 9. Prove MVxA(x) | .3. Exercises 9.1 and 9. 9. The theorems of replaceability of (both logically and syntactically) equivalent formulars hold in modal first-order logic as well.4.4. Prove 3xLA(x) | ~ T Q L 3 X A ( X ) .2.2. 9. [3] S5Q and BQ (equivalent^ S 5 Q(BF) and BQ(BF)) are sound and complete with respect to the semantics formulated in both Defini tions 9. S4Q(BF). Theorem 9.4. (Soundness of TQ(BF). SsQ. S4Q. Similarly for S 4 Q.Modal First Order Logic 211 [2] TQ(BF) and S4Q(BF) are sound and complete with respect to the semantics formulated in Definition 9.1.T Q VxMA(x). [2] If A is TQ(BF)-provable. then A is TQ-valid. Prove LVxA(x) | ~ T Q VXLA(X) (the converse of (BF)). then A is TQ(BF)-valid. Similarly for S 4 Q(BF). Prove M3xA(x) H T Q ( B P ) 3 X M A ( X ) (use LVxA(x) f—|TQ(BF) VXLA(X)). then E is TQ(BF)-consistent. S5Q. [3] If E is TQ(BF)-satisfiable.4.')• Then [1] If E | . . with re spect to the semantics formulated in Definition 9. and BQ(BF) (which is equivalent to BQ). BQ) Suppose E C Form^C™) and A G Form(Cm).2.2. then E | = T Q A. 9. S 5 Q.1.T Q A.1. then E |=TQ(BF) A.3. with respect to the semantics formulated in Definition 9.3.3.3.

. . ar Pi5 2^2> • • •aree pairwise <disjoint.5). P2. . . This is done by adding successively in the standard way. Cn.j m m jy £ ' = £ uD. for each A G Form(£™) such that A £ EJ. which has not yet occurred in E. the elements of A being TQ-maximal consistent sets.1). .) It needs to be pointed out that EJ is here TQ-maximal consistent with respect to Form(Cm). As in the case of constructive logic (see Section 7. Let pairwise pm m /»m . for each E* G A (including EJ itself). (The proof is left to the reader. Having obtained EJ. We note that. As in the case of T. Thus E is . if A £ Form(£y i ). nor in this 3xA(x) itself.% that is.1 = C U P n ( n > 0 ) . d at each stage » being some new symbol taken from P i . for each existential formula 3xA(x) G Form(C™).Q 0 — L. we add successively 3xA(x) — A(d) to E.5. L. £) m/ Form(C™) and Forra(£ ) are sets of formulas of £™ and £ m / . extended to some TQ-consistent set EJ C Form(C™)) such that for each '■?) mm\ l 3xA(x) G Form(£ ). The function symbols will be omitted for simplicity. First.212 Mathematical Logic for Computer S( er Science 9. L. we suppose Po. E*-. nor in any previously added formula. . Po. The procedure will be described in detail. neN £171/ =n€N £m . . . we cannot conclude 1) from A £ EJ. Suppose E C F o r r a ( £ m ) is TQ-consistent. are countable sets of new free variable symbols and £ m .1). . a series of TQ-maximal consistent sets subordinate to E* (each of which corresponds to some MB G E* and is written as E p as follows. + C+i=CU^(n>0). COMPLETENESS Firstly we shall consider the completeness of the modal systems without the Barcon formula (with respect to the semantics formulated in Defini tion 9. 1) EJ U {A} is TQ-inconsistent. all those members of Form^™) which do not cause TQ-inconsistency.Q TO — L. P i . }. we will construct A = { E J .). 771/ Then Term(Cm) ) and Terra(£ m ') are sets of terms of £™ and £ m / . We begin with TQ. v=\Jvn.4.2. 1 )> Then we extend EJ to some TQ-maximal consistent set E* C For Form(£m) such that EJ has the E-property (see Definition 5. EJ is constructed as follows. we then construct.. there is some d G P i such that 3xA(x) -* A(d) G Ef.. v=\Jvn. .

) Then Ej is extended to some TQconsistent set E? C Form(£™) such that for each 3xA(x) G Form(£™)... . Suppose E^ corresponding to MB is the kjth set to be constructed in A. . there is some d G V^. then ki = kj. Hence assuming E* is the fcith set in A. m FVfc< C Divk. This is done by adding successively in the standard way. hence d does not occur in Ej. then E* is TQ-maximal consistent with respect to Form(C™).tm)GEJ = 1 iff (that is. E* precedes E* in A.ky If E* = E^. )• If E*sw6E^.. . we add successively 3xA(x) —> A(d) to Ej and obtain E ?. g G S * ) . F are any individual symbol. . such that 3xA(x) -> A(d) G E°. Suppose vkiRvkj. and . all those members of Form(C™) which do not cause TQ-inconsistency. m-ary rela tion symbol of £)£■ Suppose K = {vki | E* G A} and R is a binary relation on K such that vkiRvkj iff E* = E* or EJsuftEJ (vki.vkj G K).. t'm G £>("**). . Secondly.. . . .. u. which has not yet occurred before. }. ... u"** = u'. then ki < kj. (This can be done because.) Then we have E*su6Ej. .5. D{vki) = {t'l {t'\teTerm(C%)}... .C ) G F ^ t t' x . and accordingly vki is *i identical with vkj and D(vki) = D(ykj).)171 such that for any ( t i.. To sum up: we have constructed A = { E ^ . . tm) 0 F ( t i. firstly. ... &v"i = a'. iff Vhi i F(ti. (The proof is left to the reader. As shown in Section 8. set. for each E* G A. Ej C Form(C™^). . . .. d at each stage being some new symbol taken from D^. E * . Next we extend E? to some TQ-maximal consistent set E^ C Form{C™) such that Ej has the E-property. we have ki < kj and then E* C Form(C™^). . where a. We note that E* is here TQ-maximal consistent with respect to Form(£™).. F ( t i .Modal First Order Logic 213 First we take any MB G E*..)• . Then R is reflexive. Let EJ = { B } U { C | L C 6 E * } . d at each stage is taken from Vkj. Ej is TQ-consistent. For each existential formula 3xA(x) G Form(C™). .. if we suppose E* is the kith. Now we will construct a valuation v^ for £™ over domain D^^) such that '**) D(v kt {t'\teTerm(Ckni)}. free variable symbol. . .

B G Form(£™).3. ind hyp. .3. (11) There is some E* G A such that EJsubEJ and -iB G E*. Then (-^B)Vki and BVki are not undefined.1. TQ-max consis of E* with respect to Forra(£™). Then B G Form(£™) and accord ingly BVki is not undefined. First we prove (LB)Vki i = 1 => LB G E*.B)Vfc< = 1. construction of E^).3. TQ-max consis of E* with respect to F o r r a ( £ £ ) . L e m m a 9. Then (LB)Vki is not undefined. Hence X (with its elements) and i? satisfy the conditions stated in Definition 9. For every A G Formi^C™') and every ufc. TQ-max consis of E* with respect to Farm{C%). Lem 5. and accordingly LB G Form(£™).« G E* (by (2).3. we prove {-^B)Vki = 1 = > -iB G E*. "t '■% ■ ■> Proof. ))• (££))• W For the converse. G K. First. LB. ind hyp). BVkii is not undefined). M . Sup Jk: Vki pose (LB)Vfcii = 1. Sup "i pose (^B)Vfci = 1. (2) B £ E* (by (1). E3xB(x). hence B 0 E* j (by (10).1. Case of A = -»B. By induction on the structure of A. and B G Form(C™. Lem 5. (10) M-nB G E* (by (9). (6) (-. We have: k (7) For every ^ G if such that vkiRvkj•Jk<5 BVk* = 1 (by (LB)Vfc* = 1). B G E* (by (7). suppose ->B G E*. ind hyp). . Suppose LB £ E*.B G F o r r a ( £ £ ) . .L B |—|TQ M-iB*). Suppose K and R are given as above.2. C £™ and D(vki) C D(vkj). (3) .BeFarm(C%)).)). The remaining cases are left to the reader. We have: "I (4) B £ E * . M . Case of A = LB.kj (8) For every E* G A such that E* = E* or E*su6E*. 'i (5) BVki = 0 (by (4). We choose to prove for the cases of A = ->B. (9) -^LB G E* (by LB 0 E*.).5. AVfc< = 1 iff A G E*.214 Mathematical er Science Logic for Computer Scie accordingly C£. LB G Form(C^. We have: (1) BVk* = 0.

B G F o r r a ( £ £ ) . suppose LB G £*. For the converse.Modal First Order Logic 215 Since (11) contradicts (8).) (2) Lemma 9. Similarly.Vi ' BVkJ = 1 (by (14). We have: (17) There is some t' G D{vki) ) such that B(u)*M u / t/ ) = 1.5. TQ-max consis of £* with respect to Form a ^ ^ ) ) . ind hyp). for instance. and 3xB(x) G Form(C™^). we will make the same modifi cations as for the corresponding systems of modal propositional logic. . We have: (12) B G £* (by LB G £*. We have: (21) There is some d G Vki such that B(d) G £* (22) B(d)w*i = 1 (by (21). ((by (20) 3xB(x) G E* (by (19). 3xB(x) G Form(C™^) is necessary for establishing (20). Suppose 3xB(x)Vfci = 1.1 holds for S4Q. we cannot derive -iB G E* from B 0 E* because E* is TQ-maximal consistent with respect to Form(£™). Forr A (13) For every S * G A such that £*sub£*. is necessary for establishing (3). (14) For every £* G A such that E* = E* or £*su&£*. (23) 3xB(x)v*< = 1 (by (22)). In the formulation and proof of this lemma for these systems.). t i = t'). If. If B 0 Form{C™). ind hyp). we prove 3xB(x)Vfei = 1 = > 3xB(x) G £*. B G E* (by (12). i 3 (13)). that (by (i E-property of £*). (19) B(t) G E* (i (18). suppose 3xB(x) G £*.1 3xB(x) G Form{C%)). □ Remarks cs (1) In the above proof. Then B G Form(C^. (Refer to the note after 1). Case of A = 3xB(x). (15) For every vkj G K such that vkiRvkj. ind hyp). First. u being free )Vk variable symbol in £J™. we obtain LB G £*. con struction of E!-). S5Q. B G £* (by LB G £*. not occurring in B(x) (by 3xB(x)VkVki = 1). the condition B G Form(C™). TQ-max consis of £* with respect to Formic1?. i Vk w Vk Vk (18) B(t) i = B(u) *i<"/*') = 1 (by (17).).). and BQ as well. Then 3xB(x)Vfei is not undefined. For the converse. ! kjl (16) (LB)"** = 1 (by (15)).

. and BQ(BF). then A is TQ-provable. S 5 Q. Similarly for S 4 Q(BF).216 Mathematical Logic for Computer Si sr Science is. T h e o r e m 9. and BQ. t m ) G E * . S5. . . E*. 5 5 Q. SAQ. We construct a valuation vki for C™.T Q A. 4 ) G F ^i iff F ( t 1 .1. \iVki = u' m Fvki c Dm (u being any free variable symbol in £ m / ) . ^ s u c h t h f t t for any t / ? . □ Now we turn to the completeness of those systems with the Barcan formula.2. [3] If A is TQ-valid. . [2] If E ^ T Q A. .5. We note that the single domain D is available for each vki € K. [Completenessess ofTQ(BF). Then for each E* € A. . we con struct A = { E i .3. S 5 Q(BF).2. }. then E | . . BQ) . )• Then )a ■ ) n. The treatment for TQ(BF) is analogous to that for TQ mentioned above. ra\ 771 \ Suppose E C Form(Cm) l ) and A e Form(Cm). Suppose E C Form^C™) is TQ(BF)-consistent.1 for TQ is the same as that for the systems S4. l z Let K = {vki I E* e A}.. Then what needs to be added to the above proof of Lemma 9. >F S4Q(BF). Starting from E.5. for S 5 Q that vkiRvkjIk 7 iff E* = EJ or E*su6 n E* for some n > 1 or kj E*su6E*.5.5. # ^ ^ e * ! > • •■•• • ?1t m 'G V. fc. j m 1 1 m for n A ( t . and B. . and for BQ that vkiRvkj Kj iff E* = E$ or E*stx6E* or E*stx6E*. ) Then ) • [1] If E is TQ-consistent. Then we can establish a lemma for these modal systems which is anal ogous to Lemma 9. Similarly for S 4 Q. suppose E* is the A^th set in A.. then E is TQ-satisfiable. . The details are left to the reader. . with respect to the semantics formulated in Definition 9. zVk* = a'. . (Completeness S iof TQ.for some n > 1. . Theorem 9.1. S5Q. . .BQ) nesss m Suppose E C Form(Cmra>) and A G Form(Crn:). over domain D such that D = {t' I t e Ter Term(Cmf)}. we will stipulate for S4Q that vkiRvkj iff E* = EJ or E?su6nE:. .

Modal First Order Logic

217

[1] If E is TQ(BF)-consistent, then E is TQ(BF)-satisfiable. [2] If E HTQ(BF) A, then E | - T Q ( B F ) A. [3] If A is TQ(BF)-valid, then A is TQ(BF)-provable. with respect to the semantics formulated in Definition 9.2.4. Similarly for S 4 Q(BF), S 5 Q(BF) (which is equivalent to S 5 Q), and BQ(BF)(which is equivalent to BQ). □

9.6.

EQUALITY

The usual interpretation of the equality symbol is (ti « t 2 ) v = 1 iff t\ = t£, where v is any valuation. For modal systems, however, we are faced with two kinds of semantics concerning equality. Suppose K is any set of valuations and R is any binary relation on K, which may meet the requirements of any one of the systems TQ, S4Q, S5Q, r and BQ. Suppose vi G K and ( t l « tt2 )\Vi — 1, that is, t ^ = t^- According (ti ~ 2 ;ViVi = to the semantics of one kind, it is stipulated that for any Vj G K such that ViRvj, we have t\3 = t23 and hence (ti « t2)Vj 3 = 1. In the case of Vi>i (t x « t2)y = 0 (that is, t\l ^ t ^ ) , it is stipulated that t ^ ^ t\j and Vj hence (ti ~ t22)) Vi3 = 0. Such an interpretation means that equal objects are necessarily equal and unequal objects are necessarily unequal. (In other words, it means that true propositions of equality are necessarily true, and false propositions of equality are necessarily false.) Accordingly we have:

r

o

u

1) 2)

ti « t 2 h L(ti « t 2 ). - ( t i « t 2 ) |=L-i(ti«t2).

According to another kind of semantics, we can have the same indi Vi vidual assigned by V{ to ti and t 2 and hence (ti « t22:)"' = 1, but differ )Vi y< 3 3 ent individuals assigned by Vj to ti and t 2 and hence (ti ~ t2))Vj 3 = 0. We can also have different individuals assigned by V{ to ti and t 2 and hence (ti ~ t 2 ) V i = 0, but the same individual assigned by Vj to ti and Vi Vi 'j t 2 and hence (ti « t2)vJi = 1. Therefore, (ti w t2)\Vi = 1 does not imply :)Vi Vi (ti « t2p = 1, nor does (ti « t2) = 0 imply (ti « t 2 ) v ' = 0. Thus 1) >.r r and 2) do not hold. Now we turn to formal deducibility. The rules of formal deduction for equality corresponding to the semantics of the first kind are exactly the same as in the case of classical first-order logic. They are:

V ; v

218

Mathematical

Logic for Computerir Si Science

**(«-)IfE|-A(t1), E | - t i «t2> then S |- A(t 2 ), where A(t 2 ) results from A(t x ) by replacing some (not necessarily all) occurrences of ti in A(ti) by t 2 .
**

1

(w+)0|-u«u. Adopting these rules we can derive in TQ (and accordingly in S4Q, S5Q, and BQ) 3) and derive in S5Q and BQ 4) - ( t i « t2) h L i ( t i « t 2 ) . The proof of 3) is as follows: (1) L ( t i * t 1 ) , t i « t 2 | - L ( t i « t 2 ) . (2) 0 | - t i « t i . (3) 0 h L ( t ! « t i )) (by (L+), (2)). (4) t i « t 2 h L ( t i « t i ) . (5) ti « t 2 (- ti ss t 2 . (6) t: « t 2 h L(ti « t 2 ) (by (4), (5), (1)). The proof of 4) is as follows: (1) ti « t 2 | - L ( t i « t 2 )) (by 3)). (2) tj « t 2 h - M - ( t i « t 2 ) (by(l)). (3) M-.(ti « t 2 ) h i ( t ! » t 2 ) (by (2)). (4) - ( t j « t 2 ) 1- L-i(t a w t 2 ) (by Thm 8.3.8 [3], (3)). 3) and 4) may seem unacceptable intuitively. Hence weaker rules of formal deduction have been proposed in order that 3) and 4) cannot be derived. The rule (~—) may be replaced by a weaker rule ( « - ' ) I f S h A ( t i ) ,5 E|-ti«t2, then E — A(t2), where A(t2) results from A(ti) by replacing | some (not necessarily all) occurrences of ti not in the scope of any modal symbol by t2S5

ti « t 2 |- L(ti « t 2 )

Then the rules (w —') and ( « +) correspond to the second kind of semantics.

Modal First Order Logic

219

According to these two kinds of semantics and the rules of formal deduction corresponding to them, we can establish the soundness and completeness of various systems of modal first-order logic with equality. Soundness is proved by induction on the structure of X — A. Completeness | is established with the aid of the completeness of modal systems without equality. This is analogous to the case of classical first-order logic (see Chapter 5). The details are left to the reader. The axiomatic deduction systems of various modal first-order logical systems (with or without equality) are obtained by adding axioms and rule of inference about modal symbols to the axiomatic deduction system of classical first-order logic, just as the axiomatic deduction system of T, S4, 55, and B are obtained from that of classical propositional logic (see Section 8.3).

APPENDIX

(a simple form of formal proof in natural deduction)

In this appendix we shall introduce a simple and clear form to facilitate the writing and reading of formal proofs in natural deduction. In the form to be introduced, one formula is written on each line:

1)

In this diagram Ai, A2, A3, A4 are the premises. They are written in such a way that Ai is the first premise and is written in the leftmost position. A2, the second premise, is written on the right of Ai (that is, the first symbol of A2 is written on the right of that of Ai), and A3 is written on the right of A2, etc. Bi is not written on the right of A4, but under it (that is, the first symbol of Bi is aligned with that of A 4 ). Then Bi is not a premise, but a conclusion. Similarly for B2 and B3. Therefore a formula in such a diagram is a premise iff it is written on the right of the formula immediately preceeding it. Each formula which is a conclusion is intended to express a scheme of formal deducibihty. The conclusion of the scheme expressed is the formula itself, and the premises of the scheme include the topmost formula over the

221

B->C[-A->C A can be written in the following form: f(l) A->B (2) (3) (4) 3) < < \ I(5) (6) (7) I I(8) I I [(9) V V B->C A A -> B A B B -+ C A->C (by (c)) (by (c)) (by (->-).AhA->B A A.B->C. Then the formal proof: f f (1) (2) (3) (4) (5) 2) < V V v [(6) A ->B. (4).A3. A h A A ->B. B3 express.A3.A3. for instance.B->C. the conclusions Bi.A4 h B 2 . B .222 Mathematical Logic for Computer Si er Science conclusion and all those premises to the left of this topmost formula.B-»C. but a > . Ai.(6)) (l b ( (b: y(^+).> B .A4 | . respectively.A2.A4 I-B3.> C . (5)) C (by (e)) ( (byy(^-).B i .A2.A|-C A A -+B. B2.A|-B-> C A A ->B. Ai.(7). Ai. In 1). We note that A — C in (9) of 3) is written » under B —• C in (2). respectively. This means that A -> C is not a premise.(8)) 0b in which the formulas (conclusions) in (4)-(9) of 3) express. the schemes in (l)-(6) of 2).A|-B A A ->B.B4C. We note that Bi is not included in the premises for B 2 or B3. Similarly for B 2 .A2. Bi is not a premise. because Bi is not the topmost formula over B 2 or B3.

B — C. and (7) (using (e)) occur repeatedly and may be deleted. while A -> B in (4) of 3) is a conclusion. ( 3 ) ) (by (->-).(6) (by(->-). (4)) (->-). and that the premises for A — C include A — B and B — C. (5)) We note that A -+ B in (1) of 3) is a premise. Suppose we are to prove A—» B. > Obviously 3) is simpler and clearer than 2). A — B. 3) may be simplified as: 4) f ((1) A --> B (1) A > B l) B --4 C 4C (2) (2) A (3) (3) < 1(4) B (4) (5) C C (5) [(6) A^C C A ^C . because some steps are deleted. which we shall describe. But 3) can be further simplified. (2).) .> . > » > and A occur not only as premises but as conclusions as well. ( l ) . (5).AppendixX 223 conclusion. There is another advantage of this new form. We may first write the > proof as r A. because the steps (4).(5)) (by (->+). Similarly for B — C and A in 3).(l). (by (->+). But in 4).-^B A-+B B->C c 5) A->C c and then add A and C to 5) in the following way: A->B » C B->C A c C A->C C . B —>C|— A — C. > > » Hence A —• C expresses the scheme in (6) of 2).(3)) ( (1b y ( .

Example If E. (2)) B (by supposition.-. (3). (1) VxA(x) ->■ B (2) -. (1) E (2) (3) (4) (5) (6) . (4)) □ .3x(A(x) -> B) (3) Vx-(A(x) -> B) (by Thm 3. (5)) Example le VxA(x) .3 [2]. (3).-).4 B h 3x(A(x) -> B) Proof. (4).( A V B) | . (2)) (4) . (4).A (by (^+). The blanks between A and C can be filled easily. The following are some examples to show how this new form is used in proving schemes of formal deducibility.A A (by .--A A ->B Proof. E. (1) ^ ( A v B ) (2) A (3) A V B (by(V+). u not in (1)) (5) A(u) (by Thm 2.6.A|--B. ) then E \. (1).A ^ A -. Proof. (4)) (6) -B (by Thm 2.5.^ A h A.224 Mathematical Logic for Computer Sci ■er Science Thus 5) can be obtained from it by applying (—»+). (1)) (5) ->B (analogous to (4)) (6) -nAAnB (by (A+).7 [5].6.A. (5)) D Example le . A | .B.-.7 [6]. (3)) ->B (the same as (4)) (by (-. (2)) (4) -(A(u) -»• B) (by (V-).

D .) .p. We first prove A(u) . □ Examplee n. 3x(A(x) — B) — VxA(x) — B.(2)) (by ( _ . ( ! ) . u not in A(x)) (3)A(u)VB(u) (by(V+). (5)) (8) B (by ( . (3)) Similarly for VxB(x) | .Appendix X 225 (7) VxA(x) (by (V+).VxA(x) -> B as follows: (1) A(u) -> B (2) VxA(x) (3) A(u) (4) B (5) VxA(x) -»• B (by (V-). ► | > Proof. (1). Then the theorem is proved by (V—). (1).-). _ ) .Vx(A(x) V B(x)).+ .> B | . (7)) (9) 3x(A(x) -> B) (by (-. We first prove VxA(x) hVx(A(x)VB(x)) as follows: (1) VxA(x) (2) A(u) (by (V-). (6)) D Examplee VxA(x) V VxB(x) h Vx(A(x) V B(x)) Proof. x not occurring in B. Then the theorem is proved by (3—).(4)) We may take u not occurring in (5).(2)) (4) Vx(A(x)VB(x)) (by(V+). ( 3 )) (by (-► +). (8).

blank .This page is intentionally left blank.

582-591. (English transl.. (North-Holland. Acad.BIBLIOGRAPHY Chang. Brouwer. of Ch. Basic Papers on Undecidable Propositions. and H. Symb. Amsterdam. C . Sci. Symb. [1936] A note on the Entscheidungsproblem. in Van Heijenoort [1967]. 525-581. C. 159-166. M. V. G. 349-360. Lett.) Davis. Godel. (5) 15. L. (English transl. J. and M. (Raven Press. Bull. 37. (Methuen and Co.) Glivenko. and Computable Functions. (ed. New York. Logic 1.) Church. 40-41. [1929] Sur quelques points de la logique de M. [1949] The completeness of the first-order functional calculus. A. 33-160. 5 in Van Heijenoort [1967]. Cresswell [1968] An Introduction to Modal Logic. J. J. 183-188. Roy. [1930] Die Vollstandigkeit der Axiome des logischen Funktionenkalkiils. E. Belg. [1930] Recherches sur la theorie de la demonstration. Phys. (Reprinted with corrections in Davis [1965].) 227 . Varsovie. Monatsh. J.) [1965] The Undecidable. Keisler [1973] Model Theory. Trav. K. Unsovable Problems. Ltd. Math. Her brand. Soc. Sci.) Hughes.) Henkin. J. Cl. Ill 33. Logic 14. 110-115.

Formal Systems and Recursive Functions. 1 in Van Heijenoort [1967].-Akad. Broy and G. Ann. (Harvard Univ. Norske Vid. A. 252-263. Math. Reidel Publishing Company. Holland. A. [1982] Verification of sequential programs: temporal axiomatization. [1965] Semantical analysis of intuitionistic logic I. J. Z. (D. Mass. M. kl.) Lowenheim. Crossley and M.228 Bibliographyy Kripke. a Source Book in Mathematical Logic 18791931. 228-251. N. Cambridge. of Sec. (English transl. (ed. (English transl. J. Dummett. E. Kristiana Mat. in Van Heijenoort [1967].) [1967] From Frege to Godel.) Skolem. (North-Holland. [1920] Logisch-kombinatorische Untersuchungen iiber die Erflillbarkeit oder Beweisbarkeit mathematischer Satze nebst einem Theoreme iiber dichte Mengen I. [1915] Uber Moglichkeiten im Relativkalkiil. 53-102.) Van Heijenoort. T.Naturv. eds. S.) . Theoretical Foundations of Programming Methodology. Press. eds. Skr. Schmidt. Amsterdam. 92-130. L. 76. (4). 447-470.) Manna.

. . . . ./?) 7 ( a i .> T 229 . x S n p qr -. 137 10 12 12 15 15 15 15 15 15 15 £ 55 iff 6 C 0 U |J r\/ 1 |5| iV 7 => <=> «= Def 7 y Thm Lem Cor 6 6 7 7 ind hyp {x\_x_} _ } D 7 n T o\ S71 dora ran n (a. . E 5 f\SS r^ - 9 10.LIST OF SYMBOLS The numbers refer to the pages on which the symbol occurs (or its meaning is explained) for the first time.) 8 9 9 9 8 8 D £? 15 21 Si x .an) . 22 A 22 V 22 22 f:S->T.

t2) 78 ... 75 76 46 47 47 47 47 47 47 47 50 £(A0 76 C{9) Term(£)O 76 G f(t!..V„) 78 F(ti.tB) 76 t 77 U(Sl..\/...A) (A*B) ABC deg(A)....t„) 78 « (ti....sn) Atom(C) <c) 78 78 U(V!.....) 26 t 35 p' A* £ £' 35 35 36 36 41 41 41 a b c 74 F G H « 74 75 74 f g h 74 u v w V 3 75 75 x y z 75 S|= A E^ A B A H B \46 46 (Ref) (A-) (A+) (V-) (V+) (-►-) (->+) (*+-) (*+ +) (e) 48 E(-A Vx 75 3x 75 .A (Tr) 53 (-+) 23 23 -| 56 | 66 4 66 M £ 70 74 G 70 50 55 ( ) A |—| B 56 Atom (C ) * 23 23 23 24 Form (CP) (-.230 List o/ Symbols -> -H- 22 22 22 22 p Y.

xn A(xx... xn 99 3 xx.xn) 100 100 Q 102 3 ! 103 ! 3! 103 (Axl) 109 (Ax2) 109 (Ax3) 109 (Ax4) 109 (Ax5) 109 (Ax6) 109 (Ax7) 109 (Ax8) 109 (Ax9) 109 (AxlO) 110 (Axil) 110 (Axl2) 110 (Axl3) 110 (Axl4) 110 (Axl5) 110 (Axl6) 110 (Axl7) 110 (Axl8) 110 (Rl) 110 (R2) 110 E I A 110 consis 127 max consis 127 T 134 t 134 ' t 137 TT 138 HA A 151 H H 151 K 160 he 163 (> 164 -) he 164 he 164 L 180 M 180 pm £pm 180 Atomic?"1pm\ ) 180 ) mprn C Form{£P ) ) 180 (LA) 180 ...List of Symbols 231 tj « t2 78 Form(C) (C) 78 VxA(x) 78 3xA(x) 78 v 87 tvV 88 A vV 88 v(u/a) a) 88 S" 91 (V-) 98 (V+) 98 (3-) 98 (3+) 98 (w -) 98 («+) 98 V xi... xn 99 Vxx...... . xn A(xx.xn) 100 100 3xx... ..

232 List of Symbols S5 T S4 B N5 (=T Hs 4 \=B 183 183 183 183 184 184 184 184 185 186 186 186 186 186 186 186 186 188 196 196 198 205 205 205 205 S4Q S5Q BQ H Q 206 206 206 207 207 207 207 208 208 208 208 208 Hs4Q hs 5 Q HBQ TQ(BF) S 4 Q(BF) S 5 Q(BF) BQ(BF) |=TQ(BF) (MA) (L-) (L+) (">-(L)) (L+L) (L+M) (LM+) h-T |-s4 hs5 |-B A sub sub}nn £m Rep eq 186 Hs4Q(BF) (=S 5 Q(BF) |=BQ(BF) 208 208 208 186 BF 208 210 210 210 210 210 210 210 (BF) 210 I-TQ hs4Q hs5Q I-BQ hTQ(BF) 210 |-S4Q(BF) hs5Q(BF) l BQ(BF) - l TermiC™)) 171 AtomiC * ) ) (« -') 218 FormiC171) n ) TQ 206 .

Ruth C. addition of premise 46 adequate set of connectives algorithm 31 antecedent 29 assignment 86 associative law 43 associativity A56 65 V.INDEX The numbers refer to the pages on which the term (or the same term of different meanings) occurs for the first time.58 atom 23. 78 atomic formula 23 axiom 109 axiomatic deduction system Bconsistency 186 maximal consistency provability 186 satisfiability 184 validity 184 valuation 184 Barcan.57 +->. 208 186 109 233 .

E. C. L. C. 180 Church. 184 Cconsistency 164 formally provable 164 logical consequence 163 maximal consistency 164 satisfiability 163 validity 163 cardinal 10 cardinal number 10 Cartesian product 8 Chang. 92 classical first-order logic 69 classical logic 17 classical propositional logic 17 clause 61 closed formula 80 closed term 77 commutative law 43 .234 Index Barcan formula 208 basis of induction 12 bound variable 72 bound variable symbol 75 BQconsistency 210 maximal consistency 210 provability 210 satisfiability 207 validity 207 valuation 206 BQ(BF)consistency 210 maximal consistency 210 provability 210 satisfiability 208 validity 208 valuation 208 Brouwer. J. A.

136. J. 198. 139. 178. 132. M.58 comma 75 compactness 147 complement 7. 203. 161 contradiction 37 Cresswell.Indexx 235 commutativity A56 V. 22 consequent 29 consistency 126 constructive 158 constructive valuation 160. 63 complementary 63 complete 118 Completeness Theorem 131. 184 countable 11 countably infinite 11 course-of-values induction 13 Deduction theorem 111 definition by recursion 13 degree of complexity of A G Form(£p)P) De Morgan's Law 57 difference 7 disjoint 7 disjunct 29 disjunction 22 disjunction formula 29 disjunction property 172 disjunctive normal form 61 26 .57 <->. 216 compound proposition 18 conclusion 1 conjunct 29 conjunction 22 conjunction formula 29 conjunctive normal form 61 full — 63 connective 18.

236 Indexx full — 63 domain 70 domain of functions dual 44. 56. 97 duality 44. 75 existential quantifier symbol 75 expression 22 3-free prenex normal form 149 186 . 97 E-property 133 element 5 elementary logic 69 elimination -iA46 47 9 V. 93 exclusive or 19 existence property 133 existential formula 81 existential quantifier 71.» .186 —^-elimination in the scope of L empty expression 22 empty set 6 enumerable 11 enumerably infinite 11 equality symbol 74 equipotent 10 equivalence 22.47 V.46 <->.98 «98 L .98 3 . 29 equivalence class 10 equivalence formula 29 equivalence relation 10 equivalent formulas 41.47 .

Index

237

falsehood 18 first-order language 74 first-order logic 69 formal deducibility 46, 50, 99 closed under — 128 scheme of — 48 transitivity of — 53 formal deduction 46, 110 rule of — 46 formal language 3 formal proof 50, 110 formally deducible 46, 50, 110 formally provable 46, 59, 110 formation rules of formulas 23, 78 formation rules of terms 76 formation sequence 25 formula 23, 78 free variable 72 free variable symbol 75 function 8 function symbol 74 Glivenko, V. 167 Godel, K. 133 Godel's completeness theorem Godel translation 168 Henkin, L. 133 Herbrand, J. 154 Herbrand theorem Herbrand universe Herbrand valuation higher-order logic Hughes, G. E. 184 if-then-else 66 implication 21, 29 implication formula impossible 179

133

153 151 152 74

29

238

Index lex

inclusive or 19, 22 independence 140 indirect proof 49 individual 70 individual symbol 74 induction hypothesis 12 induction on the structure of formal deducibility induction on the structure of formulas 25, 80 induction on the structure of terms 77 induction proposition 12 induction step 12 induction variable 12 inductive definition 11 inductive proof 12 initial segment 23 injection 9 instance 153 interpretation 84 intersection 7 introduction — 55

A47

51

V- 47 - + - 46 <->- 47 V- 98 3- 98 « - 98 L - 186 L-introduction to L 186 L-introduction to M 186 LM- 186 Keisler, H. J. Kripke, S. A. 181 159, 185

law of excluded middle 57 law of non-contradiction 56 left parenthesis 22

Index

239

Leibniz, G. W. 3, 181 length of an expression 22 Lindenbaum, A. 129 literal 61 logical consequence 93 logical symbol 75 logically equivalent formulas Lowenheim, L. 149 Lowenheim-Skolem theorem downward — 149 upward — 149

93 148, 149

Manna, Z. 185 mapping 9 matrix 106 maximal consistency 127 member 5 metalanguage 3 modal first-order language 205 modal first-order logic 205 modal logic 179 modal operator 179 modal propositional language 180 modal propositional logic 179 model 126 natural deduction 60 necessary 179 necessity 179 necessity symbol 180 negation 22, 29 negation formula 29 non-constructive 158 non-logical symbol 75 object language 3 one-one function 9 ordered n-tuple 8 ordered pair 7

240

Indexx

possibility 179 possibility symbol 180 possible 179 Post, E. L. 127 predicate logic 69 prefix 106 premise 1 prenex normal form 106 proof by cases 49 proof by induction 12 proper initial segment 23 proper segment 23 proper subset 6 proper terminal segment 23 proposition 1 proposition function 71 proposition symbol 22 propositional language 21 propositional logic 17 punctuation 22, 75 quantification 72 quantified 72 quantifier 71, 75 quantifier symbol 75 quantifier with restricted range quasi-formula 80

73

range of functions 9 reductio ad absurdum 54 reduction laws 191 reflexive relation 10 reflexivity 46 relation 8 relation symbol 74 relational calculus 69 replaceability of bound variable symbols 106 replaceability of equivalent formulas 44, 59, 97, 105, 170, 185, 188, 211 restricted functional calculus 69

91 satisfiability in a domain 119 scope 29. 211 S 4 Qconsistency 210 maximal consistency 210 provability 210 satisfiability 207 . 149 simple proposition 18 sound 117 Soundness Theorem 125. 192.Index 241 restricted predicate calculus restricted quantifier 73 restriction of a function 9 restriction of a relation 9 right parenthesis 22 rule of inference 110 69 s4- consistency 186 maximal consistency provability 186 satisfiability 184 validity 184 valuation 184 186 s5- consistency 186 maximal consistency 186 provability 186 satisfiability 183 validity 183 valuation 183 satisfiability 36. 194. 171. 82 second-order logic 73 segment 23 semantics 3 sentence 80 set 5 Sheffer stroke 66 Skolem. 126. T.

242 Indexx validity 207 valuation 206 S 5 Qconsistency 210 maximal consistency 210 provability 210 satisfiability 207 validity 207 valuation 206 S 4 Q(BF)consistency 210 maximal consistency 210 provability 210 satisfiability 208 validity 208 valuation 208 S 5 Q(BF)consistency 210 maximal consistency 210 provability 210 satisfiability 208 validity 208 valuation 208 strong consistency 172 structure 70 subordinate 196 subset 6 surjection 9 symmetric relation 10 syntactically equivalent formulas syntax 3 Tconsistency 186 maximal consistency provability 186 satisfiability 184 validity 184 valuation 184 56 186 .

37 truth valuation 35 truth value 18 truth-functional 179 undefined 162 union 7 universal formula 81 universal quantifier 71. 75 universal quantifier symbol 75 universal validity 92 validity 91 validity in a domain valuation 87 119 .IndexX 243 tautological consequence 41 tautologically equivalent formulas 41 tautology 37 term 76 terminal segment 23 theory of quantification with equality 69 TQconsistency 210 maximal consistency 210 provability 210 satisfiability 207 validity 207 valuation 206 TQ(BF)consistency 210 maximal consistency 210 provability 210 satisfiability 208 validity 208 valuation 208 transitive relation 10 true 92 truth 18 truth function 22 truth table 34.

162. 182.244 Index \x value 18 value of formulas 35. 208 value of terms 88 variable 70 well-formed formula world 180 23 . 181. 161. 88. 207.