20.07.2013 Views

Sets and Logic

Sets and Logic

Sets and Logic

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Membership<br />

Basics of Set Theory <strong>and</strong> <strong>Logic</strong><br />

S. F. Ellermeyer<br />

August 18, 2000<br />

Set Theory<br />

A set is a well-defined collection of objects. Any object which is in a set is called a member<br />

of the set. If the object x is a member of the set A, then we write<br />

x A<br />

which is read as “ x is a member of A” or“xbelongs toA” or“xis in A” or“xis an element of<br />

A”. If the object x is not a member of A, then we write<br />

x A.<br />

Examples of <strong>Sets</strong><br />

1. A 4,7,13,157.52 is a set with exactly four members. The members of A are the<br />

numbers 4, 7, 13, <strong>and</strong> 157.52. Hence, we could write<br />

13 A<br />

<strong>and</strong><br />

9 A.<br />

2. B 200,190 is the set consisting of all real numbers between 200 <strong>and</strong> 190 not<br />

including 200 <strong>and</strong> 190. Hence, we could write<br />

6.34 B<br />

<strong>and</strong><br />

214.12 B.<br />

3. C the set of all Presidents of the United States .<br />

4. D the set of all people who were born before 1953<br />

5. E x R|x 2 5x 6 0 is the set of all real numbers which satisfy the equation<br />

x2 5x 6 0.<br />

6. F x R|x 14 4 x is the set of all real numbers which satisfy the inequality<br />

x 14 4 x. Hence, we could write<br />

10 F<br />

<strong>and</strong><br />

0 F.<br />

1


7. G n N|n is a divisor of 275 is the set of all natural numbers which are divisors of<br />

the number 275. Note that<br />

11 G<br />

<strong>and</strong><br />

3 G.<br />

Inclusion<br />

If A <strong>and</strong> B are two sets such that every member of A is also a member of B, then we say that<br />

A is a subset of B (or that A is included in B) <strong>and</strong> we write<br />

A B.<br />

If A B but B has members which are not members of A, then we say that A is a proper<br />

subset of B <strong>and</strong> we write<br />

A B.<br />

If A B <strong>and</strong> B A, then we say that A equals B <strong>and</strong> we write A B.<br />

Note that if A B, then there are exactly two possibilities: either A B or A B.<br />

Example<br />

If A 4,7,13,157.52 <strong>and</strong> B 200,190 , then A B.<br />

Remark: The symbols <strong>and</strong> are very similar to the symbols <strong>and</strong> which are used in<br />

describing the order relation of two real numbers. This can help us remember what the<br />

set inclusion symbols mean. In particular, if a <strong>and</strong> b are two real numbers <strong>and</strong> if we<br />

write a b, this means that either a b or a b. Likewise, if A <strong>and</strong> B are two sets <strong>and</strong><br />

we write A B, this means that either A B or A B.<br />

Universal <strong>Sets</strong><br />

A universal set is the set that is assumed to contain all members pertaining to the<br />

discussion at h<strong>and</strong>. Thus, a universal set is the “largest possible” set under consideration<br />

within a given discussion. Every set (within the discussion at h<strong>and</strong>) is assumed to be a<br />

subset of the universal set. In this course, the universal set will almost always be assumed<br />

to be the set of real numbers, R. Hence, if we define the set<br />

A x|x2 1 x 3 0 ,<br />

<strong>and</strong> if it is understood that the universal set is R, then we can conclude that A 3 <br />

because 3 is the only real number that satisfies the equation x2 1 x 3 0. On the<br />

other h<strong>and</strong>, if we are assuming that the universal set is C (the set of all complex numbers),<br />

then we have A 3, i, i. If the universal is understood to be C <strong>and</strong> we want to define A to<br />

be the set of all real numbers that satisfy x2 1 x 3 0, then we must write<br />

A x R|x2 1 x 3 0 .<br />

This example shows why it is important that the universal set under consideration within a<br />

2


particular discussion must be stated or agreed upon beforeh<strong>and</strong>. Unless specifically stated<br />

otherwise, we will always assume that the universal set is R.<br />

The Complement of a Set<br />

If A is a set, then the complement of A, denoted by A , is the set of all non–members of A.<br />

For example if A 4,7,13,157.52 , then<br />

A <br />

x | x 4, x 7, x 13, <strong>and</strong> x 157.52<br />

<strong>and</strong> if A 4, , then A <br />

,4. Note the importance of knowing what the universal set is<br />

in determining A . For example, if we were using the set of complex numbers as the<br />

universal set, then the complement of A 4, would include the interval ,4 as well as<br />

all of the imaginary numbers (such as i <strong>and</strong> 5 3i).<br />

Operations<br />

Let A <strong>and</strong> B be two sets.<br />

The union of A <strong>and</strong> B, denoted by A B, is the set of all elements which are either members<br />

of A or members of B.<br />

The intersection of A <strong>and</strong> B, denoted by A B, is the set of all elements which are both<br />

members of A <strong>and</strong> members of B.<br />

The difference, A B (sometimes written as A/B), is the set of all elements which are<br />

members of A but not members of B.<br />

Examples<br />

If A 1,6 <strong>and</strong> B 4,10,, then A B 1,10 <strong>and</strong> , A B 4,6 <strong>and</strong> A B 1,4.<br />

The Empty Set<br />

The empty set is defined to be the set which has no members. The empty set is denoted by<br />

the symbol or by . Other names for the empty set are the null set <strong>and</strong> the vacuous<br />

set.<br />

The concept of the empty set is necessary because we need to be able to describe<br />

situations where two given sets do not intersect. For example, if A 1,6 <strong>and</strong> B 12,24 ,<br />

then A B . Any two sets, A <strong>and</strong> B, for which A B are said to be disjoint.<br />

We remark that the empty set is a subset of every set <strong>and</strong> that no set is a subset of the<br />

empty set except for the empty set itself.<br />

Below, we list some properties <strong>and</strong> identities involving the empty set. In each of these, A<br />

st<strong>and</strong>s for any given set.<br />

1. A<br />

2. A A<br />

3. A <br />

4. A A<br />

5. A <br />

The Venn diagram in Figure 1 shows a general picture relating A B, A B, <strong>and</strong> B A (for<br />

any sets A <strong>and</strong> B).<br />

3


Figure 1<br />

Below, we list a few properties <strong>and</strong> identities which hold for any two sets, A <strong>and</strong> B. These<br />

can be deduced by looking at the Venn diagram in Figure 1.<br />

1. A A B A B<br />

2. A B A B A B B A<br />

3. A A B<br />

4. A B A<br />

5. A B A<br />

6. A B A B <br />

7. A B B <br />

8. A A the universal set <strong>and</strong> A A .<br />

9. the universal set<br />

10. A B <br />

A <br />

<br />

<strong>and</strong> the universal set<br />

B <strong>and</strong> A B <br />

A <br />

B (These are called DeMorgan’s Laws.)<br />

Sample Proof<br />

Let us prove the equality A A B A B. To prove this equality, we must prove that<br />

A A B A B <strong>and</strong> that A B A B A. First, we prove that<br />

A A B A B.<br />

Let x A. Clearly, either x B or x B .Ifx B, then x A B <strong>and</strong> if x B , then x A B.<br />

We conclude that either x A B or x A B. Thus x A B A B. This shows that<br />

A A B A B.<br />

Next, we prove that A B A B A.<br />

Let x A B A B. Then either x A B or x A B. In either case, it must be true<br />

that x A. This shows that A B A B A.<br />

Exercises<br />

Prove statements 2 through 10 above. (Some of the proofs are very short <strong>and</strong> follow almost<br />

immediately by definition.)<br />

4


<strong>Logic</strong><br />

Mathematical Statements<br />

A mathematical statement that depends on a variable, x, is a statement pertaining to x<br />

which is either true or false, depending on the value of x. For example, if we write<br />

Px : x 5,<br />

then we are saying that Px is the statement “x is less than 5.” Note that, depending on the<br />

value of x, this statement is either true or false. For example, P4.6 is true <strong>and</strong> P12 is<br />

false. Abstractly, we can think of P as a function, P : R true, false .<br />

Implications<br />

If P <strong>and</strong> Q are statements <strong>and</strong> if we want to assert that Qx must be true whenever Px is<br />

true, then we say:<br />

“If P, then Q”<br />

or<br />

P Q<br />

(where the symbol “” st<strong>and</strong>s for “implies”)<br />

or<br />

P is sufficient for Q<br />

or<br />

Q is necessary for P.<br />

Example<br />

We know that if x 5, then x 2 10, so we can write<br />

x 5 x 2 10.<br />

In other words, if Px is the statement x 5 <strong>and</strong> Qx is the statement x 2 10, then<br />

P Q is true because Qx is true whenever Px is true.<br />

The Converse of an Implication<br />

The converse of an implication P Q is the implication Q P. For example, the converse<br />

of the implication in the preceding example is<br />

x 2 10 x 5.<br />

Note that this implication is not true because, for instance, 7 2 10 but 7 5. This<br />

example shows that it is possible that the converse of a true implication might not be true.<br />

If P <strong>and</strong> Q are statements such that P Q <strong>and</strong> Q P are both true, then we say that<br />

statements P <strong>and</strong> Q are equivalent <strong>and</strong> write<br />

P if <strong>and</strong> only if Q<br />

or<br />

P Q<br />

5


or<br />

P is necessary <strong>and</strong> sufficient for Q.<br />

Example<br />

Let us prove that x 0 <strong>and</strong> x 1/x 2 are equivalent: First, observe that if x 0, then<br />

1/x 0 so x 1/x 0. Also, if x 0, then x 1/x is not even defined. We conclude that if<br />

x 0, then it certainly is not true that x 1/x 2. In other words, if x 1/x 2, then it must<br />

be true that x 0. This establishes the truth of the implication<br />

x 1 x 2 x 0.<br />

To prove the converse, we consider the inequality<br />

x 1 2 0<br />

which is true for all real numbers x. By exp<strong>and</strong>ing the left h<strong>and</strong> side of this inequality, we<br />

obtain<br />

x 2 2x 1 0 for all real numbers x<br />

which gives us<br />

x2 1 2x for all real numbers x.<br />

If x 0, then we can divide both sides of the preceding inequality by x (without reversing the<br />

order of the inequality) to obtain<br />

x 1 x 2.<br />

This establishes the truth of the implication<br />

x 0 x 1 x 2 .<br />

The Contrapositive of an Implication<br />

The contrapositive of an implication P Q is the implication not Q not P .An<br />

implication <strong>and</strong> its contrapositive are always equivalent.<br />

Example<br />

The contrapositive of the implication<br />

x 5 x 2 10<br />

is the implication<br />

x 2 10 x 5.<br />

More formally, if<br />

then<br />

Px : x 5<br />

Qx : x 2 10<br />

not Px : x 5<br />

not Qx : x 2 10<br />

<strong>and</strong> we see that the implication P Q is equivalent to the implication not Q not P .<br />

Example<br />

Restate the statement “All real numbers have nonnegative squares” as an implication <strong>and</strong><br />

6


state the contrapositive of this implication.<br />

Original Statement: If x is a real number, then x 2 0.<br />

Contrapositive: If x 2 0, then x is not a real number.<br />

Set Theory <strong>and</strong> <strong>Logic</strong><br />

We observe the following formal correspondence between logic <strong>and</strong> set theory: If F <strong>and</strong> P<br />

are statements that depend on a variable x, then we define the sets<br />

x | Fx is true<br />

<strong>and</strong><br />

x | Px is true .<br />

Then, the implication F P is true if <strong>and</strong> only if .<br />

For example, consider the statements<br />

Fx : x 5<br />

For these statements, we have<br />

Px : x 2 10.<br />

,5<br />

,8<br />

<strong>and</strong> we observe that F P is true <strong>and</strong> that . On the other h<strong>and</strong>, the converse<br />

implication P F is false <strong>and</strong>, likewise, .<br />

Clearly, two statements F <strong>and</strong> P are equivalent if <strong>and</strong> only if .<br />

If F is a statement that is not true for any value of x, then so, in this case, the<br />

implication F P is true no matter what statement P is! For example, the implication<br />

is true because for<br />

we have<br />

x 2 0 x 6<br />

Fx : x2 0<br />

Px : x 6<br />

<br />

6<br />

<strong>and</strong> so .<br />

On the other extreme, if P is a statement that is true for all values of x, then R so, in this<br />

case, the implication F P is true no matter what statement F is. For example, the<br />

implication<br />

is true because for<br />

we have<br />

x 2 9 0 x 2 0<br />

Fx : x2 9 0<br />

Px : x2 0<br />

7


3,3<br />

R<br />

<strong>and</strong> so .<br />

The foregoing discussion shows that an implication F P is false if <strong>and</strong> only if there exists<br />

a real number, x, such that Fx is true but Px is false. For example, the implication<br />

x 2 10 x 5<br />

is false because for<br />

Fx : x 2 10<br />

Px : x 5<br />

we have F7 true but P7 false.<br />

Further Connections Between <strong>Sets</strong> <strong>and</strong> <strong>Logic</strong><br />

1. Statements containing “for all” can be stated as set inclusions. For example, the<br />

statement “All cows are white” can be stated as A B where<br />

A all cows<br />

B all white things<br />

2. Statements containing “there exists” can be stated in terms of the empty set. For<br />

example, the statement “Some dogs are brown” can be stated as A where<br />

A all brown dogs<br />

or as B C where<br />

B all dogs<br />

C all brown things<br />

Example<br />

Consider the statement “All mathematicians are either smart or weird”. If we let<br />

M all mathematicians<br />

S all smart people<br />

W all wierd people ,<br />

then the above statement is equivalent to M S W. Likewise, “All mathematicians are<br />

smart <strong>and</strong> weird” is equivalent to M S W <strong>and</strong> “Some mathematicians are weird” is<br />

equivalent to M W .<br />

Exercises<br />

Consider the pairs of statements, P <strong>and</strong> Q, given below. For each pair, which of P Q,<br />

Q P, <strong>and</strong> P Q are true? Recall that we are assuming that the universal set (the<br />

domain of x) isR.<br />

1. Px : x 3<br />

Qx : x 2 9<br />

2. Px : x 3<br />

Qx : x 2 9<br />

3. Px : x 3<br />

8


Qx : x2 9<br />

4. Px : x 15<br />

Qx : x 3 18<br />

5. Px, y : x 0 <strong>and</strong> y 0<br />

x Qx, y : y y<br />

x 2<br />

6. Px : x for all 0<br />

Qx : x 0<br />

7. Px : |x| 4<br />

Qx : 4 x 4<br />

8. PA : x 46 for all x A<br />

QA : There exists M R such that x M for all x A<br />

9. PA,B : A B <br />

QA,B : A <br />

10. Px, y : x y<br />

Qx, y : x z y z for all z R<br />

In the following exercises, let<br />

M all mathematicians<br />

S all smart people<br />

W all weird people<br />

<strong>and</strong> write the following statements in terms of the sets M, S, <strong>and</strong> W.<br />

1. All mathematicians are smart.<br />

2. Some mathematicians are smart.<br />

3. Some people who are smart or weird are mathematicians.<br />

4. All smart people who are not weird are not mathematicians.<br />

5. Some weird mathematicians are smart.<br />

Answer the following questions:<br />

1. Suppose that P <strong>and</strong> Q are statements such that P4 is true <strong>and</strong> Q4 is false. Is the<br />

implication P Q true or false or can’t this be determined? What about the implication<br />

Q P? Give examples.<br />

2. Suppose that P <strong>and</strong> Q are statements such that P4 is true <strong>and</strong> Q4 is true. Is the<br />

implication P Q true or false or can’t this be determined? What about the implication<br />

Q P? Give examples.<br />

3. Suppose that P <strong>and</strong> Q are statements such that P4 is false <strong>and</strong> Q4 is false. Is the<br />

implication P Q true or false or can’t this be determined? What about the implication<br />

Q P? Give examples.<br />

4. Suppose that P <strong>and</strong> Q are statements such that Qx is true for all x. Is the implication<br />

P Q true or false or can’t this be determined? What about the implication Q P?<br />

Give examples.<br />

5. Suppose that P <strong>and</strong> Q are statements such that Qx is false for all x. Is the implication<br />

P Q true or false or can’t this be determined? What about the implication Q P?<br />

Give examples.<br />

9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!