Docsity

Logic Lecture 9: Equivalence Relations, Functions, and Cardinality, Study notes of Mathematics

Partial preview of the text

Download Logic Lecture 9: Equivalence Relations, Functions, and Cardinality and more Study notes Mathematics in PDF only on Docsity!

M124 – Logic Lecture 9 • Equivalence relations on sets • Function between sets • Types of function

Relations

  • Suppose

A =^ { 0,1,2,

  • An example of a relation on

A^ is ‘<’

  • This relation is defined by the set^ R =^ {^0 <

1 ,^^0 <^2 ,^^0

<^3 ,^^1 <^2 ,^

1 <^3 ,^^2 <^3

or, equivalently R =^ {( 0,

A × A • So, a^ relation on

A^ is a subset of

R^ ⊆^ A^ ×

A

Examples

-^ S^ is the set of all people in the UK •^ R^ :^ x,y^1

∈^ S ,^ x~y^

if and only if

x^ and^ y^ are the

same age. This

is^ an equivalence relation on

S

-^ R^ :^ x,y^2

∈^ S ,^ x~y^

if and only if

x^ and^ y^ own a copy

of the same book. This is

not^ an equivalence

relation. Why? • R^ x,y^ ∈^^3 :^

S ,^ x~y^ if and only if

x^ and^ y^ both own a

copy of ‘War and Peace’. This

is^ an

equivalence relation on

S

Partitions

  • Suppose

A^ is a set. A

partition

P^ of^ A^ is a

set of subsets of

A, P =^ {

P^ ,…,P^1 N

} such

that:^ –^ P ∩ Pnm

=^ ∅^ if^ n^ ≠ m

-^ P^ ∪ P^ ∪^12

… ∪ P= AN^

Partitions & Equivalence

Relations (1)

  • Let ~ be an equivalence relation on

A

• For^ a^ ∈

A , let^ P^ a

be the set of elements of

A

which are equivalent to

a

  • I.e.^ P^ a

=^ { b^ ∈ A :

b~a }

-^ P =^ { P

: a^ ∈ A } is a partition of a

A

Partitions & Equivalence

Relations (2)

  • Let^ P=

{ P } be a partition of^ α

A

  • Define an equivalence relation ~ on

A^ by

a~b^ if and only if both

a^ and^ b

belong to

P^ α

for some

  • ~ is an equivalence relation on

A

Relations - More Terminology^ •^ Let

A^ be a set,

R^ a relation on

A

-^ The^ domain

of^ R, dom

( A ), is the set: dom ( A )={

a :^ ∃ b (( a,b

)^ ∈ R )}

-^ The^ range

of^ R, range

( A ), is the set: range ( A )={

b:^ ∃ a (( a,b

)^ ∈ R )}

-^ If^ R^ is a relation on

A^ then the

inverse

relation^

-1^ R is given by -1 R ={( b,a ): ( a,b )∈ R }

Example

  • Let^ S^

be the set of all people in the world

  • Define a relation

R^ on^ S^

by:

  • If^ x,y^ ∈ S

, then ( x,y

)^ ∈^ R^ if and only if

x^ and^ y

are siblings – The domain of

R^ is the set of all people who have brothers or sisters – The range of

R^ is the same as its domain

Example 3

-^ S^ = {1,4,7,9} • Define a relation

R^ on^ S^

by:

  • If^ x,y^ ∈

S , then (

x,y )^ ∈^ R^ if and only if

x^ <^ y

  • The domain of

R^ is {1,4,7}

  • The range of

R^ is {4,7,9}

  • Is^ R^ an equivalence relation?

Functions

-^ You probably have pre-conceived ideas of whata function is –

(^2) f ( x )= x + 2x

  • 2, f ( x )= sin

( x ),

f ( x )= exp (

x ),…

-^ These are all functions which associate amember

x^ of^ ℝ^ unambiguously

with another

member^

f(x)^ of^ ℝ

-^ They can all be written in set-theoretic notationas^ f =^ {(

x,f ( x )) : x^

∈^ ℝ}

Examples continued • f ( x )= 1 / x – Not defined when

x = 1

-^ f^ = {( x ,^

f ( x )):^ x^ ∈^

ℝ,^ x^ ≠^^0 } 1008060 40200 -20-40-60-80 -

-6^ -^

-2^0

2 4

6 x 1/x

Functions

  • Also,^ x

and^ f ( x ) need

not^ be members of

the same set. For example consider thefunction

(positive square root)

  • If^ x >0, then

f^ is a real-valued function

  • Otherwise

f^ is a^ complex

x -valued function

xf =)(

Functions

  • If^ f^ is a function from

A^ to^ B^ and

A = dom

( f )

then we write: f^ :^ A^ →^ B

Functions

  • In formal mathematics it is important totake care with this notation –in particularto be sure about the domain and rangein the definition of a function:–^ f :ℝ^ →

ℝ,^

is not^ well-defined

-^ f :[0,∞)^ →

ℝ,^

(positive root) is a well-

defined function– f :ℝ^ →^ ℂ^ ,^

is a well-defined function, and is^ different

from either of the previous functions

xxf =)(^ xxf =)(^ xxf =)(