CS245 Tutorial
Week 3 (September 30, 2016)
1. Problem: Prove
{((p ∨ q) → r)} `Res ((p ∧ q) → r).
Solution: Converting the premise into an equivalent formula in CNF yields:
((p ∨ q) → r) ≡ ((¬(p ∨ q)) ∨ r)
≡ (((¬p) ∧ (¬q)) ∨ r)
≡ (((¬p) ∨ r) ∧ ((¬q) ∨ r)).
Converting the negation of the conclusion formula into an equivalent formula in CNF yields:
(¬((p ∧ q) → r)) ≡ (¬((¬(p ∧ q)) ∨ r))
≡ ((p ∧ q) ∧ (¬r)).
Therefore our starting set of clauses is
{((¬p) ∨ r), ((¬q) ∨ r), p, q, (¬r)}.
We then obtain the following Resolution refutation proof.
(¬r)
((¬p) ∨ r)
p
r
⊥
2. Consider the set of propositional formulas:
{(a → b), ((b ∧ c) → d), ((d ∧ (e ∨ f )) → g), a, c, (¬e)}.
Convert the formulas to conjunctive normal form and for each of the following queries, either
prove the query using Resolution refutation or show that the query does not logically follow.
Q1. d
Q2. (f → g)
Q3. (g → (¬f ))
Conversion of each formula into conjunctive normal form.
1
1.
2.
3a.
3b.
5.
6.
7.
((¬a) ∨ b)
(((¬b) ∨ (¬c)) ∨ d)
(((¬d) ∨ g) ∨ (¬e))
(((¬d) ∨ g) ∨ (¬f ))
a
c
(¬e)
A Resolution refutation proof of Q1.
1.
2.
3a.
3b.
4.
5.
6.
7.
8.
9.
10.
11.
((¬a) ∨ b)
(((¬b) ∨ (¬c)) ∨ d)
(((¬d) ∨ g) ∨ (¬e))
(((¬d) ∨ g) ∨ (¬f ))
a
c
(¬e)
(¬d)
((¬b) ∨ (¬c))
(¬b)
(¬a)
⊥
assumption
assumption
assumption
assumption
assumption
assumption
assumption
negated query
2, 7
5, 8
1, 9
4, 10
A Resolution refutation proof of Q2.
1.
2.
3a.
3b.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
((¬a) ∨ b)
(((¬b) ∨ (¬c)) ∨ d)
(((¬d) ∨ g) ∨ (¬e))
(((¬d) ∨ g) ∨ (¬f ))
a
c
(¬e)
f
¬g
(¬d) ∨ g
(¬d)
((¬b) ∨ (¬c))
(¬b)
(¬a)
⊥
assumption
assumption
assumption
assumption
assumption
assumption
assumption
negated query
negated query
3b, 7
8, 9
2, 10
5, 11
1, 12
4, 13
Q3 does not logically follow. One can show that there is no proof; i.e., resolving all possible
clauses together does not lead to the empty clause. One can also show a counter-example:
where the assumptions are all true but the query (g → (¬f )) is false.
3. Consider the following:
2
“If the dragon is mythical, then it is immortal, but if it is not mythical, then it is
a mortal mammal. If the dragon does not have scales, then it is mortal and not a
mammal. The dragon is magical if it has scales.”
Represent the above in propositional logic.
I will use the following propositions:
y
o
m
s
g
=
=
=
=
=
The
The
The
The
The
dragon
dragon
dragon
dragon
dragon
is mythical.
is mortal.
is a mammal.
has scales.
is magical.
The sentences are given by:
• s0 : If the dragon is mythical, then it is immortal. (y → (¬o)).
• s1 : If the dragon is not mythical, then it is a mortal mammal. ((¬y) → (o ∧ m)).
• s2 : If the dragon does not have scales, then it is mortal and not a mammal. ((¬s) →
(o ∧ (¬m))).
• s3 : The dragon is magical if it has scales. (s → g).
Conversion of each formula into conjunctive normal form.
c0.
c1a.
c1b.
c2a.
c2b.
c3.
((¬y) ∨ (¬o))
(y ∨ o)
(y ∨ m)
(s ∨ o)
(s ∨ (¬m))
((¬s) ∨ g)
Let Σ be the set consisting of the above clauses. Show whether or not the following possible
queries logically follow from Σ. If a query logically follows, give a Resolution refutation proof.
If a query does not logically follow, show a counter-example.
(a) Q1. Is the dragon mythical?
Solution: Neither y nor (¬y) is a logical consequence of Σ. The definition of Σ |= ϕ says
that every model of Σ must also be a model of ϕ. One way of showing that a given ϕ is
not a logical consequence is to find a counter-example, an interpretation that satisfies Σ
but does not satisfy ϕ. Consider the following interpretation.
• y is false,
• s is true, g is true, o is true, m is true.
We can verify that each of the formulas in Σ is satisfied, but the query y is not satisfied.
Similarly, consider the following interpretation.
• y is true, s is true, g is true,
• o is false, m is false.
3
We can verify that each of the formulas in Σ is satisfied, but the query (¬y) is not
satisfied.
(b) Q2. Is the dragon magical?
Solution: g is a logical consequence of Σ.
Resolution refutation proof.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
((¬y) ∨ (¬o))
(y ∨ o)
(y ∨ m)
(s ∨ o)
(s ∨ (¬m))
((¬s) ∨ g)
(¬g)
(¬s)
o
(¬y)
m
s
⊥
assumption
assumption
assumption
assumption
assumption
assumption
assumption (from negated conclusion)
6, 7
4, 8
1, 9
3, 10
5, 11
8, 12
In the above proof I list the formula followed by the two clauses which I have resolved
together to derive the formula.
(c) Q3. Does the dragon have scales?
Solution: s is a logical consequence of Σ.
Resolution refutation proof.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
((¬y) ∨ (¬o))
(y ∨ o)
(y ∨ m)
(s ∨ o)
(s ∨ (¬m))
((¬s) ∨ g)
(¬s)
(¬m)
y
(¬o)
s
⊥
assumption
assumption
assumption
assumption
assumption
assumption
assumption (from negated conclusion)
5, 7
3, 8
1, 9
4, 10
7, 11
Once again, in the above proof I list the formula followed by the two clauses which I
have resolved together to derive the formula.
4. Remark on Notation: In this question, we use the associativity of ∧ and ∨ to omit parentheses where doing so does not create ambiguity.
Let p0 , p1 , p2 , . . . be propositional variables. Let n be any natural number.
4
(a) Prove, using induction on n, the following Generalized DeMorgan Law, for any
natural number n:
(¬(pn ∨ · · · ∨ p0 )) ≡ (¬pn ) ∧ · · · ∧ (¬p0 ).
Solution: As stated in the question, the proof is by induction on n.
• Base (n = 0): The desired result in this case is (¬p0 ) ≡ (¬p0 ), which is trivially true.
• Induction (n > 0): The induction hypothesis is
(¬(pn−1 ∨ · · · ∨ p0 )) ≡ ((¬pn−1 ) ∧ · · · ∧ (¬p0 )).
We compute
(¬(pn ∨ · · · ∨ p0 ))
≡
|{z}
((¬pn ) ∧ (¬(pn−1 ∨ · · · ∨ p0 )))
≡
|{z}
((¬pn ) ∧ ((¬pn−1 ) ∧ · · · ∧ (¬p0 )))
DeMorgan
induction
≡
(¬pn ) ∧ · · · ∧ (¬p0 ).
This completes the induction and the proof.
(b) Prove that, for any 0 ≤ i ≤ n, there exists a Resolution refutation proof to witness
{pi } `Res (pn ∨ · · · ∨ p0 ).
Solution: By the result of part 4a, the negation of the desired conclusion formula is
(¬(pn ∨ · · · ∨ p0 )) ≡ (¬pn ) ∧ · · · ∧ (¬p0 ).
Hence our starting set of clauses for Resolution is
{pi , (¬pn ), . . . , (¬pi ), . . . , (¬p0 )}.
Now we see that combining pi and (¬pi ) with the Resolution inference rule yields ⊥, as
desired.
5
© Copyright 2026 Paperzz