Truth Deduction and Computation Logic and Semantics For Computer Science 1st Edition by RE Davis ISBN 0716782014 9780716782018 Download
Truth Deduction and Computation Logic and Semantics For Computer Science 1st Edition by RE Davis ISBN 0716782014 9780716782018 Download
https://ebookball.com/product/truth-deduction-and-computation-
logic-and-semantics-for-computer-science-1st-edition-by-re-davis-
isbn-0716782014-9780716782018-19792/
https://ebookball.com/product/mathematical-logic-for-computer-
science-2nd-edition-by-mordechai-ben-ari-
isbn-1447103351-9781447103356-19800/
https://ebookball.com/product/theory-of-computer-science-
automata-languages-and-computation-3rd-edition-by-isbn-klp-
mishra-n-chandrasekaran-isbn-9788120329683-15850/
https://ebookball.com/product/computer-science-press-an-
introduction-to-the-theory-of-computation-1st-edition-by-eitan-
gurari-isbn-10804/
https://ebookball.com/product/logic-in-computer-science-
modelling-and-reasoning-about-systems-2nd-edition-by-michael-
huth-mark-ryan-isbn-0511261586-9780511261589-19806/
Logic in Computer Science Modelling and Reasoning about Systems 2nd
Edition by Michael Huth, Mark Ryan ISBN 0511261586 9780511261589
https://ebookball.com/product/logic-in-computer-science-
modelling-and-reasoning-about-systems-2nd-edition-by-michael-
huth-mark-ryan-isbn-0511261586-9780511261589-19814/
https://ebookball.com/product/lncs-2803-computer-science-logic-
frontmatter-pages-1st-edition-by-matthias-baaz-johann-
makowsky-3540408010-19920/
https://ebookball.com/product/computer-science-with-mathematica-
theory-and-practice-for-science-mathematics-and-engineering-1st-
edition-by-roman-maeder-isbn-1595720596-9780521663953-19788/
https://ebookball.com/product/c-for-computer-science-and-
engineering-1st-edition-by-vic-broquard-
isbn-1941415539-9781941415535-19790/
Digital Logic and Computer Design 1st edition by Morris Mano ISBN
817758409X 978-8177584097
https://ebookball.com/product/digital-logic-and-computer-
design-1st-edition-by-morris-mano-
isbn-817758409x-978-8177584097-17666/
PRINCIPLES OF COMPUTER SCIENCE SERIES
Series Editors
Alfred V. Aho, Bell ??Aephone Laboratories, Murray Hill, New Jersey
Jeffrey
Computer
D. Ullman, Stanford University, Stanford, California
Organization
TRUTH,DEDUCTION,AND
Michael Andrews
Trends in Theoretical Computer Science COMPUTATION
Egon Rorger, Editor
‘B-uth, Deduction, and Computation: Logic and Semantics for Computer Science
R. E. Davis
The luring Omnibus
Logic and Semantics for Computer Science
A. K. Dewdney
Formal Languages and Automata Theory
Vladimir Drobot
Advanced C: Food for the Educated Palate
Narain Gehani
R. E. DAVIS
C: An Advanced Introduction Santa Clara University
Narain Gehani
C: An Advanced Introduction, Ansi C Version
Narain Gehani
C for Personal Computers: IBM PC, AT&T PC 6300, and Compatibles
Narain Gehani
An Introduction to the Theory of Computation
Eitan Gurari
Theory of Relational Databases
David Maier
An Introduction to Solid Modeling
Martti Mantyla
Principles of Computer Design
Leonard R. Marino
UNIX: The Minimal Manual
Jim Moore
A Logical Language for Data and Knowledge Bases
Shamim Naqvi and Shalom Tsur
The Theory of Database Concurrency Control
Christos Papadimitriou
Algorithms for Graphics and Image Processing
Theo Pavlidis
Data Compression Methods and Theory
James A. Storer
The Elements of Artificial Intelligence
Steven lbnimoto
Computational Aspects of VLSI
Jeffrey D. Ullman
hinciples of Database and Knowledge-Base Systems, Volumes I and II
Jeffrey D. Ullman
Algorithmic Studies in Mass Storage Systems
C. K. Wong
1234567890 RRD 8 9
To John, Michael, Kevin, and Peter
1234567890 RRD 8 9
... Contents Contents
Vlll ix
Bibliography 257
4 ELEMENTARY NUMBER THEORY 105
4.1 The Language 105
Index 261
4.2 ‘Ruth 106
4.2.1 Intuitive Number Theory (INT) 107
Exercises 116
4.3 Deduction 117
4.3.1 Consistency of FZVY 122
4.4 Undecidability and Incompleteness 124
4.4.1 Extending Undecidability Results 139
4.4.2 Incompleteness of Fn/l 142
Exercises 144
Bibliography 257
4 ELEMENTARY NUMBER THEORY 105
4.1 The Language 105
Index 261
4.2 ‘Ruth 106
4.2.1 Intuitive Number Theory (INT) 107
Exercises 116
4.3 Deduction 117
4.3.1 Consistency of FZVY 122
4.4 Undecidability and Incompleteness 124
4.4.1 Extending Undecidability Results 139
4.4.2 Incompleteness of Fn/l 142
Exercises 144
tional (mathematical) description. The denotational description is mined, but the choice of one move to make is not. Nondeterministic
also most useful when attempting to prove the equivalance of dif- computation is discussed in Section 3.4.2 on logic programming.)
ferent implementations of the same language. We will investigate four languages (formalisms): Propositional
We could argue the advantages and drawbacks of each approach, Logic, Predicate Calculus, Elementary Number Theory, and
or we can realize that each has its place and see what we can learn Lambda Calculus. In each case, the syntax of the language is
about the relationships between these descriptive devices. described first; then we examine separately the truth, deduction,
Because a solid foundation in mathematical logic is also critical to and computation aspects of the language; and finally, discover the
the study of computer science, I have combined an introduction to relationships among these concepts.
formal logic with the study of three approaches to semantics of In Propositional Logic we will find that truth, deduction, and
languages. In particular, I chose to investigate the concepts of truth computation are equivalent and that our computation scheme pro-
(denotational semantics), deduction (axiomatic semantics), and vides a decision procedure for provability in the theory. The model
computation (operational semantics) as they apply to mathematical theory of Propositional Logic is explicated by means of truth tables,
logic and computer science formalisms (i.e., languages) and to and a minimal (in number of axioms) formal theory is presented.
observe how the relationships among these ideas vary as the For computation, the process of complementary literal elimination
expressive power of the formalism increases. (CLE), or ground resolution, which provides a decision procedure
The investigation of each formalism begins with a description of for the theory, is described. An alternative computation scheme is
the syntax of the language. This is simply a description of the sym- offered that is simply a method of generating a truth table for a
bols allowed and the rules by which the symbols may be combined given formula, establishing its truth, and therefore (by complete-
to form legal sentences of the language. ness) its provability.
Truth is an intuitive notion. Since the symbols of a formalism (lan- For Predicate Calculus our computation scheme is expanded to
guage) have no intrinsic meaning, we speak of truth in an interpre- general resolution. An alternative computation scheme for a subset
tation of a formalism. An interpretation gives meaning to the of Predicate Calculus known as Horn clauses is also discussed. This
symbols and sentences of a language by mapping them onto objects is the basis for many logic programming systems, such as Prolog and
in the domain of interpretation. For example, the French map the its descendants. Again, we can show the equivalence of our notions
sequence of symbols “pomme ” onto the object we call “apple.” of truth, deduction, and computation. However, we cannot decide
Deduction involves the formal manipulation of symbols accord- whether or not our computation will yield any results. If a sentence
ing to prescribed rules. A deductive system, or formal theory, speci- is provable, then computation will terminate successfully, and if
fies the rules by which derivations can be made. These derivations computation terminates successfully, then the sentence is prov-
are strictly syntactic, so they have no intrinsic meaning. In particu- able. We cannot, however, put any bound on our computation; we
lar, proof is a syntactic notion; its relationship with truth depends have no way of knowing whether or not the program will
upon the formal theory being investigated. terminate.
Computation is also syntactic in nature and closely related to In Elementary Number Theory we look more closely at what we
deduction. Computation suggests an algorithm; we are interested mean by an algorithm (effectively computable function) and prove
not only in what the legal moves are, but in how we might execute that the formal system is undecidable. We also establish the undeci-
them. Thus a computational scheme must provide some informa- dability of Predicate Calculus (which we had left hanging after
tion to control the use of the rules for rewriting symbols. showing that the procedure we had described did not provide a
(Note: We are concerned with deterministic computation only. decision procedure). We sketch Godel’s incompleteness results,
Thus we always know what to do next. Nondeterministic computa- exhibiting a sentence that is true under the standard interpretation
tion is closer yet to deduction-a set of possible next moves is deter- but not provable.
tional (mathematical) description. The denotational description is mined, but the choice of one move to make is not. Nondeterministic
also most useful when attempting to prove the equivalance of dif- computation is discussed in Section 3.4.2 on logic programming.)
ferent implementations of the same language. We will investigate four languages (formalisms): Propositional
We could argue the advantages and drawbacks of each approach, Logic, Predicate Calculus, Elementary Number Theory, and
or we can realize that each has its place and see what we can learn Lambda Calculus. In each case, the syntax of the language is
about the relationships between these descriptive devices. described first; then we examine separately the truth, deduction,
Because a solid foundation in mathematical logic is also critical to and computation aspects of the language; and finally, discover the
the study of computer science, I have combined an introduction to relationships among these concepts.
formal logic with the study of three approaches to semantics of In Propositional Logic we will find that truth, deduction, and
languages. In particular, I chose to investigate the concepts of truth computation are equivalent and that our computation scheme pro-
(denotational semantics), deduction (axiomatic semantics), and vides a decision procedure for provability in the theory. The model
computation (operational semantics) as they apply to mathematical theory of Propositional Logic is explicated by means of truth tables,
logic and computer science formalisms (i.e., languages) and to and a minimal (in number of axioms) formal theory is presented.
observe how the relationships among these ideas vary as the For computation, the process of complementary literal elimination
expressive power of the formalism increases. (CLE), or ground resolution, which provides a decision procedure
The investigation of each formalism begins with a description of for the theory, is described. An alternative computation scheme is
the syntax of the language. This is simply a description of the sym- offered that is simply a method of generating a truth table for a
bols allowed and the rules by which the symbols may be combined given formula, establishing its truth, and therefore (by complete-
to form legal sentences of the language. ness) its provability.
Truth is an intuitive notion. Since the symbols of a formalism (lan- For Predicate Calculus our computation scheme is expanded to
guage) have no intrinsic meaning, we speak of truth in an interpre- general resolution. An alternative computation scheme for a subset
tation of a formalism. An interpretation gives meaning to the of Predicate Calculus known as Horn clauses is also discussed. This
symbols and sentences of a language by mapping them onto objects is the basis for many logic programming systems, such as Prolog and
in the domain of interpretation. For example, the French map the its descendants. Again, we can show the equivalence of our notions
sequence of symbols “pomme ” onto the object we call “apple.” of truth, deduction, and computation. However, we cannot decide
Deduction involves the formal manipulation of symbols accord- whether or not our computation will yield any results. If a sentence
ing to prescribed rules. A deductive system, or formal theory, speci- is provable, then computation will terminate successfully, and if
fies the rules by which derivations can be made. These derivations computation terminates successfully, then the sentence is prov-
are strictly syntactic, so they have no intrinsic meaning. In particu- able. We cannot, however, put any bound on our computation; we
lar, proof is a syntactic notion; its relationship with truth depends have no way of knowing whether or not the program will
upon the formal theory being investigated. terminate.
Computation is also syntactic in nature and closely related to In Elementary Number Theory we look more closely at what we
deduction. Computation suggests an algorithm; we are interested mean by an algorithm (effectively computable function) and prove
not only in what the legal moves are, but in how we might execute that the formal system is undecidable. We also establish the undeci-
them. Thus a computational scheme must provide some informa- dability of Predicate Calculus (which we had left hanging after
tion to control the use of the rules for rewriting symbols. showing that the procedure we had described did not provide a
(Note: We are concerned with deterministic computation only. decision procedure). We sketch Godel’s incompleteness results,
Thus we always know what to do next. Nondeterministic computa- exhibiting a sentence that is true under the standard interpretation
tion is closer yet to deduction-a set of possible next moves is deter- but not provable.
Thus in moving from Propositional Logic through Predicate Cal- Elliott Mendelson, for the formal theories of .& 232, and T5Vc and
culus to Elementary Number Theory, we begin with decidability Christopher Wadsworth, for his work on the lambda calculus.
and completeness, first lose decidability, and finally also lose I am also indebted to over six hundred graduate students who
completeness. suffered through various versions of this text over the past several
When studying the X-calculus we run into a few surprises. Intui- years. Many provided comments and occasionally some construc-
tively, we expect to be able to equate termination of computation tive criticism. Donna Potter did an excellent job of providing
with the ability to find a normal form This idea of computation detailed criticism on an early draft.
takes the reduction rules (inference rules) of the formal system and I am grateful to Barbara Friedman of Computer Science Press for
uses them as computational rules. A normal form is reached when her helpfulness and understanding when medical complications
no more reductions are possible. This might lead us to believe that interfered with the timely completion of the manuscript; and I am
terms without normal forms should be different (semantically dis- most grateful to Fred Schlichting for keeping complications from
tinguishable) from those with normal forms. However, this turns turning to tragedy.
out not to be the case. I also wish to thank John R. Allen, and Michael, Kevin, and Peter
This unexpected fact caused C. Wadsworth to look more closely Davis-Allen for putting up with each other and with my absence in
at the idea of computation. A more adequate analysis of computa- the early hours of the morning for so very, very long.
tion involves the concept of a generalized normal form (head nor-
mal form), which gives much more satisfying results with respect to
the models.
We exhibit several examples of terms that are equal in the models
but cannot be proved so in the formalism; thus, the X-calculus is
also incomplete. However, if we restrict our attention to terms with
normal forms, we can establish the equivalence of truth, deduction,
and computation. We also show that if we allow approximate normal
forms, we get completeness in the limit, That is, every term is the
limit of its approximate normal forms, so we can compute the
approximate normal forms of a term to get a closer and closer
approximation of the term itself.
The formalisms presented are arranged in the order of their
expressive power. Anything that can be expressed in one formalism
can be expressed in the one following it. This is one reason that once
we lost decidability and completeness because of statements formal-
izable within the system, they were gone forever.
Acknowledgments
First and foremost I must acknowledge John R. Allen, who pointed
me toward this subject in the first place, insisting that it was prereq-
uisite material for anyone who wanted to pursue study in computer
science. I owe an obvious debt to all my sources, but most notably:
Thus in moving from Propositional Logic through Predicate Cal- Elliott Mendelson, for the formal theories of .& 232, and T5Vc and
culus to Elementary Number Theory, we begin with decidability Christopher Wadsworth, for his work on the lambda calculus.
and completeness, first lose decidability, and finally also lose I am also indebted to over six hundred graduate students who
completeness. suffered through various versions of this text over the past several
When studying the X-calculus we run into a few surprises. Intui- years. Many provided comments and occasionally some construc-
tively, we expect to be able to equate termination of computation tive criticism. Donna Potter did an excellent job of providing
with the ability to find a normal form This idea of computation detailed criticism on an early draft.
takes the reduction rules (inference rules) of the formal system and I am grateful to Barbara Friedman of Computer Science Press for
uses them as computational rules. A normal form is reached when her helpfulness and understanding when medical complications
no more reductions are possible. This might lead us to believe that interfered with the timely completion of the manuscript; and I am
terms without normal forms should be different (semantically dis- most grateful to Fred Schlichting for keeping complications from
tinguishable) from those with normal forms. However, this turns turning to tragedy.
out not to be the case. I also wish to thank John R. Allen, and Michael, Kevin, and Peter
This unexpected fact caused C. Wadsworth to look more closely Davis-Allen for putting up with each other and with my absence in
at the idea of computation. A more adequate analysis of computa- the early hours of the morning for so very, very long.
tion involves the concept of a generalized normal form (head nor-
mal form), which gives much more satisfying results with respect to
the models.
We exhibit several examples of terms that are equal in the models
but cannot be proved so in the formalism; thus, the X-calculus is
also incomplete. However, if we restrict our attention to terms with
normal forms, we can establish the equivalence of truth, deduction,
and computation. We also show that if we allow approximate normal
forms, we get completeness in the limit, That is, every term is the
limit of its approximate normal forms, so we can compute the
approximate normal forms of a term to get a closer and closer
approximation of the term itself.
The formalisms presented are arranged in the order of their
expressive power. Anything that can be expressed in one formalism
can be expressed in the one following it. This is one reason that once
we lost decidability and completeness because of statements formal-
izable within the system, they were gone forever.
Acknowledgments
First and foremost I must acknowledge John R. Allen, who pointed
me toward this subject in the first place, insisting that it was prereq-
uisite material for anyone who wanted to pursue study in computer
science. I owe an obvious debt to all my sources, but most notably:
PRELIMINARY
DEFINITIONS
1
-- ~~__I_ ML---.. ._.-------_. .____i
CHAPTER 1
PRELIMINARY
DEFINITIONS
1
-- ~~__I_ ML---.. ._.-------_. .____i
2 Preliminary Definitions 3
DEFINITION: A set is denumerable if it can be put into a one- DEFINITION: An instance of a statement form or schema is a wff
to-one correspondence with the positive integers - in other words, obtained from the statement form by substitution. In particular, we
if there is a way to list (or enumerate) the elements such that each can substitute wffs for all metavariables (statement letters in the state-
element will eventually be listed, but the entire set can never be com- ment form), all occurrences of the same metavariable being replaced
pletely listed (there are always more elements). A set is countable if by the same wff. n
it is either finite or denumerable. n
For example, Theory X1:
DEFINITION: A formal theory 7 consists of the following:
1. The symbols are: A, B, C, 1 , +, ), and (. The symbols 7 and
+ can be read “not” and “implies”, respectively.
1. A countable set, of symbols. (A finite sequence of symbols of 7 is
called an expression of 7.) 2. A, B, and C are wffs, and if P and Q are any wffs, then (+) and
(P -+ Q) are also wffs.
2. A subset of the expressions, called the well-formed formulas
(abbreviated w$s) of 7. The wffs are the legal sentences of the 3. The axioms are:
theory.
b(P-4 1
3. A subset of the wffs called the axioms of 7.
W'-+(Q+P)>>
4. A finite set of relations RI,. . . , & on wffs, called rules of in- 4. There is one rule of inference:
ference. For each .& there is a unique positive integer j such
that for every j wffs and each wff A one can effectively decide Q is a direct consequence of (+Q-+P))
whether the given j wffs are in the relation & to A; if so, A is
called a direct consequence of the given wffs by virtue of &. Theory X has an infinite number of wffs and an Smite number of
For example, the rule modus ponens is a relation on three wffs, axioms. Metavariables P and Q were used to describe both of these
A, A + B, and B, by which B is a direct consequence of A and sets. Some wffs of X are:
A + B. n
A
The set of axioms of a theory is often infinite. It can usually be
specified by providing a finite set, of axiom schemata.
DEFINITION: A set is denumerable if it can be put into a one- DEFINITION: An instance of a statement form or schema is a wff
to-one correspondence with the positive integers - in other words, obtained from the statement form by substitution. In particular, we
if there is a way to list (or enumerate) the elements such that each can substitute wffs for all metavariables (statement letters in the state-
element will eventually be listed, but the entire set can never be com- ment form), all occurrences of the same metavariable being replaced
pletely listed (there are always more elements). A set is countable if by the same wff. n
it is either finite or denumerable. n
For example, Theory X1:
DEFINITION: A formal theory 7 consists of the following:
1. The symbols are: A, B, C, 1 , +, ), and (. The symbols 7 and
+ can be read “not” and “implies”, respectively.
1. A countable set, of symbols. (A finite sequence of symbols of 7 is
called an expression of 7.) 2. A, B, and C are wffs, and if P and Q are any wffs, then (+) and
(P -+ Q) are also wffs.
2. A subset of the expressions, called the well-formed formulas
(abbreviated w$s) of 7. The wffs are the legal sentences of the 3. The axioms are:
theory.
b(P-4 1
3. A subset of the wffs called the axioms of 7.
W'-+(Q+P)>>
4. A finite set of relations RI,. . . , & on wffs, called rules of in- 4. There is one rule of inference:
ference. For each .& there is a unique positive integer j such
that for every j wffs and each wff A one can effectively decide Q is a direct consequence of (+Q-+P))
whether the given j wffs are in the relation & to A; if so, A is
called a direct consequence of the given wffs by virtue of &. Theory X has an infinite number of wffs and an Smite number of
For example, the rule modus ponens is a relation on three wffs, axioms. Metavariables P and Q were used to describe both of these
A, A + B, and B, by which B is a direct consequence of A and sets. Some wffs of X are:
A + B. n
A
The set of axioms of a theory is often infinite. It can usually be
specified by providing a finite set, of axiom schemata.
When we say that P is deducible from the empty set, it sounds as DEFINITION: An interpretation supplies a meaning for each of
if we can deduce it from nothing. However, checking the definition of the symbols of a formal theory such that any wff can be understood
deducible from, we see that we always have the set of axioms of the as a statement that is either true or false in the interpretation. n
theory as an implicit set of assumptions.
For example, consider the following proof of A in Theory X: The above is only an intuitive definition of interpretation. We will
be more precise about what is required to specify an interpretation
1. (+A+A)) by the first axiom
when we discuss specific languages.
2. A by 1 and the rule of inference
3All the theories we study in this book are monotonic. There is a wealth of
The following properties of deducibility are consequences of the def-
research on non-monotonic logics. In such systems it is possible that the addition
inition of deducible from: of new information (axioms) can invalidate proofs that were possible prior to the
Let a and SJ be sets of wffs, and A a wff, then addition. Such logics are very useful in modelling common sense reasoning, in
which, for example, we modify conclusions derived from general rules by learning
*We will not continue to use the subscript ‘T on the symbol I-I; the theory we the exceptions. However interesting, these logics are outside the scope of this text.
mean should be clear from context. We refer the interested reader to [l], particularly to [11,27].
Preliminary Definitions
4 5
When we say that P is deducible from the empty set, it sounds as DEFINITION: An interpretation supplies a meaning for each of
if we can deduce it from nothing. However, checking the definition of the symbols of a formal theory such that any wff can be understood
deducible from, we see that we always have the set of axioms of the as a statement that is either true or false in the interpretation. n
theory as an implicit set of assumptions.
For example, consider the following proof of A in Theory X: The above is only an intuitive definition of interpretation. We will
be more precise about what is required to specify an interpretation
1. (+A+A)) by the first axiom
when we discuss specific languages.
2. A by 1 and the rule of inference
3All the theories we study in this book are monotonic. There is a wealth of
The following properties of deducibility are consequences of the def-
research on non-monotonic logics. In such systems it is possible that the addition
inition of deducible from: of new information (axioms) can invalidate proofs that were possible prior to the
Let a and SJ be sets of wffs, and A a wff, then addition. Such logics are very useful in modelling common sense reasoning, in
which, for example, we modify conclusions derived from general rules by learning
*We will not continue to use the subscript ‘T on the symbol I-I; the theory we the exceptions. However interesting, these logics are outside the scope of this text.
mean should be clear from context. We refer the interested reader to [l], particularly to [11,27].
6 Preliminary Definitions 7
DEFINITION: An interpretation is a model for a set of wffs 5 if concerned with the relationships between truth and computation, and
every wff in 8 is true in the interpretation. We say that an interpreta- between deduction and computation. So, for each theory we discuss,
tion provides a model for a formal theory ‘7 if it provides a model for we will define precisely what we mean by computation.
the set of theorems of 7. l
DEFINITION: A computation method is complete if for every
Completeness is a metatheoretic concept used to relate truth and sentence S the algorithm will terminate on input S in a finite amount
provability in a formal theory; soundness is the complementary prop of time, indicating whether or not S is true in all interpretations. m
erty.
Besides general completeness, we can speak of completeness with
DEFINITION: A theory is complete if every sentence that is true respect to a particular class of interpretations, narrowing the focus of
in all interpretations is provable in the theory. n
our discussion from truth in all interpretations to truth in some cho-
sen interpretations. This idea surfaces in Elementary Number Theory
DEFINITION: A theory is sound if every provable sentence is true (ENI), where we show that the theory is incomplete with respect to
in all interpretations. m the standard model (Intuitive Number Theory or 2X7), and is useful
in the study of programming formalisms.
Our example theory X is complete. It is possible to prove every Two other metatheoretic concepts of interest are the decidability
sentence that is true in all interpretations. In fact, it is possible to and consistency of a theory.
prove every sentence in theory X. We gave a sample proof of the wff
consisting of the single proposition letter A. Since the axioms and the DEFINITION: A formal theory is decidable if there exists an ef-
rule of inference are schemata we could use the form of that proof, fective procedure that will determine, for any sentence of the theory,
instantiated with different specific wffs to prove any wff. For example, whether or not that sentence is provable in the theory. n
we will prove (A+A).
We will occasionally wish to speak of the decidability of a property
1. (+(A+A)-+(A-+A))) by the first axiom
in a more general sense.
2. (A-+A) by 1 and the rule of inference
DEFINITION: Any property is said to be decidable if there exists
But theory X is not sound. If a wff A is true in all interpretations, an effective procedure (i.e., terminating algorithm) that will determine
then certainly its negation, TA, must be false. However, both of these whether or not the property holds. m
sentences are provable in X. Thus, something that is not true in all
interpretations is provable; therefore, X is unsound. This definition is purposefully vague definition since we may wish
A theory in which we can prove false results is not of much use, so to apply it to properties of symbols (is x a symbol of 7?), strings
we will insist that every theory we use be sound. It is easy to legislate, of symbols (is x a wff?), sets of wffs (is P deducible from set x?),
but we cannot ignore enforcement; although it is obvious that we want sequences of wffs (is x a proof?), and so on.
our theories to be sound, it is not always so obvious how we can prove
that they are sound. Soundness must be demonstrated, not simply DEFINITION: A theory is consistent if it contains no wff such
assumed. that both the wff and its negation are provable. m
If a theory is both sound and complete, we will say truth and de-
duction are equivalent and write “truth w deduction.” We will also be An inconsistent theory is usually not very useful, alt\ugh there are
-I
_ll.----.--- -
_._. --- .- -_
___-._..
_---
--
6 Preliminary Definitions 7
DEFINITION: An interpretation is a model for a set of wffs 5 if concerned with the relationships between truth and computation, and
every wff in 8 is true in the interpretation. We say that an interpreta- between deduction and computation. So, for each theory we discuss,
tion provides a model for a formal theory ‘7 if it provides a model for we will define precisely what we mean by computation.
the set of theorems of 7. l
DEFINITION: A computation method is complete if for every
Completeness is a metatheoretic concept used to relate truth and sentence S the algorithm will terminate on input S in a finite amount
provability in a formal theory; soundness is the complementary prop of time, indicating whether or not S is true in all interpretations. m
erty.
Besides general completeness, we can speak of completeness with
DEFINITION: A theory is complete if every sentence that is true respect to a particular class of interpretations, narrowing the focus of
in all interpretations is provable in the theory. n
our discussion from truth in all interpretations to truth in some cho-
sen interpretations. This idea surfaces in Elementary Number Theory
DEFINITION: A theory is sound if every provable sentence is true (ENI), where we show that the theory is incomplete with respect to
in all interpretations. m the standard model (Intuitive Number Theory or 2X7), and is useful
in the study of programming formalisms.
Our example theory X is complete. It is possible to prove every Two other metatheoretic concepts of interest are the decidability
sentence that is true in all interpretations. In fact, it is possible to and consistency of a theory.
prove every sentence in theory X. We gave a sample proof of the wff
consisting of the single proposition letter A. Since the axioms and the DEFINITION: A formal theory is decidable if there exists an ef-
rule of inference are schemata we could use the form of that proof, fective procedure that will determine, for any sentence of the theory,
instantiated with different specific wffs to prove any wff. For example, whether or not that sentence is provable in the theory. n
we will prove (A+A).
We will occasionally wish to speak of the decidability of a property
1. (+(A+A)-+(A-+A))) by the first axiom
in a more general sense.
2. (A-+A) by 1 and the rule of inference
DEFINITION: Any property is said to be decidable if there exists
But theory X is not sound. If a wff A is true in all interpretations, an effective procedure (i.e., terminating algorithm) that will determine
then certainly its negation, TA, must be false. However, both of these whether or not the property holds. m
sentences are provable in X. Thus, something that is not true in all
interpretations is provable; therefore, X is unsound. This definition is purposefully vague definition since we may wish
A theory in which we can prove false results is not of much use, so to apply it to properties of symbols (is x a symbol of 7?), strings
we will insist that every theory we use be sound. It is easy to legislate, of symbols (is x a wff?), sets of wffs (is P deducible from set x?),
but we cannot ignore enforcement; although it is obvious that we want sequences of wffs (is x a proof?), and so on.
our theories to be sound, it is not always so obvious how we can prove
that they are sound. Soundness must be demonstrated, not simply DEFINITION: A theory is consistent if it contains no wff such
assumed. that both the wff and its negation are provable. m
If a theory is both sound and complete, we will say truth and de-
duction are equivalent and write “truth w deduction.” We will also be An inconsistent theory is usually not very useful, alt\ugh there are
-I
_ll.----.--- -
_._. --- .- -_
___-._..
_---
--
8 preliminary Definitions
9
exceptions, particularly in the field of artificial intelligence; hence, all Well, no one said that every interpretation has to make sense. How-
the theories we study in detail will be consistent. However, it is impor- ever, interpretations are our means of connecting the purely syntactic
tant to realize that not all theories are consistent; consistency must be world of formal theories with the world of semantics.
demonstrated, particularly when dealing with programming languages.
We defined above what is meant by a decidable theory - that there
Exercises 1 .O
exists an effective procedure capable of determining whether or not any
given well-formed formula is a theorem. So if, within a given theory, 1. Review the definitions of sound, complete, consistent, and decid-
we can find some rule by which we can always tell whether a given wff able. Is it conceivable that a theory might be:
is provable or not, our theory is decidable. The example theory X is
decidable. In fact, the decision procedure is very simple: given any a. sound, but not complete?
wff, terminate immediately with the answer “Yes, it is provable.” b. sound, but not consistent?
We also know that X is inconsistent. We proved (A + A) as an
c. consistent, but not sound?
example above. We know that (l(A -+ A)) is also provable, as is any
axiom. Thus we have exhibited a wff such that both it and its negation d. complete, but not decidable?
are provable, implying that the theory is not consistent. (Aside: Look e. consistent and complete, but not sound?
again at the definitions of “sound” and “consistent.” The terms are
closely related, but not the same. For example, one might be able to Give a rationale or an example or both justifying each answer.
conceive of a theory in which one could prove only false statements.
Such a theory would be consistent but not sound.)
Wffs are strictly syntactic objects; they have meaning only when
an interpretation is given for the symbols. However, our definition of
consistency has assumed something about the meaning of 1. We have
said that it means negation. We shall fix the meaning of some of our
symbols - for example, the logical connectives 1 and + with which
we build complicated wffs from the atomic wffs. The meaning assigned
to these symbols will be defined precisely in Section 2.2.
The meaning attached to wffs of a theory is determined by the
meaning of the connectives, together with an interpretation. To supply
an interpretation for our theory X, we must specify the domain of
interpretation, and a relation over that domain for each of the symbols
A, B, and C. For example:
domain = integers
A means “2 is an even number”
B means “3 is an even number”
C means “21 is divisible by 7”
Under this interpretation, the wff (A --t (B ---t (X))) means: If 2 is
an even number, then (3 is an even number implies that it is not the
case that 21 is divisible by 7).
8 preliminary Definitions
9
exceptions, particularly in the field of artificial intelligence; hence, all Well, no one said that every interpretation has to make sense. How-
the theories we study in detail will be consistent. However, it is impor- ever, interpretations are our means of connecting the purely syntactic
tant to realize that not all theories are consistent; consistency must be world of formal theories with the world of semantics.
demonstrated, particularly when dealing with programming languages.
We defined above what is meant by a decidable theory - that there
Exercises 1 .O
exists an effective procedure capable of determining whether or not any
given well-formed formula is a theorem. So if, within a given theory, 1. Review the definitions of sound, complete, consistent, and decid-
we can find some rule by which we can always tell whether a given wff able. Is it conceivable that a theory might be:
is provable or not, our theory is decidable. The example theory X is
decidable. In fact, the decision procedure is very simple: given any a. sound, but not complete?
wff, terminate immediately with the answer “Yes, it is provable.” b. sound, but not consistent?
We also know that X is inconsistent. We proved (A + A) as an
c. consistent, but not sound?
example above. We know that (l(A -+ A)) is also provable, as is any
axiom. Thus we have exhibited a wff such that both it and its negation d. complete, but not decidable?
are provable, implying that the theory is not consistent. (Aside: Look e. consistent and complete, but not sound?
again at the definitions of “sound” and “consistent.” The terms are
closely related, but not the same. For example, one might be able to Give a rationale or an example or both justifying each answer.
conceive of a theory in which one could prove only false statements.
Such a theory would be consistent but not sound.)
Wffs are strictly syntactic objects; they have meaning only when
an interpretation is given for the symbols. However, our definition of
consistency has assumed something about the meaning of 1. We have
said that it means negation. We shall fix the meaning of some of our
symbols - for example, the logical connectives 1 and + with which
we build complicated wffs from the atomic wffs. The meaning assigned
to these symbols will be defined precisely in Section 2.2.
The meaning attached to wffs of a theory is determined by the
meaning of the connectives, together with an interpretation. To supply
an interpretation for our theory X, we must specify the domain of
interpretation, and a relation over that domain for each of the symbols
A, B, and C. For example:
domain = integers
A means “2 is an even number”
B means “3 is an even number”
C means “21 is divisible by 7”
Under this interpretation, the wff (A --t (B ---t (X))) means: If 2 is
an even number, then (3 is an even number implies that it is not the
case that 21 is divisible by 7).
CHAPTER 2
PROPOSITIONAL LOGIC
JiilmLe-__-- . 11 -__I
-~
CHAPTER 2
PROPOSITIONAL LOGIC
JiilmLe-__-- . 11 -__I
-~
12 Propositional Logic 2.1 The Language 13
thus 4’ may be read as “not P” and P+Q as “if P then Q” to express all formulas. When we consider computation we will use a
or “P implies Q.“) different set of sufficient connectives than the one we chose for our
formal system of Propositional Logic.
DEFINITION: If P is a wff in which no proposition letters other DEFINITION: The scope of a connective is the wff or wffs to which
than those in the set {Ai, . . . , An} occur, then P is said to be a formula the connective applies. n
in the proposition letters Al, . . . , A,. n
DEFINITION: 8 is a suficient set of connectiues if any logical 1. Remove all redundant pairs of parentheses (i.e., those that are
function can be expressed in terms of connectives in the set S. n not needed due to the conventions described above) from each of
the following wffs:
The set (1, -} is a sufficient set of connectives. Sometimes it is
more convenient to use one set of connectives than another. It makes no a. (((A A bW-0)) V (A A (~-+A))))+(C A WW
difference, formally, as long as the set of connectives chosen is sufficient b. (((B+(C-+A))-B)-(C-A))
12 Propositional Logic 2.1 The Language 13
thus 4’ may be read as “not P” and P+Q as “if P then Q” to express all formulas. When we consider computation we will use a
or “P implies Q.“) different set of sufficient connectives than the one we chose for our
formal system of Propositional Logic.
DEFINITION: If P is a wff in which no proposition letters other DEFINITION: The scope of a connective is the wff or wffs to which
than those in the set {Ai, . . . , An} occur, then P is said to be a formula the connective applies. n
in the proposition letters Al, . . . , A,. n
DEFINITION: 8 is a suficient set of connectiues if any logical 1. Remove all redundant pairs of parentheses (i.e., those that are
function can be expressed in terms of connectives in the set S. n not needed due to the conventions described above) from each of
the following wffs:
The set (1, -} is a sufficient set of connectives. Sometimes it is
more convenient to use one set of connectives than another. It makes no a. (((A A bW-0)) V (A A (~-+A))))+(C A WW
difference, formally, as long as the set of connectives chosen is sufficient b. (((B+(C-+A))-B)-(C-A))
Propositional Logic 2.2 Truth 15
14
2. Fully parenthesize each of the following wffs according to the con- A B A-B
ventions described above. tt t
tf f
ft t
a. A A lB+C V A A B--A-d7 A TB ff t n
b. B--+C-+A-+B-+C-+A
In informal usage, “if A then B” implies some sort of causal rela-
tionship. However, the (perhaps surprising) truth table entries of lines
3 and 4 can be explained by considering the following:
2.2 Truth
AAB-B (If A and B, then B)
For Propositional Logic, an interpretation consists of an assignment Certainly this implication should be true in all situations; $ we know
of a truth value (t or f, for “true” and “false”, respectively) to each two things, then we must certainly know the second of them.
proposition letter. The interpretation of a wff is determined by the
truth values of the proposition letters in the formula. By giving truth f + t is t: Suppose that A is false and B is true. Then the con-
tables to define the meaning of the connectives, we can describe how junction A A B is false, and the conclusion B is true.
the truth value of a wff is built from the truth values of its component
wffs. In constructing a truth table we exhibit all possible interpreta- f --f f is t: If B is false, we have that false implies false is true.
tions of a wff. Each line of the truth table assigns a unique combination
Intuitively, we simply do not want to consider cases in which the hy-
of truth values to the proposition letters of the wff, thus determining
pothesis of an implication is false as counterexamples to the truth of
an interpretation; we consider all possible interpretations by listing all
the implication. We define the implication to be true unless we can
possible assignments. In the following truth tables we use metavari-
show it to be false by exhibiting a case in which the hypothesis is
ables to emphasize that the definitions apply to arbitrarily complex
satisfied but the conclusion does not follow.
wffs.
If we know the meaning of the proposition letters, we can always
determine the meaning of a complicated wff by repeated use of the
DEFINITION: The logical connective “not,” written 1, represents
truth tables given above. Note that an interpretation is free to change
negation; TA is true iff A is false, as shown by the following truth only the meaning of individual proposition letters. The meaning of the
table: connectives is fixed by the truth tables just given.
The truth tables for the connectives A, V, and = can be determined
A 1A by considering the formulas they are abbreviations of. Given sepa-
t f rately, they are:
f t n
A B AVB A B AAB A B AGB
tt t tt t tt t
DEFINITION: + is a conditional; A-tB is read “A implies B” or “if
tf t tf f tf f
A then B”. A is the antecedent (or hypothesis) of the implication,
ft t ft f ft f
B is the consequent (or conclusion). The meaning of A-tB is given
ff f ff f ff t
by the following truth table:
2. Fully parenthesize each of the following wffs according to the con- A B A-B
ventions described above. tt t
tf f
ft t
a. A A lB+C V A A B--A-d7 A TB ff t n
b. B--+C-+A-+B-+C-+A
In informal usage, “if A then B” implies some sort of causal rela-
tionship. However, the (perhaps surprising) truth table entries of lines
3 and 4 can be explained by considering the following:
2.2 Truth
AAB-B (If A and B, then B)
For Propositional Logic, an interpretation consists of an assignment Certainly this implication should be true in all situations; $ we know
of a truth value (t or f, for “true” and “false”, respectively) to each two things, then we must certainly know the second of them.
proposition letter. The interpretation of a wff is determined by the
truth values of the proposition letters in the formula. By giving truth f + t is t: Suppose that A is false and B is true. Then the con-
tables to define the meaning of the connectives, we can describe how junction A A B is false, and the conclusion B is true.
the truth value of a wff is built from the truth values of its component
wffs. In constructing a truth table we exhibit all possible interpreta- f --f f is t: If B is false, we have that false implies false is true.
tions of a wff. Each line of the truth table assigns a unique combination
Intuitively, we simply do not want to consider cases in which the hy-
of truth values to the proposition letters of the wff, thus determining
pothesis of an implication is false as counterexamples to the truth of
an interpretation; we consider all possible interpretations by listing all
the implication. We define the implication to be true unless we can
possible assignments. In the following truth tables we use metavari-
show it to be false by exhibiting a case in which the hypothesis is
ables to emphasize that the definitions apply to arbitrarily complex
satisfied but the conclusion does not follow.
wffs.
If we know the meaning of the proposition letters, we can always
determine the meaning of a complicated wff by repeated use of the
DEFINITION: The logical connective “not,” written 1, represents
truth tables given above. Note that an interpretation is free to change
negation; TA is true iff A is false, as shown by the following truth only the meaning of individual proposition letters. The meaning of the
table: connectives is fixed by the truth tables just given.
The truth tables for the connectives A, V, and = can be determined
A 1A by considering the formulas they are abbreviations of. Given sepa-
t f rately, they are:
f t n
A B AVB A B AAB A B AGB
tt t tt t tt t
DEFINITION: + is a conditional; A-tB is read “A implies B” or “if
tf t tf f tf f
A then B”. A is the antecedent (or hypothesis) of the implication,
ft t ft f ft f
B is the consequent (or conclusion). The meaning of A-tB is given
ff f ff f ff t
by the following truth table:
Remember, each row of a truth table corresponds to one possible For example, A V 47 G B has the following truth table:
interpretation. If a wff P is made up of the proposition letters Pr, . . . ,
A B C -2 (Ah17) (AVS=B)
P, and propositional connectives, there are 2n possible interpretations
t t t f t t
assigning truth values to the proposition letters.
t t f t t t
The propositional connectives are logical functions in that they take t ft f t f
truth-valued arguments and define a truth-valued result. The connec- t f f t t f
tives defined above are unary (-), or binary (A, V, +, z), but we can ftt f f f
easily define a function of any number of arguments by supplying a f t f t t t
truth table that specifies the value of the function for all possible val- fft f f t
ues of its arguments, as we used truth tables to define the connectives f f f t t f
1, +, V, A, and G. If a function takes n arguments, then to define the
values of the function under all possible combinations of values of its
Reading across each line with a t in the last column, it is easy to
arguments will require a truth table with 2n lines.
see that A V 4’ G B is equivalent to
We can demonstrate that (1, A, V} is a sufficient set of connectives
by showing that any logical function f(zi, . . . , 2,) can be expressed in
terms of 1, A, and V.
Remember, each row of a truth table corresponds to one possible For example, A V 47 G B has the following truth table:
interpretation. If a wff P is made up of the proposition letters Pr, . . . ,
A B C -2 (Ah17) (AVS=B)
P, and propositional connectives, there are 2n possible interpretations
t t t f t t
assigning truth values to the proposition letters.
t t f t t t
The propositional connectives are logical functions in that they take t ft f t f
truth-valued arguments and define a truth-valued result. The connec- t f f t t f
tives defined above are unary (-), or binary (A, V, +, z), but we can ftt f f f
easily define a function of any number of arguments by supplying a f t f t t t
truth table that specifies the value of the function for all possible val- fft f f t
ues of its arguments, as we used truth tables to define the connectives f f f t t f
1, +, V, A, and G. If a function takes n arguments, then to define the
values of the function under all possible combinations of values of its
Reading across each line with a t in the last column, it is easy to
arguments will require a truth table with 2n lines.
see that A V 4’ G B is equivalent to
We can demonstrate that (1, A, V} is a sufficient set of connectives
by showing that any logical function f(zi, . . . , 2,) can be expressed in
terms of 1, A, and V.
DEFINITION: A wff that is always true, no matter what the truth 2. Determine whether each of the following wffs is unsatisfiable, a
values of its statement letters (proposition letters) may be, is called a tautology, both, or neither.
tautology. Such a statement P is said to be logically valid or true
in all interpretations, is denoted + P, and is read “P is logically a. (lA-+B)+(7B+A)
valid.” n b. (A-+B)-+(B--+A)
c. l(A-+(B+A))
DEFINITION: A wff is satisfiable if it is true in some interpreta-
d. l(A-+B)-+A
tion (i.e., there exists an assignment of truth values to the proposition
letters that makes the wff true). n e. Y(A+B)+Y(B+A)
3. Show that V, and A are commutative and associative.
If P is true in all models, then TP is false in all models; that is,
there does not exist an interpretation in which TP is true. a. commutativity:
AVBGBVA
DEFINITION: P is unsatisfiable if TP is logically valid. An un- AABEBAA
satisfiable wff is also called a contradiction. n
b. associativity:
The validity of any statement P is decidable. + P if and only if AV(BVC)G(AVB)VC
the column under P in its truth table (or under its main connective in AA(BAC)E(AAB)AC
the abbreviated form) contains only t’s - that is, P is true for every
possible interpretation (assignment of truth values to its proposition
letters). 4. Is + associative?
The first two requirements for a formal theory - the set of symbols
Exercises 2.2 and the class of well-formed formulas we presented in Section 2.1 -
describe the syntax of the language. It remains to describe the axioms
1. Demonstrate, via the truth table, that the wff and rules of inference of our formal theory for Propositional Logic
(which we shall call C).
((A-(B-C>>j((AjB>j(AjC))) There are many ways of axiomatizing Propositional Logic. The
following set of axioms is a minimal one. If A, B, and C are any wffs
is a tautology. of L, then the following are axioms of C.
18 Propositional Logic
DEFINITION: A wff that is always true, no matter what the truth 2. Determine whether each of the following wffs is unsatisfiable, a
values of its statement letters (proposition letters) may be, is called a tautology, both, or neither.
tautology. Such a statement P is said to be logically valid or true
in all interpretations, is denoted + P, and is read “P is logically a. (lA-+B)+(7B+A)
valid.” n b. (A-+B)-+(B--+A)
c. l(A-+(B+A))
DEFINITION: A wff is satisfiable if it is true in some interpreta-
d. l(A-+B)-+A
tion (i.e., there exists an assignment of truth values to the proposition
letters that makes the wff true). n e. Y(A+B)+Y(B+A)
3. Show that V, and A are commutative and associative.
If P is true in all models, then TP is false in all models; that is,
there does not exist an interpretation in which TP is true. a. commutativity:
AVBGBVA
DEFINITION: P is unsatisfiable if TP is logically valid. An un- AABEBAA
satisfiable wff is also called a contradiction. n
b. associativity:
The validity of any statement P is decidable. + P if and only if AV(BVC)G(AVB)VC
the column under P in its truth table (or under its main connective in AA(BAC)E(AAB)AC
the abbreviated form) contains only t’s - that is, P is true for every
possible interpretation (assignment of truth values to its proposition
letters). 4. Is + associative?
The first two requirements for a formal theory - the set of symbols
Exercises 2.2 and the class of well-formed formulas we presented in Section 2.1 -
describe the syntax of the language. It remains to describe the axioms
1. Demonstrate, via the truth table, that the wff and rules of inference of our formal theory for Propositional Logic
(which we shall call C).
((A-(B-C>>j((AjB>j(AjC))) There are many ways of axiomatizing Propositional Logic. The
following set of axioms is a minimal one. If A, B, and C are any wffs
is a tautology. of L, then the following are axioms of C.
20 Propositional Logic 2.3 Deduction 21
Axioms: L1 (A+(B+A)) Clearly, from the definition of proof given in Section 1, we have the
L2 ((A+(B+C))-((A-B)+(A+C))) following lemma.
L3 (((~B)j(-A>>j(((lB>jA)-tB))
LEMMA 2.3.1 l- A, for any axiom A.
Rule of inference: There is only one rule of inference in fZ. It is
modus ponens (MP): B is a direct consequence of A and A+B, We must be careful to distinguish two uses of the word proof. A proof
written in the theory, as defined previously, is a sequence of wffs of the theory
A,A-+BkB such that the last is the statement we wish to prove and each preceding
wff in the sequence is an axiom or follows by a rule of inference from
In other words, assuming A and A-B, we can derive B. We shall two previous members of the sequence. As is the case with the axioms,
abbreviate modus ponens by the initials MP. we can represent an infinite number of actual theorems and proofs by
using metavariables to establish a proof schema. Any instance of a
The axioms are presented as schemata expressed in metavariables theorem schema is a theorem of the theory, just as any instance of an
over ,!Z. They actually describe an infinite number of axioms. Any axiom schema is an axiom.
instance of one of these statement forms is an axiom. We also give proofs of statements about the theory. Lemma 2.3.1 is
such a statement, as are the Deduction Theorem (Theorem 2.3.3) and
DEFINITION: An instance of a statement form is obtained by re- the completeness theorems. These proofs are constructed by the usual
placing each metavariable with a wff consistently throughout the state- mathematical methods and are written in English supplemented by
ment form (that is, each occurrence of the same metavariable must be mathematical symbols and symbols from the theory we are discussing.
replaced by the same wff). n These are actually metatheorems, that is, theorems about the theory
rather than in the theory. However, we will refer only to theorems,
For example, lemmas, etc., without continuing the distinction by using the terms
((C+D)+A-+(C-+D))) metatheorems, metalemmas, and so on. (Note: Each theorem in a
theory must be a well-formed formula of the theory.)
is an instance of axiom Ll, with (C-D) for A, and TA for B.
We shall prove the following lemma in the theory L. That is, we
We have chosen to define our theory using only the connectives 1 will construct a sequence of wffs in L such that the last element of
and +. We have also chosen to use a minimal set of axioms; none the sequence is the statement we wish to prove, and every other wff
of the three can be proven from the other two, and together they are in the sequence is an (instance of an) axiom or follows from previous
sufficient to prove any true statement of Propositional Logic (i.e., fZ is members of the sequence by MP.
complete, as we shall see in Section 2.5). Providing many more axioms,
even though they might be redundant, would make it easier to prove LEMMA 2.3.2 A-A
theorems, so what is the benefit of using a minimal set? Although it
may be more difficult to prove theorems in the theory, a minimal axiom Proof:
set makes it easier to prove theorems about the theory (metatheorems). 1. (A-((A+A)+A))-+((A+(A+A))+(A+A))
For example, suppose we wish to prove something about all theorems an instance of axiom schema L2, with A for A,
of a theory (such as the fact that they are all tautologies). Every (A+A) for B, and A for C
theorem must be derivable from the axioms and rules of inference.
Thus, the smaller the set of axioms and rules of inference the fewer the 2. A+((A+A)+A) axiom schema Llwith A for A,
cases we must consider. (A+A) for B
-----
--- ______.- -- .._. -llll_.-_~. . I”_;
_--
20 Propositional Logic 2.3 Deduction 21
Axioms: L1 (A+(B+A)) Clearly, from the definition of proof given in Section 1, we have the
L2 ((A+(B+C))-((A-B)+(A+C))) following lemma.
L3 (((~B)j(-A>>j(((lB>jA)-tB))
LEMMA 2.3.1 l- A, for any axiom A.
Rule of inference: There is only one rule of inference in fZ. It is
modus ponens (MP): B is a direct consequence of A and A+B, We must be careful to distinguish two uses of the word proof. A proof
written in the theory, as defined previously, is a sequence of wffs of the theory
A,A-+BkB such that the last is the statement we wish to prove and each preceding
wff in the sequence is an axiom or follows by a rule of inference from
In other words, assuming A and A-B, we can derive B. We shall two previous members of the sequence. As is the case with the axioms,
abbreviate modus ponens by the initials MP. we can represent an infinite number of actual theorems and proofs by
using metavariables to establish a proof schema. Any instance of a
The axioms are presented as schemata expressed in metavariables theorem schema is a theorem of the theory, just as any instance of an
over ,!Z. They actually describe an infinite number of axioms. Any axiom schema is an axiom.
instance of one of these statement forms is an axiom. We also give proofs of statements about the theory. Lemma 2.3.1 is
such a statement, as are the Deduction Theorem (Theorem 2.3.3) and
DEFINITION: An instance of a statement form is obtained by re- the completeness theorems. These proofs are constructed by the usual
placing each metavariable with a wff consistently throughout the state- mathematical methods and are written in English supplemented by
ment form (that is, each occurrence of the same metavariable must be mathematical symbols and symbols from the theory we are discussing.
replaced by the same wff). n These are actually metatheorems, that is, theorems about the theory
rather than in the theory. However, we will refer only to theorems,
For example, lemmas, etc., without continuing the distinction by using the terms
((C+D)+A-+(C-+D))) metatheorems, metalemmas, and so on. (Note: Each theorem in a
theory must be a well-formed formula of the theory.)
is an instance of axiom Ll, with (C-D) for A, and TA for B.
We shall prove the following lemma in the theory L. That is, we
We have chosen to define our theory using only the connectives 1 will construct a sequence of wffs in L such that the last element of
and +. We have also chosen to use a minimal set of axioms; none the sequence is the statement we wish to prove, and every other wff
of the three can be proven from the other two, and together they are in the sequence is an (instance of an) axiom or follows from previous
sufficient to prove any true statement of Propositional Logic (i.e., fZ is members of the sequence by MP.
complete, as we shall see in Section 2.5). Providing many more axioms,
even though they might be redundant, would make it easier to prove LEMMA 2.3.2 A-A
theorems, so what is the benefit of using a minimal set? Although it
may be more difficult to prove theorems in the theory, a minimal axiom Proof:
set makes it easier to prove theorems about the theory (metatheorems). 1. (A-((A+A)+A))-+((A+(A+A))+(A+A))
For example, suppose we wish to prove something about all theorems an instance of axiom schema L2, with A for A,
of a theory (such as the fact that they are all tautologies). Every (A+A) for B, and A for C
theorem must be derivable from the axioms and rules of inference.
Thus, the smaller the set of axioms and rules of inference the fewer the 2. A+((A+A)+A) axiom schema Llwith A for A,
cases we must consider. (A+A) for B
-----
--- ______.- -- .._. -llll_.-_~. . I”_;
_--
22 Propositional Logic 2.3 Deduction 23
n Induction step. Assume the theorem is true for i < Ic, then (by the
definition of proof)
We can extend our idea of proof in two ways. First, we allow abbre-
1. BI, is an axiom, or
viations of proofs; that is, we can use any previously proved theorem
in our sequence of statements as an abbreviation for its own proof.
2. BI, is an assumption
Another helpful extension is the common mathematical practice of
proving a statement B on the assumption of some other statement A,
a. & ES, or
and then concluding that we have A implies B. In Propositional Logic
this procedure is justified by the Deduction Theorem. b. BI, is A, or
THEOREM 2.3.3 (Deduction Theorem for L) If 5 is a set of wffs, 3. & follows by MP from Bi and Bj, where i,j < Ic, and Bj is
and A and B are wffs, and ,S, A l- B, then 2 l- A-B. In particular &+Bk.
(when &’ is empty), if A t- B, then k A-+B. (If you can derive B given
the assumption A, then, with no assumptions, you can derive that A The first two cases are treated exactly as in the basis case above.
implies B.) We now consider the third case.
Proof: Let Bl, . . . . B, be a derivation of B from ,S, A; then
B, = B. We shall use induction on i to show that if it is the case that s t- A+(&-+Bk) inductive hypothesis
& A l- Bi, then S l- A+Bi, for every i, 1 5 i 5 n.
2 I-A--+Bi inductive hypothesis
Basis case: i = 1. B1 must be either an axiom or a hypothesis.
!- (A-t(BijBk))j((A-Bi)j(AjBk)) L2
1. If B1 is an axiom:
Zi’ I- ((A+Bi)+(A-+Bk)) MP
I- BI Lemma 2.3.1
t- B1+(A--+B1) Ll &’ t-A+& MP
I- A-+B1 MP on the previous two steps
8 I-A-+B1 property 1 of deducibility (Section 1) The theorem follows as the special case where i = 72: n
2. If B1 is an assumption: Now that we have the Deduction Theorem, the proof of Lemma
2.3.2 is simplified to the point of being trivial. We used Lemma 2.3.2
a. If& ES:
in proving the Deduction Theorem, but we could have simply used the
S FBI def. of “deducible from” (Section 1) proof (without the Deduction Theorem) given earlier to derive what
S k Bp(A-+Bl) Ll we needed without ever making reference to Lemma 2.3.2. Thus the
s. I-A-+Bl MP on the previous two steps following proof, although quite trivial, is not circular.
. “.-- ~I_---
22 Propositional Logic 2.3 Deduction 23
n Induction step. Assume the theorem is true for i < Ic, then (by the
definition of proof)
We can extend our idea of proof in two ways. First, we allow abbre-
1. BI, is an axiom, or
viations of proofs; that is, we can use any previously proved theorem
in our sequence of statements as an abbreviation for its own proof.
2. BI, is an assumption
Another helpful extension is the common mathematical practice of
proving a statement B on the assumption of some other statement A,
a. & ES, or
and then concluding that we have A implies B. In Propositional Logic
this procedure is justified by the Deduction Theorem. b. BI, is A, or
THEOREM 2.3.3 (Deduction Theorem for L) If 5 is a set of wffs, 3. & follows by MP from Bi and Bj, where i,j < Ic, and Bj is
and A and B are wffs, and ,S, A l- B, then 2 l- A-B. In particular &+Bk.
(when &’ is empty), if A t- B, then k A-+B. (If you can derive B given
the assumption A, then, with no assumptions, you can derive that A The first two cases are treated exactly as in the basis case above.
implies B.) We now consider the third case.
Proof: Let Bl, . . . . B, be a derivation of B from ,S, A; then
B, = B. We shall use induction on i to show that if it is the case that s t- A+(&-+Bk) inductive hypothesis
& A l- Bi, then S l- A+Bi, for every i, 1 5 i 5 n.
2 I-A--+Bi inductive hypothesis
Basis case: i = 1. B1 must be either an axiom or a hypothesis.
!- (A-t(BijBk))j((A-Bi)j(AjBk)) L2
1. If B1 is an axiom:
Zi’ I- ((A+Bi)+(A-+Bk)) MP
I- BI Lemma 2.3.1
t- B1+(A--+B1) Ll &’ t-A+& MP
I- A-+B1 MP on the previous two steps
8 I-A-+B1 property 1 of deducibility (Section 1) The theorem follows as the special case where i = 72: n
2. If B1 is an assumption: Now that we have the Deduction Theorem, the proof of Lemma
2.3.2 is simplified to the point of being trivial. We used Lemma 2.3.2
a. If& ES:
in proving the Deduction Theorem, but we could have simply used the
S FBI def. of “deducible from” (Section 1) proof (without the Deduction Theorem) given earlier to derive what
S k Bp(A-+Bl) Ll we needed without ever making reference to Lemma 2.3.2. Thus the
s. I-A-+Bl MP on the previous two steps following proof, although quite trivial, is not circular.
. “.-- ~I_---
Propositional Logic 2.4 Computation 25
24
LEMMA 2.3.2 A+A 5. A+B 3 and 4, Lemma 2.3.4 Thus lB--A k A-B, and,
n Exercises 2.3
The following lemma gives us a transitivity rule for implication. Prove each of the following theorems of C:
1.
LEMMA 2.3.4 A-+B, B-C I- A-L’
Proof: 2. A, B I- l(A+lB) (i.e., A, B k A A B)
LEMMA 2.3.2 A+A 5. A+B 3 and 4, Lemma 2.3.4 Thus lB--A k A-B, and,
n Exercises 2.3
The following lemma gives us a transitivity rule for implication. Prove each of the following theorems of C:
1.
LEMMA 2.3.4 A-+B, B-C I- A-L’
Proof: 2. A, B I- l(A+lB) (i.e., A, B k A A B)
truth and deduction, we can consider the symbols r and Cl as abbrevi- a. -Q reduces to Q
ations for A V TA and 1A A A, respectively. (It is convenient to assume b. $QI V Q2) reduces to l&r A 7Q2
that our wffs are expressed using only the connectives V, A, and 1.
c. l(Ql A Q2) reduces to l&l V 7Q2
Clearly this is possible since we have already shown (page 16) that
{ 7, A, V } is a sufficient set of connectives.) d. v reduces to •I
e. 10 reduces to 7
DEFINITION: A wff P is in conjunctive normal form, abbrevi-
ated cnf if all of the following are satisfied: 2. The following rules eliminate occurrences of A, 7, or Cl within the
scope of any V.
1. No subformula Q of P whose principal connective is 1 contains
another occurrence of 1, or an occurrence of V, A, 7, or Cl. a. &I V (Q2 A Q3) reduces to (QI V Q2) A (Ql V Q3)
For example, the following are not in conjunctive normal form: b. V and A are commutative operations
+Q), l(P V Q), l(P A Q), T(T), and -J(D). c. Q V r reduces to 7
2. No subformula of P whose principal connective is V contains A, T, d. Q V 0 reduces to Q
or Cl. That is, no A, 7, or q occurs within the scope of any V.
(The scope of a connective is the wff(s) to which it applies.) 3. We ensure no occurrences of r or 0 within the scope of any A by:
The reduced conjunctive normal form of the example given above a. Pk V Pk, which reduces t0 Pk
is: b. -Pk V Pk, which reduces2 to r
fjCV7B)A(CV7AVB) C. +k V lpk, which reduces to lpk
Every wff P can be reduced to an equivalent formula P’ such that
For example, we can use the reductions above to transform the wff
P’ is in reduced conjunctive normal form.
truth and deduction, we can consider the symbols r and Cl as abbrevi- a. -Q reduces to Q
ations for A V TA and 1A A A, respectively. (It is convenient to assume b. $QI V Q2) reduces to l&r A 7Q2
that our wffs are expressed using only the connectives V, A, and 1.
c. l(Ql A Q2) reduces to l&l V 7Q2
Clearly this is possible since we have already shown (page 16) that
{ 7, A, V } is a sufficient set of connectives.) d. v reduces to •I
e. 10 reduces to 7
DEFINITION: A wff P is in conjunctive normal form, abbrevi-
ated cnf if all of the following are satisfied: 2. The following rules eliminate occurrences of A, 7, or Cl within the
scope of any V.
1. No subformula Q of P whose principal connective is 1 contains
another occurrence of 1, or an occurrence of V, A, 7, or Cl. a. &I V (Q2 A Q3) reduces to (QI V Q2) A (Ql V Q3)
For example, the following are not in conjunctive normal form: b. V and A are commutative operations
+Q), l(P V Q), l(P A Q), T(T), and -J(D). c. Q V r reduces to 7
2. No subformula of P whose principal connective is V contains A, T, d. Q V 0 reduces to Q
or Cl. That is, no A, 7, or q occurs within the scope of any V.
(The scope of a connective is the wff(s) to which it applies.) 3. We ensure no occurrences of r or 0 within the scope of any A by:
The reduced conjunctive normal form of the example given above a. Pk V Pk, which reduces t0 Pk
is: b. -Pk V Pk, which reduces2 to r
fjCV7B)A(CV7AVB) C. +k V lpk, which reduces to lpk
Every wff P can be reduced to an equivalent formula P’ such that
For example, we can use the reductions above to transform the wff
P’ is in reduced conjunctive normal form.
to its reduced conjunctive normal form. First we eliminate the impli- The distinction will become more important in the next chapter. We
cations. abbreviate “ground” by gr.
Sometimes it is convenient in the following to think of a gr sentence
+(A-+(B-tC)) v ((A-tB)+(A-+C))) as a set of gr clauses, and a gr clause as a set of literals. This will cause
++A v (B+C)) v (+A-+B) V (A+(I))) no confusion since we know that a gr sentence is always a conjunction
$+A v (‘B v C)) v (+A V B) V (‘A V C))) (A) of its elements (gr clauses), and a gr clause is a disjunction (V) of
its elements (fliterals). In the following definitions we use the form
Then we move the negations inside the parentheses. of a context-free grammar, but indicate some alternatives using set
notation rather than the strictly syntactic juxtaposition of symbols (U
-+A v (‘B V C)) A +(-A V B) V (‘A V C)) indicates set union).
To describe the process of CLE on formulas in reduced conjunctive Now we are prepared to define complementary literal elimination
form, we need to define a few more terms. The following style of syntax (CLE) on formulas in reduced conjunctive normal form.
specification is called a context-free grammar. Each line represents a
rule for transforming a nonterminal symbol into a string of symbols. DEFINITION: Pk and lpk (where Pk is a proposition letter) are
A terminal symbol is placed inside quotation marks; the symbol ::= complementary literah l
is to be read “is a”; the symbol ( is to be read “or” (representing
alternative reduction rules on the same line); and juxtaposition of IC DEFINITION: If A and B are gr clauses, and Pk E A and lpk E B,
and y indicates that z is followed by y. Thus the first clause below can then the ground resolvent of A and B with respect to Pk and TPk
be read “a plus-or-minus literal is a plus-literal or a minus-literal.” is:3
to its reduced conjunctive normal form. First we eliminate the impli- The distinction will become more important in the next chapter. We
cations. abbreviate “ground” by gr.
Sometimes it is convenient in the following to think of a gr sentence
+(A-+(B-tC)) v ((A-tB)+(A-+C))) as a set of gr clauses, and a gr clause as a set of literals. This will cause
++A v (B+C)) v (+A-+B) V (A+(I))) no confusion since we know that a gr sentence is always a conjunction
$+A v (‘B v C)) v (+A V B) V (‘A V C))) (A) of its elements (gr clauses), and a gr clause is a disjunction (V) of
its elements (fliterals). In the following definitions we use the form
Then we move the negations inside the parentheses. of a context-free grammar, but indicate some alternatives using set
notation rather than the strictly syntactic juxtaposition of symbols (U
-+A v (‘B V C)) A +(-A V B) V (‘A V C)) indicates set union).
To describe the process of CLE on formulas in reduced conjunctive Now we are prepared to define complementary literal elimination
form, we need to define a few more terms. The following style of syntax (CLE) on formulas in reduced conjunctive normal form.
specification is called a context-free grammar. Each line represents a
rule for transforming a nonterminal symbol into a string of symbols. DEFINITION: Pk and lpk (where Pk is a proposition letter) are
A terminal symbol is placed inside quotation marks; the symbol ::= complementary literah l
is to be read “is a”; the symbol ( is to be read “or” (representing
alternative reduction rules on the same line); and juxtaposition of IC DEFINITION: If A and B are gr clauses, and Pk E A and lpk E B,
and y indicates that z is followed by y. Thus the first clause below can then the ground resolvent of A and B with respect to Pk and TPk
be read “a plus-or-minus literal is a plus-literal or a minus-literal.” is:3
ebookball.com