Download Attach the input and output files. For the latter, the formula transfor

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
COMP 3400 Computational Logic and Automated
Reasoning
Winter 2017 Assignment 1
1. Produce a knowledge base in PROPOSITIONAL LOGIC capturing
the following information as closely as possible as stated here: If Tweety is
a bird and it is not an abnormal bird, then it flies. A bird is abnormal
exactly when it is an ostrich, a penguin, or not an abnormal wooden bird. A
wooden bird is abnormal exactly when operated under remote control. Tweety
is a bird, it is not an ostrich nor a penguin nor a remote controlled wooden
bird. Prove using Prover9 that Tweety flies. Notice that the two forms of
abnormality mentioned here may be different, one is if birds, the other is for
wooden birds.
You have to provide the knowledge base as part of your written report.
Start by listing the propositional variables and their intended meanings. Then
produce the formulas that will go into your input file, explaining them.
Explain in the report what Prover9 did to prove the claim.
Attach the input and output files. For the latter, the formula transformation done by Prover9 and the pruned proof suffice.
propositional variables:
b: tweety is a bird
ab: is tweety is abnormal bird
f: tweety flies
o: is an ostrich
p: is a penguin
w: is wooden bird
abw: abnormal as wooden bird
r: remote control operated
formulas(assumptions).
b & -ab -> f.
ab <-> (o | p | (w & -abw) ).
abw <-> r.
-o.
-p.
-r.
b.
-w.
end_of_list.
formulas(goals).
f.
end_of_list.
============================== PROOF =================================
%
%
%
%
%
%
-------- Comments from original proof -------Proof 1 at 0.00 (+ 0.00) seconds.
Length of proof is 13.
Level of proof is 4.
Maximum clause weight is 3.
Given clauses 0.
1 b & -ab -> f # label(non_clause). [assumption].
2 ab <-> o | p | x & -abw # label(non_clause). [assumption].
4 f # label(non_clause) # label(goal). [goal].
6 -ab | o | p | x. [clausify(2)].
7 -x. [assumption].
8 -b | ab | f. [clausify(1)].
14 -o. [assumption].
15 -p. [assumption].
17 b. [assumption].
18 -f. [deny(4)].
19 -ab | o | p. [resolve(7,a,6,d)].
20 -ab. [copy(19),unit_del(b,14),unit_del(c,15)].
22 $F. [back_unit_del(8),unit_del(a,17),unit_del(b,20),unit_del(c,18)].
============================== end of proof ==========================
2. Prove with Prover9 the theorem about idempotency in Boolean algebras
shown in Chapter 2. You need to use predicate logic with ad hoc symbols
for the operations and special constants involved. Make sure Prover9 understands equality. Instructions as for the previous problem.
More precisely, prove that “For all a:
a t a = a” from the following
axioms:
BA1
Commutativity
For all a, b:
atb=bta
2
aub=bua
BA2
Associativity:
For all a, b, c:
(a t b) t c = a t (b t c)
(a u b) u c = a u (b u c)
BA3
Distributivity:
For all a, b, c:
a t (b u c) = (a t b) u (a t c)
a u (b t c) = (a u b) t (a u c)
BA4
Neutral elements:
For all a:
a t 0̂ = a
BA5
“Complement”:
a u 1̂ = a
For all a:
a t a0 = 1̂
a u a0 = 0̂
============================== prooftrans ============================
Prover9 (32) version Dec-2007, Dec 2007.
Process 7000 was started by xahra on xahra-PC,
Sat Feb 11 11:15:42 2017
The command was "/cygdrive/c/Program Files (x86)/Prover9-Mace4/bin-win32/prover9".
============================== end of head ===========================
============================== end of input ==========================
============================== PROOF =================================
%
%
%
%
%
%
-------- Comments from original proof -------Proof 1 at 0.00 (+ 0.01) seconds.
Length of proof is 22.
Level of proof is 8.
Maximum clause weight is 13.
Given clauses 11.
4 (all a all b all c and(and(a,b),c) = and(a,and(b,c))) # label(non_clause). \\ [assumption].
5 (all a all b all c or(a,and(b,c)) = or(and(a,b),and(a,c))) # label(non_clause). \\ [assumption
6 (all a all b all c and(a,or(b,c)) = or(and(a,b),and(a,c))) # label(non_clause).\\ [assumption
7 (all a or(a,$0) = a) # label(non_clause). [assumption].
8 (all a and(a,$1) = a) # label(non_clause). [assumption].
9 (all a or(a,-a) = $1) # label(non_clause). [assumption].
11 (all a or(a,a) = a) # label(non_clause) # label(goal). [goal].
15 and(and(x,y),z) = and(x,and(y,z)). [clausify(4)].
3
16
17
18
19
20
21
23
24
25
54
55
56
57
58
or(and(x,y),and(x,z)) = or(x,and(y,z)). [clausify(5)].
and(x,or(y,z)) = or(and(x,y),and(x,z)). [clausify(6)].
and(x,or(y,z)) = or(x,and(y,z)). [copy(17),rewrite([16(5)])].
or(x,$0) = x. [clausify(7)].
and(x,$1) = x. [clausify(8)].
or(x,-x) = $1. [clausify(9)].
or(c1,c1) != c1. [deny(11)].
or(x,and(y,z)) = and(x,and(y,or(x,z))). [back_rewrite(16),rewrite([18(3,R),15(3)]),flip(a)].
and(x,and(y,or(x,z))) = and(x,or(y,z)). [back_rewrite(18),rewrite([24(4)]),flip(a)].
and(x,and(y,x)) = and(x,y). [para(19(a,1),25(a,1,2,2)),rewrite([19(4)])].
and(x,or(y,-x)) = and(x,y). [para(21(a,1),25(a,1,2,2)),rewrite([20(2)]),flip(a)].
and(x,y) = x. [para(21(a,1),25(a,2,2)),rewrite([55(3),54(2),20(3)])].
or(x,y) = x. [para(25(a,1),24(a,1,2)),rewrite([56(2),56(3),56(3),56(2)])].
$F. [resolve(57,a,23,a)].
============================== end of proof ===========================
Deadline: Feb. 6, at 23:55
4
Related documents