A1 Sol
A1 Sol
A1 Sol
Propositional Logic
1. p∨q Simplification
2. p → r ≡ ¬p ∨ r Simplification
3. q → r ≡ ¬q ∨ r Simplification
4. q∨r Resolution (1) and (2)
5. r∨r ≡r Resolution (3) and (4)
(a) (p → q) → r
1
To get disjunctive normal form, we take the conjunction of the values for p, q, and
r for each row where the final evaluation is T, and then take their disjunction:
To get conjunctive normal form, we take the conjunction of the values for p, q,
and r for each row where the final evaluation is F, and then take their disjunction:
Now we take the negation of this entire expression, and repeatedly using DeMor-
gan’s, we derive:
(¬p ∨ ¬q ∨ r) ∧ (p ∨ ¬q ∨ r) ∧ (p ∨ q ∨ r)
(b) (p ∧ ¬q) ∨ (p ↔ r)
To get disjunctive normal form, we take the conjunction of the values for p, q, and
r for each row where the final evaluation is T, and then take their disjunction:
To get conjunctive normal form, we take the conjunction of the values for p, q,
and r for each row where the final evaluation is F, and then take their disjunction:
Now we take the negation of this entire expression, and repeatedly using DeMor-
gan’s, we derive:
2
Predicate Logic
Let the domain be the domain of drivers, and let S(x) be the predicate “x obeys
the speed limit.” Then the statement can be written ∃x¬S(x), and the negation
is ¬∃x¬S(x) ≡ ∀xS(x), or, in English, all drivers obey the speed limit.
Let the domain be the domain of Swedish movies, and let M (x) be the predicate
“x is serious.” Then the statement can be written ∀xM (x), and the negation is
¬∀xM (x) ≡ ∃x¬M (x), or, in English, some Swedish movie is not serious.
Let the domain be the domain of all people, and let K(x) be the predicate “x
can keep a secret.” The statement can be written ¬∃xK(x) ≡ ∀x¬K(x). The
negation is ∃xK(x), or, in English, someone can keep a secret.
Let the domain be the domain of all monkeys, and let F (x) be the predicate “x
can speak French.” The statement can be written ¬∃xF (x) ≡ ∀x¬F (x). The
negation is ∃xF (x), or, in English, some monkey can speak French.
(e) There is someone in the class who does not have a good attitude.
Let the domain be everyone in the class, and let A(x) be the predicate “x has a
good attitude’.” The statement can then be written ∃x¬A(x). The negation is
¬∃x¬A(x) ≡ ∀xA(x), or, in English, everyone in the class has a good attitude.
4. (10 points) Translate these system specifications into English where the predicate
S(x, y) is “x is in state y” and where the domain for x and y consists of all systems
and all possible states, respectively.
3
(a) ∃S(x, open)
No system is working.
5. (3+3+3+3=12 marks) Rewrite the following statments statements so that all negation
symbols immediately precede predicates (that is, no negation is outside a quantifier or
an expression involving logical connectives). Show al the steps in your derivation.
4
(d) ¬∃y(∀x∃zT (x, y, z) ∨ ∃x∀zU (x, y, z))
¬∃y(∀x∃zT (x, y, z) ∨ ∃x∀zU (x, y, z)) ≡ ∀y¬(∀x∃zT (x, y, z) ∨ ∃x∀zU (x, y, z))
≡ ∀y(¬∀x∃zT (x, y, z) ∧ ¬∃x∀zU (x, y, z))
≡ ∀y(∃x∀z¬T (x, y, z) ∧ ∀x∃z¬U (x, y, z))
6. (10 points) Prove these logical equivalences, assuming that the domain is nonempty.
You will probably have to use a proof by cases on the two possible values of proposition
∀yQ(y) and ∃yQ(y) respectively. This proof will use word arguments (not symbolic
formula manipulation).
(a) ∀x(∀yQ(y) → P (x)) ≡ ∀yQ(y) → ∀xP (x)
T → ∀x P (x)
≡ ¬T ∨ ∀x P (x) Table 7
≡ F ∨ ∀x P (x)
≡ ∀x P (x) domination
Thus, if ∀xQ(x) is true, the statements are equivalent.
If ∀xQ(x) is false, we have that:
∀x (F → P (x))
≡ ∀x (¬F ∨ P (x)) Table 7
≡ ∀x (T ∨ P (x))
≡ ∀x T domination
≡T
F → ∀x P (x)
≡ ¬F ∨ ∀x P (x) Table 7
≡ T ∨ ∀x P (x)
≡T domination
Thus, if ∀xQ(x) is false, both statements are true, and thus equivalent.
As they are equivalent regardless of the value of ∀xQ(x), the two statements are
logically equivalent.
5
(b) ∃x(∃yQ(y) → P (x)) ≡ ∃yQ(y) → ∃xP (x)
∃x (T → P (x))
≡ ∃x (¬T ∨ P (x)) Table 7
≡ ∃x (F ∨ P (x))
≡ ∃x P (x) domination
T → ∃x P (x)
≡ ¬T ∨ ∃x P (x) Table 7
≡ F ∨ ∃x P (x)
≡ ∃x P (x) domination
Thus, if ∃xQ(x) is true, the statements are equivalent.
If ∃xQ(x) is false, we have that:
∃x (F → P (x))
≡ ∃x (¬F ∨ P (x)) Table 7
≡ ∃x (T ∨ P (x))
≡ ∃x T domination
≡T
F → ∃x P (x)
≡ ¬F ∨ ∃x P (x) Table 7
≡ T ∨ ∃x P (x)
≡T domination
Thus, if ∃xQ(x) is false, both statements are true, and thus equivalent.
As they are equivalent regardless of the value of ∃xQ(x), the two statements are
logically equivalent.
7. (10 points) A statement is in prenex normal form (PNF) if and only if all quantifiers
occur at the beginning of the statement (without negations), followed by a predicate
involving no quantifiers. Put the following statement in prenex normal form:
(Hint: your first step should rename one of the two x’s as y; check useful valid equiv-
alences in exercises 48,49 page 62 of 6th edition)
(a) ∃xP (x) ∨ ∃xQ(x) ∨ A, where A is a proposition not involving any quantifiers.
We rewrite the statement ∃xP (x) ∨ ∃yQ(y) ∨ A. Now, by 49(b), we can write
(∃x∃y(P (x) ∨ Q(y)) ∨ A. Since A does not contain either the variable x or y,
we can move it inside the parentheses and write: ∃x∃y(P (x) ∨ Q(y) ∨ A). This
6
statement is in PNF. Note that changing the name of the variable is not necessary,
as ∃xP (x) ∨ ∃xQ(x) ≡ ∃x(P (x) ∨ Q(x)), as per S1.3 exercise 45. Thus, the final
answer could also be ∃x(P (x) ∨ Q(x) ∨ A).
We first rename the variable on the right hand side as y to get ∃xP (x) → ∃yQ(y).
We rewrite the statement by reinterpreting implication as ¬∃xP (x) ∨ ∃yQ(y)).
Then by moving the negation in front of the predicate P (x) gives us ∀x¬P (x) ∨
∃yQ(y). Now by 49(b), we can rewrite this as ∀x∃y(¬P (x) ∨ Q(y)), which is in
PNF as required.
Rules of Inference
8. (9 points) For each of these arguments, determine whether the argument is correct or
incorrect and explain why.
(a) Everyone born in Ottawa has eaten a beaver tail. Susan has never eaten a beaver
tail. Therefore Susan was not born in Ottawa.
If we let B(x) be the predicate “x was born in Ottawa”, and E(x) be the predicate
“x has eaten a beaver tail”, and the domain be the domain of all people, then
the argument as given is (∀x(B(x) → E(x)) ∧ ¬E(Susan)) → ¬B(Susan). This
is just an application of modus tollens, and thus, the argument is correct.
(b) A convertible car is fun to drive. Joe’s car is not a convertible. Therefore, Joe’s
car is not fun to drive.
Let the domain be the domain of all cars, and let C(x) be the predicate “x is a
convertible” and F (x) be the predicate “x is fun to drive.” Then the argument as
stated is (∀x(C(x) → F (x)) ∧ ¬C(Joe’s car)) → ¬F (Joe’s car). This argument
is not true, and it is the fallacy of denying the antecedent: being a covertible is
a sufficient condition for being fun to drive, but it is not a necessary condition.
Thus, we cannot derive any information about whether or not Joe’s car is fun to
drive from the premises.
(c) Emma likes all fine restaurants. Emma likes the restaurant “Le Cordon Bleu”.
Therefore, “Le Cordon Bleu” is a fine restaurant.
Let the domain be the domain of all restaurants, and let F (x) be the predicate “x
is a fine restaurant” and L(x) be the predicate “Emma likes x.” Then the argu-
ment as stated is (∀x(F (x) → L(x))∧F (Le Cordon Bleu)) → L(Le Cordon Bleu).
7
This argument is not true, and is the fallacy of confirming the consequent: Emma
liking a restaurant is a necessary condition for a restaurant to be a fine restaurant,
but it is not sufficient. Thus, we cannot conclude from the premises whether or
not Le Cordon Bleu is a fine restaurant.
9. (10 points) Give a formal proof, using known rules of inference, to establish the conclu-
sion of the argument (3rd statement) using the first 2 statements as premises, where
the domain of all quantifiers is the same.
Remember that a formal proof is a sequence of steps, each with a reason noted beside
it; each step is either a premise, or is obtained from previous steps using inference
rules.