You are on page 1of 1

# Automated Theorem Proving

This project is created as a term project for the course CENG 561 - Artificial I
ntelligence at Middle East Technical University
Contributers for this project are:
* zlem Ceren ahin
* Gne Sucu
* Deniz Can Yldrm
This README file is created to explain how the resolution.py can be executed.
The source code starts with the definitions of methods needed for execution of r
esolution process. At the end of the source code the main method starts with the
try block. The parameter "formula" in the main method can be changed with the f
ormula desired which is desired to be executed in resolution process.
Some examples are commented in the source code provided. By removing comments, i
t is possible to try examples.
Some examples:
*
*
*
*
*
*

formula
formula
formula
formula
formula
formula

=
=
=
=
=
=

"P"
"(P & ~P)"
"(P | ~P)"
"(G & (R -> F))"
"((P & (P <-> Q)) -> Q)"
"((P | Q) & ( P -> R)) -> (P -> R)"

To evaluate a story with the resolution.py, it is posible to change it i


nto a logical propositional sentence and givve it as formula like below:
* For the story:
Given the following hypotheses
If it rains, Joe brings
If Joe has an umbrella,
If it doesn't rain, Joe
Prove that Joes doesn't get wet

his umbrella (r -> u)


he doesn't get wet (u -> NOT w)
doesn't get wet (NOT r -> NOT w)
(NOT w)

Change it into :
formula = "((R -> U) & ((U -> ~W) & (~R -> ~W))) -> (~W)"
And give it to the resolution.

You might also like