PDF Introduction to Logic Programming 1st Edition Michael Genesereth download
PDF Introduction to Logic Programming 1st Edition Michael Genesereth download
com
https://textbookfull.com/product/introduction-to-logic-
programming-1st-edition-michael-genesereth/
OR CLICK BUTTON
DOWNLOAD NOW
https://textbookfull.com/product/introduction-to-logic-3rd-edition-
michael-genesereth/
textboxfull.com
https://textbookfull.com/product/introduction-to-logic-third-edition-
michael-r-genesereth/
textboxfull.com
https://textbookfull.com/product/an-introduction-to-description-
logic-1st-edition-franz-baader/
textboxfull.com
https://textbookfull.com/product/introduction-to-logic-14th-edition-
irving-m-copi/
textboxfull.com
Introduction to Formal Logic 2nd Edition Russell Marcus
https://textbookfull.com/product/introduction-to-formal-logic-2nd-
edition-russell-marcus/
textboxfull.com
https://textbookfull.com/product/an-introduction-to-formal-logic-2nd-
edition-peter-smith/
textboxfull.com
https://textbookfull.com/product/pixel-logic-a-guide-to-pixel-art-
michael-azzi/
textboxfull.com
https://textbookfull.com/product/processing-an-introduction-to-
programming-1st-edition-nyhoff/
textboxfull.com
https://textbookfull.com/product/introduction-to-programming-
with-c-1st-edition-nhce/
textboxfull.com
Series ISSN: 1939-4608
GENESERETH • CHAUDHRI
Series Editors: Ronald J. Brachman, Jacobs Technion-Cornell Institute at Cornell Tech
Francesca Rossi, AI Ethics Global Leader, IBM Research AI
Peter Stone, University of Texas at Austin
“This is a book for the 21st century: presenting an elegant and innovative perspective on logic
“In a world where Deep Learning and Python are the talk of the day, this book is a
remarkable development. It introduces the reader to the fundamentals of traditional Logic
Programming and makes clear the benefits of using the technology to create runnable
specifications for complex systems.” – Son Cao Tran, Professor in Computer Science, New Mexico
State University
About SYNTHESIS
This volume is a printed version of a work that appears in the Synthesis
Digital Library of Engineering and Computer Science. Synthesis
store.morganclaypool.com
Ronald J. Brachman, Francesca Rossi, and Peter Stone, Series Editors
Testimonials for
Introduction to Logic Programming
This is a book for the 21st century: presenting an elegant and innovative perspective on logic
programming. Unlike other texts, it takes datasets as a fundamental notion, thereby bridg-
ing the gap between programming languages and knowledge representation languages; and
it treats updates on an equal footing with datasets, leading to a sound and practical treat-
ment of action and change.
Bob Kowalski, Professor Emeritus, Imperial College London
In a world where Deep Learning and Python are the talk of the day, this book is a re-
markable development. It introduces the reader to the fundamentals of traditional Logic
Programming and makes clear the benefits of using the technology to create runnable spec-
ifications for complex systems.
Son Cao Tran, Professor in Computer Science, New Mexico State University
Federated Learning
Qiang Yang, Yang Liu, Yong Cheng, Yan Kang, Tianjian Chen, and Han Yu
2019
Metric Learning
Aurélien Bellet, Amaury Habrard, and Marc Sebban
2015
Active Learning
Burr Settles
2012
Trading Agents
Michael P. Wellman
2011
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in
any form or by any means—electronic, mechanical, photocopy, recording, or any other except for brief quotations
in printed reviews, without the prior permission of the publisher.
DOI 10.2200/S00966ED1V01Y201911AIM044
Lecture #44
Series Editors: Ronald Brachman, Jacobs Technion-Cornell Institute at Cornell Tech
Francesca Rossi, IBM Research AI
Peter Stone, University of Texas at Austin
Series ISSN
Synthesis Lectures on Artificial Intelligence and Machine Learning
Print 1939-4608 Electronic 1939-4616
Introduction to
Logic Programming
M
&C Morgan & cLaypool publishers
ABSTRACT
Logic Programming is a style of programming in which programs take the form of sets of sen-
tences in the language of Symbolic Logic. Over the years, there has been growing interest in
Logic Programming due to applications in deductive databases, automated worksheets, Enter-
prise Management (business rules), Computational Law, and General Game Playing. This book
introduces Logic Programming theory, current technology, and popular applications.
In this volume, we take an innovative, model-theoretic approach to logic programming.
We begin with the fundamental notion of datasets, i.e., sets of ground atoms. Given this funda-
mental notion, we introduce views, i.e., virtual relations; and we define classical logic programs as
sets of view definitions, written using traditional Prolog-like notation but with semantics given
in terms of datasets rather than implementation. We then introduce actions, i.e., additions and
deletions of ground atoms; and we define dynamic logic programs as sets of action definitions.
In addition to the printed book, there is an online version of the text with an interpreter
and a compiler for the language used in the text and an integrated development environment
for use in developing and deploying practical logic programs.
KEYWORDS
logic programming, computational logic, knowledge representation, deductive
databases, aritificial intelligence
xiii
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
PART I Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 Programming in Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Logic Programs as Runnable Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Advantages of Logic Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Applications of Logic Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 Basic Logic Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Conceptualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.4 Example – Sorority World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.5 Example – Kinship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.6 Example – Blocks World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.7 Example – Food World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.8 Reformulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4 Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.2 Update Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.3 Update Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.4 Simultaneous Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.5 Example – Kinship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.6 Example – Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5 Query Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.2 Evaluating Ground Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.3 Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.4 Evaluating Queries With Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.5 Computational Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6 View Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.2 Subgoal Ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.3 Subgoal Removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.4 Rule Removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.5 Example – Cryptarithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
xv
8 View Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
8.2 Top-Down Processing of Ground Goals and Rules . . . . . . . . . . . . . . . . . . . . . 71
8.3 Unification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
8.4 Top-Down Processing of Non-Ground Queries and Rules . . . . . . . . . . . . . . . 76
8.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
9 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
9.2 Example – Kinship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
9.3 Example – Blocks World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
9.4 Example – Modular Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
9.5 Example – Directed Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
9.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
12 Metaknowledge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
12.2 Natural Language Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
12.3 Boolean Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
12.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
B Sierra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
B.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
B.2 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
xviii
B.3 Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
B.4 Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
B.5 Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
B.6 View Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
B.7 Operation Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
B.8 Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
B.9 File Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
B.10 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Preface
This book is an introductory textbook on Logic Programming. It is intended primarily for use at
the undergraduate level. However, it can be used for motivated 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. The book also presumes that the
student is comfortable with symbolic mathematics, at the level of high-school algebra or beyond.
Nothing else is required.
While experience in computational thinking is helpful, it is not essential. And prior pro-
gramming experience is not necessary. In fact, we have observed that some students with pro-
gramming backgrounds have more difficulty at first than students who are not accomplished
programmers! It is almost as if they need to unlearn some things in order to appreciate the
power and beauty of Logic Programming.
The approach to Logic Programming taken here emerged from more than 30 years of
research, applications, and teaching of this material in both academic and commercial settings.
The result of this experience is an approach to the subject matter that differs somewhat from the
approach taken in other books on the subject in two essential ways.
First of all, in this volume, we take a model-theoretic approach to specifying semantics
rather than the traditional proof-theoretic approach. We begin with the fundamental notion of
datasets, i.e., sets of ground atoms. Given this fundamental notion, we introduce classic logic
programs as view definitions, written using traditional Prolog notation but with semantics given
in terms of datasets rather than implementation. (We also talk about implementation, but it
comes later in the presentation.)
Another difference from other books on Logic Programming is that we treat change on
an equal footing with state. Having talked about datasets, we introduce the fundamental notion
of updates, i.e., additions and deletions of ground atoms. Given this fundamental notion, we
introduce dynamic logic programs as sets of action definitions, where actions are conceptualized
as sets of simultaneous updates. This extension allows us to talk about logical agents as well as
static logic programs. (A logical agent is effectively a state machine in which each state is modeled
as a dataset and each arc is modeled as a set of updates.)
In addition to the text of the book in print and online, there is a website with automatically
graded online exercises, programming assignments, Logic Programming tools, and a variety of
sample applications. The website (http://logicprogramming.stanford.edu) is free to use
and open to all.
xx PREFACE
In conclusion, we first of all want to acknowledge the influence of two individuals who
had a profound effect on our work here - Jeff Ullman and Bob Kowalski. Jeff Ullman, our col-
league at Stanford, inspired us with his popular textbooks and helped us to appreciate the deep
relationship between Logic Programming and databases. Bob Kowalski, co-inventor of Logic
Programming, listened to our ideas, nurtured our work, and even collaborated on some of the
material presented here.
We also want to acknowledge the contributions of a former graduate student - Abhijeet
Mohapatra. He is a co-inventor of dynamic logic programming and the co-creator of many
of the programming tools associated with our approach to Logic Programming. He helped to
teach the course, worked with students, and offered invaluable suggestions on the presentation
and organization of the material.
Finally, our thanks to the students who 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 mistakes on our part. Their patience and constructive comments
were invaluable in helping us to understand what works and what does not.
Introduction
3
CHAPTER 1
Introduction
1.1 PROGRAMMING IN LOGIC
Logic Programming is a style of programming in which programs take the form of sets of sen-
tences in the language of Symbolic Logic. Programs written in this style are called logic programs.
The language in which these programs are written is called logic programming language. And a
computer system that manages the creation and execution of logic programs is called a logic
programming system.
Data Integration. The language of Logic can be used to relate the concepts in different vocab-
ularies and thereby allow users to access multiple, heterogeneous data sources in an integrated
fashion, giving each user the illusion of a single database encoded in his own vocabulary.
Enterprise Management. Logic Programming has special value in expressing and imple-
menting business rules of various sorts. Internal business rules include enterprise policies (e.g.,
expense approval) and workflow (who does what and when). External business rules include the
details of contracts with other enterprises, configuration and pricing rules for company products,
and so forth.
Computational Law. Computational Law is the branch of Legal Informatics concerned with
the representation of rule and regulations in computable form. Encoding laws in computable
form enables automated legal analysis and the creation of technology to make that analysis
available to citizens, and monitors and enforcers, and legal professionals.
General Game Playing. General game players are systems able to accept descriptions of arbi-
trary games at runtime and able to use such descriptions to play those games effectively without
human intervention. In other words, they do not know the rules until the games start. Logic
Programming is widely used in General Game Playing as the preferred way to formalize game
descriptions.
6 1. INTRODUCTION
1.5 BASIC LOGIC PROGRAMMING
Over the years, various types of Logic Programming have been explored (Basic Logic Pro-
gramming, Classic Logic Programming, Transaction Logic Programming, Constraint Logic
Programming, Disjunctive Logic Programming, Answer Set Programming, Inductive Logic
Programming, etc.). Along with these different types of Logic Programming, a variety of logic
programming languages have been developed (e.g., Datalog, Prolog, Epilog, Golog, Progol,
LPS, etc.). In this volume, we concentrate on Basic Logic Programming, a variant of Transac-
tion Logic Programming; and we use Epilog in writing our examples.
In Basic Logic Programming, we model the states of an application as sets of simple facts
(called datasets), and we write rules to define abstract views of the facts in datasets. We model
changes to state as primitive updates to our datasets, i.e., sets of additions and deletions of facts,
and we write rules of a different sort to define compound actions in terms of primitive updates.
Epilog (the language we use in this volume) is closely related to Datalog and Prolog.
Their syntaxes are almost identical. And the three languages are nicely ordered in terms of
expressiveness—with Datalog being a subset of Prolog and Prolog being a subset of Epilog.
For the sake of simplicity, we use the syntax of Epilog throughout this course, and we talk about
the Epilog interpreter and compiler. Thus, when we mention Datalog in what follows, we are
referring to the Datalog subset of Epilog; and, when we mention Prolog, we are referring to the
Prolog subset of Epilog.
As we shall see, all three of these languages (Datalog and Prolog and Epilog) are less ex-
pressive than the languages associated with more complex forms of Logic Programming (such
as Disjunctive Logic Programming and Answer Set Programming). While these restrictions
limit what we can say in these languages, the resulting programs are computationally better be-
haved and, in most cases, more practical than programs written in more expressive languages.
Moreover, due to these restrictions, Datalog and Prolog and Epilog are easy to understand; and,
consequently, they have pedagogical value as an introduction to more complex Logic Program-
ming languages.
In keeping with our emphasis on Basic Logic Programming, the material of the course is
divided into five units. In this unit, Unit 1, we give an overview of Logic Programming and Basic
Logic Programming, and we introduce datasets. In Unit 2, we talk about queries and updates. In
Unit 3, we talk about view definitions. In Unit 4, we concentrate on operation definitions. And,
in Unit 5, we talk about variations, i.e., other forms of Logic Programming.
HISTORICAL NOTES
In the mid-1950s, computer scientists began to concentrate on the development of high-level
programming languages. As a contribution to this effort, John McCarthy suggested the language
of Symbolic Logic as a candidate, and he articulated the ideal of declarative programming. He
1.5. BASIC LOGIC PROGRAMMING 7
gave voice to these ideas in a seminal paper, published in 1958, which describes a type of system
that he called an advice taker.
“The main advantage we expect the advice taker to have is that its behavior will be
improvable merely by making statements to it, telling it about its ... environment and
what is wanted from it. To make these statements will require little, if any, knowledge
of the program or the previous knowledge of the advice taker.”
The idea of declarative programming caught the imaginations of subsequent researchers—
notably Bob Kowalski, one of the fathers of Logic Programming, and Ed Feigenbaum, the
inventor of Knowledge Engineering. In a paper written in 1974, Feigenbaum gave a forceful
restatement of McCarthy’s ideal.
“The potential use of computers by people to accomplish tasks can be ‘one-
dimensionalized’ into a spectrum representing the nature of the instruction that must
be given the computer to do its job. Call it the what-to-how spectrum. At one ex-
treme of the spectrum, the user supplies his intelligence to instruct the machine with
precision exactly how to do his job step-by-step. ... At the other end of the spectrum
is the user with his real problem. ... He aspires to communicate what he wants done ...
without having to lay out in detail all necessary subgoals for adequate performance.”
The development of Logic Programming in its present form can be traced to subsequent
debates about declarative vs. procedural representations of knowledge in the Artificial Intelli-
gence community.
Advocates of procedural representations were mainly centered at MIT, under the lead-
ership of Marvin Minsky and Seymour Papert. Although it was based on the proof methods
of logic, Planner, developed at MIT, was the first language to emerge within the procedural-
ist paradigm. Planner featured pattern-directed invocation of procedural plans from goals (i.e.,
goal-reduction or backward chaining) and from assertions (i.e., forward chaining). The most
influential implementation of Planner was the subset of Planner, called Micro-Planner, imple-
mented by Gerry Sussman, Eugene Charniak and Terry Winograd. It was used to implement
Winograd’s natural-language understanding program SHRDLU, which was a landmark at that
time.
Advocates of declarative representations were centered at Stanford (associated with John
McCarthy, Bertram Raphael, and Cordell Green) and in Edinburgh (associated with John Alan
Robinson, Pat Hayes, and Robert Kowalski). Hayes and Kowalski tried to reconcile the logic-
based declarative approach to knowledge representation with Planner’s procedural approach.
In 1973, Hayes developed an equational language, Golux, in which different procedures could
be obtained by altering the behavior of a theorem prover. Kowalski, on the other hand, de-
veloped SLD resolution, a variant of SL-resolution, and showed how it treats implications as
goal-reduction procedures. Kowalski collaborated with Colmerauer in Marseille, who developed
these ideas in the design of the programming language Prolog, which was implemented in the
Another Random Scribd Document
with Unrelated Content
Conjectores Ægypti, cunctósq; Sapientes. And these doubtless
Pharaoh would not have sent for, but that either upon his own
knowledge he knew that they professed the ability of the
interpretation of dreams, and (perhaps) as the sequel shewed,
greater matters; or else upon common repute, or relation of others,
and that must needs arise from their own profession of the
knowledge of such abstruse matters: and so of necessity must have
pretended greater matters, than when they came to tryal they were
able to perform, and so must needs be Impostors. And the Woman at
Endor (falsely called a Witch, or a Woman that had a familiar Spirit,
when in the Hebrew she is only called the Mistress of the Bottle, as
we shall manifest hereafter) must needs be a Deceiver and Impostor,
because she pretended to bring up whomsoever Saul desired, which
was a thing absolutely not in her power, as I shall undeniably prove
afterwards. And notwithstanding the stories of Eusebius, and the
strong endeavours of Doctor Hamond to make it good, that Simon
Magus was a person that had peculiar and corporeal converse with
the Devil, and by that league and converse could perform strange and
wonderful things; yet was he but a notorious Impostor, as appeareth
by two reasons. 1. The Text saith, that he gave out that himself was
some great one, that is, that he had great skill, and was able to
perform wonderful things. This sheweth his presumption and
pretence, the certain badge of a Deceiver and Cheater. 2. But could
do little, except some petty jugling Tricks of Leger-de-main,
confederacy, and the like; because he wondred, or was amazed,
beholding the Miracles and signs which were done, and those were,
that unclean Spirits, crying with loud voice, came out of many that
were possessed with them: And many taken with palsies, and that
were lame, were healed. Now if he had been any great Magician, or
could have performed any great things, he could not have so much
wondred at those things that Philip wrought: or if he could have
flown in the air, as Eusebius (or those that have foisted such
incredible lyes into his Writings) pretendeth, then he need not have
been so amazed at the miracles and signs that the Apostles wrought,
nor to have offered to have bought the gift of bestowing the Holy
Ghost, but only because he was a notorious Dissembler and
Impostor. And if he had been in league with the Devil, surely he
might have cast forth Devils by the power of Beelzebub the Prince of
Devils: all which do plainly conclude him to be an absolute Cheater
and Impostor. And the story of Bel and the Dragon (though but an
Apocryphal piece, yet very ancient, and of sufficient credit as to
matter of fact) doth evidently demonstrate, that these sort of people
were abominable Cheaters and Impostors, and were not endowed
with any supernatural power, nor had assistance of any visible
Demon, but only the Devil of deceit and cousenage in their own
breasts, and so were, as Cardan saith, Carnales Dæmones ipsis
Dæmonibus callidiores.
5. And though by the Laws of our own Instit. p. 3. p. 45.
Nation these kind of people were to be
severely punished, as appeareth by the Statute 1 Jac. cap. 12. yet had
they respect in that Act, not only to the punishment in respect of
what these persons could or did do, but also in regard of their being
Impostors and Deceivers of the people; for so the Lord Chief Justice
Sir Edward Cook, the best Expositor of Law that hath written in our
Language, doth expound it in these words. The mischiefs before this
part of this Act were: “That divers Impostors, men and women,
would take upon them to tell or do these fine things here specified,
in great deceit of the people, and cheating and cousening them of
their money or other goods: therefore was this part of the Act made,
wherein these words [take upon him or them] are very remarkable.
For if they take upon them, &c. though in truth they do it not, yet
are they in danger of this first branch.”
6. And whereas in the objection Mr. Glanvil mentioneth converse
with Devils, if he mean mental, internal, and spiritual converse, such
as Murtherers, Adulterers, Thieves, Robbers, and all wicked persons
have with Satan, we grant it; for so had the Jews and the High Priests
in conspiring and acting to put our blessed Saviour to death: it was
their hour, and the power of darkness. But if he mean a visible and
corporeal converse, then we plainly affirm that there is not, nor can
be any such, whereby any such strange things (as Witchmongers
fondly and falsely believe) can be performed or effected. Therefore by
way of conclusion in this particular, we grant that there are many
sorts of such kind of Witches, as for gain and vain-glory do take upon
them to declare hidden and occult things, to divine of things that are
to come, and to do many wonderful matters, but that they are but
Cheaters, Deceivers, and Couseners.
2. And as there are a numerous crew of active Witches, whose
existence we freely acknowledge; so there are another sort, that are
under a passive delusion, and know not, or at least do not observe or
understand, that they are deluded or imposed upon. These are those
that confidently believe that they see, do, and suffer many strange,
odd, and wonderful things, which have indeed no existence at all in
them, but only in their depraved fancies, and are meerly
melancholiæ figmenta. And yet the confessions of these, though
absurd, idle, foolish, false, and impossible, are without all ground
and reason by the common Witchmongers taken to be truths, and
falsely ascribed unto Demons, and that they are sufficient grounds to
proceed upon to condemn the Confessors to death, when all is but
passive delusion, intrinsecally wrought in the depraved imaginative
faculty by these three ways or means.
1. One of the Causes that produceth this depraved and passive
delusion, is evil education; they being bred up in ignorance, either of
God, the Scriptures, or the true grounds of Christian Religion, nay
not being taught the common Rules of Morality, or of other humane
Literature; but only imbibing and sucking in, with their mothers and
nurses milk, the common gross and erroneous opinions that the
blockish vulgar people do hold, who are all generally inchanted and
bewitched with the belief of the strange things related of Devils,
Apparitions, Fayries, Hobgoblins, Ghosts, Spirits, and the like: so
that thereby a most deep impression of the verity of the most gross
and impossible things is instamped in their fancies, hardly ever after
in their whole life time to be obliterated or washt out: so prevalent a
thing is Custom and Institution from young years, though the things
thus received, and pertinaciously believed, and adhered unto, are
most abominable falsities and impossibilities, having no other
existence but in the brains and phantasies of old, ignorant, and
doting persons, and are meerly muliercularum & nutricum
terriculamenta & figmenta, and therefore did Seneca say:
Gravissimum est consuetudinis imperium. And that this is one main
cause of this delusion, is manifest from all the best Historians, that
where the light of the Gospel hath least appeared, and where there is
the greatest brutish ignorance and heathenish Barbarism, there the
greatest store of these deluded Witches or Melancholists are to be
found, as in the North of Scotland, Norway, Lapland, and the like,
as may be seen at large in Saxo Grammaticus, Olaus Magnus,
Hector Boetius, and the like.
2. But when an atrabilarious Schenck. observ.
Temperament, or a melancholick medic. lib. 1. pag.
Complexion and Constitution doth happen 129.
to those people bred in such ignorance, and that have suckt in all the
fond opinions that Custom and Tradition could teach them, then
what thing can be imagined that is strange, wonderful, or incredible,
but these people do pertinaciously believe it, and as confidently
relate it to others? nay even things that are absolutely impossible, as
that they are really changed into Wolves, Hares, Dogs, Cats,
Squirrels, and the like; and that they flye in the Air, are present at
great Feasts and Meetings, and do strange and incredible things,
when all these are but the meer effects of the imaginative function
depraved by the fumes of the melancholick humor, as we might shew
from the Writings of the most grave and learned Physicians; but we
shall content our selves with some few select ones. 1. That distemper
which Physicians call Lycanthropia, is according to the judgment of
Aetius and Paulus, but a certain species of Melancholy, and yet they
really think and believe themselves to be Wolves, and imitate their
actions: of which Johannes Fincelius in his second Book de Mirac.
giveth us a relation to this purpose. “That at Padua in the year 1541.
a certain Husband-man did seem to himself a Wolf, and did leap
upon many in the fields, and did kill them. And that at last he was
taken not without much difficulty, and did confidently affirm that he
was a true Wolf, only that the difference was in the skin turned in
with the hairs. And therefore that certain, having put off all
humanity, and being truly truculent and voracious, did smite and cut
off his legs and arms, thereby to try the truth of the matter; but the
innocency of the man being known, they commit him to the
Chirurgions to be cured, but that he dyed not many days after.”
Which instance is sufficient to overthrow the vain opinion of those
men that believe that a man or woman may be really transformed or
transubstantiated into a Wolf, Dog, Cat, Squirrel, or the like, without
the operation of an omnipotent power, as in Lots Wife becoming a
Pillar of Salt; though St. Augustine was so weak as to seem to believe
the reality of these transformations: of which we shall have occasion
to speak more largely hereafter.
2. Another story we shall give from the Observat. medic.
Authority of that learned Physician lib. 1. cap. 18. pag.
Nicolaus Tulpius of Amsterdam to this 38.
effect. A certain famous Painter was for a long time infected with
black Choler, and did falsely imagine that all the bones of his body
were as soft and flexible, that they might be drawn and bended like
soft wax. Which opinion being deeply imprinted in his mind, he kept
himself in bed the whole Winter, fearing that if he should rise, they
would not bear his weight, but would shrink together by reason of
their softness. That Tulpius did not contradict him in that fancy, but
said that it was a distemper that Physicians were not ignorant of, but
had been long before noted by Fernelius, that the bones like wax
might be softned and indurated, and that it might be easily cured, if
he would be obedient: and that within three days he would make the
bones firm and stable, and that within six days he would restore him
to the power of walking. By which promises it was hard to declare,
how much hope of recovering health it had raised up in him, and
how obedient it made him. So that with Medicines proper to purge
the atrabilarious humour within the time appointed, he was at the
three days end suffered to stand upon his feet, and upon the sixth
day had leave given to walk abroad: and so found himself perfectly
sound afterwards; but did not perceive the deceit in his phantasie,
that had made him lye a whole Winter in bed, though he was no
stupid, but an ingenious person in his Art, and scarce second to any.
3. Thomas Vt supr. Histor. 85. Cent. 1. Hist. 79.
Bartholinus the pag. 125. pag. 117.
famous Anatomist, and Physician to Frederick the Third King of
Denmark, tells us these things: “That it is the property of melancholy
persons to fear things not to be feared, and to feign things quæ nec
picta usquam sunt, nec scripta. A Plebeian (he saith) with them
abounding with melancholy blood did imagine that his Nose was
grown to that greatness, that he durst not go abroad, for fear it
should be hurt or justled upon by those he met. And that a famous
Poet at Amsterdam did believe that his Buttocks were of glass, and
feared their breaking, if he should sit down. Another Old man of
prime Dignity did suspect that he had swallowed a nail, which being
lost, he could no where find, and thought himself much tortured by
its being fixed in him. But was restored to his health, by having a
Vomit given, and the Physician conveying a nail into the matter that
he cast up. And that a certain man in England would not make
water, for fear that all the blood in his body should have passed forth
by that passage, and therefore straitly tyed the yard with a thred for
some days, which swelling he was not far from death, but that his
Brother by force untyed it.” The Books of Physicians are very full
with such relations, and we in our Practice have met with divers as
strange as these, and cured them. Also he tells us this: “A certain
Student of a melancholick Constitution, distracted with grief for the
death of a Sister, and wearied with lucubrations, did complain to
(Bartholinus) of the Devil haunting of him: and did affirm that he
felt the evil Spirit enter by his fundament with wind, and so did creep
up his body until it possessed the head, lest he might attend his
Prayers and Meditations with his accustomed devotion, and that it
did descend and go forth the same way, when he bent himself to
Prayers, and reading of Sacred Books. Before these things he used to
be filled with unheard of joy from his assiduous Prayers and
watching, that also he had heard a celestial kind of Musick, and
therefore despising all mortal things, he had distributed all things to
the poor; but that now piety waxing cold by too much appetite after
meat, and his brain troubled with that wind, that he had heard a
voice of one in his brain upbraiding him with Blasphemy, and that he
felt hands beating, and a stink passing before his nose. By all which
Bartholinus guessed, that it was Hypochondriacal Melancholy, and
by good Counsel, proper Physick, merry Company, and rightly
ordering of him, he was perfectly cured.”
4. To these we will only add this that is Histor. medic.
related by Marcellus Donatus, Physician to mirab. l. 2. c. 1. p.
the Duke of Mantua and Montferrat, to this 33.
purpose. “That he knew a Noble Countess of their City, that did most
earnestly affirm, that she was made sick by the Witchery and
Incantation of a certain ill-minded Woman; which was apprehended
by a learned Physician to be, notwithstanding her fancy, nothing else
but Hypochondriacal Melancholy, which he cured by giving her
proper Medicaments to purge that humour, and ordering her
Waiting-maid to put into the matter she voided Nails, Feathers, and
Needles; which when with a glad countenance she had shewed to her
Mistress, she presently cryed out that she had not been deceived,
when she had referred the cause of her disease to Witchcraft, and
afterwards did daily recover more and more.”
3. And as ignorance and irreligion Relat. of Lancash.
meeting with a melancholick Constitution, Witches.
doth frame many persons to strange fancies
both of fear and credulity: so when to these is added the teachings of
those that are themselves under a most strong passive delusion, then
of all others these become most strongly confident that they can
perform admirable things. As when a person hath by education suckt
in all the grossest fables and lyes of the power of Witches and
familiar Devils, and therein becometh extremely confident,
heightned with the fumes of black Choler, and so thinks, meditates,
and dreameth of Devils, Spirits, and all the strange stories that have
been related of them, and becometh maliciously stirred up against
some Neighbour or other: And so in that malicious and revengeful
mind seeketh unto, and inquireth for some famed and notorious
Witch, of whom they believe they may learn such craft and cunning,
that thereby they may be able to kill or destroy the persons or goods
of those that they suppose have done them injuries. Then meeting
with some that are strongly deluded, and confidently perswaded, that
they have the company and assistance of a familiar Spirit, by whose
help they believe they can do (almost) any thing, especially in
destroying men or cattel, they are presently instructed what vain and
abominable Ceremonies, Observances, Unguents, Charms, making of
Pictures, and a thousand such fond, odd fopperies they are to use, by
which they believe they can do strange Feats. And from this do
proceed their bold and confident confessions of lyes and
impossibilities, that notwithstanding have abused so many to take
them for certain truths: so that according to the Proverb, Popery and
Witchcraft go by Tradition: and we shall find none of these deluded
Witches (if they must be so called) but they have been taught by
others, that thought themselves to be such also. And this is a truth, if
we may trust the confession of Alizon Denice at the Bar at Lancaster,
who saith thus: “That about two years agone her Grandmother called
Elizabeth Sotheres, alias Dembdike, did (sundry times in going or
walking together, as they went begging) perswade and advise this
Examinate to let a Devil or a Familiar appear to her, and that she this
Examinate would let him suck at some part of her, and she might
have and do what she would.”
But besides these two sorts of Witches, whose Existence we deny
not, there is an acceptation of the word Witch in another sense, the
Existence of which I absolutely deny, and that is this according to
Mr. Perkins. “A Witch is a Magician, who either by open or secret
League wittingly and willingly consenteth to use the aid and
assistance of the Devil in the working of Wonders.”
But the full Description and Notion that the common
Witchmongers give a Witch is this. “That a Witch is such a person to
whom the Devil doth appear in some visible shape, with whom the
Witch maketh a League or Covenant, sometimes by Bond signed with
the Witches blood, and that thereby he doth after suck upon some
part of their bodies, and that they have carnal Copulation together,
and that by virtue of that League the Witch can be changed into an
Hare, Dog, Cat, Wolf, or such like Creatures; that they can flye in the
air, raise storms and tempests, kill men or cattel, and such like
wonders.” This notion of a Witch may be gathered from the Writings
of these persons, Delrio the Jesuit, Bodinus, Jacobus Springerus,
Johannes Niderus, Bartholomeus Spineus, Paulus Grillandus,
Lambertus Danæus, Hemmingius, Erastus, Sennertus, and many
others. As also from the Writings of our own Country-men, Mr.
Perkins, Mr. Bernard of Balcombe, the Author of the Book called
Demonology, Mr. Gaule, Mr. Giffard, and divers others, who have
from one to another lickt up the Vomit of the first Broacher of this
vain and false opinion, and without due consideration have laboured
to obtrude it upon others. Yet was it in a manner rejected by the most
of the Learned, who had duly weighed the matter, and read the
strong and convincing arguments of Wierus, Tandlerus, Nymannus,
Biermannus, Gutierrius, Mr. Scot, and the like, until of late years Dr.
Casaubon and Mr. Glanvil have taken up Weapons to defend these
false, absurd, impossible, impious, and bloody opinions withal,
against whose arguments we now principally direct our Pen, and
after the answering of their groundless and unjust scandals, we shall
labour to overthrow their chief Bulwarks and Fortifications.
CHAP. III.
That the Scriptures and sound Reason are the true and proper
Mediums to prove the Actions attributed unto Witches by, and
not other improper ways that many Authors have used. And of
the Requisites necessary truly to prove a matter of Fact by.
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.
textbookfull.com