Hyperproof - Logical Reasoning With Diagrams
Hyperproof - Logical Reasoning With Diagrams
Hyperproof:
Logical Reasoning with Diagrams
77
It-
I,
’ ~!’HBBetween(,
GJveaGivel~]
~- FrontOf(o,c)
¯ 3x Left0r(x, d) <--> Lerge(b)
Given
I|
3x :ly (~Tet(x) ~Tet(y) A Between(b, x,y))
Glven
Given
lea
Iil
¯ Left0f(d, f) Given
II
Dodec(e) Given
Iill
-~3gLeft0f(xo e) V Large(e) ~ven
~il
One aim of our work, as explained in [1], is to demon- this is probably an understatement. Figuring out how
strate that this dogmais quite misguided. Webelieve to represent the information at hand is often the most
that many of the problems people have putting their important part of the solution. What we seek to teach
knowledgeof logic to work, whether in machines or in our students, then, is to use the most appropriate form
their own lives, stems from the logocentricity which of representation for the reasoning task at hand. As
has pervaded its study for the past hundred years. long as the purported proof really does clearly demon-
Weapproach logic from an informational perspec- strate that the information represented by the conclu-
tive. Whereverthere is structure, there is information. sion is implicit in the information represented by the
But in order for agents (animals, people, or comput- premises, the purported proof is valid.
ers) to traffic in information, the information must, in Whyare logicians so suspicious of diagrams and
some way or other, be presented to or represented by other forms of non-textual representation? The an-
the agent. Typically, a given representation, or family swer goes back to the tradition in geometry, where
of representations, will represent certain information diagrams were viewed with suspicion by the ancients.
explicitly, while other information will be implicit in Certain mistaken proofs were seen to result from being
the information explicitly represented. Inference, as we led astray by a misleading diagram that accompanied
understand the term, is the task of extracting informa- it. So, the tradition went, the diagram should, in the-
tion implicit in someexplicitly presented information. ory, be eliminable from the proof. The textual part of
This informational perspective is part of the modern, the proof should stand on its own two feet.
semantic approach to logic associated with names like This argument is itself a nonsequitur. If we threw
G6del, Tarski, l~obinson, and the like. On this view, out every form of reasoning that could be misapplied
a purported rule of inference is valid or not depending by the careless, we would have very little left. Math-
on whcthcr it in fact guarantees that the information ematical induction, for example, would go. No, the
represented by the conclusion is implicit in the infor- correct response is not to throw out methods of proof
mation represented by the premises. But when one that have been misapplied in the past, but rather to
takes this informational perspective seriously, the lo- give a careful analysis of such methods with the aim of
gician’s disdain for nontextual representations seems understanding exactly when they are valid and when
like an oversight, a case of dogmathat desperately they are not.
needs reexamination. The most casual survey of the A nice case study along these lines has been car-
ways people actually represent information shows an ried out by Sun-Joo Shin in [3] and reported in [4]. In
enormous variety of representational devices that go introductory logic, many people teach the method of
beyond simple text. Venn diagrams. But often they also tell their students
In carrying out a reasoning task, part of the solution that Venn diagrams are only a heuristic aid to giving
lies in figuring out how to represent the problem. In proofs. A "real" proof has to be given in first-order
problem solving, well begun really is half done. Indeed, logic. Shin shows that this is a mistake. She gives a
78
[] Given
¯ VX(TeL(x) -.) Small(x)) Given
¯ Vx (Cube(x) 4 Hedtum(x)) Given
¯ VX(Dodec(x) ~, Large(x)) Given
j= VVVU (Semeslze(u,v)<-> SemeCol(u, Given
I" Vw -~Dodec(w) Glvee
I" Vx Vy ((Tet(x) ^ Tet(y)) -’, Given
¯ 3W Tet(w) Given
79
I Problem3 Counterexamplo
of D (in that it carries more information than D), and diagram D* which is incompatible with D’ and which
say that these exhaust all the possibilities, given the settles all issues raised in D~, we call this a possible
sentence S. This step is valid if any way the world counterexample, and give it to the user as a possibility
could be, consistent with D and S, is also consistent that needs to be considered explicitly. In this way, the
with at least one of these new diagrams. This is the search space is greatly reduced and the rule is sound,
rule of Cases Exhaustive. in that it never ratifies an invalid use of Apply. The
A special instance of Cases Exhaustive is where algorithm is not complete, in that it will not be able
k = l, that is, where there is just one new diagram. to recognize some valid uses of Apply, but in such
Applying the rule in this case means that the informa- cases it returns a possible counterexample for the Nser
tion added to D in the new diagram D1 is implicit in to consider.
tile sentence S. Wecall this special instance Apply, This rule, and the more general version of Cases
since you can think of it as applying the information Exhaustive, give proofs in Hyperproof quite a differ-
in S to add new information to the diagram. ent character than we expected. It is very difficult
Rather than describe the general Cases Exhaus- to find problems where the best solution relies on the
tive algorithm, let us discuss the special case of Ap- standard sentential rules of inference. It is typically
ply. The interested reader can readily think through muchmore efficient to break into several diagrammal~le
the extension to the more general rule. So we imagine cases and then work on these diagrams.
ourselvcs in tile following situation. The user has a di-
agram D and a sentence S. She wants to apply S to The role of the computer
I.
amplify tile diagram to D
As we said earlier, Hyperproof is not an AI program. It;
Ideally, what one would like would be an algorithm
is, rather, a platform for teaching students somebasic
which did the following: If this Apply is legitimate,
then say so. If not, then produce a counterexample, principles of valid reasoning. The role of the compllter
is two-fold:
by displaying a diagram D* that amplifies D in a way
I.
where S is true but which is incompatible with D ¯ It is an environmentfor creating proofs: it provides a
This specification is not in general realizable in a convenient environment for generating visually per-
computationally feasible manner. The reason is that it spicuous representations of the situations the stLi-
can happen that such a diagram would have to settle dents are asked to reason about.
too many issues, issues which themselves can be re- * It is a proof checker: it checks the students work to
solved in a variety of ways. Thus one gets into a huge see if each step is correct, and if the proof as a whole
scarch space. satisfies the goal of the problem.
In Hyperproofwesolve this problem in two ways, re-
lying on partial information. First, we only search for This said, though, it must be said that the program
countercxamplcs amongthose diagrams that settle just does have some smarts. It is able to perform some
issues raised in DS.3 If we can find a such a diagram reasoning tasks that outstrip our original iutentioas
in which S is true, then we will have found a coun- for it. While we do not want to make any AI claims
tcrexample. But we do not insist that the sentence for our program, we would be gratified if the features
S come out as true in D*, only that it not come out that make it smarter than we intended were of use il~
as false. If it comesout as neither true nor false in a AI.
Most noticeable of these are the rules of Apply and
3 For example,if D’ settles the size of a single block b, Cases Exhaustive. By repeated uses of these rules,
and that is all, then the only issue we consider is the size one can basically have the computer figure out the
of that block. All other amplifications of D are ignored. cases for a case analysis. All one does is start it off
8O
with one case to activate the issues you want consid- 6. Neil Tennant, "The Withering Away of Formal Se-
ered in your case analysis. mantics," Mind and Language, Vol. 1, No. 4, 1986,
Using this trick, the user can prod the program to pp. 302-318.
performfeats of inference that are very difficult for the Jon Barwise
user herself to follow. For example, it may produce Department of Computer Science
a set of exhaustive cases which she cannot readily see Indiana University
to be exhaustive. For our pedagogical purposes, this Bloomington, IN 47405
poses a bit of a problem, since we want to teach the
student that proofs are composed out of self-evident E-mail: [email protected]
steps. But if you think of using Hyperproof-like tech-
nology for automated or computer-aided inference in
other settings, this feature could be a big win. John Etchemendy
Weclose with a simple example of this phenomenon. Center for the Study of Language and Information
Figure 2 shows a sample problem given in Hyperproof. Ventura Hall
The goal of the problem is to determine the sizes and Stanford University
shapes of the objects depicted. (In Hyperproof, we as- Stanford, CA94305
sumethat there are only three sizes of objects, small,
mediumand large, and three shapes, cubes, tetrahe- E-mail: [email protected]
dra, and dodecahedra, so the sizes and shapes of the
objects depicted are, in fact, all determined by the sen-
tences in the given.) This is not an entirely trivial
chore. However,using a trick, and Hyperproof, she can
make short work of it. If she makes a random guess
at the sizes and shapes, and asks the program to ver-
ify that her guess follows from the given information,
Hyperproofquickly comes up with the counterexample
shown in Figure 3. This counterexample is, of course,
4the correct answer to the problem.
This is a fairly simple example, but the program can
solve much more complicated problems in the same
way. For example, try to figure out which objects de-
picted in Figure 1 have which of the names used in the
sentences displayed. The trick just described makes
short work of it.
References
1. Jon Barwise and John Etchemendy, "Valid inference
and visual representation," in Visualization in Math-
emalics, ed by Zimmermanand Cunningham, Math-
ematical Association of America, 1990
2. Jon Barwise and John Etchemendy, Tarski’s World
3.0, CSLI Lecture Notes, University of Chicago Press
1991
3. Sun-Joo Shin, Vaild Reasoning and Visual Represen-
tation, Dissertation, Stanford University, 1991
4. Sun-Joo Shin, "An Information-Theoretic Analysis
of Valid Reasoning with Venn Diagrams," in Sit-
nation theory and its applications, Part 2, ed by
Barwise et. al., CSLI Lecture Notes, University of
Chicago Press, 1991
5. John Sowa, Conceptual Structures: Information
Processing in Mind and Machine, Addison-Wesley,
1984
Interestingly, it takes a lot longer for the programto de-
termine that the counterexampleis the only solution than
that it is a solution.
81