Mod1 08 Reasoning
Mod1 08 Reasoning
Automated Reasoning
Andrea Torsello
Automated Reasoning
Very important area of AI research
Automated mathematics
Automated verification
Theorem proving
Applications:
Inference Rules
A entails B iff
A
B
Axioms C D Z Theorem
Tautologies
S: (X(YZ))((XY) (XZ))
YZ
XY
XZ
X (YZ)
((XY)(XZ))
true
true
true
true
true
true
true
true
true
true
true
false
false
true
false
false
false
true
true
false
true
false
false
true
false
false
true
true
false
false
false
false
false
false
false
true
false
true
true
true
true
true
true
true
true
false
true
false
false
true
true
true
true
true
false
false
true
false
true
true
true
true
true
false
false
false
false
true
true
true
true
true
Equivalence Rules
A and B are logically equivalent (write A B)
Also B A
Properties
Commutativity
PQ QP
PQ QP
PQ QP
Associativity
(PQ)R P(QR)
(PQ)R P(QR)
Distributivity over 'and' and 'or':
P (Q R) (P Q) (P R)
P (Q R) (P Q) (P R)
Distributivity over implication
P (Q R) (P Q) (P R)
P (Q R) (P Q) (P R)
Properties
De Morgans Law (refers to either)
(P Q)
P Q
(P Q)
P Q
PQ
Q P
P Q P Q
P Q (P Q) (Q P)
Reduce to truth value
P P False
P P True
An Example Deduction
(P Q) (P Q)
Show that this sentence is false
(P Q) (P Q)
(P Q) (P Q)
(P Q) (Q P)
(P Q) (Q P)
((P Q) (Q P)) (Q P)
(P Q) ((Q P) (Q P))
(P Q) False
False
Classic example
AB, A
B
Above line: what we know, below: what we can deduce
AB
Top: AB, A
Bottom: B
True
True
True
True
True
True
False
False
False
False
False
True
True
False
True
False
False
True
False
True
And-Elimination:
A1 A 2 A n
Ai
[1 i n]
And-Introduction:
A1, A2, , An
A1 A2 An
The sentences may be from different places
Ai
A1 A2 An
[1 i n]
Unit resolution
(A B) , B
A
Basis for resolution theorem proving
Example: X.Y.likes(X,Y)
becomes likes(tony, george)
We write:
Universal Elimination
Given a sentence, A
V.A
Subst({V/g}, A)
Remember to remove quantifier
X likes(X, ice_cream)
becomes likes(ben,ice_cream)
Existential Elimination
Given a sentence, A
V.A
Subst({V/k}, A)
For the sake of argument, lets call it
Existential Introduction
Given a sentence, A
A
V. Subst({g/V},A)
Exercise: find sentence where V is in A such that this inference rule is not sound
Chains of Inference
Three approaches
Forward chaining
Backward chaining
Proof by contradiction
Forward Chaining
A1
A2
A3
Backward Chaining
Start with the theorem state and work backwards
Which operator could have been applied to which state to produce the state
(sentence) Im at
Reductio ad absurdum
Assume theorem is false
(next week)