100% found this document useful (4 votes)
46 views

PDF Introduction to Logic Programming 1st Edition Michael Genesereth download

Logic

Uploaded by

sunejaayis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
46 views

PDF Introduction to Logic Programming 1st Edition Michael Genesereth download

Logic

Uploaded by

sunejaayis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Experience Seamless Full Ebook Downloads for Every Genre at textbookfull.

com

Introduction to Logic Programming 1st Edition


Michael Genesereth

https://textbookfull.com/product/introduction-to-logic-
programming-1st-edition-michael-genesereth/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Introduction to Logic 3rd Edition Michael Genesereth

https://textbookfull.com/product/introduction-to-logic-3rd-edition-
michael-genesereth/

textboxfull.com

Introduction to Logic Third Edition Michael R Genesereth

https://textbookfull.com/product/introduction-to-logic-third-edition-
michael-r-genesereth/

textboxfull.com

An Introduction to Description Logic 1st Edition Franz


Baader

https://textbookfull.com/product/an-introduction-to-description-
logic-1st-edition-franz-baader/

textboxfull.com

Introduction to Logic 14th Edition Irving M. Copi

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

An Introduction to Formal Logic 2nd Edition Peter Smith

https://textbookfull.com/product/an-introduction-to-formal-logic-2nd-
edition-peter-smith/

textboxfull.com

Pixel Logic A Guide to Pixel Art Michael Azzi

https://textbookfull.com/product/pixel-logic-a-guide-to-pixel-art-
michael-azzi/

textboxfull.com

Processing an introduction to programming 1st Edition


Nyhoff

https://textbookfull.com/product/processing-an-introduction-to-
programming-1st-edition-nyhoff/

textboxfull.com

Introduction to Programming with C 1st Edition Nhce

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

Introduction to Logic Programming


Michael Genesereth, Stanford University
Vinay K. Chaudhri, Stanford University

“This is a book for the 21st century: presenting an elegant and innovative perspective on logic

INTRODUCTION TO LOGIC PROGRAMMING


programming. Unlike other texts, it takes datasets as a fundamental notion, thereby bridging
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 treatment 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
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

“Excellent introduction to the fundamentals of Logic Programming. The book is well-written


and well-structured. Concepts are explained clearly and the gradually increasing complexity of
exercises makes it so that one can understand easy notions quickly before moving on to more
difficult ideas.” – George Younger, student, Stanford 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

MORGAN & CLAYPOOL


books provide concise, original presentations of important research and
development topics, published quickly, in digital and print formats.

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

Excellent introduction to the fundamentals of Logic Programming. The book is well-


written and well-structured. Concepts are explained clearly and the gradually increasing
complexity of exercises makes it so that one can understand easy notions quickly before mov-
ing on to more difficult ideas.
George Younger, student, Stanford University
Introduction to
Logic Programming
Synthesis Lectures on Artificial
Intelligence and Machine
Learning
Editors
Ronald Brachman, Jacobs Technion-Cornell Institute at Cornell Tech
Francesca Rossi, IBM Research AI
Peter Stone, University of Texas at Austin

Introduction to Logic Programming


Michael Genesereth and Vinay K. Chaudhri
2020

Federated Learning
Qiang Yang, Yang Liu, Yong Cheng, Yan Kang, Tianjian Chen, and Han Yu
2019

An Introduction to the Planning Domain Definition Language


Patrik Haslum, Nir Lipovetzky, Daniele Magazzeni, and Christian Muise
2019

Reasoning with Probabilistic and Deterministic Graphical Models: Exact Algorithms,


Second Edition
Rina Dechter
2019

Learning and Decision-Making from Rank Data


Lirong Xia
2019

Lifelong Machine Learning, Second Edition


Zhiyuan Chen and Bing Liu
2018

Adversarial Machine Learning


Yevgeniy Vorobeychik and Murat Kantarcioglu
2018
vi
Strategic Voting
Reshef Meir
2018

Predicting Human Decision-Making: From Prediction to Action


Ariel Rosenfeld and Sarit Kraus
2018

Game Theory for Data Science: Eliciting Truthful Information


Boi Faltings and Goran Radanovic
2017

Multi-Objective Decision Making


Diederik M. Roijers and Shimon Whiteson
2017

Lifelong Machine Learning


Zhiyuan Chen and Bing Liu
2016

Statistical Relational Artificial Intelligence: Logic, Probability, and Computation


Luc De Raedt, Kristian Kersting, Sriraam Natarajan, and David Poole
2016

Representing and Reasoning with Qualitative Preferences: Tools and Applications


Ganesh Ram Santhanam, Samik Basu, and Vasant Honavar
2016

Metric Learning
Aurélien Bellet, Amaury Habrard, and Marc Sebban
2015

Graph-Based Semi-Supervised Learning


Amarnag Subramanya and Partha Pratim Talukdar
2014

Robot Learning from Human Teachers


Sonia Chernova and Andrea L. Thomaz
2014

General Game Playing


Michael Genesereth and Michael Thielscher
2014

Judgment Aggregation: A Primer


Davide Grossi and Gabriella Pigozzi
2014
vii
An Introduction to Constraint-Based Temporal Reasoning
Roman Barták, Robert A. Morris, and K. Brent Venable
2014

Reasoning with Probabilistic and Deterministic Graphical Models: Exact Algorithms


Rina Dechter
2013

Introduction to Intelligent Systems in Traffic and Transportation


Ana L.C. Bazzan and Franziska Klügl
2013

A Concise Introduction to Models and Methods for Automated Planning


Hector Geffner and Blai Bonet
2013

Essential Principles for Autonomous Robotics


Henry Hexmoor
2013

Case-Based Reasoning: A Concise Introduction


Beatriz López
2013

Answer Set Solving in Practice


Martin Gebser, Roland Kaminski, Benjamin Kaufmann, and Torsten Schaub
2012

Planning with Markov Decision Processes: An AI Perspective


Mausam and Andrey Kolobov
2012

Active Learning
Burr Settles
2012

Computational Aspects of Cooperative Game Theory


Georgios Chalkiadakis, Edith Elkind, and Michael Wooldridge
2011

Representations and Techniques for 3D Object Recognition and Scene Interpretation


Derek Hoiem and Silvio Savarese
2011

A Short Introduction to Preferences: Between Artificial Intelligence and Social Choice


Francesca Rossi, Kristen Brent Venable, and Toby Walsh
2011
viii
Human Computation
Edith Law and Luis von Ahn
2011

Trading Agents
Michael P. Wellman
2011

Visual Object Recognition


Kristen Grauman and Bastian Leibe
2011

Learning with Support Vector Machines


Colin Campbell and Yiming Ying
2011

Algorithms for Reinforcement Learning


Csaba Szepesvári
2010

Data Integration: The Relational Logic Approach


Michael Genesereth
2010

Markov Logic: An Interface Layer for Artificial Intelligence


Pedro Domingos and Daniel Lowd
2009

Introduction to Semi-Supervised Learning


XiaojinZhu and Andrew B.Goldberg
2009

Action Programming Languages


Michael Thielscher
2008

Representation Discovery using Harmonic Analysis


Sridhar Mahadevan
2008

Essentials of Game Theory: A Concise Multidisciplinary Introduction


Kevin Leyton-Brown and Yoav Shoham
2008
ix
A Concise Introduction to Multiagent Systems and Distributed Artificial Intelligence
Nikos Vlassis
2007

Intelligent Autonomous Robotics: A Robot Soccer Case Study


Peter Stone
2007
Copyright © 2020 by Morgan & Claypool

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.

Introduction to Logic Programming


Michael Genesereth and Vinay K. Chaudhri
www.morganclaypool.com

ISBN: 9781681737225 paperback


ISBN: 9781681737232 ebook
ISBN: 9781681737249 hardcover

DOI 10.2200/S00966ED1V01Y201911AIM044

A Publication in the Morgan & Claypool Publishers series


SYNTHESIS LECTURES ON ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

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

Michael Genesereth and Vinay K. Chaudhri


Stanford University

SYNTHESIS LECTURES ON ARTIFICIAL INTELLIGENCE AND


MACHINE LEARNING #44

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

PART II Queries and Updates . . . . . . . . . . . . . . . . . . . . . 21


3 Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2 Query Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.3 Query Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
xiv
3.4 Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.5 Predefined Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.6 Example – Kinship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.7 Example – Map Coloring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

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

PART III View Definitions . . . . . . . . . . . . . . . . . . . . . . . 57


7 View Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
7.2 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
7.3 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
7.4 Semipositive Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
7.5 Stratified Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
7.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

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

10 Lists, Sets, Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89


10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
10.2 Example – Peano Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
10.3 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
10.4 Example – Sorted Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
10.5 Example – Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
10.6 Example – Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
10.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
xvi
11 Dynamic Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
11.2 Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
11.3 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
11.4 Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
11.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

12 Metaknowledge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
12.2 Natural Language Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
12.3 Boolean Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
12.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

PART IV Operation Definitions . . . . . . . . . . . . . . . . . . 109


13 Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
13.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
13.2 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
13.3 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
13.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

14 Dynamic Logic Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119


14.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
14.2 Reactive Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
14.3 Closed Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
14.4 Mixed Initiative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
14.5 Simultaneous Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
14.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

15 Database Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125


15.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
15.2 Update With Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
15.3 Maintaining Materialized Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
15.4 Update Through Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
15.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
xvii
16 Interactive Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
16.1 Interactive Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
16.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
16.3 Page Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
16.4 Gestures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
16.5 Operation Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
16.6 View Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
16.7 Semantic Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

PART V Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139


17 Variations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
17.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
17.2 Logic Production Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
17.3 Constraint Logic Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
17.4 Disjunctive Logic Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
17.5 Existential Logic Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
17.6 Answer Set Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
17.7 Inductive Logic Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

A Predefined Concepts in EpilogJS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149


A.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
A.2 Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
A.3 Math Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
A.4 String Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
A.5 List Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
A.6 Arithmetic List Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
A.7 Conversion Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
A.8 Aggregates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
A.9 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

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

Authors’ Biographies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199


xix

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.

Michael Genesereth and Vinay K. Chaudhri


December 2019
PART I

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.

1.2 LOGIC PROGRAMS AS RUNNABLE SPECIFICATIONS


Logic Programming is often said to be declarative or descriptive and contrasts with the imperative
or prescriptive approach to programming associated with traditional programming languages.
In imperative/prescriptive programming, the programmer provides a detailed operational
program for a system in terms of internal processing details (such as data types and variable
assignments). In writing such programs, programmers typically take into account information
about the intended application areas and goals of their programs, but that information is rarely
recorded in the resulting programs, except in the form of non-executable comments.
In declarative/descriptive programming, programmers explicitly encode information
about the application area and the goals of the program, but they do not specify internal pro-
cessing details, leaving it to the systems that execute those programs to decide on those details
on their own.
As an intuitive example of this distinction, consider the task of programming a robot to
navigate from one point in a building to a second point. A typical imperative program would
direct the robot to move forward a certain amount (or until its sensors indicated a suitable land-
mark); it would then tell the robot to turn and move forward again; and so forth until the robot
arrives at the destination. By contrast, a typical declarative program would consist of a map and
an indication of the starting and ending points on the map and would leave it to the robot to
decide how to proceed.
A logic program is a type of declarative program in that it describes the application area
of the program and the goals the programmer would like to achieve. It focusses on what is true
and what is wanted rather than how to achieve the desired goals. In this respect, a logic program
is more of a specification than an implementation.
4 1. INTRODUCTION
Logic Programming is practical because there are well-known mechanical techniques for
executing logic programs and/or producing traditional programs that achieve the same results.
For this reason, logic programs are sometimes called runnable specifications.

1.3 ADVANTAGES OF LOGIC PROGRAMMING


Logic programs are typically easier to create and easier to modify than traditional programs. Pro-
grammers can get by with little or no knowledge of the capabilities and limitations of the systems
executing those programs, and they do not need to choose specific methods of achieving their
programs’ goals.
Logic programs are more composable than traditional programs. In writing logic programs,
programmers do not need to make arbitrary choices. As a result, logic programs can be combined
with each other more easily than traditional programs where unnecessary arbitrary choices can
conflict.
Logic programs are also more agile than traditional programs. A system executing a logic
program can readily adapt to unexpected changes to its assumptions and/or its goals. Once again
consider the robot described in the preceding section. If a robot running a logic program learns
that a corridor is unexpectedly closed, it can choose a different corridor. If the robot is asked to
pick up and deliver some goods along the way, it can combine routes to accomplish both tasks
without having to accomplish them individually.
Finally, logic programs are more versatile than traditional programs—they can be used for
multiple purposes, often without modification. Suppose we have a table of parents and children.
Now, imagine that we are given definitions for standard kinship relations. For example, we are
told that a grandparent is the parent of a parent. That single definition can be used as the basis
for multiple traditional programs. (1) We can use it to build a program that computes whether
one person is the grandparent of a second person. (2) We can use the definition to write a
program to compute a person’s grandparents. (3) We can use it to compute the grandchildren
of a given person. (4) And we can use it to compute a table of grandparents and grandchildren.
In traditional programming, we would write different programs for each of these tasks, and the
definition of grandparent would not be explicitly encoded in any of these programs. In Logic
Programming, the definition can be written just once, and that single definition can be used to
accomplish all four tasks.
As another example of this (due to John McCarthy), consider the fact that, if two objects
collide, they typically make a noise. This fact about the world can be used in designing programs
for various purposes. (1) If we want to wake someone else, we can bang two objects together.
(2) If we want to avoid waking someone, we would be careful not to let things collide. (3) If
we see two cars come close in the distance and we hear a bang, we can conclude that they had
collided. (4) If we see two cars come close together but we do not hear anything, we might guess
that they did not collide.
1.4. APPLICATIONS OF LOGIC PROGRAMMING 5
1.4 APPLICATIONS OF LOGIC PROGRAMMING
Logic Programming can be used fruitfully in almost any application area. However, it has spe-
cial value in application areas characterized by large numbers of definitions and constraints and
rules of action, especially where those definitions and constraints and rules come from multiple
sources or where they are frequently changing. The following are a few application areas where
Logic Programming has proven particularly useful.

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; it can be used to encode constraints
on databases; it can be used to specify access control policies; and it can be used to write update
rules.

Logical Spreadsheets/Worksheets. Logical spreadsheets (sometimes called worksheets) gen-


eralize traditional spreadsheets to include logical constraints as well as traditional arithmetic for-
mulas. 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.

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.

The denying of such a Witch as is last described in the foregoing


Chapter, doth not infer the denying of Angels or Spirits.
Apparitions no warrantable ground for a Christian to believe
the Existence of Angels or Devils by, but the Word of God.

Having declared in Preface. Of Credulity and


what sense and Incredulity, pag. 7.
acceptation we allow of Witches, and in what notion we deny them,
lest we be misunderstood we shall add thus much: That we do not (as
the Schools speak) deny the existence of Witches absolutè &
simpliciter, sed secundùm quid, and that they do not exist tali modo,
that is, they do not make a visible Contract with the Devil, he doth
not suck upon their bodies, they have not carnal Copulation with
him, and the like recited before, and in these respects, and not
otherwise, did Wierus, Gutierrius and Mr. Scot deny Witches, that is,
that neither they nor their supposed Familiars could perform such
things as are ascribed unto them. And that Dr. Casaubon and Mr.
Glanvil should charge those that hold this opinion with Atheism or
Sadducism, is to me very strange, having no ground, connexion, or
rational consequence so to do: yet doth Dr. Casaubon affirm it in
these words: “Now one prime foundation (saith he) of Atheism, as by
many ancient and late is observed, being the not believing the
existence of spiritual Essences, whether good or bad, separate, or
united, subordinate to God, as to the supreme and original Cause of
all; and by consequent the denying of supernatural operations: I
have, I confess, applied my self, by my examples, which in this case
do more than any reasoning, and (the Authority of the holy
Scriptures laid aside) are almost the only convincing proof.” And Mr.
Glanvil is so confident (I might justly say impudent) that he styled
his Book, A Blow at modern Sadducism, which, I confess, is so weak
a blow, and so blindly levell’d, and so improperly directed, that I am
sure it will kill or hurt no body: and tells us this boldly and roundly.
“And those that dare not bluntly say, There is no God, content
themselves, (for a fair step and introduction) to deny there are
Spirits or Witches. Which sort of Infidels, though they are not
ordinary among the meer Vulgar, yet are they numerous in a little
higher rank of understandings. And those that know any thing of the
World, know that most of the looser Gentry, and the small
Pretenders to Philosophy and Wit, are generally deriders of the belief
of Witches and Apparitions.” And the whole design of his Book is to
prove those men to be guilty of Sadducism, that deny the existence of
Witches understood in his sense, and this we oppose, and the state of
the question we lye down thus.
That the denying the existence of Angels or Spirits; or the
Resurrection, doth not infer the denying of the Being of God; nor the
denying of the existence of Witches (in the sense before laid down)
infer the denying of Angels or Spirits; and that they do unjustly
charge the Authors of this opinion with Sadducism, we shall prove
with irrefragable Arguments.
1. There can be no right deduction made, Argum. 1.
nor no right consequence drawn, where
there is no dependency in causality, nor no connexion of
dependency. For as in the Relative and Correlative, the denying of
the one necessarily destroys the other, yet fundamentum Relationis
non destruitur; so a father without a child, as a father, doth neither
exist nor is known, and yet the foundation of those two terms, of
Paternity and Childship, which is Man, doth remain. So he that
denieth Creation, doth destroy the Relative, which is Creator; yet the
foundation, which is God, doth remain: and the denying of the
Creation, doth not infer the necessary conclusion of denying the
Being of a God, because there might be a God, though there were no
Creation, because God is supposed to be, both in respect of causality
and duration, before Creation. So what relation can Mr. Glanvil feign
betwixt the Being of God and the Being of Angels or Spirits? For they
both belong to the Predicament of Substance, and not that of
Relation; and there is less relation betwixt the Being of a Witch and
the Being of Spirits: so that the denying of the one doth not infer the
denying of the other. And though there were relation (which Mr.
Glanvil cannot shew) the foundation of that Relation (which is so
necessary, that Relatives cannot subsist without it) might remain,
though the Relatives were taken away: and therefore the denying of
the existence of Angels or Spirits, doth not infer the denying of the
Being of God; and therefore the Authors of this opinion are
wrongfully and falsely charged with Atheism: and the denying of the
existence of a Witch (in the sense specified) doth not infer the
denying of the Being of Spirits; and therefore Scot, Osburne, and the
like, are falsely and wrongfully charged with Sadducism.
2. Though it be a Mat. 22. 23. Act. 23. Argum. 2.
true Maxime, that 8.
de posse ad esse non valet argumentum; yet on the contrary, the
possibility of that can never be rationally denied, that hath once been
in esse. But it is apparent, that the Sadducees denied the
Resurrection, and that there were either Angels or Spirits, that is,
they denied that Angels or Spirits, whether good or bad, did
separately exist, and that they were nothing but the good or bad
motions in mens minds: yet these men were no Atheists; for though
they denied the Resurrection, and held that there were no Angels or
Spirits, yet they held and believed there was a God, and did allow of,
and believed the five Books of Moses, else would not our Saviour
have used an argument, whose only strength was drawn from a
sentence in the third Chapter of Exodus, the sixth verse. So that even
the denying of the Existence of Angels and Spirits, doth not infer the
denying of a God; much less doth the denying the Existence of a
Witch, infer the denial of the Being of Angels and Spirits; and
therefore the charge of Atheism and Sadducism is false, injurious,
and scandalous.
3. Those things that in their Beings have Argum. 3.
no dependence one upon another, the
denying of the one doth not takeaway or deny the being of the other;
but where the being doth meerly exist in dependency upon another
superior Cause, there take away or deny the being of the first Cause,
and thereby you take away and deny the being of all the rest that
depends upon it. So he that denies the Being of a God, doth
necessarily deny the Being of Angels or Spirits; but not on the
contrary. For he that denieth the Existence of Angels and Spirits,
doth not therefore necessarily take away or deny the Being of a God,
because the Being of a God is independent of either Angel or Spirit,
and doth exist solely by it self. And therefore if Wierus or Scot had
denied the Existence of Angels and Spirits (which they did not) yet it
would not have inferred that they were Atheists; and therefore are
falsely accused by Dr. Casaubon and Mr. Glanvil. And though they
should have denied the Existence of Witches (which they did not
simpliciter, sed tali modo) yet it would not have inferred, that they
were guilty of Sadducism, because Spirits or Demons have their
Existence without any dependence of the being of Witches; and
therefore it is but a poor fallacia consequentiæ to say, he that denies
a Witch, denies a Demon or Spirit.
4. The denying of the Existence of Spirits, Argum. 4.
doth not infer the denying of the Being of a
God, because in the priority of duration God was when Spirits were
not, for they are not immortal à parte anté. So likewise the denying
of the Existence of Witches, doth not infer the denial of the Being of
Spirits, for in the priority of duration Spirits were existent before
Witches; for Adam and Eve could not be ignorant that there were
Spirits, both good and bad, and yet then there were no Witches. So
that a Spirit having, in respect of duration, a Being before that a
Witch can have any; the denying the Existence of the latter, doth not
infer the denying of the Being of the former, but is meerly
inconsequent, agreeable to no Rules of Logick, except that of Logger-
head Colledge.
5. Many properties or proper adjuncts Argum. 5.
may be ascribed unto a substance, the
denying of which adjuncts, doth not infer the denying of the being of
the substance. So that to deny that a Horse hath fins like a fish, or
wings like a bird, doth not infer the denying of the being of a Horse.
Therefore it is injurious and scandalous in Dr. Casaubon and Mr.
Glanvil, to charge Dr. Wierus and Mr. Scot with Atheism and
Sadducism, when indeed (as we shall prove hereafter) their own
Tenents tend to blasphemy, impiety, vanity, and uncharitableness.
Another thing that we oppose is, that Apparitions are no
warrantable ground for a Christian to believe the Existence of Angels
and Spirits by, but the Word of God, which these cogent reasons do
sufficiently prove.
1. For to say that the Apparitions of Argum. 1.
Spirits, good or bad, do prove their
Existence, is but petitio principii, a begging of the question, that first
is in doubt, and ought to be proved. For how come we to be assured,
that the Apparitions that are made, and really by unquestionable
Witnesses attested for truth (not to speak of melancholy Fancies, and
Fables, Knacks of Knavery and Imposture, and other ignorant and
gross mistakes, which are often believed to be Apparitions, when
they are no such matter) that they are made by good or bad Spirits?
for that is the thing in doubt, and so is but a circular way of arguing
by way of begging the question, or proving ignotum per ignotius; for
Apparitions do not prove the Being of Spirits, except it be first
proved, that those Apparitions be made or caused by Spirits.
2. There are many Apparitions that are Argum. 2.
produced by natural and artificial Causes,
and need not be referred to supernatural ones, as are all those Idola,
Images, or Species that we see in Glasses, which cannot be denied to
be Apparitions, and yet arise from natural Causes. So the Apparition
of Comets, new Stars, and many other sort of strange Meteors, as
sometimes three Suns, the Rain-bow, Halones, and the like, that
have natural Causes to produce them, and are no proof of the Being
of Spirits. Nay as the best and most credible Historians have left
upon Record, and hath been known to be a certain verity in divers
parts of these three Kingdoms, within the space of these forty years,
strange and various Sights have been seen in the Air, both of Men,
and Horses, and Armies fighting one with another; and yet were
these no proof of the Existence of Spirits, because they may (and
doubtlesly do) proceed from other causes, and not from the
operation or efficiency of Angels or Spirits, either good or bad.
3. It is not Jo. Drusii Præterit. Argum. 3.
certainly known l. 7. p. 289.
what diversity of De Nymph. lib. pag. De Subtil. l. 19. p.
Creatures there 389. 1202, 1203.
may be that are mediæ naturæ betwixt The invisible World,
Angels and Men, that may sometimes sect. 6. pag. 303.
appear, and then vanish: so that if it be granted, that there be
Apparitions really and truly, yet it will not necessarily follow, that
these are caused by good or bad Angels, because they may be effected
by Creatures of another and middle Nature; and so Apparitions no
certain ground for the believing of the Existence of Angels or Spirits.
For the most learned Drusius gives us this account from one of the
Commentators upon the Book Aboth. “Debet homo intelligere ac
scire à terra usq; ad firmamentum, quod Rakia, id est, Expansum
appellant, omnia plena esse turmis & præfectis, & infrà plurimas
esse creaturas lædentes & accusantes, omnésq; stare ac volare in
aëre, neq; à terra usq; ad firmamentum locum esse vacuum: sed
omnia plena esse præpositis, quorum alii ad pacem, alii ad bellum,
alii ad bonum, alii ad malum; ad vitam & ad mortem incitant. Ob id
compositum fuit canticum occursuum, quod incipit, Sedet in occulto
Supremus.” And if this be a truth, here are orders and numbers
enough of several sorts to make Apparitions, and yet be neither the
good or bad Angels. And if there may any credit be given to the
relation that Cardan gives of his Father Facius Cardanus, which he
had from his own mouth, and also had left it in writing; then “there
are mortal Demons, that are born and do die as men do, that can
appear and disappear, and are of such most tenuious bodies, that
they can afford us neither help nor, hurt, excepting terrors, and
spectres, and knowledge”. And if there may be credit given to
Plutarch (so highly magnified by Dr. Casaubon) the God Pan of the
Heathens must have been one of these mortal Demons, because he
tells us upon the credit of Epotherses (a Tale of hear-say) “That
Thamus was by a voice thrice calling upon him, commanded that
when he came to Palodes, he should tell them, that the great God
Pan was dead”. And that there are such mortal Demons, is strongly
asserted by Paracelsus, and by him called Nymphæ, Sylphi, Pygmæi,
and Salamandræ, and that they are not of Adams Generation, and
that they have wonderful power and skill. And to this opinion do the
Schools both of the ancient and later Academicks wholly incline, and
seems to be favoured both by Dr. Moor and Mr. Glanvil himself; and
if there be any such matters, doubtless from thence did arise all the
strange stories and gests that former Generations have told and
believed concerning the Apparition of these kind of Creatures, which
the common people call Fayries: of which the Reverend and Learned
person Bishop Hall giveth us this touch: “The times are not past the
ken of our memory, since the frequent (and in some part true)
reports of those familiar Devils, Fayries, and Goblins, wherewith
many places were commonly haunted; the rarity whereof in these
latter times, is sufficient to descry the difference betwixt the state of
ignorant Superstition, and the clear light of the Gospel.” And
whosoever shall seriously read and consider that little Piece that was
printed some few years since, though written long ago, and by some
(that pretend to no small share of Learning) cryed up exceedingly for
a most convincing Relation, to prove the Existence of Spirits, called,
The Devil of Mascon, may easily gather, that if the thing were truly
related, as to the matter of fact, that it must needs be some Creature
of a middle Nature, and no evil Spirit, both because it was such a
sportful and mannerly Creature, that it would leave them, and not
disturb them at their devotions; as also (as far as I remember, for I
have not the Book by me) because it denied that it was a Devil, and
professed that it hoped to be saved by Christ.
4. That the Joh. 15. 15. Argum. 4.
Scriptures contain 2 Tim. 3. 15, 16, 17. Act. 20. 27.
in them all things 2 Cor. 2. 11. Eph. 6. 11, 12, 13.
necessary to Luk. 16. 29, 30, 31. 2 Pet. 1. 19.
Salvation, is so Isa. 8. 19, 20. Sup. Gen. ad lit. l. 2.
clear a truth, that
none but those that are wilfully blind can deny it; for Christ taught
his Disciples all things that he had learned of the Father, and the
Father sending him to be the Saviour of the World, and to preach the
Gospel of eternal Salvation, was not defective in declaring all things
that were necessary to accomplish the work and end, for which he
was sent forth of the Father. And the glorious Apostle St. Paul tells
the Disciples and Brethren, That he had not shunned to declare unto
them all the counsel of God, which must of necessity be abundantly
sufficient for their Salvations. And he telleth Timothy, That he had
known the Scriptures from a child, which were able to make him
wise unto salvation. All Scripture is given by inspiration of God,
and is profitable for doctrine, for reproof, for correction, for
instruction in righteousness: That the man of God may be perfect,
throughly furnished unto all good works. Nay the Woman of
Samaria had so much knowledge and faith, that she believed that
when the Messias was come, he would tell them all things. Now to
the obtaining of Salvation, there is nothing more necessary than to
know what enemies men have to fight against in their Christian
Warfare, which the Apostle tells in these words: For we wrestle not
against flesh and blood, but against principalities, against powers,
against the rulers of the darkness of this world, against Spiritual
wickedness in high places: Wherefore they are to take unto them the
whole armor of God, πανοπλίαν τοῦ Θεοῦ, that they may be able to
stand against the wiles of the Devil, μεθοδείας τοῦ διαβόλου: and
that made the Apostle say in another place, We are not ignorant of
his devices or crafts, νοήματα. Now the Scriptures being able to
make us wise to Salvation, it hath sufficiently declared the natures,
powers, knowledge, and offices of both the good and bad Angels, and
is a sure word of Prophecy, unto which it is good to take heed, and
not unto old wives fables of Apparitions and Goblins, such as Mr.
Glanvil would perswade us that they are tydings of another World,
when we are taught by unerring testimony of Truth, That those that
have Moses and the Prophets, and do not hear them, neither will
they be perswaded, though one rose from the dead. And therefore
we must be bold to tell Mr. Glanvil, that the Sacred Scriptures do
with infallible certitude teach us, that both good and bad Spirits have
most certainly an Existence, and therefore we need none of his
feigned nor forged stories of Apparitions; which if they were certainly
known to be true and real, by undeceivable matters of fact, yet he
that doth not believe what is written of the Being of Spirits by Moses
and the Prophets, will not believe Apparitions, no not of a man, if he
came from the dead. And therefore I will conclude with that precious
and pithy Sentence of St. Austin, who saith: Major est hujus
Scripturæ authoritas, quàm omnis humani ingenii perspicacitas.
And believe not them that say, If you would know the power of Devils
and Witches, go to the Writings of Dr. Casaubon, Mr. Glanvil, and to
the rest of the Demonographers and Witchmongers, that amass and
heap together all the lying, vain improbable, and impossible stories
that can be scraped forth of any Author, ancient, middle, or modern,
when we are commanded to go to the Law and to the Testimony, if
they speak not according to this word, it is because there is no truth
in them. And so I shall shut up this Chapter, wherein (I suppose) I
have sufficiently proved, that the denying of such a Witch as I have
described, doth not infer the denial of the Being of Angels or Spirits,
and that Apparitions are no sufficient grounds for Christians to
believe the Existence of Angels and Spirits by, but the Word of God;
which was the thing undertaken to be proved.
CHAP. IV.

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.

As we have in the former Chapter proved, that Apparitions (though


true) are no sufficient warrant to ground our belief upon, for the
Existence of Angels or Spirits, but the Word of God: so here we shall
endeavour clearly to manifest, that the Sacred Scriptures are the only
Medium, joyned with sound Reason, of deciding this point of the
power and operation of Demons and Witches, and not other
improper Mediums brought in by divers Authors, and first we shall
answer the Objection of Mr. Glanvil, that runs thus.
“That though the Pag. 96, 97. Object. 1.
New Testament
had mentioned nothing of this matter, yet its silence in such cases is
not argumentative. He said nothing of those large unknown Tracts of
America, nor gave he any intimations of as much as the existence of
that numerous people; much less did he leave instructions about
their Conversion. He gives no account of the affairs and state of the
other World, but only that general one of the happiness of some, and
the misery of others. He made no discovery of the Magnalia of Art or
Nature, no not of those whereby the propagation of the Gospel might
have been much advanced, viz. the Mystery of Printing and the
Magnet, and yet no one useth his silence in these instances as an
argument against the being of things, which are evident objects of
sense.” To which we answer.
Respons.
1. He falleth into a common mistake in making the Proposition
universal, and dolus versatur in universalibus, when it ought but to
be particular: so for him to say, that no silence of Scripture is
argumentative, is too universal; for its silence in point of Geography,
as in describing America, and the people thereof, nor in discovering
the Magnalia Naturæ & Artis is not argumentative; and we do not
say, that all silence of Scripture is argumentative, but yet we affirm
that some silence of Scripture is argumentative. So we cannot
universally say, that nothing hath a being but what is mentioned in
Scripture; but we may very well affirm, that some things have no
being, or truth of existence, because not declared in Scripture.
2. The Scriptures were not written to Lib. 1. c. 1.
teach Natural Philosophy, Arts or Sciences,
humane Policy, or the like; but were given, that the man of God
might be perfect, furnished for every good work: and it is by them
that we have the doctrine of eternal Salvation revealed unto us, and
we positively affirm the sufficiency of the Scriptures unto Salvation,
which thing no Orthodox Divine (we suppose) will deny, and
Bellarmine himself did confess in these words: Prophetici &
Apostolici libri sunt verum verbum Dei, ac stabilis regula fidei. And
if it be a certain Rule of Faith, and the true Word of God, then
whatsoever it is silent of, we ought not to believe, and so its silence is
argumentative in that point. The Scriptures are utterly silent
concerning Purgatory, and therefore it is a good argument to affirm
there is no such place as Purgatory, because the Word of God is silent
as concerning it; but if it had been necessary to have been believed,
then there would have been mention made of it.
3. And as the Scriptures are sufficient in matters of Faith, and
circa credenda, and what they are silent in, are not to be received as
Articles of our Faith, but to be rejected, as having no truth of
Existence: So likewise what Worship God requireth of his people, is
fully revealed in his Word, and therefore I am to reject the
worshipping of Mahomet with the Turks, or Images, and praying to
Saints with the Papists, because I have neither precept nor president
in the Word, but it is silent in such matters; nay tells us, That he is
the Lord our God, and him only we ought to serve.
4. Though Mr. Origin. Sacr. l. 3. c. Pag. 87, 88. 23.
Glanvil say, that 6. p. 608.
God hath given no Joh. 17. 24. Invisib. World, p.
account of the Serm. c. 7. 112.
state of the other Luk. 23. 43. Wisd. 3. 1.
World, but only Luk. 16. 22, 23. Concio secunda de
that general one of 2 Sam. 12. 23. Lazaro.
the happiness of
Idem. 10. 20, 21. Job 7. 9, 10.
some, and the
misery of others; Homil. sect. 16. Bellarm. Enervat.
pag. 484. tom. 2. l. 5. p. 204.
yet Am I to believe
as Mr. Glanvil somewhere in his Book affirmeth, that Samuels Soul
was raised up by the Woman at Endor, and that those that he
feigneth to make Leagues and Contracts with Witches, are the Souls
of such as had been Witches when they lived, and asketh, Who saith
that happy Souls were never imployed in any ministeries here below?
Or am I to believe that both the Souls of the godly and wicked, do
rove up and down here upon earth, and make Apparitions, because
the Popish Teachers do hold it to be so? I hope not, and therefore I
shall in part give an answer here to some of these, and handle that of
the Woman of Endor in another place. 1. The Word of God doth
particularly teach us the state and condition of the Souls after death,
that they shall be like the Angels in Heaven; and all other things
necessary to move and draw us to believe the immortal Existence of
Souls, as that most able and learned Divine Dr. Stillingfleet hath
asserted in these words: “The Scriptures give the most faithful
representation of the state and condition of the Soul of Man. The
World (he saith) was almost lost in Disputes concerning the Nature,
Condition, and Immortality of the Soul, before divine Revelation was
made known to Mankind by the Gospel of Christ; but life and
immortality was brought to light by the Gospel, and the future state
of the soul of man not discovered in an uncertain Platonical way, but
with the greatest light and evidence from that God who hath the
supreme disposal of souls, and therefore best knows and
understands them.” A Sentence truly pious and orthodoxal. 2. Hath
not God in the holy Scriptures amply and plainly taught us the state
of the other World, in describing unto us such a numerous company
of Seraphims and Cherubims, Angels and Archangels, with their
several Orders, Offices, Ministeries, and Imployments? and this is
more than a general account, as may be seen at full in that learned
and godly Piece of Bishop Halls, called The invisible World. And
hath he not given us a particular account of the very Kingdom of
Darkness, telling us of the Devil and his Angels, and precisely in this
enumeration? For we wrestle not with flesh and blood, but against
principalities, against powers, against the rulers of the darkness of
this world, against spiritual wickedness in high places. And this is
more than a general account, and we must needs say, that what he
holds is very derogatory to the wisdom and goodness of God, and the
sufficiency and truth of the Scriptures. 3. Must I believe him that the
souls of the Saints do rove and wander here below? when as Bishop
Hall saith, where he is speaking against the opinion of those that
hold, that Souls do sleep until the Day of Judgment: “Indeed who can
but wonder that any Christian can possibly give entertainment to so
absurd a thought, whilst he hears his Saviour say, Father I will that
they also whom thou hast given me, be with me where I am, and
that (not in a safe sleep) they may behold my glory, which thou hast
given me.” Sure if the Souls departed be with Christ where he is, and
do behold his glory, then it is a Popish Fable of Mr. Glanvil, to feign
their coming upon Messages hither. The saying of St. Bernard is
remarkable in this case: Advertistis tres esse sanctarum status
animarum, primum videlicet in corpore corruptibili, secundum sine
corpore, tertium in corpore jam glorificato. Primum in militia,
secundum in requie, tertium in beatitudine consummata. And if the
second state of holy Souls be without a body, and be at peace and
rest, then it must necessarily be a truth, that they do not wander
here, nor run upon Errands; For the souls of the righteous are in the
hands of the Lord, and there shall no torment touch them. And our
Saviour told the Thief upon the Cross, This day thou shalt be with
me in Paradise, that is, as Dr. Hammond giveth the Paraphrase:
“Immediately after thy death thou shalt go to a place of bliss, and
there abide with me, a Member of that my Kingdom which thou
askest for.” Now if the souls of the godly, after their death, be
immediately in a place of bliss, and abide with Christ as Members of
his Kingdom, then they do not wander up and down here, as Mr.
Glanvil and the Papists vainly fancy and believe; for as Chrysostome
saith upon that place of Lazarus his being carried by Angels into
Abrahams bosome. “What is it then that the Devils say, I am the Soul
of such a Monk? Truly I therefore believe it not, because the Devils
say it, for they deceive their Auditors.” 4. Or must I believe that the
souls of the wicked do wander, and make Apparitions here, because
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

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.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like