Download INTRODUCTORY CHAPTER: Mathematical Logic, Proof and Sets

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Number wikipedia , lookup

Birkhoff's representation theorem wikipedia , lookup

Addition wikipedia , lookup

Transcript
Introductory Chapter : Mathematical Logic, Proof and Sets
1
INTRODUCTORY CHAPTER: Mathematical Logic, Proof and Sets
SECTION A Joy of Sets
By the end of this section you will be able to

understand what is meant by a set

understand different types of sets

plot Venn diagrams of set operations

carry out set operations
This section is straightforward. You will need to understand set theory notation. Once
you have digested this notation then the remaining material is routine mathematical
work.
A1 Introduction to Set Theory
What does the term set mean?
A set is a collection of objects and these objects are normally called elements or
members of the set. The following are examples of sets:
1. The numbers 1, 2, 3 and 4.
2. Students who failed the mathematics exam.
3. A pack of cards.
4. European capital cities.
5. All the odd numbers.
6. The roots of the equation x 2  8 x  7  0 .
A set can be described in various ways:
i. By listing all the elements of the set. For example in 1 above the set can be
written as A  1, 2, 3, 4 . The curly brackets,   , capture the set and each
element in the set is separated by a comma.
ii. By listing the first few elements to give an indication of the pattern of the set.
For example B  1, 3, 5, 7,  . This is the set in number 5 above. Note that
the 3 dots (ellipses), , represents the missing members when there is a
pattern.
iii. By describing a property of the set such as C  European capital cities .
iv. By stating a mathematical expression like

D x

x2  8x  7  0
such that
What does the set D mean?
The set D consists of the elements x such that x satisfies the quadratic equation
x 2  8 x  7  0 . The vertical line, , in the set is read as ‘such that’. Hence the set D
has members x such that x 2  8 x  7  0 .
In some mathematical literature the above set D is written as
D   x : x 2  8 x  7  0
The vertical line is replaced by the colon : However throughout this book we will use
the vertical line in the curly brackets to represent ‘such that’.
In mathematical notation sets are normally denoted by capital letters such as A, B, C
… X, Y … The elements or objects of the set are denoted by lower case letters such as
a, b, c … x, y …
Introductory Chapter : Mathematical Logic, Proof and Sets
2
Example 1
Determine the elements of the set D given above.
Solution.
We need to solve the quadratic equation given in the set D  x


x2  8x  7  0 .
We have
x2  8x  7  0
 x  7  x  1  0
 Factorizing 
x  7  0 or x  1  0
x  7 or x  1
We can write the set D as D  1, 7 but it can be written as D  7, 1 . The order of
the elements in a set does not matter.
We denote the number 7 is a member of the set D by
7D

The symbol means ‘is a member of’. Since 2 is not a member of this set therefore
we denote this by 2 
 D and read it as ‘2 is not a member of the set D’.
In general
x  A means x is a member of the set A
What does x 
 A mean?
x
 A means x is not a member of the set A
Example 2
Let A be the set of all even numbers. Write the set A in set notation.
Solution.
We can write even numbers as the symbol x such that x is an even number, thus we
have
A   x x is an even number
What is the size of the set A?
It is an infinite set. Note that sets maybe infinite or finite. Can you think of an
example of a finite set?
The above set D  1, 7 .
A2 Types of Sets
There maybe no elements in a set. What do you think we call a set which has no
members?
The empty set or the null set. The empty set is normally denoted by  (The Greek
letter phi). Can you think of any examples of the empty set?
Humans who can walk on water
Prime numbers less than 1
Remember prime numbers are greater than 1.
What does the universal set mean?
Universal set is the set of all the elements under consideration. For example if we are
discussing prime numbers then the universal set will be the set of all prime numbers.
The universal set is denoted by U .
There are various types of numbers that we have used throughout our lives but they
have not been placed in set form or been given a special symbol. Can you remember
what types of numbers you have used?
Introductory Chapter : Mathematical Logic, Proof and Sets
3
Real numbers, natural numbers, rational numbers etc. We can give all of these their
own symbol:
 the set of all natural numbers 1, 2, 3, 4, … These are sometimes called the
counting numbers.
 the set of all integers … 3,  2,  1, 0, 1, 2, 3 ,… This is the set of all whole
numbers.
 the set of all rational numbers. These are numbers which can be written as ratios
2
5 100
1
, 6,  etc. Note that all the integers are also in
or fractions such as ,  ,
3
2 2
7
12
this set because numbers like 6 can be written as
.
2
Numbers such as  , 2 , e etc cannot be written as fractions so these are not
rational numbers. These are called the irrational numbers.
 the set of all real numbers. This is the set of all rational and irrational numbers.
22
41
, 2,
, 5,  666, 2.333 … are all members of .
For example  ,
7
29
 the set of all complex numbers. This set contains all the real numbers as well as
numbers such as 1 which is not a real number. Complex numbers are normally
written as a  bi where i denotes an imaginary number and is equal to 1 .
and
All the above sets , , ,
are examples of infinite sets.
Example 2
Determine the elements of the set A  x 
 x  3 2 x  1  0 .


Solution.
The factorized quadratic has the solutions
 x  3 2 x  1  0
1
2
1
Does the set A contain both these elements 3 and  ?
2
No because the set A has the qualification x  . What does this notation x 
mean?
x is a member of the set of natural numbers which means x is a counting number.
1
Since  (rational) is not a natural number therefore it cannot be a member of the
2
set A. Thus the set A only has the element 3, that is A  3 .
x  3 or x  
The set A only has one element 3 and in general a set with only one element is called
a singleton.
Definition (I.1). Any set with precisely one element is called a singleton.
Example 3
Write the following statements in set notation:
(a)
The set of positive real numbers excluding 0.
(b)
The set of negative integers.
(c)
The set of rational numbers between 0 and 1.
Solution.
Introductory Chapter : Mathematical Logic, Proof and Sets
4
(a)
The set of positive real numbers can be written as a symbol x which represents
a real number such that it is greater than 0:
 x  x  0
What does x  in this set mean?
x  means x is a real number.
(b)
What is the symbol for the set of integers?
represents the set of all integers. The set of negative integers can be written as x
which is an integer such that it is less than 0:
 x  x  0
(c)
What is the symbol for the set of rationals?
represents the set of rationals (Q for quotient). The set of rationals between 0 and
1 can be written as:
 x  0  x  1
A3 Venn Diagrams
Venn diagrams are a graphically way of representing sets. Venn diagrams were
introduced by John Venn.
Fig 1 John Venn
1834 to 1923
John Venn was born in Hull, England in 1834. His
father and grandfather were priests and John was
also groomed for a similar post. In 1853 he went to
Gonville and Caius College Cambridge and graduated in
1857 becoming fellow of the college. For the next 5
years he went into priesthood and returned to
Cambridge in 1862 to teach logic and probability
theory.
John Venn is popular known as the person who
developed a graphically way to look at sets and this
graph become known as a Venn diagram. The sets were
represented by oval or circular shape figures but they
can be any shape.
In 1883 John Venn was elected as a Fellow of the prestigious Royal Society. At
this time he started to take an interest in history and by 1897 he published a
history of his college Gonville and Caius, Cambridge.
Consider the set A   x 
 3  x  2 . What are the elements of the set A?
A is the set of integers which lie between 3 to 2. Thus the elements are
3,  2,  1, 0, 1 and 2. A Venn diagram of this looks like:
-2
A
-3
-1
2
1
0
U
Fig 2
The U in the bottom right hand corner of the rectangle is the universal set which
means it includes every element under consideration. The members of the set A lie
within the boundary of the oval shape as shown in Fig 2.
Introductory Chapter : Mathematical Logic, Proof and Sets
5
We can use Venn diagrams to display set operations.
A4 Union and Intersection of Sets
From the age of 5 we have added and subtracted numbers. In a similar fashion we can
carry out similar operations on sets. These operations are called union and
intersection.
What is the union of two sets?
The word union in everyday language means combining of 2 or more things. Union
of two sets is the combination of all elements in both sets.
Definition (I.2). The union of two sets A and B is the set of all the elements belonging
to set A or set B. The union of two sets A and B is denoted in set theory notation as
A  B and
A  B   x x  A or x  B
In terms of a Venn diagram we can draw this as:
A
B
U
A  B (A union B) is shaded
Fig 3
The other operation on sets is intersection. What does intersection mean in everyday
language?
Intersection means crossroads. Intersection of two sets A and B is the set of all
elements which belong to both sets A and B.
Definition (I.3). The intersection of two sets A and B is the set of all the elements
belonging to set A and set B. The intersection of two sets A and B is denoted in set
theory notation as A  B and
A  B   x x  A and x  B
The Venn diagram of A  B is:
A B
A
B
U
Fig 4
A  B (A intersection B) is shaded
Example 4
Let A  2, 3, 4, 5, 6 and B  1, 3, 7 . Determine the sets A  B (A union B)
and A  B (A intersection B).
Also draw the Venn diagrams of these sets.
Solution.
What does A  B mean?
A union B is the set of all elements which are in the set A or B. Thus we have
A  B  1, 2, 3, 4, 5, 6, 7
Which elements does the set A  B have?
A  B is the set of all elements which belong to both the sets A and B. Which elements
are common to both the sets A  2, 3, 4, 5, 6 and B  1, 3, 7 ?
Introductory Chapter : Mathematical Logic, Proof and Sets
6
Only the number 3 belongs to both sets A and B. Therefore
A  B  3
Note that A  B is a singleton.
The Venn diagrams of A  B and A  B are
B
A
2,
4,
5, 6
3
1, 7
Example 5
Let E   x 
B
2,
4,
5, 6
U
A  B is shaded
Fig 5
A
3
1, 7
A  B is shaded
x is an even number and O   x 
U
x is an odd number .
Determine the sets E  O and E  O . Draw Venn diagrams of E  O and E  O .
Solution.
What does the notation E  O mean?
E  O is the set of all the even and odd numbers which means it is the set of all the
integers. Which symbol is used to represent all integers?
is the set of all integers. Thus we have E  O  .
What is E  O equal to?
There is no element which is common to both the set of even and odd numbers.
Therefore the intersection of these sets is empty. What is the symbol for the empty set?
The Greek letter phi,  , denotes the empty set. Thus we have
E O  
Venn diagrams of these is:
E
O
E
O
E  O is shaded
E O
Fig 6
In general if for given sets A and B we have A  B   then we say the sets A and B
are disjoint.
We can extend the above set operations to 3 or more sets.
Example 6
Let A  1, 2, 3, 4, 5 , B  1, 3, 5, 7, 9 and C  1, 4, 9, 16 . Determine the
elements of the following sets:
(a) A   B  C 
(b)  A  B    A  C 
What do you notice about your results?
Draw a Venn diagram of the set A   B  C  .
Solution.
(a) How do we find the elements of A   B  C  ?
Introductory Chapter : Mathematical Logic, Proof and Sets
7
First we determine B  C . Thus B  C is the set of elements which are common to
both sets B  1, 3, 5, 7, 9 and C  1, 4, 9, 16 . That is
B  C  1, 9
A   B  C  is the set of elements which are in set A  1, 2, 3, 4, 5 or set
B  C  1, 9 . Which elements are in either of these sets?
It is all the elements in set A and the element 9:
A   B  C   1, 2, 3, 4, 5, 9
(b) How do we find the elements of  A  B    A  C  ?
Well A  B is the set of elements which belong to either of these given sets
A  1, 2, 3, 4, 5 or B  1, 3, 5, 7, 9 :
A  B  1, 2, 3, 4, 5, 7, 9
Similarly the elements in set A  1, 2, 3, 4, 5 or C  1, 4, 9, 16 are
A  C  1, 2, 3, 4, 5, 9, 16
What does  A  B    A  C  mean?
It is the set of elements which are common to both A  B and A  C . Which
elements belong to both these sets A  B  1, 2, 3, 4, 5, 7, 9 and
A  C  1, 2, 3, 4, 5, 9, 16 ?
 A  B    A  C   1,
2, 3, 4, 5, 9
Note that the answers to parts (a) and (b) are the same, that is
A   B  C    A  B   A  C 
Venn diagrams of A   B  C  are
A
2
4
3,
5
1
B
A
B
7
2

9
4
16
3,
5
1
7
16
C
C
U
U
A

Fig 7
Shading in the union of these sets of Fig 7 gives:
B  C
=
B
A
3
2
4
5, 1
7
9
16
C
U
Fig 8
=
9
A   B  C   1, 2, 3, 4, 5, 9
Introductory Chapter : Mathematical Logic, Proof and Sets
8
The last observation, A   B  C    A  B    A  C  , is true for all sets and we
will prove this result in later sections. You may like to convince yourself of this result
by drawing general Venn diagrams.
A5 Other Set Operations
What does the word complement mean in everyday language?
Complement is something which completes or fills up. In set theory the complement
of a set A is the elements which are in the universal set but not in set A.
Definition (I.4). The complement of a set A is denoted by Ac and is defined to be
Ac   x x  U , x  A
What does the Venn diagram of Ac look like?
A
Ac (complement of A) is shaded
Fig 9
You may see Ac written as A in other mathematical literature.
Example 7
Let E  2, 4, 6, 8,  and universal set U  . Determine E c .
Solution.
What does U  mean?
The universal set is the set of natural numbers 1, 2, 3, 4 … Note that E is the set of
even numbers. What does E c mean?
E c is the set of elements which are not in the set E but are in the universal set. This
means numbers which are not even but are natural numbers. What numbers are these?
The odd numbers. Thus E c  1, 3, 5, 7,  .
In mathematics what does difference mean?
Difference is subtraction. Given two sets A and B the difference of A and B is the set
of elements which belong to the set A but not to B. [Subtract the members of B from
A].
Definition (I.5). The difference of set A and set B is denoted by A \ B and is defined
to be
A \ B   x x  A, x  B
What does the Venn diagram of A \ B look like?
A
B
Fig 10
A \ B is shaded
In other mathematics literature you might find the following notation for difference of
two sets such as A  B or A ~ B .
Introductory Chapter : Mathematical Logic, Proof and Sets
Example 8
Let A  1, 2, 3, 4, 5 and B  1, 3, 5 be two given sets. Find A \ B .
Solution.
What does the set theory notation A \ B mean?
From the set A subtract the members of set B. This means from the set
A  1, 2, 3, 4, 5 we delete members which are in the set B  1, 3, 5 and the
remaining set is A \ B . Thus
A \ B  2, 4
There is one more difference in set theory called symmetric difference. The
symmetric difference between two sets A and B are the elements which are in set A
or set B but not in both.
Definition (I.6). The symmetric difference of set A and set B is denoted by A  B
and is defined to be
A  B   x x  A, x  B, x  A  B
What does the Venn diagram of this look like?
A
B
Fig 9
A  B is shaded
In the exercises we will show the result A  B   A  B  \  A  B  . This means
A  B is the set of A  B take away the elements of A  B .
Example 9
Let A  1, 2, 3, 4, 5 , B  1, 3, 7 and C  1, 4, 9 . Find A  B , A  C and
B C .
Solution.
The elements in A  B are members which are in the set A or B but not in both.
Which elements are in both sets A  1, 2, 3, 4, 5 and B  1, 3, 7 ?
The elements 1 and 3 are common to both sets A and B. Thus removing elements 1
and 3 from the union of sets A and B gives
A  B  2, 4, 5, 7
Similarly we can find A  C . What members are common between the sets
A  1, 2, 3, 4, 5 and C  1, 4, 9 ?
1 and 4 therefore removing these from A  C gives
A  C  2, 3, 5, 9
To find B  C we delete the members which are in common between the sets
B  1, 3, 7 and C  1, 4, 9 . Only the element 1 is common therefore
B  C  3, 4, 7, 9
Example 10
For the Venn diagram of Fig 9 above show that
9
Introductory Chapter : Mathematical Logic, Proof and Sets
 A  B
c
10
 Ac  B c
Solution.
c
We first shade in A  B and then  A  B  which is everything outside A  B :
A
B
A
B
AB
(A  B)
Fig 10
Similarly for Ac  B c we shade in Ac and B c and then take the union of these 2 sets,
Ac  B c .
c
A
B

A
B
=
A
B
c
c
c
c

A B
A
B
Fig 11

c
Notice that the same regions are shaded in Fig 10 and 11 for  A  B  and Ac  B c .
We have  A  B   Ac  B c for the sets shown.
c
You can show results of set theory by using Venn diagrams like these but they are
only valid for the sets shown. We will prove results of set theory more rigorously in
later sections by using algebra of subsets.
SUMMARY
A set is a collection of objects. Capital letters are used to represent sets and lower case
letters for elements of sets. The notation x  A means the element x is a member of
the set A.
There are various types of sets such as the empty set  , the universal set U and the
sets which give the type of numbers:
 Natural numbers. These are positive whole numbers.
 Integers. These are whole numbers.
 Rational Numbers. These are ratios of integers.
 Real numbers. These are rational as well as irrational numbers.
 Complex numbers. These are numbers of the form a  b 1 .
Any set with just one element is called a singleton.
Let A and B be sets. Then we have the following set operations:
The union of two sets is given by A  B   x x  A or x  B
The intersection of two sets is given by A  B   x
The complement of a set A is given by Ac   x
x  A and x  B
x  U , x  A .
The difference of sets A and B is given by A \ B   x
x  A, x  B
The symmetric difference of sets A and B is given by
A  B   x x  A, x  B, x  A  B