ml Hill
mw
wk
F
-w
d 11 a
I
CSLI Lecture Notes No. 42
HYPERPROOF Jon Barwise & John Etchemendy
Program by Gera...
68 downloads
654 Views
12MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
ml Hill
mw
wk
F
-w
d 11 a
I
CSLI Lecture Notes No. 42
HYPERPROOF Jon Barwise & John Etchemendy
Program by GerardAllwein, Mark Greaves, and Michael Lenz With additional programming by Alan Bush, DouglasFelt, Adrian Klein, ChristopherPhoenix, Mark Ravaglia, and Rick Wong
Publications CENTER FOR THE STUDY OF LANGUAGE AND INFORMATION STANFORD, CALIFORNIA
Copyright X)1994 Center for the Study of Language and Information Leland Stanford Junior University Printed in the United States 999897969594 5432 1 Library of Congress Cataloging-in-Publication Data Barwise, Jon. Hyperproof for the Macintosh / Jon Barwise and John Etchemendy; program by Gerard Allwein, Mark Greaves, and Michael Lenz, with additional programming by Alan Bush [et al.]. p. cm. - (CSLI lecture notes; no. 42) In cludes index. ISBN 1-881526-11-9 (pbk.) L.Computer science. 2.Logic, Symbolic and mathematical. 3.Hyperproof. 4.Macintosh (Computer) I. Etchemendy, John, 1952-. II.Title. III.Series. QA76.B3114 1994 160'.285'5369-dc2O
93-30747 CIP
CSLI was founded early in 1983 by researchers from Stanford University, SRI International, and Xerox PARC to further research and development of integrated theories of language, information, and computation. CSLI headquarters and CSLI Publications are located on the campus of Stanford University. CSLI Lecture Notes report new developments in the study of language, information, and computation. In addition to lecture notes, the series includes monographs, working papers, and conference proceedings. Our aim isto make new results, ideas, and approaches available as quickly as possible. Apples is a registered trademark of Apple Computer, Incorporated Macintosh' is a trademark licensed to Apple Computer, Incorporated
Please do not copy Hyperproof(except to make a back-up disk) or this book: it is illegal, immoral, and discouragesthe production of low cost, high quality software. The authorsmake no representationsor warrantieswith respect to the contents hereof and specifically disclaim any implied warrantiesof fitness for any particularpurpose. Please send comments and suggestions to one or both of us. ProfessorJon Barwise I. U. Logic Group Department of Mathematics Indiana University Bloomington, IN 47405
ProfessorJohn Etchemendy Centerfor the Study of Language and Information Stanford University Stanford, CA 94305-4115
To Mary Ellen and Nancy
MSMIM~
About Hyperproof xiii How to use this book .............. ...................... xiv With LoFOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
With Tarski Lite ..............
.........
Acknowledgements ................. A note to instructors .................
. . ....... .
.........
xv
.... ....
xvi xvii
.............. ..............
I
Basic Concepts
1
Comparing Tarski's World and Hyperproof 1.1 Worlds and situations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 A new property and relation ...................... . ............ 1.3 Language differences ...................... ....... ........... 1.4 Kleene evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.5 Proofs .... ..................................................
3 4 7 9 11 15
2
Proofs of Consequence and Nonconsequence 2.1 Observe ................................................. 2.2 Assume ................................................. 2.3 Check Truth of the Assumptions (CTA) ........................... 2.4 Sentence goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of sentence goals ................................... Strategy and tactics .........................................
20 21 23 28 31 37 37
3
1
.....
Sentential Consequence Rules 3.1 Tautological Consequence . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Logical Consequence ....................................... Strategy and tactics ......................................... ix
42 42 50 54
x
Contents Analytic Consequence ..........
56
Proofs of Consistency and Inconsistency 4.1 Syntactic Close .............. 4.2 Semantic Close ......... 4.3 Consistency goals ....... Summary of consistency goals Strategy and tactics .......
60 62
3.3 4
64 66 67 68
II Diagrammatic Reasoning
73
5
The Apply Rule 5.1 Apply. ........... Strategy and tactics ...... 5.2 Some situation goals . ... Strategy and tactics ......
75 76 80 81 83
6
Reasoning by Cases 6.1 Cases Exhaustive ...... Strategy and tactics ...... 6.2 Merge and Inspect ...... Strategy and tactics ...... 6.3 Recursive Close ....... Strategy and tactics ...... 6.4 Name.............. Strategy and tactics ... ... 6.5 Review exercises .......
87 87 93 96 101 104 106 107 110 111
7 Independence Proofs 7.1 Consequence, nonconsequence and independence 7.2 More independence goals. . .. . ........ Summary of some situation goals .......... Strategy and tactics .................... 7.3 Constrained independence and consequence . . . ........ 7.4 Some final situation goals ... .... Summary of remaining situation goals ....... 7.5 Review exercises ..................
114 114 117 117 120 122 124 127 129
Contents xi
III 8
9
Sentential Reasoning Sentence Connective Rules 8.1 Conjunction rules . . . . . . . . . . . . . . . 8.2 Disjunction rules . . . . . . . . . . . . . . . . Disjunctive Close ........................ 8.3 Negation rules ..................... Strategy and tactics .................. 8.4 Conditional rules .. .... .... .. .... ....... Strategy and tactics ..................................... 8.5 Biconditional rules ................. ........ Strategy and tactics ..................................... 8.6 Matters of style . .............................. Quantifier and Identity Rules 9.1 Identity rule .......................................... 9.2 Existential quantifier rules . ............................... Existential Close ....................................... 9.3 Universal quantifier rules ................................. Strategy and tactics ..................................... 9.4 Multiple quantifiers ....................... 9.5 Numerical quantifier rules ................................ 9.6 Review Exercises ......................................
133 135 136 140 143 145 148 153 156 ... 158 159 160
. . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ....... ....... ....... ....... ....... ....... ....... ... .... ......
.......
.............
164 164 167 172 174 178 182 184 188
10 Axioms and Analytic Consequence 10.1 The axiomatic method ................................... 10.2 Axiomatizing shape .................................... 10.3 Axiomatizing size ...................................... 10.4 Location axioms .......................................
191 191 194 201 205
11 Logic and Observation
212
Appendices
218
A Using Hyperproof 218 A.1 Launching the program . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 A.2 Editing the situation .................................... 221 A.3 The body of the proof .................. .......... .......... 224 A.4 Goalsoas .............................................. 232 A.5 Copying and pasting .................................... 233 A.6 Printing proofs ............. .... ........ ..... .... ......... 236
xii
Contents A.7 Function keys ......................... ....... A.8 Setting up problems ................. .................... A.9 Projecting Hyperproof in class .........................
.......
..... 236 .. 236 ....... 238
B Summary of Goals
239
C The LoFOL Proof System
244
Index
247
Index of Try Me Files
254
Sb
A
About Hyperproof Hyperproof is a system for teaching the basic principles of analytical reasoning. It is a descendant of Tarski's World, a program that we designed to teach students the language of first-order logic. When we first developed Tarski's World, we found ourselves giving students reasoning problems that did not fit neatly into any traditional approach to logic. These problems presented a world and a list of sentences involving names whose referents were not identified in the world. The students were asked to determine which of the depicted objects had which names, based on the combined information from the sentences and the depicted world. These problems engage the students in a form of deductive reasoning quite different from the sort of reasoning formalized in standard systems of deduction. Standard systems deal exclusively with sententially given information, whereas these problems require the student to combine sentential information with additional information derived from the picture of the blocks world. From a pedagogical point of view these problems were quite effective. First of all, the students found them challenging, but enjoyable-unlike sentential proofs, which all too often are simply difficult, without other redeeming virtues. But more important, we discovered that these problems allowed students to focus on the content of the reasoning tasks. With an exclusively sentential deductive system, students are forced to reason about the syntactic form of the sentences rather than the information the sentences convey. Thinking about this kind of reasoning, we realized that it was much more pervasive in ordinary reasoning and problem solving than we had imagined. In everyday life we get information from a variety of sources and in a variety of forms. One of the main components of reasoning consists of integrating these variously presented pieces of information. Not only that, all of the main concepts we teach in logic are needed in this process of integration. Hyperproof is a deductive system that takes seriously the heterogeneity of the information we deal with in everyday life. It allows us to present problems which combine graphical and sentential information, and gives the user a stock of logically valid rules for integrating these different forms of information. This provides a platform for presenting much more than the standard fare of introductory logic courses. On the one hand, Hyperproof allows important topics traditionally consigned to advanced courses, such as consistency,
xiii
xiv
About Hyperproof
nonconsequence, and independence, to be taught in a first course in logic. On the other hand, completely new issues arise naturally when working with the system, issues that are obscured when we restrict attention to the logic of a formal, often uninterpreted language. Hyperproof has been under development for six years. For the past three years, beta versions of the program have been used in courses at Stanford, Indiana, Notre Dame, Cornell, and the University of San Francisco. We have discovered several effective ways to use the program in basic logic courses. We will describe a few of these ways in the following section.
How to use this book This book and the accompanying program, Hyperproof, allow for two quite distinct uses: in a standard logic course based on our textbook The Language of First-orderLogic (henceforth LOFOL), or in a more adventuresome course that uses this book as primary text, supplementing it with our little book Tarski's World (henceforth Tarski Lite). Both LOFOL and Tarski Lite come packaged with the computer program Tarski's World, and familiarity with this program is presupposed in the present book. Hyperproof can also be used outside the classroom, but the individual reader will want to supplement it with one of the two books mentioned above. With LoFOL Instructors who want to cover the traditional topics of introductory logic should use this book with LoFOL. There are two ways to integrate material from these books. The first uses Hyperproof simply as a supplementary, proof-theoretic module for LoFOL. The second incorporates new material covering diagrammatic reasoning. Course 1 The Fitch-style natural deduction system presented in LOFOL is a subsystem of the proof system incorporated into Hyperproof. Thus Hyperproof can be used as an environment for constructing proofs in the LoFOL system. However, it can also be used to establish nonconsequence results by building a situation in which the sentential premises are true but the purported conclusion is false. Since many of the problems in LoFOL ask the students to determine whether a purported conclusion is or is not a consequence of some stated premises, Hyperproof provides a uniform setting for the solution of these problems. This allows both the students and the instructor to check the solutions automatically. To use Hyperproof in this way, have your students work through the first three chapters of LoFOL, postponing the sections on formal proofs. Then have them work through Chapters I and 2 of Hyperproof and glance through Appendix C. They will then be ready to use Hyperproof as a proof environment when working through the material on formal proofs in LOFOL. At this point, you should have the students cover the postponed sections from Chapters 2 and 3 of LoFOL. You will then be in a position to work through the
How to use this book xv
remaining material in LoFOL in the standard order, using Hyperproof in the sections on formal proofs. To make life easier we have included a folder on the Hyperproof disk called LoFOL. This contains Hyperproof versions of most of the exercises from the formal proof sections of LOFOL. Course 2 To take advantage of the full power of Hyperproof you will want to give equal treatment to the two books. There are various ways you can do this. The most straightforward is to spend the first half of the course on basic material from the first six chapters of LoFOL, omitting the sections on proofs (and other sections, at your discretion). Then move to the material in Hyperproof, covering the whole book from beginning to end. Alternatively, you can interleave chapters from the two books in a variety of ways. Basically, you will need to work through enough of LOFOL so that your students understand quantifier-free sentences before reading Hyperproof.
With Tarski Lite Tarski Lite is an inexpensive package containing Tarski's World along with a manual explaining how to use the program and providing exercises for learning the language of first-order logic. There are two interesting ways to use Tarski Lite with this book. Course 3 An effective course that teaches both standard material and methods of diagrammatic reasoning can be built around Hyperproof, prefaced by Tarski Lite. Spend the first three or four weeks of the course using Tarski Lite to teach students the first-order language, including quantifiers. Then work through Hyperproof in detail. This course will cover roughly the same material as Course 2, but some of it will have to be presented in lectures since Tarski Lite is more of a workbook than a full textbook. You might want to use LoFOL as a library reference and in preparing lectures for this course. Course 4 An interesting course emphasizing analytical reasoning skills, one that stresses the use of diagrammatic techniques in problem solving and downplays purely syntactic proofs, can be built around Hyperproof. Use Tarski Lite to teach students the first-order language as in Course 3. Then work through Hyperproof as before. As you go through the book, supplement it with material on Venn Diagrams, Euler Circles, and the kind of ad hoc diagrams that arise in solving reasoning problems found on GRE and LSAT exams. In this course the treatment of formal proofs in Chapters 8 and 9 can be abbreviated. The only rules that the students need to learn are the ones that introduce subproofs. The others can always be subsumed under the rules of Taut Con and Log Con. In a full semester version of this course, it is also possible to supplement Tarski Lite and Hyperproof with material on critical thinking. We are currently developing a full-sized textbook using this approach to analytical reasoning, but do not expect it to be completed for several years. We would be delighted
xvi
About Hyperproof
to receive any feedback on Hyperproof, as well as interesting examples and teaching techniques that use the program.
Acknowledgements Hyperproof is a complicated program, and took six years from initial conception to final release. We originally conceived the program, made mockups, and designed the basic algorithms in the summer of 1988. Michael Carter, then at Stanford's Office of Academic Information Resources (AIR), helped us find initial seed funding based on these mockups and a vigorous sales pitch. This seed funding allowed us to hire Alan Bush to write the program specification for Hyperproof's logic engine, a document that took much of the 1988-89 academic year to complete. Programming began in earnest during the summer of 1989, with funding provided by CSLI. The initial programming team consisted of Mark Greaves, Mike Lenz (the main programmer of Tarski's World 3.0), and Chris Phoenix, with Doug Felt of AIR providing invaluable guidance and technical expertise. Mark assumed primary responsibility for the logic engine, Mike took charge of the design and implementation of the situation pane, and Chris for the proof pane. Though Chris was only with us for the first summer, Mark and Mike continued through the entire project. When Jon Barwise moved to Indiana University during the summer of 1990, Gerry Allwein joined the project as a full-time programmer, supported through IU's Center for Innovative Computer Applications. Gerry took charge of the proof pane as well as the overall coordination of the project. Mark Greaves spent the following academic year at UCLA working on the situation rules. With Mike at Stanford, Mark at UCLA, and Gerry at IU, the coordination became a significant feat made possible only by the Internet and Gerry's diplomacy and humor. Mark returned to Stanford during the summer of 1991, while Mike went to Switzerland. Mike returned in the fall and the first beta version of the program was completed in time for us to use in courses during the following academic year. Subsequent beta versions of the program were used in classes several times: at Stanford by Tom Burke, at Notre Dame by Sun-Joo Shin, at IU by Ruth Eberle, at Cornell by Carl Ginet, and at USF by Benjamin Wells. Isabel Luengo also tested the program extensively, and both Ruth and Isabel provided us with some of the Hyperproof problems used in the book. Many modifications and additions to the program were suggested by these initial trials. Among the additions were the rules Taut Con, Log Con, and Ana Con. In the summer of 1992, Adrian Klein and Mark Ravaglia joined the project to implement these rules under the direction of Mark Greaves. In the fall of 1992, Rick Wong, the main programmer on Tarski's World 1.0 and 2.0, became a project consultant. We look back on this project, and our long association with its members, with some amazement. In spite of our experience developing other courseware, we simply had no idea
A note to instructors xvii
how complex a project we were undertaking, or the degree of dedication we would need on the part of our team to bring it to completion. During that first summer, Doug set a series of milestones for the project, identifying them with landmarks along the route from Stanford to Pescadero Beach. Little did we know when we started the project how long it would take us to get to Skyline Boulevard, let alone Pescadero. We would certainly never have reached the beach had we lost Mike, Mark, or Gerry along the way. We are extremely grateful to them, and to the entire team for their hard work and long-term commitment. If you enjoy using the program, you have them to thank.
A note to instructors If you plan to use Hyperproof in a course, you should write for the instructor's package. This package contains material that will make it easier for you to teach the course, as well the most recent version of Hyperproof. We can only distribute this material to instructors, so please write on departmental letterhead. Indicate how many students you anticipate having, and whether you are using Hyperproof with LOFOL or with Tarski Lite. Write to: CSLI Publications Ventura Hall Stanford University Stanford, CA 94305
*All
Basic Concepts
Comparing Tarski's World and Hyperproof Hyperproof is a system that allows you to solve simple reasoning problems. The subject matter of the problems are blocks worlds, similar to those you are familiar with from Tarski's World. You will be given some initial information about such a world and then the problems will challenge you to figure out some additional information. For example, you might be asked to figure out the size and location of a particular block, or to prove that certain claims about the world must hold, or to identify a given block by name. The most distinctive feature of Hyperproof is that the information you work with comes in two different forms: graphical and sentential. On the graphical side, you are given some of your information about the blocks world in the form of a picture or diagram of that world. This information is supplemented with additional information in the form of sentences of a first-order language similar to the one used in Tarski's World. To solve the problems you apply a variety of inference rules that allow you to manipulate the given information in various ways. Some of the rules let you add information to the diagram, if the addition can be justified on the basis of your sentential information. Other rules let you make new sentential claims, provided the sentences follow from the state of the diagram or the other sentences you have available. Still other rules let you do still other things. We will explain all the rules in due course. A lot of things in Hyperproof will seem familiar from Tarski's World. But a lot of things won't. So the first order of business is to say a bit about the differences between Tarski's World and Hyperproof. When you first look at them, the programs will seem very similar. But don't be misled: the similarity is only skin deep. Hyperproof is a much more powerful program, and along with that power comes a good deal of complexity, both conceptual and operational. To master these complexities, you will have to do two things. First, you need to pay close attention to the major, conceptual differences we describe in this chapter. Make sure you understand them or you will certainly end up puzzled later on. Second, when you read the book, you should station yourself near a Macintosh and make sure you try out everything we ask you to. This will make the transition from Tarski's World, which is very simple to
3
4
ComparingTarski's World andHyperproof
'N
II'07",V I ,,
* x,! .. ......... ...
t
1110 kw-
&........ , r
4
77%6 4 .
Figure 1: Situations vs. worlds use, to Hyperproof, which is more complicated, relatively painless.
1.1 Worlds and situations Although the problems in Hyperproof are about worlds like those in Tarski's World, the pictorial information you are given about these worlds will rarely be as complete as it is in Tarski's World. Tarski's World only allows you to construct "complete" or "total" worlds, worlds in which every object has a particular size, shape, and location, and in which all the names in use are assigned to specific objects. In Hyperproof you reason about complete worlds, but the pictorial information you are given about the worlds is, in general, only partial. For example, you may know that there is an object located at a certain point on the grid, but not know the size or shape of that object. Or you may know the size and shape of an object, but not know where on the grid it is located. When we depict such partial information pictorially, we call the depiction a situation. Figure 1 shows a situation from Hyperproof and a world from Tarski's World. When you compare these pictures, the first thing to notice is that the large and medium blocks in Hyperproof are smaller than their counterparts in Tarski's World. The large blocks in Hyperproof (for example, cube d in the top picture) are about the size of the medium blocks in Tarski's World. This allows us to place large blocks next to other blocks, something that is not possible in Tarski's World. The more important differences have to do with the conventions we have adopted in order to present partial information pictorially. The situation in Figure 1 contains several devices
Worlds and situations 5
that you have not seen in Tarski's World. For example, there are two cylindrical objects, one marked with a triangle and the other with a question mark. These do not represent new kinds of objects, but incomplete information about the familiar cubes, tetrahedra, and dodecahedra from Tarski's World. The cylinder at the back, the one with the question mark, indicates that an object is located at that position, but that the size and shape of the object are both unknown. The cylinder on the left, marked with a triangle, also indicates the presence of an object: this one a tetrahedron whose size is unknown. Whenever an object's size is unknown, it is depicted by a cylinder. (The idea is that the object is inside the cylinder, and so its size can't be determined.) The object's shape is indicated by the marking on the outside of the cylinder, unless the shape is also unknown, in which case the cylinder will sport a question mark. Another type of uncertainty is illustrated by the block labeled c toward the middle of the grid. Instead of an ordinary block, you see a crude depiction of a paper bag. The idea here is that you can tell the size of the block-in this case, it is medium-but you cannot tell its shape. Thus we know there is a medium block named c at this location on the grid, but we do not know whether it is a cube, a tetrahedron, or a dodecahedron. To represent a block whose location we do not know, we place the block in the area to the right of the grid. In the situation shown in Figure 1, the location of the large tetrahedron is unknown. Finally, we indicate uncertainty about names in the obvious way: if we don't know which object a name refers to, then the name is simply not attached to any object in the situation. In the example, we do not know which object, if any, the name b refers to. You have probably already noticed that the situation shown in Figure 1 is a partial depiction of the world below it. In other words, the world shown is one way we could extend this partial situation to a total situation (or world). For example, the large tetrahedron might be located in the back right corner of the grid, as it is in the world; the unknown block in the back row might be a large dodecahedron, as it is in the world; and so forth. Of course there are many other worlds (367,416, to be exact!) that this situation might depict equally well: for instance, the large tetrahedron might be located in the front left corner, the unknown block might be a small tetrahedron, and so on. As you fill in any of the missing information in a situation, we say that you are "extending" the situation. One situation is an extension of another if it can be gotten by assigning definite values for attributes that were not determined by the original situation. Thus, the world in Figure I is an extension of our example situation. Another way of extending this situation, this time to another partial situation, is shown in Figure 2. Note that when you extend a situation, none of the definite information you started with is lost. The extension just contains additional definite information. One background assumption made in Hyperproof is that the number of objects in a situation is always known. In other words, all of the objects are always displayed, even though some may not be located on the grid. We make this assumption because, although the Hyperproof rules would be correct without it, they would be a lot harder to apply. What
6
ComparingTarski's World and Hyperproof
1, '%-0I
.~
U~ -b 53w 3.35.3 al39;i tsy i,-3H £5 '33 33' '5
-
.. .. .....
'
%
o5
t.
@
r..