100% found this document useful (1 vote)
411 views

Automated Reasoning With PROLOG

This document provides an introduction to an automated reasoning course. The course will cover general deduction techniques that can be applied to many areas, focusing specifically on first-order logic and equality. It will explore how a theorem prover takes logical data and determines if a given conclusion follows from that data, answering yes, no, or that it cannot determine. Prolog is presented as an example of a theorem prover that uses refutation methods to show if a conclusion is implied by given facts.

Uploaded by

Naga Raju N
Copyright
© Attribution Non-Commercial (BY-NC)
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 (1 vote)
411 views

Automated Reasoning With PROLOG

This document provides an introduction to an automated reasoning course. The course will cover general deduction techniques that can be applied to many areas, focusing specifically on first-order logic and equality. It will explore how a theorem prover takes logical data and determines if a given conclusion follows from that data, answering yes, no, or that it cannot determine. Prolog is presented as an example of a theorem prover that uses refutation methods to show if a conclusion is implied by given facts.

Uploaded by

Naga Raju N
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 5

Automated Reasoning (what this course is about) 0ai

AUTOMATED REASONING
machine does 'thinking' machine does book-keeping,
Krysia Broda user does nothing user does 'thinking'.
Room 378 Concerned with GENERAL DEDUCTION - applicable in many areas.
kb@doc.ic.ac.uk Specifically First order logic / equality - not modal or temporal logics
PROBLEM: DATA |= CONCLUSION (|= read as “implies”)
SLIDES 0: The data will be expressed in logic – e.g. (i) first order predicate logic,
(ii) clausal form, (iii) equalities only, or (iv) Horn clauses only.
INTRODUCTION and OVERVIEW ANSWER: YES/NO/DON'T KNOW (i.e. give up)
Introduction to the course -
what it covers and what it doesn’t cover YES + 'proof' - usually just one and smallest if possible, or
Examples of problems for a theorem prover YES + all proofs (or all answers) - (c.f. logic programming)
Prolog – an example of a theorem prover Problem can be answered:
• with refutation methods (show data + ¬ conclusion give a contradiction).
eg resolution and tableau methods covered here;
• for equality using special deduction methods (covered here);
KB - AR - 09 • directly, reasoning forwards from data using inference rules, or backwards
from conclusion using procedural rules; eg natural deduction (but not here)

0aii Prolog is a Theorem Prover (1)


Fields of Automated Reasoning
COMMON
Special Theory Models of discovery SENSE Data: (1) a(Y):-b(Y),c(Y). (2) b(X):-c(X). (3) c(g).
Built-in axioms reasoning Models of poor REASONING (Variables X,Y universally quantified)
of equality reasoning Conclusion: a(g)
Show Data implies Conclusion.
EQUALITY AUTOMATED DEDUCTION Large domain - can also read
easy calculations tree backwards:
REASONING - hints, heuristics,
REASONING with Can work forwards
NON-CLASSICAL puzzle solving from facts eg to show c(g), again note
LOGICS - belief logics c(g) is a fact
THEOREM from c(g) and (3) c(g) (2)
PROVING Description Logics b(X):-c(X) for all X, to show b(g), by (2)
Temporal LOGIC can derive b(g); show c(g)
(3) c(g) (4) b(g) (1) c(g) is a fact, so ok
Reasoning PROGRAMMING
Mathematical Semantic from b(g), c(g) and
reasoning Web a(Y):-b(Y),c(Y) for all Y to show a(g), by (1)
can derive a(g) a(g) show (b(g) and c(g)) (i.e.
Proof checking MODEL show b(g) and show c(g))
CHECKING deduction =
execution, small
Program verification domain, complex Question:
Proof
guidance Deductive databases calculations Include eq(g,h) meaning g=h. What data is needed to show c(h)? 0aiii
Prolog is a Theorem Prover (2) 0aiv Prolog is a Theorem Prover (3) 0av
Data: (1) a(Y):-b(Y),c(Y). (2) b(X):-c(X). (3) c(g). Data: (1) a(Y):-b(Y),c(Y). (2) b(X):-c(X). (3) c(g).
Conclusion: a(g) Conclusion: a(g)
Prolog assumes conclusion false (i.e. ¬a(g)) and derives a contradiction – ¬a(g)
called a refutation
?a(g) show a(g)
(1) (1) ¬b(g) or ¬c(g)
From ¬a(g) and a(Y):-b(Y),c(Y) derive ¬(b(g) and c(g)) ≡ ¬b(g) or ¬c(g) (*)
Case 1 of (*) if ¬b(g), then from b(X):-c(X) derive ¬c(g) ?b(g), c(g) show b(g) and c(g)
(2) ¬c(g) (3)
¬c(g) contradicts fact c(g) (2)
Case 2 of (*) if ¬c(g) again it contradicts c(g) show c(g) and c(g) (3)
?c(g), c(g)
Hence ¬b(g) or ¬c(g) leads to contradiction;
(3) ¬a(g) may be read as "show a(g)"
Hence ¬a(g) leads to contradiction, so a(g) must be true and the refutation and procedural
?c(g) show(c(g)
¬a(g) interpretation are isomorphic
(3) c(g) (2) (3) to show a(g), show (b(g) and c(g))
done
(1) ¬b(g) or ¬c(g) [] (i.e. show b(g) and show c(g))
(3) c(g) (4) b(g) (1) to show b(g), show c(g)
(2) ¬c(g) (3) Prolog reading c(g) is a fact, so ok
(procedural interpretation) to show c(g), again note c(g) is a fact
a(g) (3)
The various interpretations are similar because the Data uses Horn clauses

Introduction: 0avi
Introduction (continued):
The course slides will generally be covered “as is” in class. Course notes (like this On the other hand, direct reasoning of the form "from X conclude Y" (also called forwards
one) amplify the slides. There are also some longer (“chapter”) notes with more reasoning), from data to conclusion, is sometimes used. When reasoning is directed
background material (not examinable) on my webpage (www.doc.ic.ac.uk/~kb). backwards from the conclusion, as in "to show Y, show X" it may be called backwards
reasoning). The deductions produced by LP are sometimes viewed in this way, when it is
In this course we'll be concerned with methods for automating reasoning. often referred to as a procedural interpretation.
We'll look at the "father" of all methods, resolution, as well as at tableaux methods.
We'll also consider reasoning with equality, especially when the data consists only of What we won't be concerned with: particular methods of knowledge representation, user
equations. All data will be in first order logic (i.e. not in modal logic, for example). interaction with systems, reasoning in special domains (except equational systems), or
Of course, there are special systems for automating other kinds of logics, for example model checking. All of these things are important; a problem can be represented in
modal logics. The methods are usually extensions of methods for first order logic, or different ways, making it more or less difficult to solve; clever algorithms can be used in
sometimes they reduce to using theorem provers for first order logic in special ways. special domains; user interactive systems are important too - e.g. Isabelle, the B-toolkit or
It is mainly for these reasons (but also because there isn't enough time) that we Perfect Developer, as they usually manage to prove the easy and tedious things and require
restrict things. intervention only for the hard proofs. Isabelle and its relations are now very sophisticated.
If a proof seems to be hard it may mean that some crucial piece of data is missing (so the
Logic programming (LP) is a familiar, useful and simple automated reasoning system proof doesn't even exist!) and user interaction may enable such missing data to be detected
which we will occasionally use to draw analogies and contrasts. e.g in LP we usually easily. Model checking (e.g. Alloy) can also be used to show a conclusion is not provable
desire all solutions to a goal. In theorem proving terms this usually amounts to by finding a model of the data that makes the conclusion false.
generating all proofs, although often just one proof might be enough. In LP reasoning
is done by refutation. The method of refutation assumes that the conclusion is false In order to see what kinds of issues can arise in automated reasoning, here are 3 problems
and attempts to draw a contradiction from this assumption and the given data. Nearly for you to try for yourself. Are they easy? How do you solve them? Are you sure your
always, refutations are sought in automated deduction. answer is correct? What are the difficulties? You should translate the first two into logic. In
the third, assume all equations are implicitly quantified over variables x, y and z and that a,
b, c and e are constants. 0avii
A harmonious household (!): 0bii
EXAMPLE PROBLEMS 0bi
Someone who lived in the house stole from Aunt Agatha.
Agatha the butler and James live in the house and are the only people that do.
• A general theorem prover might be expected to solve all of the following A thief dislikes, and is never richer than, his victim.
3 problems easily. James dislikes no-one whom Aunt Agatha dislikes.
• The user would translate the data into logic first. Agatha dislikes everyone except the butler.
• How would YOU solve the problems? The butler dislikes anyone not richer than Agatha and everyone she dislikes.
• Are they easy? What are the difficulties? No-one dislikes everyone.
• Are you sure the answer is correct? Agatha is not the butler.
Therefore Agatha stole from herself
Three naughty children: (and also that neither James nor the butler stole from her)

Dolly Ellen or Frances was the culprit and only one. A Mathematical Problem:
The culprit was in the house. aοb=c
Dolly said " It wasn't me, I wasn't in the house; Ellen did it." ο is an associative operator: x ο (y ο z) = (x ο y) ο z
Ellen said " It wasn't me and it wasn't Frances; xοx=e
but if I did do it then (Dolly did it too or was in the house)." x ο e = e ο x = x (e is the identity of ο)
Frances said " I didn't do it, Dolly was in the house;
if Dolly was in the house and did it so did Ellen." Show b ο a = c
None of the three told the truth. Who did it?

Some hints for the problems. 0biii


Some Useful References and Websites 0ci
For the naughty children: (See Chapter Notes for additional papers etc.)
Let the constants be d, e and f (for Dolly, Ellen and Francis);
You need predicates C(x) – x is a culprit, and H(x) – x is in the house; Alan Bundy: The Computer Modelling of Mathematical reasoning (Academic)
The second sentence is ∀x(C(x) → H(x)).
Chang & Lee: Symbolic Logic and Mechanical Theorem Proving (Academic)
For Aunt Agatha's Burglary:
You can ignore "lives in the house". Mel Fitting: First order Logic and Automated Theorem Proving (Springer)
Let the constants be a, b, j and predicates be s(x,y): y is the victim of thief x, Alan Robinson: Logic:Form and Function (Edinburgh)
d(x,y): x dislikes y, r(x,y): x is richer than y and = (usual meaning);
The first sentence is ∃x(s(x,a)), which can be simplified to s(m,a); Larry Wos: Automated Reasoning: Introduction and Applications (McGrawHill)
The last piece of data is ¬ (a=b); J. Kalman: Automated reasoning with Otter (Rinton)
You'll need to reason about equality:
if data S holds for x, and x=y, then S holds for y. Blasius & Burckert: Deduction Systems in Artificial Intelligence (Ellis Horwood)

Mathematics: Lassez & Plotkin (Eds): Computational Logic (MIT)


There are 3 constants, a, b and c, and predicate P(x,y,z) meaning x o y = z; Kakas & Sadri (Eds): Computational Logic: Logic Prog and Beyond (Springer)
You can either translate into data using P
or keep with = only and reason with equality (see just above); R. Veroff: Automated Reasoning and its Applications (MIT)
Try both! J. Gallier: Logic for Computer Science: Foundations of Automated Theorem
Proving (Harper Row)
Several “freetech” books from www.freetechbooks.com
Useful References and Websites Continued 0cii
Summary of Slides 0 0di
CADE: Conference on Automated Deduction (Springer)
http://www.cadeconference.org/ (old: http://www.cs.albany.edu/~nvm/cade.html) 1. This course is concerned with the automation of logical reasoning.
TABLEAUX: Conference on Analytic Tableau and Related Methods (Springer)
http://i12www.ira.uka.de/TABLEAUX/ 2. You are already familiar with one automated reasoner, Prolog. Its evlauation
can be viewed in two ways: either as refutation whereby the conclusion is
Workshop on First Order Theorem Proving http://www.csc.liv.ac.uk/FTP-WS/ negated and a contradiction derived from it by resolution using the data, or as a
(Old: http://www.mpi-sb.mpg.de/conferences/FTP-WS/) natural deduction process working backwards from the goal.
http://en.wikipedia.org/wiki/Automated_theorem_proving 3.There are other refutation methods, including general resolution and semantic
(Slightly biased contents) tableaux, which will be covered in the course.
Theorem Proving at Argonne
http://www-unix.mcs.anl.gov/AR/ (Includes Otter theorem Prover) 4. Problems can involve propositional data (without quantifiers), or data with
quantifiers. Data may include use of the equality predicate, for which special
http://www.uni-koblenz.de/~beckert/leantap/ (A tableau based prover) methods can be used (eg Knuth Bendix Procedure), also covered in the course.
http://www.leancop.de/ (Another tableau based prover)
5. There are other aspects to automated reasoning, including systems with
http://www.cl.cam.ac.uk/research/hvg/Isabelle/ more user interaction, model checking, modal and temporal logic provers and
knowledge representation. This course will not be considering these things.
http://alloy.mit.edu/
http://www.cs.miami.edu/~tptp/ (Thousands of problems for Theorem Provers) 6. You will be able to use several theorem provers in this course.
http://www.cs.swan.ac.uk/~csetzer/logic-server/software.html (List of Provers)

Some Famous Names in Theorem Proving Some Famous Names in Theorem Proving
Chang and Lee
Robert First book on theorem
Kowalski Proving (1968)
(1979) Theory
of Logic
Programming
Connection
Alan Bundy Graphs (1976)
Clam Theorem
Alan Robinson Gerard Huet Prover, Hillary Putnam
Discovered Resolution Discovered excellent book, Davis Putnam
1961 rewrite systems problem solving prover 1957
1976
Donald Knuth Martin Davis
Larry Wos Reiner Hahnle Knuth Bendix Davis Putnam Algorithm
Wrote Otter LeanTap 1997 and Algorithm (1957)
prover other provers (1971)
(1980s) and Key System for Tex J S Moore
successor Program Correctness Boyer MooreProver (1970s)
Prover9 2005 Structure Sharing (1971)
More Famous Names in Theorem Proving (No pictures!)
Donald Loveland - discovered Model Elimination 1967
Alain Colmerauer - first Prolog System
Mark Stickel - PTTP Theorem Prover 1982
David Plaistead - Hyper-linking (1992)
Reinhold Letz - Setheo, Free variable Tableau proving (1990s onwards)
Norbert Eisinger - Connection Graph theory (1986)
Woody Bledsoe - UT prover (natural deduction style)
Larry Paulson - Inventor of Isabelle
Andrei Voronkov - Vampire Theorem Prover
Ian Horrocks - Description Logic Theorem Prover

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy