**Question 1 (30):**Let a be the proposition "he is asleep", c be the proposition "he has his coat", l be the proposition "he has the leash" and w be the proposition "it is time for a walk".- (a,10) Translate the following four statements as indicated:
- (to English) (I) (a ∧ c) ⊕ l
Either he is both asleep and has his coat, or he has the leash, but not both.

- (to symbols) (II) If he has the leash, then he also has his coat.
l → c

- (to English) (III) l ∨ (c → ¬a)
Either he has the leash or, if he has his coat, he is not asleep.

- (to symbols) (IV) It is time for a walk if and only if it is not the
case that either he is asleep, he does not have the leash, or he does not have
his coat.
w ↔ ¬(a ∨ ¬l ∨ ¬c)

- (to English) (I) (a ∧ c) ⊕ l
- (b,20) Prove that given the statements I, II, III, and IV above, it is
time for a walk. One good way to do this is to construct a truth table.
Another is to use a deductive sequence proof -- a good way to do this is to
use Proof by Cases with intermediate proposition l. In a deductive
sequence proof, remember that you may use
*valid*rules even if you don't remember their names.With a truth table, it is easier to just analyze I, II, and III on the variables a, c, and l -- we find that I ∧ II ∧ III are true if and only if (¬a ∧ c ∧ l), which by IV (using DeMorgan) is equivalent to w.

`((a and c) xor l) and (l --> c) AND (l or (c --> not a)) 0 0 0 0 0 0 0 1 0 |0| 0 1 0 1 1 0 0 0 0 1 1 0 1 0 0 |0| 1 1 0 1 1 0 0 0 1 0 0 0 0 1 1 |0| 0 1 1 1 1 0 0 0 1 1 1 1 1 1 1 |1| 1 1 1 1 1 0 1 0 0 0 0 0 0 1 0 |0| 0 1 0 1 0 1 1 0 0 1 1 0 1 0 0 |0| 1 1 0 1 0 1 1 1 1 1 0 1 0 1 1 |0| 0 0 1 0 0 1 1 1 1 0 1 0 1 1 1 |0| 1 1 0 0 0 1`

Here is one way to do the deductive sequence proof:

- Assume l.
- By Modus Ponens on II, derive c.
- If a were true, I would be (1 ∧ 1) &oplus 1 = 0, so a must be false.
- By IV, using DeMorgan, ¬a ∧ c ∧ l is equivalent to w.
- We have proved l → w given I, II, III, and IV. (Direct Proof, lines 1-4.)
- Now assume ¬l.
- By Tertium Non Datur from III, we have c → ¬a. (The Tertium Non Datur rule is ((x ∨ y) ∧ ¬x) → y -- it can be proved in two lines from Definition of Implication and Modus Ponens.)
- By Definition of Implication this is ¬c ∨ ¬a.
- By DeMorgan this is ¬(a ∧ c).
- But now I evaluates to 0 ⊕ 0 = 0, while it is assumed to be true.
- We have reached a contradiction from ¬l, so l is true.
- By Modus Ponens from line 5, w is true.

- (a,10) Translate the following four statements as indicated:
**Question 2 (50+10):**This question involves a set of dogs D and the following predicates: L(x) means "dog x is a Labrador", S(x) means "dog x likes to swim", and B(x) means "dog x is black".- (a,10) Translate the following three statements as indicated:
- (to symbols) (V) Ebony is a black Labrador.
B(e) ∧ L(e) (You may supply any name for the constant "Ebony".)

- (to English) (VI) ∃y: S(y) ∧ ¬B(y)
There exists a dog that likes to swim and is not black.

- (to symbols) (VII) Only Labradors like to swim.
"If a dog likes to swim, then it is a Labrador": ∀x: S(x) → L(x)

- (to symbols) (V) Ebony is a black Labrador.
- (b,10) The following statement VIII defines the binary predicate
E(x,y) on D:
¬E(x,y) ↔ (B(x) ⊕ B(y))

Prove that E is an equivalence relation. (Use this definition only, not the statements from (a).)

Reflexive: E(x,x) is defined to be ¬(B(x) ⊕ B(x)) = ¬0 = 1.

Symmetric: E(x,y) ↔ ¬(B(x) ⊕ B(y)) ↔ ¬(B(y) ⊕ B(x)) ↔ E(y,x), using VIII and the fact that ⊕ is commutative (that is, for any p and q, (p ⊕ q) ↔ (q ⊕ p)).

Transitive: Assume E(x,y) and E(y,z), so that (B(x) ⊕ B(y)) and (B(y) ⊕ B(z)) are both false. This means that B(x) and B(y) have the same value, and that B(y) and B(z) have the same value, so we see that B(x) ⊕ B(z) is false and so E(x,z) is true.

- (c,20) Using statements V, VI, VII, and VIII from parts (a) and (b),
prove the statement:
∀u:∃v: L(v) ∧ E(u,v)

(For full credit you must use the predicate calculus proof rules -- there will be partial credit for informal arguments.)

- Let a be an arbitrary dog.
- Assume B(a).
- Let v be e.
- We have L(e) by right separation from V.
- We have B(e) by left separation from V.
- We have B(a) ∧ B(e) by conjunction from lines 2 and 5.
- So B(a) ⊕ B(e) is false by definition of ⊕, and thus E(a,e) is true by VIII.
- By conjunction from lines 4 and 7, we have L(e) ∧ E(a,e)
- By Existence, we have ∃v: L(v) ∧ E(a,v).
- Now assume ¬B(a).
- Using Instantiation on VI, let c be a dog such that S(c) ∧ ¬B(c).
- By Specification on VII, we have S(c) → L(c).
- By left separation on line 11, we have S(c).
- By Modus Ponens on lines 12 and 13, we have L(c).
- Since ¬B(a) and ¬B(c), by definition of ⊕ we have that B(a) ⊕ B(c) is false, and so E(a,c) is true by VIII.
- By conjunction from lines 14 and 15, we have L(c) ∧ E(a,c).
- By Existence, we have ∃v: L(v) ∧ E(a,v).
- We have now proved ∃v: L(v) ∧ E(a,v) by cases.
- Since a was arbitrary, we have proved ∀u:∃v: L(v) ∧ E(u,v).

- (d,10) Let C be the set {b,n} and define a function f from D to C
by the rules (f(x) = b) ↔ B(x) and (f(x) = n) ↔ ¬B(x). Can
you determine from statements V, VI, and VII in part (a) whether the function
f is onto (a surjection)? Justify your answer, making it clear that you
understand the relevant definitions.
We can be sure that f is onto. The definition of onto is that ∀c:∃d: f(d) = c. Let c be an arbitrary element of C. If c = b, then we can let d be e (Ebony), and we know that f(e) = c because B(e) is true. If c = n, then we can let d be the dog whose existence is guaranteed by VI. Since we have ¬B(d) for this dog we know that f(d) = n. These are the only cases possible for c since C = {b, n}, so we have proved ∃d:f(d) = c for arbitrary c and have thus verified that f is onto.

- (e,10 XC) Can you determine from statements V, VI, and VII in part (a)
whether the function f is one-to-one (an injection)? Justify your answer,
making it clear that you understand the relevant definitions.
We don't have enough information to determine whether f is one-to-one. We know that two different dogs exist: Ebony and the dog guaranteed to exist by VI. (They aren't the same dog because Ebony is black and the other dog isn't.) If a third dog exists, then f cannot be one-to-one because either Ebony or the second dog will have the same color as the third dog and thus the same value of f. But there is no reason why a third dog has to exist -- the axioms are all satisfied if Ebony (a black Labrador who might or might not swim) and the non-black, swimming Labrador from VI are the only two dogs in D. And in this case, f

*is*one-to-one.

- (a,10) Translate the following three statements as indicated:
**Question 3 (20):**Let**N**= {0,1,2,3,...} be the set of all naturals. Let R be the binary relation on**N**defined by:R(a,b) ↔ [(a ≤ b) ∧ (∃c: b - a = 2c)]

That is, R(a,b) means that b - a is an even natural.

Here are your questions:

- (a,10) Remember that the definition for R to be
**antisymmetric**is that ∀a:∀b:[R(a,b) ∧ R(b,a)] → (a = b). Argue carefully that R is antisymmetric. You may use standard facts of arithmetic without proof.Let a and b be arbitrary naturals and assume that R(a,b) and R(b,a) are both true. By left separation on the definition, we have that a ≤ b and b ≤ a are both true. By arithmetic, we have then than a = b. We have given a direct proof of the given implication for arbitary a and b, so we have proven that R is anti-symmetric.

- (b,10) State the other two properties necessary to show that R is
a partial order. Argue carefully that R has these two properties.
R must be reflexive: ∀a:R(a,a). Let a be arbitrary. We know that a ≤ a from arithmetic, and a - a = 0 is even (we can take c to be 0). Since a was arbitrary, we have proved the reflexive property.

R must be transitive: ∀a:∀b:∀c:[R(a,b) ∧ R(b,c)] → R(a,c). Let a, b, and c be arbitrary and assume both R(a,b) and R(b,c). We know that a ≤ b and that b ≤ c by separation on these assumptions, so a ≤ c follows by the known transitivity of "≤". We know, also by separation on the assumptions, that b - a and c - b are both even naturals. Since c - a is the sum of b - a and c - b, it is also an even natural. We have now verified the two conditions we need to conclude that R(a,c) is true. We have thus completed a direct proof of (R(a,b) ∧ R(b,c)) → R(a,c). Since a, b, and c were arbitrary, we have proved the transitive property by Generalization. Since R is reflexive, antisymmetric, and transitive, it is a partial order.

- (a,10) Remember that the definition for R to be

Last modified 27 February 2005