Sunteți pe pagina 1din 5

COS4807/201/0/2019

Tutorial Letter 201/0/2019

Formal Logic
COS4807

Year module

Department of Computer Science


School of Computing

CONTENTS
Solutions to Assignment 1

BAR CODE

university
Define Tomorrow. of south africa
SOLUTIONS TO ASSIGNMENT 1
Question 1 (20)
(i) A = (((p ∨ q) ∨ r) ∧ (¬p ∧ ¬q)) → r is valid because it is true in all interpretations:

p q r p ∨ q (p ∨ q) ∨ r ¬p ∧ ¬q ((p ∨ q) ∨ r) ∧ (¬p ∧ ¬q) A


T T T T T F F T
T T F T T F F T
T F T T T F F T
T F F T T F F T
F T T T T F F T
F T F T T F F T
F F T F T T T T
F F F F F T F T

(ii) B = (p → (q → r)) ↔ ((p ∧ q) ∧ ¬r) is unsatisfiable because it is false in all interpretations:

p q r q → r p ∧ q p → (q → r) (p ∧ q) ∧ ¬r B
T T T T T T F F
T T F F T F T F
T F T T F T F F
T F F T F T F F
F T T T F T F F
F T F F F T F F
F F T T F T F F
F F F T F T F F

(iii) C = (p → (q → r)) → ((p → q) → r) is satisfiable because it is true in at least one interpretation,


and it is falsifiable because it is false in at least one interpretation:

p q r q → r p → q p → (q → r) (p → q) → r C
T T T T T T T T
T T F F T F F T
T F T T F T T T
T F F T F T T T
F T T T T T T T
F T F F T T F F
F F T T T T T T
F F F T T T F F

2
COS4807/201/0/2019

Question 2 (20)
In the semantic arguments below, we use the following terms to refer to formulas with the correspond-
ing principle operators:

implication →
conjunction ∧
disjunction ∨
negation ¬
equivalence ↔
Note that these terms are not used in the prescribed book, but we use them to save having to write
“formula with . . . as principle operator”. For example, we simply write “implication” instead of
“formula with → as principle operator”.

(i) Assume there is some interpretation I such that vI (((p ∨ q) ∨ r) ∧ (¬p ∧ ¬q)) = T . Then
vI ((p ∨ q) ∨ r) = T and vI (¬p ∧ ¬q) = T (by the truth values of conjunction). From the second
conjunct, vI (¬p) = T and vI (¬q) = T (by the truth values of conjunction). So vI (p) = F and
vI (q) = F (by the truth values of negation). But then vI (p ∨ q) = F (by the truth values of
disjunction). But since vI ((p ∨ q) ∨ r) = T , we conclude that vI (r) = T (again by the truth
values of disjunction).
We have shown that for every interpretation I in which vI (((p ∨ q) ∨ r) ∧ (¬p ∧ ¬q)) = T ,
vI (r) = T . Therefore (by the truth values of implication), vI ((((p∨q)∨r)∧(¬p∧¬q)) → r) = T .
Since I is an arbitrary interpretation, we conclude that (((p ∨ q) ∨ r) ∧ (¬p ∧ ¬q)) → r is valid.

(ii) To show that (p → (q → r)) ↔ ((p ∧ q) ∧ ¬r) is unsatisfiable, we will show that the formula is
false in all interpretations. Let I be an arbitrary interpretation. Then

vI (p → (q → r)) = F
iff vI (p) = T and vI (q → r) = F (by the truth values of implication)
iff vI (p) = T and vI (q) = T and vI (r) = F (by the truth values of implication)
iff vI (p) = T and vI (q) = T and vI (¬r) = T (by the truth values of negation)
iff vI (p ∧ q) = T and vI (¬r) = T (by the truth values of conjunction)
iff vI ((p ∧ q) ∧ ¬r) = T (by the truth values of conjunction)

We have shown that vI (p → (q → r)) = F iff vI ((p ∧ q) ∧ ¬r) = T , i.e. vI (p → (q → r)) 6=


vI ((p ∧ q) ∧ ¬r). Therefore (by the truth values of equivalence), the formula is false in all
interpretations.

Question 3 (20)
Theorem: If A is an unsatisfiable formula, then every tableau for A closes.
Proof outline: The proof is by means of a contrapositive argument. In other words, it proves that if
some tableau for A is open, then A is satisfiable.

The proof uses the definition of a Hintikka set:


1. A Hintikka set may not contain a literal and its complement.
2. If the set contains a formula to which an α-rule may be applied, then it also contains both the
subformulas produced by the application of the rule.

3
3. If the set contains a formula to which a β-rule may be applied, then it also contains one of the
subformulas produced by the application of the rule.

The proof then proceeds to show that the set of all fomulas in an open branch of a tableau (i.e. the
union of all the formulas in all the nodes from the root to an open leaf), is a Hintikka set.
Hintikka’s theorem, which states that every Hintikka set is satisfiable, is then used to infer that
the set of all formulas in an open branch is satisfiable.
Since the set of all the formulas in an open branch contains the formula in the root, namely A,
the interpretation satisfying this set also satisfies A.

Question 4 (30)
(i) ¬((((p ∨ q) ∨ r) ∧ (¬p ∧ ¬q)) → r)

((p ∨ q) ∨ r) ∧ (¬p ∧ ¬q), ¬r

((p ∨ q) ∨ r), (¬p ∧ ¬q), ¬r

(p ∨ q) ∨ r, ¬p, ¬q, ¬r
s +
p ∨ q, ¬p, ¬q, ¬r r, ¬p, ¬q, ¬r
x & ×
p, ¬p, ¬q, ¬r q, ¬p, ¬q, ¬r
× ×

(ii) (p → (q → r)) ↔ ((p ∧ q) ∧ ¬r)



(p → (q → r)) → ((p ∧ q) ∧ ¬r), ((p ∧ q) ∧ ¬r) → (p → (q → r))
s +
¬(p → (q → r)), ((p ∧ q) ∧ ¬r) → (p → (q → r)) (p ∧ q) ∧ ¬r, ((p ∧ q) ∧ ¬r) → (p → (q → r)))
 
p, ¬(q → r), ((p ∧ q) ∧ ¬r) → (p → (q → r)) p ∧ q, ¬r, ((p ∧ q) ∧ ¬r) → (p → (q → r)))
+ s
p, q, ¬r, ((p ∧ q) ∧ ¬r) → (p → (q → r))
r ,
p, q, ¬r, ¬((p ∧ q) ∧ ¬r) p, q, ¬r, p → (q → r)
w ' w '
p, q, ¬r, ¬(p ∧ q) p, q, ¬r, ¬¬r p, q, ¬r, ¬p p, q, ¬r, q → r
×
{ $  { $
p, q, ¬r, ¬p p, q, ¬r, ¬q p, q, ¬r, r p, q, ¬r, ¬q p, q, ¬r, r
× × × × ×
Please note that we don’t normally draw branches that merge, as above. A semantic tableau
should be a tree. We have drawn it like this to save space (and work) since the left and right
branches are identical from the merged node on.

4
COS4807/201/0/2019

(iii) (p → (q → r)) → ((p → q) → r)


t *
¬(p → (q → r)) (p → q) → r
  
p, ¬(q → r) ¬(p → q) r

 
p, q, ¬r p, ¬q

Since this tableau has at least one open branch, we conclude that the formula is satisfiable.
¬((p → (q → r)) → ((p → q) → r))

p → (q → r), ¬((p → q) → r)

p → (q → r), p → q, ¬r
s +
¬p, p → q, ¬r q → r, p → q, ¬r
x & x &
¬p, ¬r ¬p, q, ¬r ¬q, p → q, ¬r r, p → q, ¬r
x & ×
¬q, ¬p, , ¬r ¬q, q, ¬r
×
Since this tableau has at least one open branch, we conclude that the unnegated formula is
falsifiable.

Question 5 (10)
1. ` ¬p, p, q, r Axiom
2. ` ¬q, p, q, r Axiom
3. ` ¬r, p, q, r Axiom
4. ` ¬(p ∨ q), p, q, r β∨, 1, 2
5. ` ¬((p ∨ q) ∨ r), p, q, r β∨, 3, 4
6. ` ¬((p ∨ q) ∨ r), ¬¬p, q, r α¬, 5
7. ` ¬((p ∨ q) ∨ r), ¬¬p, ¬¬q, r α¬, 6
8. ` ¬((p ∨ q) ∨ r), ¬(¬p ∧ ¬q), r α∧, 7
9. ` ¬(((p ∨ q) ∨ r) ∧ (¬p ∧ ¬q)), r α∧, 8
10. ` (((p ∨ q) ∨ r) ∧ (¬p ∧ ¬q)) → r α →, 9


c
UNISA 2019

S-ar putea să vă placă și