.he'TP'Page %'
.fo'Aaron Sloman'%'January 1977'
.hy0

.lv 2
.mh
D R A F T
=========
.sp2
THEOREM PROVING BY COMPUTER
===========================
.hm
This is a huge topic. This demo is intended to give only a very brief
introduction to some of the ideas.

Modern logic is made up of a number of sub-branches, of which two of the most
fundamental are Propositional Logic and Predicate Logic.
The former is concerned with global features of propositions (statements), the latter with more
detailed inner structure.

.sh
Propositional Logic
-------------------
.hs

This is concerned with the ways in which essentially complete propositions (statements) can be
embedded in larger ones. E.g. if P and Q are propositions, then larger ones
containing them are:
 	not-P
 	P and Q
 	P or Q
 	Neither P nor Q
 	If P then Q
.br
etc.

Propositional logic includes the study of valid inference patterns, such as
.br
(1)	If P then Q
 	P
 	----------
 	Therefore: Q

(2)	P  or  Q
 	not-P
 	---------
 	Therefore: Q


.sh
Predicate Logic
---------------
.hs

This is based on the inside of Gottlob Frege that instead of thinking of
a proposition as made up of a subject and a predicate, or a noun phrase and
a ver phrase, it is often useful to think of it as made up of a predicate
"applied to" one or more objects, its "arguments". E.g. in POP11, we
translate "X is an integer" to ISINTEGER(X), i.e. we apply the predicate
(a function which produces the result <true> or <false>) to X.
Similarly, we translate something like "X is a member of LIST" to
MEMBER(X,LIST) where MEMBER is a binary or "two-place" predicate.

Frege showed that many words which look like ordinary arguments were in fact
"higher-level" functions, e.g. "something", "nobody", "everything", "nothing", etc.

So although "John is hungry" and "Nobody is hungry" look grammatically similar,
they have a different logical structure, namely
 	Hungry(John)
  and
 	For all x, not(Hungry(x))

Where "x" in the latter is a "universally quantified" variable.

Predicate Logic subsumes Propositional Logic, since the propositions formed
from predicates, arguments, quantifiers, etc. can be combined in still larger
propositions, using the propositional connectives "and", "or", "not", etc.
The rules of propositional logic still apply, and in addition there are rules
of predicate logic, for instance rules which enable you to infer that the
following complex statement internally inconsistent:

  Hungry(John) and (For all x, not(Hungry(x)))

Several different notations are in use by logicians, and several different
systems of rules have been developed, many of them equivalent in power,
but differing in economy or simplicity of use.

.sh
Computer logic
--------------
.hs

It is possible to give a computer the ability to apply rules of logic to tell whether
inferences are valid, whether assertions are inconsistent etc.

In fact all the rules can be formulated in terms of telling whether a statement
 (which may be quite complex)
is inconsistent, or self contradictory.
For example, to say that the inference from premisses
 	S1, S2, S3, S4...Sn
.br
to the conclusion C
.br
is valid, is equivalent to saying that the following complex statement is
self-contradictory:
 	S1 and S2 and S3 and ... and Sn and not-C

"Resolution theorem-provers" work like that. I.e. to discover whether some
statement C can be derived from a collection of statements, they add
the negation of C to the collection, and then attempt to derive
a contradiction, a statement of the form
 	P and not-P
.sh
Theorem proving and problem-solving
-----------------------------------
.hs

Often a problem can be thought of as defined by a set of facts describing some
given conditions, and then a theorem to be proved, e.g. a theorem that it is
possible to transform the situation to a desired state, using operations
described in the given facts. The proof that it can be done, will generate
a description of how to do it. (See the paper by Green, in IJCAI-1.)

Resolution theorem-provers will do this in a slightly back to front fashion,
by adding the asserting that it cannot be done to the given facts, then trying
to derive a contradition. The derivation of the contradiction will involve,
in effect, constructing a method of doing it.

A more detailed introduction to these ideas can be found in Nilsson's book.
