Académique Documents
Professionnel Documents
Culture Documents
Sets (2.1)
Notation:
specification by predicates:
S= {x| P(x)},
S contains all the elements from U which make the
predicate P true.
R = reals
N = natural numbers = {0,1, 2, 3, . . . }, the
counting numbers
Z = all integers = {. . , -3, -2, -1, 0, 1, 2, 3, 4, . .}
Z+ is the set of positive integers
Notation:
x is a member of S or x is an element of S:
x S.
x is not an element of S:
x S.
5
Definition: The void set, the null set, the empty set,
denoted , is the set with no members.
Example:
A = {,{}}.
A has two elements and hence four subsets:
, {}, {{}}. {,{}}
Note that is both a member of A and a subset of A!
Russell's paradox: Let S be the set of all sets which are not
members of themselves. Is S a member of itself?
Example:
A = {a,b}, B = {1, 2, 3}
AxB = {<a, 1>, <a, 2>, <a, 3>, <b, 1>, <b, 2>, <b, 3>}
What is BxA? AxBxA?
Boolean Algebra.
A = B if x [(x A x B) (x B x A)]
or
A = B if A B and B A
12
Set Operations (2.2) (cont.)
Definitions:
AB = {1, 2, 3, 4, 5, 6, 7, 8}
A B = {4, 5}
A = {0, 6, 7, 8, 9, 10}
B = {0, 1, 2, 3, 9, 10}
A - B = {1, 2, 3}
B - A = {6, 7, 8}
AB = {1, 2, 3, 6, 7, 8}
14
U U
A B
A B
C
Example:
The complement of the union is the intersection of the
complements:
A B = A B
Proof: To show:
x [x x ]
B we show
To show two sets areAequal A forBall x that x is
a member of one set if and only if it is a member of
the other.
16
Universal Instantiation
In a proof we can eliminate the universal
quantifier which binds a variable if we do not
assume anything about the variable other than it
is an arbitrary member of the Universe. We can
then treat the resulting predicate as a proposition.
We say 17
'Let x be arbitrary.'
Then we can treat the predicates as propositions:
18
is a tautology.
Since
x was arbitrary
we have used only logically equivalent assertions
and definitions
19
Universal Generalization
We can apply a universal quantifier to bind a
variable if we have shown the predicate to be true
for all values of the variable in the Universe.
x [x A B x A B ]
Example:
Show A (B - A) =
A (B - A) or x [xA (B - A) x ]
Example (cont.)
Q. E. D.
23
Let Ai [ iA, ), 1 i
[ i , ),1 i
i
n n
Ai [ 1 , )
Ai i n1 [ 1 , )
i 1 Ai [ n , )
i 1
n
Ai [ n , )
i 1
25
Functions (2.3)
Definition:
x [x A y [y B < x, y > f ]]
and
[< x, y1 > f < x, y2 > f ] y1 = y2
26
A B A B
a a
V V
b b
W W
c c
X X
d d
Y Y
Injection & a surjection,
Z hence a bijection
Injection but not a surjection
31
f(x) = x,
f(x) = x2,
f(x) = x3,
f(x) = x + sin(x),
f(x) = | x |
33
Definition:
f-1(y) = x if f(x) = y
35
A f B A f-1 B
a a
V V
b b
W W
c c
X X
d d
Y Y
Definition:
f g(x) = f(g(x))
38
A g B f C
a V h
Examples: b W i
c X j
d
Y
A fg C
a
h
b
i
c
j
d
39
Definition:
Example:
Suppose f: B C, g: A B and f g is injective.
What can we say about f and g?
k
Given a sequencea i 0 we can add together a
subset of the sequence by using the summation
and function notation
n
a g ( m ) a g ( m 1 ) ... a g ( n ) a g( j )
j m
or more generally
aj
jS
44
Sequences and Summations (2.4)
(cont.)
n
Examples: r 0 r 1 r 2 ... r n r j
0
1 1 1 1
1 ...
2 3 4 1 i
n
a 2 m a 2 ( m 1 ) ... a 2 ( n ) a2 j
j m
Cardinality
Definition:
Theorem:
If | A | | B | and | B | | A | then | A | = | B |.
This implies
if there is an injection from A to B
then
there must be a bijection from A to B
0 2 5
51
0 2 4 6 8 10 12
Z+, the set0of positive
2 4 integers
6 8 10
is countably12
infinite.
52
etc.
For example:
Let A = {a, b, c}.
{ , a, b, c, aa, ab, ac, ba, bb, bc, ca, cb, cc, aaa,
aab,
aac, aba, ....} = {f(0), f(1), f(2), f(3), f(4), . . . .}
57
Hence, there cannot exist a list and therefore the set is not
countable
59
xi = 3 if dii 3
xi = 4 if dii = 3
Hence, no such list can exist and hence the interval (0,1) is
uncountable. Q. E. D.
61
Example: