Introduction to Logic 2nd Edition Michael Genesereth - The latest updated ebook version is ready for download
Introduction to Logic 2nd Edition Michael Genesereth - The latest updated ebook version is ready for download
https://ebookfinal.com/download/a-friendly-introduction-to-
mathematical-logic-2nd-edition-christopher-c-leary/
https://ebookfinal.com/download/logical-forms-an-introduction-to-
philosophical-logic-2nd-edition-mark-sainsbury/
https://ebookfinal.com/download/introduction-to-logic-3rd-edition-
harry-j-gensler/
https://ebookfinal.com/download/an-introduction-to-traditional-
logic-3rd-edition-scott-m-sullivan/
Introduction to Logic Design 1st Edition Svetlana N.
Yanushkevich (Author)
https://ebookfinal.com/download/introduction-to-logic-design-1st-
edition-svetlana-n-yanushkevich-author/
https://ebookfinal.com/download/a-concise-introduction-to-logic-10th-
edition-patrick-j-hurley/
https://ebookfinal.com/download/introduction-to-logic-and-critical-
thinking-6th-edition-merrilee-h-salmon/
https://ebookfinal.com/download/understanding-arguments-an-
introduction-to-informal-logic-9th-edition-walter-sinnott-armstrong/
https://ebookfinal.com/download/introduction-to-meta-analysis-1st-
edition-michael-borenstein/
Introduction to Logic 2nd Edition Michael Genesereth
Digital Instant Download
Author(s): Michael Genesereth, Eric Kao
ISBN(s): 9781627052481, 1627052488
Edition: 2nd
File Details: PDF, 1.24 MB
Year: 2013
Language: english
Introduction to Logic
Second Edition
M
&C Morgan & cLaypool publishers
Copyright © 2013 by Morgan & Claypool
DOI 10.2200/S00518ED2V01Y201306CSL006
Lecture #6
Series ISSN
Synthesis Lectures on Computer Science
Print 1932-1228 Electronic 1932-1686
ABSTRACT
This book is a gentle but rigorous introduction to Formal Logic. It is intended primarily for use at
the college level. However, it can also be used for advanced secondary school students, and it can be
used at the start of graduate school for those who have not yet seen the material.
The approach to teaching logic used here emerged from more than 20 years of teaching logic
to students at Stanford University and from teaching logic to tens of thousands of others via online
courses on the World Wide Web. The approach differs from that taken by other books in logic in
two essential ways, one having to do with content, the other with form.
Like many other books on logic, this one covers logical syntax and semantics and proof theory
plus induction. However, unlike other books, this book begins with Herbrand semantics rather than
the more traditional Tarskian semantics. This approach makes the material considerably easier for
students to understand and leaves them with a deeper understanding of what logic is all about.
In addition to this text, there are online exercises (with automated grading), online logic tools
and applications, online videos of lectures, and an online forum for discussion. They are available at
http://logic.stanford.edu/intrologic/.
KEYWORDS
Formal Logic, Symbolic Logic, Propositional Logic, Relational Logic, deduction, rea-
soning, Artificial Intelligence
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Elements of Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Formalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Automation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.5 Reading Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2 Propositional Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.4 Satisfaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.5 Logical Properties of Propositional Sentences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.6 Propositional Entailment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3 Satisfiability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.2 Truth Table Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.3 Basic Backtracking Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.4 Simplification and Unit Propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.5 DPLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.6 GSAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4 Propositional Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.2 Linear Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.3 Structured Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.4 Fitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.5 Soundness and Completeness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5 Propositional Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.2 Clausal Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.3 Resolution Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.4 Resolution Reasoning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6 Relational Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6.2 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6.3 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.4 Example: Sorority World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
6.5 Example: Blocks World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.6 Example: Modular Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.7 Example: Peano Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
6.8 Example: Linked Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
6.9 Example: Pseudo English . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
6.10 Example: Metalevel Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
6.11 Properties of Sentences in Relational Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
6.12 Logical Entailment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
6.13 Finite Relational Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
6.14 Omega Relational Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
6.15 General Relational Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
8 Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
8.2 Clausal Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
8.3 Unification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
8.4 Resolution Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
8.5 Resolution Reasoning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
8.6 Unsatisfiability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
8.7 Logical Entailment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
8.8 Answer Extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
8.9 Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
9 Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
9.2 Domain Closure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
9.3 Linear Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
9.4 Tree Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
9.5 Structural Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
9.6 Multidimensional Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
9.7 Embedded Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
9.8 Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
10 Equality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
10.2 Properties of Equality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
10.3 Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
10.4 Fitch With Equality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
10.5 Example – Group Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
10.6 Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Preface
This book is a first course in Formal Logic. It is intended primarily for use at the college level.
However, it can also be used for advanced secondary school students, and it can be used at the start
of graduate school for those who have not yet seen the material.
There are just two prerequisites. The book presumes that the student understands sets and set
operations, such as union, intersection, and so forth. It also presumes that the student is comfortable
with symbolic manipulation, as used, for example, in solving high-school algebra problems. Nothing
else is required.
The approach to teaching Logic used here emerged from more than 10 years of experience
in teaching the logical foundations of Artificial Intelligence and more than 20 years of experience
in teaching Logic for Computer Scientists. The result of this experience is an approach that differs
from that taken by other books in Logic in two essential ways, one having to do with content, the
other with form.
The primary difference in content concerns that semantics of the logic that is taught. Like
many other books on Logic, this one covers first-order syntax and first-order proof theory plus
induction. However, unlike other books, this book starts with Herbrand semantics rather than the
more traditional Tarskian semantics.
In Tarskian semantics, we define an interpretation as a universe of discourse together with
a function (1) that maps the object constants of our language to objects in a universe of discourse
and (2) that maps relation constants to relations on that universe. We define variable assignments
as assignments to variables. We define the semantics of quantified expressions as variations on
variable assignments, saying, for example, that a universally quantified sentence is true for a given
interpretation if and only if it is true for every variation of the given variable assignment. It is a
mouthful to say and even harder for students to understand.
In Herbrand semantics, we start with the object constants, function constants, and relation
constants of our language; we define the Herbrand base (i.e. the set of all ground atoms that can be
formed from these components); and we define a model to be an arbitrary subset of the Herbrand
base. That is all. In Herbrand semantics, an arbitrary logical sentence is logically equivalent to the set
of all of its instances. A universally quantified sentence is true if and only if all of its instances are true.
There are no interpretations and no variable assignments and no variations of variable assignments.
Although both approaches ultimately end up with the same deductive mechanism, we get
there in two different ways. Deciding to use Herbrand semantics was not an easy to choice to
make. It took years to get the material right and, even then, it took years to use it in teaching
Logic. Although there are some slight disadvantages to this approach, experience suggests that
the advantages significantly outweigh those disadvantages. This approach is considerably easier for
students to understand and leaves them with a deeper understanding of what Logic is all about.
That said, there are some differences between Herbrand semantics and Tarskian semantics that
some educators and theoreticians may find worrisome.
First of all, Herbrand semantics is not compact—there are infinite sets of sentences that are
inconsistent while every finite subset is consistent. The upshot of this is that there are infinite sets of
sentences where we cannot demonstrate unsatisfiability with a finite argument within the language
itself. Fortunately, this does not cause any practical difficulties, since in all cases of practical interest
we are working with finite sets of premises.
One significant deficiency of Herbrand semantics vis a vis Tarksian semantics is that with
Herbrand semantics there are restrictions on the cardinality of the worlds that can be axiomatized.
Since there is no external universe, the cardinality of the structures that can be axiomatized is equal to
the number of ground terms in the language. (To make things easy, we can always choose a countable
language. We can even choose an uncountable language, though doing so would ruin some of the nice
properties of the logic. On the positive side, it is worth noting that in many practical applications we
do not care about uncountable sets. Although there are uncountably many real numbers, remember
that there are only countably many floating point numbers.) More significantly, recall that the
Lowenheim-Skolem Theorem for Tarskian semantics assures us that even with Tarskian semantics
we cannot write sentences that distinguish models of different infinite cardinalities. So, it is unclear
whether this restriction has any real significance for the vast majority of students.
Herbrand semantics shares most important properties with Tarskian semantics. In the absence
of function constants, the deductive calculus is complete for all finite axiomatizations. In fact, the
calculus derives the exact same set of sentences. When we add functions, we lose this nice property.
However, we get some interesting benefits in return. For one, it is possible with Herbrand semantics
(with functions) to finitely axiomatize arithmetic. As we know from Godel, this is not possible in a
first-order language with Tarskian semantics. The downside is that we lose completeness. However,
it is nice to know that we can at least define things, even though we cannot prove them. Moreover, as
mentioned above, we do not actually lose any consequences that we are able to deduce with Tarskian
semantics.
That’s all for what makes the content of this book different from other books. There is also a
difference in form. In addition to the text of the book in print and online, there are also online exercises
(with automated grading), some online Logic tools and applications, online videos of lectures, and
an online forum for discussion.
The online offering of the course began with an experimental version early in the 2000s.
While it was moderately successful, we were at that time unable to combine the online materials and
tools and grading program with videos and an online forum, and so we discontinued the experiment.
Recently, it was revived when Sebastian Thrun, Daphne Koller, and Andrew Ng created technologies
for comprehensive offering online courses and began offering highly successful online courses of their
own. With their technology and the previous materials, it was easy to create a comprehensive online
course in Logic. And this led to completion of this book.
Thanks also to Pat Suppes, Jon Barwise, John Etchemendy, David-Barker Plummer, and
others at the Stanford Center for the Study of Language and Information for their pioneering
work on online education in Logic. Language, Proof, and Logic (LPL) in particular is a wonderful
introduction to Logic and is widely used around the world. Although there are differences between
that volume and this one in theory (especially semantics) and implementation (notably the use
here of browser-based exercises and applications), this volume is in many ways similar to LPL. In
particular, this volume shamelessly copies the LPL tactic of using online worlds (like Tarski’s World)
as a teaching tool for Logic.
And thanks as well to the thousands of students who over the years have had to endure early
versions of this material, in many cases helping to get it right by suffering through experiments that
were not always successful. It is a testament to the intelligence of these students that they seem
to have learned the material despite multiple bumbling mistakes on our part. Their patience and
constructive comments were invaluable in helping us to understand what works and what does not.
Finally, we need to acknowledge the enormous contributions of a former graduate student—
Tim Hinrichs. He is a co-discoverer of many of the results about Herbrand semantics, without
which this book would not have been written.
Introduction
1.1 LOGIC
Logic is one of the oldest intellectual disciplines in human history. It dates back to Aristotle; it has
been studied through the centuries; and it is still a subject of active investigation today.
We use Logic is just about everything we do. We use it in our personal lives. We use it in our
professional activities. We use the language of Logic to state observations, to define concepts, and
to formalize theories. We use logical reasoning to derive conclusions from these bits of information.
We use logical proofs to convince others of these conclusions.
And we are not alone! Logic is increasingly being used by computers—to prove mathematical
theorems, to validate engineering designs, to diagnose failures, to encode and analyze laws and
regulations and business rules.
This chapter is an overview of Logic as presented in this book. We start with an introduction
to the key concepts of Logic using sentences written in English. We then talk about the value of
using a formal language for expressing logical information, and we talk about the formal rules for
manipulating sentences expressed in this language. After this, we discuss how formalization of this
sort enables automation of logical reasoning, and we summarize the current state of Logic technology
and its applications. Finally, we conclude with a reading guide for the remainder of the book.
Abby
Bess
Cody
Dana
Sentences like these constrain the possible ways the world could be. Each sentence divides
the set of possible worlds into two subsets, those in which the sentence is true and those in which
the sentence is false. Believing a sentence is tantamount to believing that the world is in the first set.
Given two sentences, we know the world must be in the intersection of the set of worlds in which
the first sentence is true and the set of worlds in which the second sentence is true. Ideally, when we
have enough sentences, we know exactly how things stand.
Unfortunately, this is not always the case. Sometimes, a collection of sentences only partially
constrains the world. For example, there are four different worlds that are consistent with the our
Sorority World sentences, namely the ones shown in Figure 1.3.
Even though a set of sentences does not determine a unique world, it is often the case that
some sentences are true in every world that satisfies the given sentences. A sentence of this sort is
said to be a logical conclusion from the given sentences. Said the other way around, a set of premises
logically entails a conclusion if and only if every world that satisfies the premises also satisfies the
conclusion.
What can we conclude from the bits of information in Figure 1.2? Quite a bit, as it turns out.
For example, it must be the case that Bess likes Cody. Also, Bess does not like Dana. There are also
some general conclusions that must be true. For example, in this world with just four girls, we can
conclude that everybody likes somebody. Also, everyone is liked by somebody.
Abby Bess Cody Dana Abby Bess Cody Dana
Abby Abby
Bess Bess
Cody Cody
Dana Dana
Abby Abby
Bess Bess
Cody Cody
Dana Dana
One way to make this determination is by checking all possible worlds. For example, in our
case, we notice that, in every world that satisfies our sentences, Bess likes Cody, so the statement
that Bess likes Cody is a logical conclusion from our set of sentences.
Unfortunately, determining logical entailment by checking all possible worlds is impractical
in general. There are usually many, many possible worlds; and in some cases there can be infinitely
many.
The alternative is logical reasoning, that is, the application of reasoning rules to derive logical
conclusions and produce a logical proofs, i.e., sequences of reasoning steps that leads from premises
to conclusions.
As an example, consider the following informal proof that starts with the premises shown
above and proves that Bess likes Cody.
We know that Abby likes everyone that Bess likes, and we know that Abby does not like Dana.
Therefore, Bess must not like Dana either. (If Bess did like Dana, then Abby would like her as
well.) At the same time, we know that Bess likes Cody or Dana. Consequently, since Bess does
not like Dana, she must like Cody.
The concept of proof, in order to be meaningful, requires that we be able to recognize certain
reasoning steps as immediately obvious. In other words, we need to be familiar with the reasoning
“atoms” out of which complex proof “molecules” are built.
One of Aristotle’s great contributions to philosophy was his recognition that what makes a
step of a proof immediately obvious is its form rather than its content. It does not matter whether
we are talking about blocks or stocks or sorority girls. What matters is the structure of the facts with
which you are working. Such patterns are called rules of inference.
As an example, consider the reasoning step shown below. We know that all Accords are
Hondas, and we know that all Hondas are Japanese cars. Consequently, we can conclude that all
Accords are Japanese cars.
All Accords are Hondas.
All Hondas are Japanese.
Therefore, all Accords are Japanese.
Now consider another example. We know that all borogoves are slithy toves, and we know
that all slithy toves are mimsy. Consequently, we can conclude that all borogoves are mimsy. What’s
more, in order to reach this conclusion, we do not need to know anything about borogoves or slithy
toves or what it means to be mimsy.
All borogoves are slithy toves.
All slithy toves are mimsy.
Therefore, all borogoves are mimsy.
What is interesting about these examples is that they share the same reasoning structure, that
is, the pattern shown below.
All x are y.
All y are z.
Therefore, all x are z.
The existence of such reasoning patterns is fundamental in Logic but raises important ques-
tions. Which patterns are correct? Are there many such patterns or just a few?
Let us consider the first of these questions. Obviously, there are patterns that are just plain
wrong in the sense that they can lead to incorrect conclusions. Consider, as an example, the (faulty)
reasoning pattern shown below.
All x are y.
Some y are z.
Therefore, some x are z.
Now let us take a look at an instance of this pattern. If we replace x by Toyotas and y by cars and
z by made in America, we get the following line of argument, leading to a conclusion that happens
to be correct.
All Toyotas are cars.
Some cars are made in America.
Therefore, some Toyotas are made in America.
On the other hand, if we replace x by Toyotas and y by cars and z by Porsches, we get a line of
argument leading to a conclusion that is questionable.
All Toyotas are cars.
Some cars are Porsches.
Therefore, some Toyotas are Porsches.
What distinguishes a correct pattern from one that is incorrect is that it must always lead to
correct conclusions, i.e., conclusions that are logically entailed by the premises. As we will see, this
is the defining criterion for what we call deduction.
Now, it is noteworthy that there are patterns of reasoning that are sometimes useful but do not
satisfy this strict criterion. There is inductive reasoning, abductive reasoning, reasoning by analogy,
and so forth.
Induction is reasoning from the particular to the general. The example shown below illustrates
this. If we see enough cases in which something is true and we never see a case in which it is false,
we tend to conclude that it is always true.
I have seen 1000 black ravens.
I have never seen a raven that is not black.
Therefore, every raven is black.
Now try red Hondas.
Abduction is reasoning from effects to possible causes. Many things can cause an observed
result. We often tend to infer a cause even when our enumeration of possible causes is incomplete.
If there is no fuel, the car will not start.
If there is no spark, the car will not start.
There is spark.
The car will not start.
Therefore, there is no fuel.
What if the car is in a vacuum chamber?
Reasoning by analogy is reasoning in which we infer a conclusion based on similarity of two
situations, as in the following example.
The flow in a pipe is proportional to its diameter.
Wires are like pipes.
Therefore, the current in a wire is proportional to diameter.
Now try price.
Of all types of reasoning, deductive reasoning is the only one that guarantees its conclusions
in all cases. It has some very special properties and holds a unique place in Logic. In this book, we
concentrate entirely on deduction and leave these other forms of reasoning to others.
1.3 FORMALIZATION
So far, we have illustrated everything with sentences in English. While natural language works well
in many circumstances, it is not without its problems. Natural language sentences can be complex;
they can be ambiguous; and failing to understand the meaning of a sentence can lead to errors in
reasoning.
Even very simple sentences can be troublesome. Here we see two grammatically legal sen-
tences. They are the same in all but the last word, but their structure is entirely different. In the first,
the main verb is blossoms, while in the second blossoms is a noun and the main verb is sank.
The cherry blossoms in the Spring.
The cherry blossoms in the Spring sank.
As another example of grammatical complexity, consider the following excerpt taken from
the University of Michigan lease agreement. The sentence in this case is sufficiently long and the
grammatical structure sufficiently complex that people must often read it several times to understand
precisely what it says.
The University may terminate this lease when the Lessee, having made application and
executed this lease in advance of enrollment, is not eligible to enroll or fails to enroll in the
University or leaves the University at any time prior to the expiration of this lease, or for
violation of any provisions of this lease, or for violation of any University regulation relative
to resident Halls, or for health reasons, by providing the student with written notice of this
termination 30 days prior to the effective data of termination, unless life, limb, or property
would be jeopardized, the Lessee engages in the sales of purchase of controlled substances in
violation of federal, state or local law, or the Lessee is no longer enrolled as a student, or the
Lessee engages in the use or possession of firearms, explosives, inflammable liquids, fireworks,
or other dangerous weapons within the building, or turns in a false alarm, in which cases a
maximum of 24 hours notice would be sufficient.
As an example of ambiguity, suppose I were to write the sentence There’s a girl in the room
with a telescope. See Figure 1.4 for two possible meanings of this sentence. Am I saying that there
is a girl in a room containing a telescope? Or am I saying that there is a girl in the room and she is
holding a telescope?
Such complexities and ambiguities can sometimes be humorous if they lead to interpretations
the author did not intend. See the examples in Figure 1.5 for some infamous newspaper headlines
with multiple interpretations. Using a formal language eliminates such unintentional ambiguities
(and, for better or worse, avoids any unintentional humor as well).
As an illustration of errors that arise in reasoning with sentences in natural language, consider
the following examples. In the first, we use the transitivity of the better relation to derive a conclusion
about the relative quality of champagne and soda from the relative quality of champagne and beer
and the relative quality or beer and soda. So far so good.
Figure 1.4: There’s a girl in the room with a telescope.
Scientists Grow Frog Eyes and Ears British Left Waffles On Falkland Islands
The Daily Camera, Boulder, 2000
Xavier is three times as old as Yolanda. Xavier’s age and Yolanda’s age add up to twelve. How
old are Xavier and Yolanda?
Typically, the first step in solving such a problem is to express the information in the form of
equations. If we let x represent the age of Xavier and y represent the age of Yolanda, we can capture
the essential information of the problem as shown below.
x − 3y = 0
x + y = 12
Using the methods of algebra, we can then manipulate these expressions to solve the problem.
First we subtract the second equation from the first.
x − 3y = 0
x + y = 12
− 4y = −12
Next, we divide each side of the resulting equation by −4 to get a value for y.Then substituting
back into one of the preceding equations, we get a value for x.
x=9
y=3
If Mary loves Pat, then Mary loves Quincy. If it is Monday and raining, then Mary loves
Pat or Quincy. If it is Monday and raining, does Mary love Quincy?
As with the algebra problem, the first step is formalization. Let p represent the possibility that
Mary loves Pat; let q represent the possibility that Mary loves Quincy; let m represent the possibility
that it is Monday; and let r represent the possibility that it is raining.
With these abbreviations, we can represent the essential information of this problem with the
following logical sentences. The first says that p implies q, i.e., if Mary loves Pat, then Mary loves
Quincy. The second says that m and r implies p or q, i.e., if it is Monday and raining, then Mary
loves Pat or Mary loves Quincy.
p ⇒ q
m∧r ⇒ p∨q
As with Algebra, Formal Logic defines certain operations that we can use to manipulate
expressions. The operation shown below is a variant of what is called Propositional Resolution. The
expressions above the line are the premises of the rule, and the expression below is the conclusion.
p1 ∧ ... ∧ pk ⇒ q 1 ∨ ... ∨ q l
r 1 ∧ ... ∧ r m ⇒ s 1 ∨ ... ∨ s n
p1 ∧ ... ∧ pk ∧ r 1 ∧ ... ∧ r m ⇒ q 1 ∨ ... ∨ q l ∨ s 1 ∨ ... ∨ s n
There are two elaborations of this operation. (1) If a proposition on the left-hand side of one
sentence is the same as a proposition in the right-hand side of the other sentence, it is okay to drop
the two symbols, with the proviso that only one such pair may be dropped. (2) If a constant is repeated
on the same side of a single sentence, all but one of the occurrences can be deleted.
We can use this operation to solve the problem of Mary’s love life. Looking at the two premises
above, we notice that p occurs on the left-hand side of one sentence and the right-hand side of the
other. Consequently, we can cancel the p and thereby derive the conclusion that, if is Monday and
raining, then Mary loves Quincy or Mary loves Quincy.
p ⇒ q
m∧r ⇒ p∨q
m∧r ⇒ q∨q
Dropping the repeated symbol on the right-hand side, we arrive at the conclusion that, if it
is Monday and raining, then Mary loves Quincy.
m∧r ⇒ q∨q
m∧r ⇒ q
This example is interesting in that it showcases our formal language for encoding logical
information. As with algebra, we use symbols to represent relevant aspects of the world in question,
and we use operators to connect these symbols in order to express information about the things
those symbols represent.
The example also introduces one of the most important operations in Formal Logic —
Resolution (in this case a restricted form of Resolution). Resolution has the property of being
complete for an important class of logic problems, i.e., it is the only operation necessary to solve any
problem in the class.
1.4 AUTOMATION
The existence of a formal language for representing information and the existence of a corresponding
set of mechanical manipulation rules together have an important consequence—the possibility of
automated reasoning using digital computers.
The idea is simple. We use our formal representation to encode the premises of a problem
as data structures in a computer, and we program the computer to apply our mechanical rules in a
systematic way. The rules are applied until the desired conclusion is attained or until it is determined
that the desired conclusion cannot be attained. (Unfortunately, in some cases, this determination
cannot be made; and the procedure never halts. Nevertheless, as discussed in later chapters, the idea
is basically sound.)
Although the prospect of automated reasoning has achieved practical realization only in the
last few decades, it is interesting to note that the concept itself is not new. In fact, the idea of building
machines capable of logical reasoning has a long tradition.
One of the first individuals to give voice to this idea was Leibniz. He conceived of “a universal
algebra by which all knowledge, including moral and metaphysical truths, can some day be brought
within a single deductive system.” Having already perfected a mechanical calculator for arithmetic, he
argued that, with this universal algebra, it would be possible to build a machine capable of rendering
the consequences of such a system mechanically.
Boole gave substance to this dream in the 1800s with the invention of Boolean algebra and
with the creation of a machine capable of computing accordingly.
The early twentieth century brought additional advances in Logic, notably the invention of
the predicate calculus by Russell and Whitehead and the proof of the corresponding completeness
and incompleteness theorems by Gödel in the 1930s.
The advent of the digital computer in the 1940s gave increased attention to the prospects for
automated reasoning. Research in artificial intelligence led to the development of efficient algorithms
for logical reasoning, highlighted by Robinson’s invention of resolution theorem proving in the 1960s.
Today, the prospect of automated reasoning has moved from the realm of possibility to that
of practicality, with the creation of logic technology in the form of automated reasoning systems, such
as Vampire, Prover9, the Prolog Technology Theorem Prover, Epilog, and others.
The emergence of this technology has led to the application of logic technology in a wide
variety of areas. The following paragraphs outline some of these uses.
Mathematics. Automated reasoning programs can be used to check proofs and, in some cases,
to produce proofs or portions of proofs.
Engineering. Engineers can use the language of Logic to write specifications for their products
and to encode their designs. Automated reasoning tools can be used to simulate designs and in some
cases validate that these designs meet their specification. Such tools can also be used to diagnose
failures and to develop testing programs.
Database Systems. By conceptualizing database tables as sets of simple sentences, it is possible
to use Logic in support of database systems. For example, the language of Logic can be used to define
virtual views of data in terms of explicitly stored tables, and it can be used to encode constraints on
databases. Automated reasoning techniques can be used to compute new tables, to detect problems,
and to optimize queries.
Data Integration. The language of Logic can be used to relate the vocabulary and structure
of disparate data sources, and automated reasoning techniques can be used to integrate the data in
these sources.
Logical Spreadsheets. Logical spreadsheets generalize traditional spreadsheets to include logical
constraints as well as traditional arithmetic formulas. Examples of such constraints abound. For
example, in scheduling applications, we might have timing constraints or restrictions on who can
reserve which rooms. In the domain of travel reservations, we might have constraints on adults and
infants. In academic program sheets, we might have constraints on how many courses of varying
types that students must take.
Law and Business. The language of Logic can be used to encode regulations and business rules,
and automated reasoning techniques can be used to analyze such regulations for inconsistency and
overlap.
Not long had Ronald to tend the dying lad, for his days were
numbered; but to him was given the joy of being used as
God's instrument to set free one of Satan's fettered
captives. To the cry for pardon, which were the first words
that had greeted his ear, he could give, in all their fulness,
the Lord's words of free forgiveness, could tell how Jesus
"came to seek and to save them that were lost."
And the heavy, sin-sick heart grasped with a firm grip the
precious promise, "He that cometh to me I will in no wise
cast out."
There were tears shed in the quiet hut over the letter which
told of the death of the wandering one; but they were not
all bitter: joy mingled with the grief—the erring child was at
rest now in the Father's house above.
Clara pushed aside fretfully the hand her mother laid on her
brow. "It isn't that," she said. "I was tired of balls and
visiting night after night long before this illness came on;
but oh! I don't want to be sent away alone with only a
servant. Couldn't Aunt Emmie chaperon the girls, and you
come with me, mamma?"
That night, when Clara had gone to bed, the subject of the
visit to the Bridge of Allan was warmly discussed in the
drawing-room, where Mr. and Mrs. Ross sat with their
daughters.
Mr. Ross spoke angrily. "On one thing I have made up my
mind—the girl shall not go alone. If her own mother cannot
leave home, and her sisters are too selfish to do so, I shall
give up a month's business and go myself. You girls will
have to do with fewer fine dresses, that's all; for I will have
to pay a gentleman handsomely to act for me. But I will not
have my little Clara neglected for all the dresses in the
world; so when you fix on the lodgings, take a room for me
also."
Mrs. Ross was sorely put out, but not so much astonished
as her daughters. Ever since the time, now four years ago,
that Mr. Ross had accompanied Nora Macintosh to Benvourd
House, on the night of little Minnie's death, she had
observed a difference in his way of speaking of religion, and
also a growing dislike to the constant gaiety which went on
in their house. She had shut her eyes to the fact, and was
glad that the girls never appeared to observe it. So now she
felt she must act cautiously, and said abruptly she would
think over the matter, and see what arrangement could be
made. One thing was certain—Mr. Ross must on no account
be obliged to leave his business.
Inclination said: "Go; this is just what you have long been
desiring, and it would never do to refuse." Duty said:
"Decline for the present; your cousin is ill, and longs for
your society."
As she spoke these words, Mr. Ross bent over her and said,
"Thank God, we may all claim Jesus as our Friend, if we will
take him as our Saviour. I've been long in finding it out; but
I have found it, my child, though at the eleventh hour. Seek
you him, my child, while you are still young, and the same
joy and peace which Nora has got will be yours also."
Clara's tears fell fast as her father spoke, for, indeed, for
months past she had been weary and dissatisfied with her
profitless life, and a longing after higher things had filled
her heart; but she had feared the opposition she would
meet with from all her home relations, and so had stifled
the Spirit of God, and tried to drown the voice of conscience
in a ceaseless round of so-called pleasure.
And now, to find that her own father had been feeling much
as she had done, but, not content with convictions of sin,
had found the rest and the peace she longed to possess.
That night proved the turning-point in the life of Clara Ross;
and as she and her cousin sat together, after Mr. Ross had
returned home, the barrier of shyness between them on
sacred things fell, and Clara learned for the first time the
way in which Nora had been brought to decision in religious
matters, and heard all about the field-meeting, and the
servant of God whose words had set her free from Satan's
chains.
Nature had spread her fairest, freshest mantle of tender
green over hill and dale, ere the cousins left the Bridge of
Allan. The last evening they spent together there, was one
neither of them ever forgot, one that rose often in
memory's eye when seas rolled between the friends.
Nora wrote to her brother Ronald that Clara Ross had now
begun the warfare of life under the royal banner.
CHAPTER XIV.
A FAMILY GATHERING.
"The Lord hath been mindful of us, and he will bless us,"
was the unspoken utterance of both the owners of Benvourd
House, as they looked round the assembled group.
"And Eric, too, Clara, what a fine man he has turned out—
first-rate at business, I hear! Indeed, Ashley told me
yesterday that he knows the head of the firm in China
where Eric is, and that he speaks confidently of ere long
taking him in as a junior partner. If it be so, we may say his
fortune, as regards this world, is made. And he is a true
Christian, quiet, but real. We little thought, when he first
went to Edinburgh to your father's house, Clara, that it was
to be there he would awake to a personal knowledge of
Christ!"
"Why, Mr. Macleod," he said, "I don't believe you half know
what a splendid fellow he is, nor how he is adored by all
who serve with or under him. You see, there is a friend of
my mother's, whose only son is a clerk in the house, and
you should hear how he speaks of Macintosh. Why, he says,
but for him he might have been a dissipated man. He was
just standing on the verge of ruin, when Ronald came to his
aid, took him from the society of bad companions, and led
him into the right path."
And Nora, too, was recalling the wish of her heart, that she
might obtain what her mother desired for her, that she
might be above rubies.
Whilst she and Ronald hesitated, Eric spoke again—"My
wish has, I believe, been granted, though not in the way I
expected. I have got riches, great riches—even the untold
wealth of the saving knowledge of Christ Jesus, which is
indeed 'better than gold.'"
CHAPTER XV.
THE BRIDAL DAY.
The autumn sun was still brightly shining, when the carriage
drove up, after the luncheon was over, to bear off the bride
and bridegroom.
As she passed the hut where the old nurse had lived and
died, she pointed it out to her husband; and as she did so,
she seemed once more to feel the kind touch of the loving
hand as it one day had pushed back her golden brown hair,
and to hear the voice which had said, "I'm wonderin', my
lambie, what kind o' a crown will sit on that bonnie brow;
whether it will be the crown o' a vain world's folly, or the
everlastin' one that your mother prayed so earnestly might
rest there?"
And Nora knew now which it was; and even in the midst of
her bridal happiness, she could look forward with joy to the
day when she would take the golden crown put on her head
by the Saviour's own hand, and casting it at his feet, give to
him all the glory for evermore.
"Yes," said Ronald, "it is even so. Our mother's dying prayer
has been truly answered as regards Nora; she has obtained
that wisdom of which it is written, 'The topaz of Ethiopia
shall not equal it, neither shall it be valued with pure gold,'
for 'the price of it is above rubies.' It can be said of her with
truth that 'she stretcheth out her hand to the poor; yea, she
reacheth forth her hands to the needy,' and also that 'in her
tongue is the law of kindness.'"
"I believe she will exert an influence for good wherever she
goes, and prove to be well fitted for the arduous duties of a
missionary's wife. And well may we ask God to bless and
keep both her and her husband, as they go forth to lift high
in heathen lands the Royal Banner of the King of kings; and
may both be as crowns of glory in the hand of the Lord, and
as royal diadems on the head of our God!"
THE END.
*** END OF THE PROJECT GUTENBERG EBOOK THE ROYAL
BANNER ***
Updated editions will replace the previous one—the old editions will
be renamed.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookfinal.com