564 Lecture 5 Sept. 7 1999

1 Problem Set Answers:

1. a. Define -> in terms of & and ~. Show logical equivalence by a truth table.

(p -> q) <=> ~ ( p & ~q )

Truth table:

p

q

~q

p&~q

p->q

~(p&~q)

(p->q)<->~(p&~q)

1

1

0

0

1

1

1

1

0

1

1

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

b. Define & in terms of v and ~.

p&q <=> ~(~pv~q)

Truth table:

p

q

~p

~q

~pv~q

~(~pv~q)

p&q

(p&q)<->~(~pv~q)

1

1

0

0

0

1

1

1

1

0

0

1

1

0

0

1

0

1

1

0

1

0

0

1

0

0

1

1

1

0

0

1

c. Define <-> in terms of -> and &:

p<->q <=> (p->q)&(q->p)

p

q

p->q

q->p

(p->q)&(q->p)

p<->q

(p<->q)<-> (p->q)&(q->p)

1

1

1

1

1

1

1

1

0

0

1

0

0

1

0

1

1

0

0

0

1

0

0

1

1

1

1

1

2. (i) p = "It is raining".

"It is not the case that it is not raining" = ~~p

~~p <=> p

Truth table:

p

~p

~~p

p<->~~p

1

0

1

1

0

1

0

1

(ii) p = "It is snowing".

q= "It is cold"

a. "If it is snowing, it is cold" = p->q

b. "Either it is not snowing, or it is cold" = ~p v q

(p->q)<=>(~p v q)

Truth table:

p

q

~p

~pvq

p->q

(p->q)<->(~pvq)

1

1

0

1

1

1

1

0

0

0

0

1

0

1

1

1

1

1

0

0

1

1

1

1

(iii) p = "It is raining"

q = "It is hot"

a. "If it is raining, it is not hot" = p->~q

b. "If it is hot, it is not raining" = q ->~p

(p->~q)<=>(q->~p)

Truth table:

p

q

~p

~q

p->~q

q->~p

(p->~q)<->(q->~p)

1

1

0

0

0

0

1

1

0

0

1

1

1

1

0

1

1

0

1

1

1

0

0

1

1

1

1

1

(iv) p = "Jim is late"

q = "Sally is late"

r = "Dad will be furious."

a. "If either Jim or Sally is late, Dad will be furious." = (pvq)->r

b. "If Jim is late, Dad will be furious and if Sally is late, dad will be furious." = (p->r) & (q->r)

((pvq)->r)<=>((p->r)&(q->r))

Truth table:

p

q

r

pvq

(pvq)->r

p->r

q->r

(p->r)&(q->r)

((pvq)->r) <-> ((p->r)&(q->r))

1

1

1

1

1

1

1

1

1

1

1

0

1

0

0

0

0

1

1

0

1

1

1

1

1

1

1

1

0

0

1

0

0

1

0

1

0

1

1

1

1

1

1

1

1

0

1

0

1

0

1

0

0

1

0

0

1

0

1

1

1

1

1

0

0

0

0

1

1

1

1

1

(v) p = Bill is singing

q = Jim is dancing

r = Sally is dancing

a. "Bill is singing and Jim or Sally is dancing." = p & (qvr)

b. "Bill is singing and Jim is dancing or Bill is singing and Sally is dancing." = (p&q)v(p&r)

(p & (qvr))<=>( (p&q)v(p&r))

Truth table:

p

q

r

qvr

p&(qvr)

p&q

p&r

(p&q)v(p&r)

(p&(qvr))<->((p&q)&(p&r))

1

1

1

1

1

1

1

1

1

1

1

0

1

1

1

0

1

1

1

0

1

1

1

0

1

1

1

1

0

0

0

0

0

0

0

1

0

1

1

1

0

0

0

0

1

0

1

0

1

0

0

0

0

1

0

0

1

1

0

0

0

0

1

0

0

0

0

0

0

0

0

1

3. (a)

(~p v (p&q)) Given

((~p v p) & (~p v q)) Distributive law (a)

(T & (~p v q)) Complement law (a)

(~p v q) Identity law (d)

(p->q) Conditional law (a)

(b)

((~p&q)v~(pvq)) Given

((~p&q)v(~p&~q)) DeMorgan’s law (a)

(~p & (qv~q)) Distributive law (b)

(~p & T) Complement law (a)

~p Identity law (d)

(c)

(~p & ((p&q) v (p&r))) Given

(~p & (p& (qvr))) Distributive law (b)

((~p & p) & (qvr)) Associative law (b)

(F & (qvr)) Complement law (c)

F Identity law (c)

(d)

((~p&q)<->(pvq)) Given

((~p&~~q)<->(pvq)) Double negation

(~(pv~q)<->(pvq)) DeMorgan’s law (a)

(~(pv~q)->(pvq)) &((pvq)->~(pv~q) Biconditional law (a)

((~~(pv~q)v(pvq)) &((pvq)->~(pv~q) Conditional law (a)

((pv~q)v(pvq)) &((pvq)->~(pv~q) Double negation

((pv~q)v(qvp)) &((pvq)->~(pv~q) Commutative law (a)

((pv(~qv(qvp))) &((pvq)->~(pv~q) Associative law (a)

((pv((~qvq)vp)) &((pvq)->~(pv~q) Associative law (a)

(pv(Tvp)) &((pvq)->~(pv~q) Complement law (a)

(pvT) &((pvq)->~(pv~q) Identity law (b)

T &((pvq)->~(pv~q) Identity law (b)

((pvq)->~(pv~q) Identity law (d)

~((pvq) & ~~(pv~q) Conditional law (c)

~((pvq) & (pv~q) Double negation

~(~~(pvq) & (~~pv~q)) Double negation twice

~(~(~p&~q)&(~~pv~q)) DeMorgan’s law (a)

~(~(~p&~q)&~(~p&q)) DeMorgan’s law (b)

~~(~p&~q)v(~p&q)) DeMorgan’s law (a)

(~p&~q)v(~p&q) Double negation

~p & (qv~q) Distributive law (b)

~p & T Complement law (a)

~p Identity law (d)

(e)

((pvq)&(rv~q))->(pvr) Given

~((pvq)&(rv~q))v(pvr) Conditional law (a)

(~(pvq)v~(rv~q)) v (pvr) DeMorgan’s law (b)

((~p&~q)v~(rv~q)) v (pvr) DeMorgan’s law (a)

((~p&~q)v (~r&~~q)) v (pvr) DeMorgan’s law (a)

((~p&~q)v(~r&q))v(pvr) Double negation

(~p&~q)v((~r&q)v(pvr)) Associative law (a)

(~p&~q)v((~r&q)v(rvp)) Commutative law (a)

(~p&~q)v(((~r&q)vr)vp)) Associative law (a)

(~p&~q)v((rv(~r&q))vp) Commutative law (a)

(~p&~q)v((r&~r)&(rvq))vp) Distributive law (a)

(~p&~q)v(T&(rvq))vp) Complement law (a)

(~p&~q)v((rvq)vp) Identity law (d)

(~p&~q)v(pv(rvq)) Commutative law (a)

((~p&~q)vp)v(rvq) Associative law (a)

(pv(~p&~q))v(rvq) Commutative law (a)

((pv~p)&(pv~q))v(rvq) Distributive law (a)

(T&(pv~q))v(rvq) Complement law (a)

(pv~q)v(rvq) Identity law (d)

pv(~qv(rvq) Associative law (a)

pv((rvq)v~q) Commutative law (a)

pv(rv(qv~q)) Associative law (a)

pv(rvT) Complement law (a)

pvT Identity law (b)

T Identity law (b)

4. (a) 1. p->q Premise

2. q->r Premise

3. ~r Premise

4. ~q 2,3, M.T.

5. ~p 4,1, M.T.

(b) 1. pvq Premise

2. ~q Premise

3. r->~p Premise

4. p 1,2, D.S.

5. ~~p 4, Double negation

6. ~r 5,3, M.T.

(c) 1. p->~q Premise

2. r->q Premise

3. ~r->s Premise

4. |p Auxiliary Premise

5. |~q 4,1, M.P.

6. |~r 5,2, M.T.

7. |s 6,3, M.P.

8. p->s 4-7, Conditional proof.

(d) 1. p->(q&r) Premise

2. q->s Premise

3. r->t Premise

4. (s&t)->~u Premise

5. u Premise

6. |~~p Auxiliary Premise

7. |p 6, Double Negation

8. |q&r 1,7, M.P.

9. |q 8, Simplification

10. |s 9,2, M.P.

11. |r 8, Simplification

12. |t 11, 3, M.P.

13. |(s&t) 10,12, Conj.

14. |~u 13,4, M.P.

15. |(u&~u) 14,5, Conj. (!Contradiction)

16. ~p 6-15, Indirect proof.

5. Truth table for (iia):

p

q

pvq

p&q

(pvq)v(p&q)

1

1

1

1

1

1

0

1

0

1

0

1

1

0

1

0

0

0

0

0

Truth table for (iib):

p

q

p+q

p&q

(p+q)v(p&q)

1

1

0

1

1

1

0

1

0

1

0

1

1

0

1

0

0

0

0

0

Truth table for (iic)

p

q

p+q

p&q

(p+q)+(p&q)

1

1

0

1

1

1

0

1

0

1

0

1

1

0

1

0

0

0

0

0

All these are the same as the truth table for (pvq):

p

q

pvq

1

1

1

1

0

1

0

1

1

0

0

0

Truth table for (iid)

p

q

pvq

p&q

(pvq)+(p&q)

1

1

1

1

0

1

0

1

0

1

0

1

1

0

1

0

0

0

0

0

This is the same as the truth table for (p+q):

p

q

p+q

1

1

0

1

0

1

0

1

1

0

0

0

The hypothesis that English or is ambiguous between + and v cannot be maintained, given these facts, because if or were ambiguous, there should be a reading of the sentence "Bill smokes or drinks or both" which makes the sentence false if Bill both smokes and drinks (the case of iid). This is clearly not a possible meaning for the English sentence (the addition of "or both" explicitly rules it out), and hence English or is not ambiguous between an exclusive or and an inclusive or.

6. DeSwart, optional bonus question: Inference to the best explanation is often used in daily life because we care about what is probable. If we see that A causes B repeatedly, and we don’t see B very often caused by other things, then we can assume that if we see B, A probably occurred. (If there’s fire, then there’s smoke is something that we see occur again and again; inference to the best explanation gives us "where there’s smoke, there’s fire", even if it’s not always true. But it’s a good bet, and useful to the bettor – if someone sees smoke, assumes fire, and gets out of the building, they’ve got a better chance at survival than someone who sees smoke, says, that doesn’t prove fire, and stays put). A computer would have to learn the probability of event A being associated with event B in every case in order to understand an abductive "argument" – that is, it would have to learn a heck of a lot.

Another example of abductive reasoning: if it’s late on election day and you pass by the campaign headquarters of Stumblebum for Mayor, and you see the crowd yelling and cheering and hugging each other; in short, celebrating, then you’d likely infer that Stumblebum won the mayoral race. They might be celebrating for some other reason, of course, but it’s very unlikely.

2 Set Theory

Set theory is not necessarily in itself important to us, except that it has some of the properties we have associated with propositional logic (that is, they are both Boolean algebras), and in order to understand many of the definitions we are going to construct later on we need to have a very good understanding of functions, and a good understanding of sets is fundamental to a good understanding of functions. We have already seen one function, [| |] which so far maps some (atomic) natural language sentence onto its truth value, and is now also able to map combinations of natural language sentences using the logical connectives onto their truth values. We'll be seeing a bunch more soon. First, however, we need to understand some things about sets.

Web page only: As with the propositional logical connectives above, I am forced to find ASCII equivalents for set-theoretic notational symbols. These are NOT standard; use the ones on your handouts or in the book.

1. A set is an abstract collection of distinct objects. These objects are elements (or members) of the set. These objects can be anything whatever including abstractions, and can be of any number.

2. Set theoretic notation:

A, B, C... represent sets.

a,b,c...x,y,z elements of sets.

E "is an element of"

~E "is not an element of"

Read "aEA" as "a is an element of A" or, for more clarity, "a is an element of the set A".

3. Specifying sets:

(a) Sets are enclosed in braces: { ... }

(b) Sets may be specified by a simple list, when finite: {The Amazon River, George Washington, 3} (Again, realize the difference between object language and metalanguage. Here, between the braces, we're using metalanguage. That is, in the set specified above, the string "George Washington" refers to the man, the real thing, and that is what is a member of the set, not the string "George Washington". The same set could be specified as {The Amazon River, the first president of the United States, 3}. If we wish to include strings as members of sets (e.g. the string 'George Washington'), we'll enclose it in quotes.

(c) Sets are not ordered. (Consider Venn diagrams).

(d) Objects are either elements of sets or they are not. There is no such thing as multiple membership, halfway membership or fuzzy membership. (So, e.g., {The Amazon River, George Washington, 3, 3, George Washington, 3} denotes the same set as given in (1) above.

(e) Sets may also be specified by the "predicate notation". (Alert! Beginnings of predicate logic here!). This is especially necessary when considering infinite sets, which may not be listed. The predicate notation consists of four things:

i. the braces around it

ii. a variable x, which stands for no particular object, or all possible objects which may be members of sets.

iii. A line, | , read in English as "such that" and which can be thought of as introducing the predicate which will describe the membership of the set..

iv. A predicate, which indicates a defining property that all the members of the set share; in other words, it gives an algorithm for determining set-membership (sound familiar?)

(f) {x | x is an even number greater than 3 and less than 10}

{x | x is evenly divisible by 2 and is greater than or equal to 4 and less than 10}

{4, 6, 8}

All these are different ways of specifying the same set. (Recall our discussion of synonymy in natural language, and the difference between sense and reference).

(g) The cardinality of a given set is the number of members it has, and if the set in question is A, then its cardinality is written |A|, and is a number.

4. Sets and subsets

(a) If every x which is an element of a set A also happens to be an element of B, then A is a subset of B. "is a subset" is written A _ B. Note that any set is also a subset of itself, which is why the symbol looks like the "less than or equal to" sign _. If you wish to exclude the "equal to" part (a set being a subset of itself) you write C, which reads "is a proper subset".

(b) The null set is a subset of all sets.

(c) The difference between "subset of" and "member of" is very important to keep in mind. {x | x is a planet between Earth and the sun} (listable as {Mercury, Venus}), has Mercury as a member, and {Mercury} as a subset. {Mercury} is not a member of the set. Now, sets are in fact abstract objects, and hence can be members of sets, and if we'd defined the set as {{Mercury},{Venus}}, which we could write in predicate notation as {x | x is a set containing one of the planets between Earth and the sun}, then {Mercury} would be a member of that set (and {{Mercury}} would be a subset of it).

(d) Note further: the subset relation is transitive, but the element relation is not. If A _ B, and B _ C, then necessarily A _ C. However, if aEB, and BEC, a~EC (necessarily -- if it is, it's an accident).

(e) Russell's paradox: an irrelevant but nifty problem with sets. If sets are abstract objects and hence can be members of sets, and predicate notation allows us to specify a criteria for set-membership, then we could imagine specifying the following set:

{x | x is a set which is not a member of itself} (or {x | x ~E x}

Now, is the set so specified a member of itself? If it is, it isn't, and if it isn't, it is... That darn Liar's paradox right in the heart of set theory. Uh-oh.

5. Union, intersection, difference, complement, and Venn diagrams.

(a) "Union" (U) is an operation which creates a new set by taking all the elements from one set and all the elements from another set and putting them together. It can be defined in the predicate notation as: A U B = {x | x E A or x E B}. (Note: or here is our old friend, inclusive or from propositional logic, where it means "either or both").

(b) "Intersection" (_) is the operation creates a new set by taking all the elements from one set which are also elements of another set. It can be defined in the predicate notation as: A _ B = {x | x E A and x E B}(where and is again our old friend from propositional logic).

(c) "Difference" (-) is an operation which constructs a set by removing all elements of a set B which are also elements of A from A, leaving a proper subset of A. It can be defined as follows: A-B = {x | x E A and x ~E B}.

(d) "Complement" is rather similar to "difference" in some ways, but it's stated backwards. If U is the set of everything (or let's say the set containing everything of relevance, the Universe of discourse), then the complement of A, written A', is the set created by taking all elements of A out of U -- that is, it's U-A, or everything but the elements of A. It can be defined as follows: A' = {x | x ~E A}.

Now, since we know the meanings of "and" and "or" (and "not"), we can state a bunch of laws about sets which are eerily similar to the laws of equivalence we saw earlier for propositional logic.

17) a) Idempotent Laws

i)XUX=X ii) X_X=X

b) Commutative Laws

i) XUY=YUX ii) X_Y = Y_X

c) Associative Laws

i) (XUY)UZ=XU(YUZ) ii) (X_Y)_Z=X_(Y_Z)

d) Distributive Laws

i) XU(Y_Z) = (XUY)_(XUZ)

ii) X_(YUZ) = (X_Y)U(X_Z)

e) Identity Laws

i) XUØ=X ii) X_Ø=Ø

iii) XUU=U iv) X_U=X

f) Complement Laws

i) XUX'=U ii)X_X'=Ø

iii) (X')'=X iv)X-Y=X_Y'

g) DeMorgan's Law

i) (XUY)'=X'_Y' ii)(X_Y)'=X'UY'

h) Consistency Principle

i) X_Y iff XUY =Y ii) X_Y iff X_Y=X

These are properties of Boolean algebras in general, which is why they keep cropping up. Venn diagrams can be useful in helping to understand the equivalences more viscerally. Let's consider the distributive laws in terms of Venn diagrams.

6. Distributive law (a): X U (Y _ Z) = (X U Y) _ (X U Z)

Venn Diagrams: X U (Y _ Z)

(X U Y) _ (X U Z)

Set-theoretic expressions (which themselves denote sets) can be massaged into other equivalent forms with the set-theoretic equalities given, just like the truth-value-equivalent expressions of propositional logic. If the expression doesn't denote the same thing at the beginning of massaging as at the end, there's a mistake somewhere, just as is the case if the propositional logic expression doesn't have the same truth-values for any given assignment of values to the atomic statement at the end as at the beginning — if the truth-values change, you've made a mistake somewhere. (Perhaps you can see where we're going with this? Imagine that natural language expressions denote sets...)