142
MHF 3202: The Cantor-Schr¨ oder-Bernstein Theorem 12/3/14

MHF 3202: The Cantor-Schr oder-Bernstein Theorem

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

MHF 3202: The Cantor-Schroder-BernsteinTheorem

12/3/14

Proving equinumerosity

Up to this point, the main method we have for proving that twosets A and B are equinumerous is to show that there is a function

f : A→ B

that is one-to-one and onto.

In some cases, finding such a bijection can be rather difficult.

Today we will prove a theorem that will provide a new and simplermethod for showing that two sets are equinumerous.

A preliminary definition

DefinitionLet A and B be sets. We will say that A is dominated by B,denoted A - B, if there is a one-to-one function f : A→ B.

A few examples:

I If A ∼ B, then A - B.

I If A ⊆ B, then A - B.

I P(Z+) - R.

Is - a partial order?

It is not too hard to show that - is reflexive and transitive.

Is - anti-symmetric?

That is, if A - B and B - A, does it follow that A = B?

No.

Consider A = Z+ and B = Q.

I Z+ - Q.

I Q - Z+.

I But, Z+ 6= Q.

Note however that Z+ ∼ Q.

Is this an instance of a more general fact? Yes!

Is - a partial order?

It is not too hard to show that - is reflexive and transitive.

Is - anti-symmetric?

That is, if A - B and B - A, does it follow that A = B?

No.

Consider A = Z+ and B = Q.

I Z+ - Q.

I Q - Z+.

I But, Z+ 6= Q.

Note however that Z+ ∼ Q.

Is this an instance of a more general fact? Yes!

Is - a partial order?

It is not too hard to show that - is reflexive and transitive.

Is - anti-symmetric?

That is, if A - B and B - A, does it follow that A = B?

No.

Consider A = Z+ and B = Q.

I Z+ - Q.

I Q - Z+.

I But, Z+ 6= Q.

Note however that Z+ ∼ Q.

Is this an instance of a more general fact? Yes!

Is - a partial order?

It is not too hard to show that - is reflexive and transitive.

Is - anti-symmetric?

That is, if A - B and B - A, does it follow that A = B?

No.

Consider A = Z+ and B = Q.

I Z+ - Q.

I Q - Z+.

I But, Z+ 6= Q.

Note however that Z+ ∼ Q.

Is this an instance of a more general fact? Yes!

Is - a partial order?

It is not too hard to show that - is reflexive and transitive.

Is - anti-symmetric?

That is, if A - B and B - A, does it follow that A = B?

No.

Consider A = Z+ and B = Q.

I Z+ - Q.

I Q - Z+.

I But, Z+ 6= Q.

Note however that Z+ ∼ Q.

Is this an instance of a more general fact? Yes!

Is - a partial order?

It is not too hard to show that - is reflexive and transitive.

Is - anti-symmetric?

That is, if A - B and B - A, does it follow that A = B?

No.

Consider A = Z+ and B = Q.

I Z+ - Q.

I Q - Z+.

I But, Z+ 6= Q.

Note however that Z+ ∼ Q.

Is this an instance of a more general fact? Yes!

Is - a partial order?

It is not too hard to show that - is reflexive and transitive.

Is - anti-symmetric?

That is, if A - B and B - A, does it follow that A = B?

No.

Consider A = Z+ and B = Q.

I Z+ - Q.

I Q - Z+.

I But, Z+ 6= Q.

Note however that Z+ ∼ Q.

Is this an instance of a more general fact? Yes!

Is - a partial order?

It is not too hard to show that - is reflexive and transitive.

Is - anti-symmetric?

That is, if A - B and B - A, does it follow that A = B?

No.

Consider A = Z+ and B = Q.

I Z+ - Q.

I Q - Z+.

I But, Z+ 6= Q.

Note however that Z+ ∼ Q.

Is this an instance of a more general fact?

Yes!

Is - a partial order?

It is not too hard to show that - is reflexive and transitive.

Is - anti-symmetric?

That is, if A - B and B - A, does it follow that A = B?

No.

Consider A = Z+ and B = Q.

I Z+ - Q.

I Q - Z+.

I But, Z+ 6= Q.

Note however that Z+ ∼ Q.

Is this an instance of a more general fact? Yes!

The Cantor-Schroder-Bernstein Theorem

TheoremLet A and B be sets. If A - B and B - A, then A ∼ B.

Our approach

To help us understand the general strategy of the proof, we willmake use of a series of diagrams.

First, we will represent the sets A and B as follows.

Next, let

I f : A→ B be a one-to-one function witnessing A - B and

I g : B → A be a one-to-one function witnessing B - A.

Note that if either f or g is onto, it immediately follows thatA ∼ B.

So need to consider the possibility that neither f nor g are onto.

A B

The plan of attack

To help us understand the general strategy of the proof, we willmake use of a series of diagrams.

First, we will represent the sets A and B as follows.

Next, let

I f : A→ B be a one-to-one function witnessing A - B and

I g : B → A be a one-to-one function witnessing B - A.

Note that if either f or g is onto, it immediately follows thatA ∼ B.

So need to consider the possibility that neither f nor g are onto.

f

g

A B

The plan of attack

To help us understand the general strategy of the proof, we willmake use of a series of diagrams.

First, we will represent the sets A and B as follows.

Next, let

I f : A→ B be a one-to-one function witnessing A - B and

I g : B → A be a one-to-one function witnessing B - A.

Note that if either f or g is onto, it immediately follows thatA ∼ B.

So we need to consider the possibility that neither f nor g is onto.

The plan of attack (continued)

Our goal is to use f and g−1 to define a one-to-one and ontofunction h : A→ B.

To do so, we will

1. split A into two pieces X and Y ;

2. split B into two pieces W and Z ;

3. X will be matched up with W by f ; and

4. Y will be matched up with Z by g .

f

g

A B

X W

Y Z

More precisely

We will let

I W = f (X ) = {f (x) | x ∈ X} and

I Y = g(Z ) = {g(z) | z ∈ Z}.

It follows that

I f : X →W is one-to-one and onto and

I g : Z → Y is one-to-one and onto.

f

g

A B

X W = f(X)

Y = g(Z) Z

1-1 and onto

1-1 and onto

The desired function h

Since g : Z → Y is one-to-one and onto, g−1 : Y → Z is afunction that is also one-to-one and onto.

Then we can define a one-to-one and onto function h : A→ B tobe

h(a) =

{f (a) if a ∈ Xg−1(a) if a ∈ Y

.

f

g

A B

X W = f(X)

Y = g(Z) Z

1-1 and onto

1-1 and onto

f

g-1

A B

X W = f(X)

Y = g(Z) Z

1-1 and onto

1-1 and onto

f

g-1

A B

X W = f(X)

Y = g(Z) Z

1-1 and onto

1-1 and onto

h

Choosing the sets X ,Y ,W and Z

As a first step, we want our sets X ,Y ,W and Z to satisfy thefollowing:

I We want Y ⊆ Ran(g).

I If we let A1 = A \ Ran(g), then we must have A1 ⊆ X .

I Given an arbitrary a ∈ A1, since a ∈ X , it follows thatf (a) ∈W .

I Since g is one-to-one, g(f (a)) 6= g(z) for every z ∈ Z .

I Thus g(f (a)) ∈ X .

I Since a was arbitrary, we have f (a) ∈W and g(f (a)) ∈ X forall a ∈ A1.

I That is, f (A1) ⊆W and g(f (A1)) ⊆ X .

Choosing the sets X ,Y ,W and Z

As a first step, we want our sets X ,Y ,W and Z to satisfy thefollowing:

I We want Y ⊆ Ran(g).

I If we let A1 = A \ Ran(g), then we must have A1 ⊆ X .

I Given an arbitrary a ∈ A1, since a ∈ X , it follows thatf (a) ∈W .

I Since g is one-to-one, g(f (a)) 6= g(z) for every z ∈ Z .

I Thus g(f (a)) ∈ X .

I Since a was arbitrary, we have f (a) ∈W and g(f (a)) ∈ X forall a ∈ A1.

I That is, f (A1) ⊆W and g(f (A1)) ⊆ X .

A B

A B

g

A B

g(B) = Ran(g)

g

A B

g(B)

X W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

g

Choosing the sets X ,Y ,W and Z

As a first step, we want our sets X ,Y ,W and Z to satisfy thefollowing:

I We want Y ⊆ Ran(g).

I If we let A1 = A \ Ran(g), then we must have A1 ⊆ X .

I Given an arbitrary a ∈ A1, since a ∈ X , it follows thatf (a) ∈W .

I Since g is one-to-one, g(f (a)) 6= g(z) for every z ∈ Z .

I Thus g(f (a)) ∈ X .

I Since a was arbitrary, we have f (a) ∈W and g(f (a)) ∈ X forall a ∈ A1.

I That is, f (A1) ⊆W and g(f (A1)) ⊆ X .

Choosing the sets X ,Y ,W and Z

As a first step, we want our sets X ,Y ,W and Z to satisfy thefollowing:

I We want Y ⊆ Ran(g).

I If we let A1 = A \ Ran(g), then we must have A1 ⊆ X .

I Given an arbitrary a ∈ A1, since a ∈ X , it follows thatf (a) ∈W .

I Since g is one-to-one, g(f (a)) 6= g(z) for every z ∈ Z .

I Thus g(f (a)) ∈ X .

I Since a was arbitrary, we have f (a) ∈W and g(f (a)) ∈ X forall a ∈ A1.

I That is, f (A1) ⊆W and g(f (A1)) ⊆ X .

A B

g(B)

X W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

g

A B

g(B)

X W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A \ Ran(g) g

A B

g(B)

X W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) g

Choosing the sets X ,Y ,W and Z

As a first step, we want our sets X ,Y ,W and Z to satisfy thefollowing:

I We want Y ⊆ Ran(g).

I If we let A1 = A \ Ran(g), then we must have A1 ⊆ X .

I Given an arbitrary a ∈ A1, since a ∈ X , it follows thatf (a) ∈W .

I Since g is one-to-one, g(f (a)) 6= g(z) for every z ∈ Z .

I Thus g(f (a)) ∈ X .

I Since a was arbitrary, we have f (a) ∈W and g(f (a)) ∈ X forall a ∈ A1.

I That is, f (A1) ⊆W and g(f (A1)) ⊆ X .

Choosing the sets X ,Y ,W and Z

As a first step, we want our sets X ,Y ,W and Z to satisfy thefollowing:

I We want Y ⊆ Ran(g).

I If we let A1 = A \ Ran(g), then we must have A1 ⊆ X .

I Given an arbitrary a ∈ A1, since a ∈ X , it follows thatf (a) ∈W .

I Since g is one-to-one, g(f (a)) 6= g(z) for every z ∈ Z .

I Thus g(f (a)) ∈ X .

I Since a was arbitrary, we have f (a) ∈W and g(f (a)) ∈ X forall a ∈ A1.

I That is, f (A1) ⊆W and g(f (A1)) ⊆ X .

A B

g(B)

X W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) a

A B

g(B)

X W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) a

f(a)

Choosing the sets X ,Y ,W and Z

As a first step, we want our sets X ,Y ,W and Z to satisfy thefollowing:

I We want Y ⊆ Ran(g).

I If we let A1 = A \ Ran(g), then we must have A1 ⊆ X .

I Given an arbitrary a ∈ A1, since a ∈ X , it follows thatf (a) ∈W .

I Since g is one-to-one, g(f (a)) 6= g(z) for every z ∈ Z .

I Thus g(f (a)) ∈ X .

I Since a was arbitrary, we have f (a) ∈W and g(f (a)) ∈ X forall a ∈ A1.

I That is, f (A1) ⊆W and g(f (A1)) ⊆ X .

Choosing the sets X ,Y ,W and Z

As a first step, we want our sets X ,Y ,W and Z to satisfy thefollowing:

I We want Y ⊆ Ran(g).

I If we let A1 = A \ Ran(g), then we must have A1 ⊆ X .

I Given an arbitrary a ∈ A1, since a ∈ X , it follows thatf (a) ∈W .

I Since g is one-to-one, g(f (a)) 6= g(z) for every z ∈ Z .

I Thus g(f (a)) ∈ X .

I Since a was arbitrary, we have f (a) ∈W and g(f (a)) ∈ X forall a ∈ A1.

I That is, f (A1) ⊆W and g(f (A1)) ⊆ X .

Choosing the sets X ,Y ,W and Z

As a first step, we want our sets X ,Y ,W and Z to satisfy thefollowing:

I We want Y ⊆ Ran(g).

I If we let A1 = A \ Ran(g), then we must have A1 ⊆ X .

I Given an arbitrary a ∈ A1, since a ∈ X , it follows thatf (a) ∈W .

I Since g is one-to-one, g(f (a)) 6= g(z) for every z ∈ Z .

I Thus g(f (a)) ∈ X .

I Since a was arbitrary, we have f (a) ∈W and g(f (a)) ∈ X forall a ∈ A1.

I That is, f (A1) ⊆W and g(f (A1)) ⊆ X .

A B

g(B)

X W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) a

f(a)

A B

g(B)

X W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) a

g

f(a)

A B

g(B)

X W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) a

gg(f(a))

f(a)

Choosing the sets X ,Y ,W and Z

As a first step, we want our sets X ,Y ,W and Z to satisfy thefollowing:

I We want Y ⊆ Ran(g).

I If we let A1 = A \ Ran(g), then we must have A1 ⊆ X .

I Given an arbitrary a ∈ A1, since a ∈ X , it follows thatf (a) ∈W .

I Since g is one-to-one, g(f (a)) 6= g(z) for every z ∈ Z .

I Thus g(f (a)) ∈ X .

I Since a was arbitrary, we have f (a) ∈W and g(f (a)) ∈ X forall a ∈ A1.

I That is, f (A1) ⊆W and g(f (A1)) ⊆ X .

Choosing the sets X ,Y ,W and Z

As a first step, we want our sets X ,Y ,W and Z to satisfy thefollowing:

I We want Y ⊆ Ran(g).

I If we let A1 = A \ Ran(g), then we must have A1 ⊆ X .

I Given an arbitrary a ∈ A1, since a ∈ X , it follows thatf (a) ∈W .

I Since g is one-to-one, g(f (a)) 6= g(z) for every z ∈ Z .

I Thus g(f (a)) ∈ X .

I Since a was arbitrary, we have f (a) ∈W and g(f (a)) ∈ X forall a ∈ A1.

I That is, f (A1) ⊆W and g(f (A1)) ⊆ X .

Choosing the sets X ,Y ,W and Z

As a first step, we want our sets X ,Y ,W and Z to satisfy thefollowing:

I We want Y ⊆ Ran(g).

I If we let A1 = A \ Ran(g), then we must have A1 ⊆ X .

I Given an arbitrary a ∈ A1, since a ∈ X , it follows thatf (a) ∈W .

I Since g is one-to-one, g(f (a)) 6= g(z) for every z ∈ Z .

I Thus g(f (a)) ∈ X .

I Since a was arbitrary, we have f (a) ∈W and g(f (a)) ∈ X forall a ∈ A1.

I That is, f (A1) ⊆W and g(f (A1)) ⊆ X .

A B

g(B)

X W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g)

A B

g(B)

X W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g)

f

A B

g(B)

X W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

f

A B

g(B)

X W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

A B

g(B)

X W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

g

A B

g(B)

X W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

gg(f(A1))

Choosing the sets X ,Y ,W and Z (continued)

Now let A2 = g(f (A1)) ⊆ X .

If we let A3 = g(f (A2)), by a similar argument, we can concludethat A3 ⊆ X .

We can continue in this way to produce a sequence of setsA1,A2,A3, . . . such that

An ⊆ X

for every n ∈ Z+.

Finally, let X = ∪n∈Z+An.

Choosing the sets X ,Y ,W and Z (continued)

Now let A2 = g(f (A1)) ⊆ X .

If we let A3 = g(f (A2)), by a similar argument, we can concludethat A3 ⊆ X .

We can continue in this way to produce a sequence of setsA1,A2,A3, . . . such that

An ⊆ X

for every n ∈ Z+.

Finally, let X = ∪n∈Z+An.

A B

g(B)

W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

g(f(A1))

X

A B

g(B)

W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

A2 = g(f(A1))

X

A B

g(B)

W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

A2 = g(f(A1))

f

X

A B

g(B)

W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

A2 = g(f(A1))f(A2)

f

X

A B

g(B)

W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

A2 = g(f(A1))f(A2)

Xg

A B

g(B)

W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

A2 = g(f(A1))f(A2)

g(f(A2))

Xg

A B

g(B)

W = f(X)

Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

A2 = g(f(A1))f(A2)

A3 = g(f(A2))

Xg

Choosing the sets X ,Y ,W and Z (continued)

Now let A2 = g(f (A1)) ⊆ X .

If we let A3 = g(f (A2)), by a similar argument, we can concludethat A3 ⊆ X .

We can continue in this way to produce a sequence of setsA1,A2,A3, . . . such that

An ⊆ X

for every n ∈ Z+.

Finally, let X = ∪n∈Z+An.

Choosing the sets X ,Y ,W and Z (continued)

Now let A2 = g(f (A1)) ⊆ X .

If we let A3 = g(f (A2)), by a similar argument, we can concludethat A3 ⊆ X .

We can continue in this way to produce a sequence of setsA1,A2,A3, . . . such that

An ⊆ X

for every n ∈ Z+.

Finally, let X = ∪n∈Z+An.

A B

g(B)Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

A2 = g(f(A1))f(A2)

A3 = g(f(A2))

A B

g(B)Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

A2 = g(f(A1))f(A2)

A3 = g(f(A2))f(A3)f

A B

g(B)Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

A2 = g(f(A1))f(A2)

A3 = g(f(A2))f(A3)

A4 = g(f(A3)) g

A B

g(B)Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

A2 = g(f(A1))f(A2)

A3 = g(f(A2))A4 = g(f(A3))

f(A3)f

A B

g(B)Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

A2 = g(f(A1))f(A2)

A3 = g(f(A2))A4 = g(f(A3))

f(A3)

g

A B

g(B)Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

A2 = g(f(A1))f(A2)

A3 = g(f(A2)) ff(A3)

A4 = g(f(A3))

A B

g(B)Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

A2 = g(f(A1))f(A2)

A3 = g(f(A2))

g

f(A3)

A4 = g(f(A3))

A B

g(B)Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

A2 = g(f(A1))f(A2)

A3 = g(f(A2)) ff(A3)

A4 = g(f(A3))

A B

g(B)Y = g(Z) Z

g(B) = Ran(g)

A1 = A \ Ran(g) f(A1)

A2 = g(f(A1))f(A2)

A3 = g(f(A2))

g

f(A3)

A4 = g(f(A3))

Choosing the sets X ,Y ,W and Z (continued)

Now let A2 = g(f (A1)) ⊆ X .

If we let A3 = g(f (A2)), by a similar argument, we can concludethat A3 ⊆ X .

We can continue in this way to produce a sequence of setsA1,A2,A3, . . . such that

An ⊆ X

for every n ∈ Z+.

Finally, let X = ∪n∈Z+An.

Choosing the sets X ,Y ,W and Z (continued)

Now let A2 = g(f (A1)) ⊆ X .

If we let A3 = g(f (A2)), by a similar argument, we can concludethat A3 ⊆ X .

We can continue in this way to produce a sequence of setsA1,A2,A3, . . . such that

An ⊆ X

for every n ∈ Z+.

Finally, let X = ∪n∈Z+An.

A

X

Y = g(Z)

The formal proof, 1

Suppose A - B and B - A, and let f : A→ B and g : B → A beone-to-one functions that witness this.

Moreover, let R = Ran(g) ⊆ A.

Then g : B → R is one-to-one and onto.

By our theorem on the inverses of functions, g−1 : R → B is afunction.

The formal proof, 1

Suppose A - B and B - A, and let f : A→ B and g : B → A beone-to-one functions that witness this.

Moreover, let R = Ran(g) ⊆ A.

Then g : B → R is one-to-one and onto.

By our theorem on the inverses of functions, g−1 : R → B is afunction.

The formal proof, 1

Suppose A - B and B - A, and let f : A→ B and g : B → A beone-to-one functions that witness this.

Moreover, let R = Ran(g) ⊆ A.

Then g : B → R is one-to-one and onto.

By our theorem on the inverses of functions, g−1 : R → B is afunction.

The formal proof, 1

Suppose A - B and B - A, and let f : A→ B and g : B → A beone-to-one functions that witness this.

Moreover, let R = Ran(g) ⊆ A.

Then g : B → R is one-to-one and onto.

By our theorem on the inverses of functions, g−1 : R → B is afunction.

The formal proof, 1

Suppose A - B and B - A, and let f : A→ B and g : B → A beone-to-one functions that witness this.

Moreover, let R = Ran(g) ⊆ A.

Then g : B → R is one-to-one and onto.

By our theorem on the inverses of functions, g−1 : R → B is afunction.

The formal proof, 2

We define a sequence of sets A1,A2,A3, . . . by recursion:

I A1 = A \ R;

I An+1 = g(f (An)) = {g(f (a)) | a ∈ An} for every n ∈ Z+.

Let X = ∪n∈Z+An (that is, X = ∪{An | n ∈ Z+}), and letY = A \ X .

Clearly A = X ∪ Y and X ∩ Y = ∅.

Now we define h : A→ B to be

h(a) =

{f (a) if a ∈ Xg−1(a) if a ∈ Y

.

The formal proof, 2

We define a sequence of sets A1,A2,A3, . . . by recursion:

I A1 = A \ R;

I An+1 = g(f (An)) = {g(f (a)) | a ∈ An} for every n ∈ Z+.

Let X = ∪n∈Z+An (that is, X = ∪{An | n ∈ Z+}), and letY = A \ X .

Clearly A = X ∪ Y and X ∩ Y = ∅.

Now we define h : A→ B to be

h(a) =

{f (a) if a ∈ Xg−1(a) if a ∈ Y

.

The formal proof, 2

We define a sequence of sets A1,A2,A3, . . . by recursion:

I A1 = A \ R;

I An+1 = g(f (An)) = {g(f (a)) | a ∈ An} for every n ∈ Z+.

Let X = ∪n∈Z+An (that is, X = ∪{An | n ∈ Z+}), and letY = A \ X .

Clearly A = X ∪ Y and X ∩ Y = ∅.

Now we define h : A→ B to be

h(a) =

{f (a) if a ∈ Xg−1(a) if a ∈ Y

.

The formal proof, 2

We define a sequence of sets A1,A2,A3, . . . by recursion:

I A1 = A \ R;

I An+1 = g(f (An)) = {g(f (a)) | a ∈ An} for every n ∈ Z+.

Let X = ∪n∈Z+An (that is, X = ∪{An | n ∈ Z+}), and letY = A \ X .

Clearly A = X ∪ Y and X ∩ Y = ∅.

Now we define h : A→ B to be

h(a) =

{f (a) if a ∈ Xg−1(a) if a ∈ Y

.

The formal proof, 2

We define a sequence of sets A1,A2,A3, . . . by recursion:

I A1 = A \ R;

I An+1 = g(f (An)) = {g(f (a)) | a ∈ An} for every n ∈ Z+.

Let X = ∪n∈Z+An (that is, X = ∪{An | n ∈ Z+}), and letY = A \ X .

Clearly A = X ∪ Y and X ∩ Y = ∅.

Now we define h : A→ B to be

h(a) =

{f (a) if a ∈ Xg−1(a) if a ∈ Y

.

The formal proof, 2

We define a sequence of sets A1,A2,A3, . . . by recursion:

I A1 = A \ R;

I An+1 = g(f (An)) = {g(f (a)) | a ∈ An} for every n ∈ Z+.

Let X = ∪n∈Z+An (that is, X = ∪{An | n ∈ Z+}), and letY = A \ X .

Clearly A = X ∪ Y and X ∩ Y = ∅.

Now we define h : A→ B to be

h(a) =

{f (a) if a ∈ Xg−1(a) if a ∈ Y

.

The formal proof, 2

We define a sequence of sets A1,A2,A3, . . . by recursion:

I A1 = A \ R;

I An+1 = g(f (An)) = {g(f (a)) | a ∈ An} for every n ∈ Z+.

Let X = ∪n∈Z+An (that is, X = ∪{An | n ∈ Z+}), and letY = A \ X .

Clearly A = X ∪ Y and X ∩ Y = ∅.

Now we define h : A→ B to be

h(a) =

{f (a) if a ∈ Xg−1(a) if a ∈ Y

.

The formal proof, 3

h(a) =

{f (a) if a ∈ Xg−1(a) if a ∈ Y

.

We need to verify that h is a function from A to B.

In particular, we need to ensure that if a ∈ Y , then

a ∈ Dom(g−1) = Ran(g) = R.

Note that if a /∈ R, then a ∈ A \ R = A1 ⊆ X .

It follows that if a ∈ Y , we must have a ∈ R.

The formal proof, 3

h(a) =

{f (a) if a ∈ Xg−1(a) if a ∈ Y

.

We need to verify that h is a function from A to B.

In particular, we need to ensure that if a ∈ Y , then

a ∈ Dom(g−1) = Ran(g) = R.

Note that if a /∈ R, then a ∈ A \ R = A1 ⊆ X .

It follows that if a ∈ Y , we must have a ∈ R.

The formal proof, 3

h(a) =

{f (a) if a ∈ Xg−1(a) if a ∈ Y

.

We need to verify that h is a function from A to B.

In particular, we need to ensure that if a ∈ Y , then

a ∈ Dom(g−1) = Ran(g) = R.

Note that if a /∈ R, then a ∈ A \ R = A1 ⊆ X .

It follows that if a ∈ Y , we must have a ∈ R.

The formal proof, 3

h(a) =

{f (a) if a ∈ Xg−1(a) if a ∈ Y

.

We need to verify that h is a function from A to B.

In particular, we need to ensure that if a ∈ Y , then

a ∈ Dom(g−1) = Ran(g) = R.

Note that if a /∈ R, then a ∈ A \ R = A1 ⊆ X .

It follows that if a ∈ Y , we must have a ∈ R.

The formal proof, 3

h(a) =

{f (a) if a ∈ Xg−1(a) if a ∈ Y

.

We need to verify that h is a function from A to B.

In particular, we need to ensure that if a ∈ Y , then

a ∈ Dom(g−1) = Ran(g) = R.

Note that if a /∈ R, then a ∈ A \ R = A1 ⊆ X .

It follows that if a ∈ Y , we must have a ∈ R.

Claim: h is one-to-one

Let a1, a2 ∈ A be arbitrary and suppose h(a1) = h(a2).

We have two cases to consider:

I Case 1: a1 ∈ X .

I Case 2: a1 ∈ Y .

In Case 1, we will argue that if a1 ∈ X and a2 ∈ Y we have acontradiction.

Thus we must have a1 ∈ X and a2 ∈ X , and then we will arguethat a1 = a2.

Case 2 will proceed similarly.

Claim: h is one-to-one

Let a1, a2 ∈ A be arbitrary and suppose h(a1) = h(a2).

We have two cases to consider:

I Case 1: a1 ∈ X .

I Case 2: a1 ∈ Y .

In Case 1, we will argue that if a1 ∈ X and a2 ∈ Y we have acontradiction.

Thus we must have a1 ∈ X and a2 ∈ X , and then we will arguethat a1 = a2.

Case 2 will proceed similarly.

Claim: h is one-to-one

Let a1, a2 ∈ A be arbitrary and suppose h(a1) = h(a2).

We have two cases to consider:

I Case 1: a1 ∈ X .

I Case 2: a1 ∈ Y .

In Case 1, we will argue that if a1 ∈ X and a2 ∈ Y we have acontradiction.

Thus we must have a1 ∈ X and a2 ∈ X , and then we will arguethat a1 = a2.

Case 2 will proceed similarly.

Claim: h is one-to-one

Let a1, a2 ∈ A be arbitrary and suppose h(a1) = h(a2).

We have two cases to consider:

I Case 1: a1 ∈ X .

I Case 2: a1 ∈ Y .

In Case 1, we will argue that if a1 ∈ X and a2 ∈ Y we have acontradiction.

Thus we must have a1 ∈ X and a2 ∈ X , and then we will arguethat a1 = a2.

Case 2 will proceed similarly.

Claim: h is one-to-one

Let a1, a2 ∈ A be arbitrary and suppose h(a1) = h(a2).

We have two cases to consider:

I Case 1: a1 ∈ X .

I Case 2: a1 ∈ Y .

In Case 1, we will argue that if a1 ∈ X and a2 ∈ Y we have acontradiction.

Thus we must have a1 ∈ X and a2 ∈ X , and then we will arguethat a1 = a2.

Case 2 will proceed similarly.

Claim: h is one-to-one

Let a1, a2 ∈ A be arbitrary and suppose h(a1) = h(a2).

We have two cases to consider:

I Case 1: a1 ∈ X .

I Case 2: a1 ∈ Y .

In Case 1, we will argue that if a1 ∈ X and a2 ∈ Y we have acontradiction.

Thus we must have a1 ∈ X and a2 ∈ X , and then we will arguethat a1 = a2.

Case 2 will proceed similarly.

Claim: h is one-to-one

Let a1, a2 ∈ A be arbitrary and suppose h(a1) = h(a2).

We have two cases to consider:

I Case 1: a1 ∈ X .

I Case 2: a1 ∈ Y .

In Case 1, we will argue that if a1 ∈ X and a2 ∈ Y we have acontradiction.

Thus we must have a1 ∈ X and a2 ∈ X , and then we will arguethat a1 = a2.

Case 2 will proceed similarly.

Claim: h is one-to-one

Let a1, a2 ∈ A be arbitrary and suppose h(a1) = h(a2).

We have two cases to consider:

I Case 1: a1 ∈ X .

I Case 2: a1 ∈ Y .

In Case 1, we will argue that if a1 ∈ X and a2 ∈ Y we have acontradiction.

Thus we must have a1 ∈ X and a2 ∈ X , and then we will arguethat a1 = a2.

Case 2 will proceed similarly.

h is one-to-one, Case 1

Case 1: Suppose that a1 ∈ X and suppose for the sake ofcontradiction that a2 ∈ Y .

Then by definition of h, we have

I h(a1) = f (a1)

I h(a2) = g−1(a2).

Since h(a1) = h(a2), it follows that

f (a1) = g−1(a2).

Applying g to both sides yields

g(f (a1)) = g(g−1(a2)) = a2.

h is one-to-one, Case 1

Case 1: Suppose that a1 ∈ X and suppose for the sake ofcontradiction that a2 ∈ Y .

Then by definition of h, we have

I h(a1) = f (a1)

I h(a2) = g−1(a2).

Since h(a1) = h(a2), it follows that

f (a1) = g−1(a2).

Applying g to both sides yields

g(f (a1)) = g(g−1(a2)) = a2.

h is one-to-one, Case 1

Case 1: Suppose that a1 ∈ X and suppose for the sake ofcontradiction that a2 ∈ Y .

Then by definition of h, we have

I h(a1) = f (a1)

I h(a2) = g−1(a2).

Since h(a1) = h(a2), it follows that

f (a1) = g−1(a2).

Applying g to both sides yields

g(f (a1)) = g(g−1(a2)) = a2.

h is one-to-one, Case 1

Case 1: Suppose that a1 ∈ X and suppose for the sake ofcontradiction that a2 ∈ Y .

Then by definition of h, we have

I h(a1) = f (a1)

I h(a2) = g−1(a2).

Since h(a1) = h(a2), it follows that

f (a1) = g−1(a2).

Applying g to both sides yields

g(f (a1)) = g(g−1(a2)) = a2.

h is one-to-one, Case 1

Case 1: Suppose that a1 ∈ X and suppose for the sake ofcontradiction that a2 ∈ Y .

Then by definition of h, we have

I h(a1) = f (a1)

I h(a2) = g−1(a2).

Since h(a1) = h(a2), it follows that

f (a1) = g−1(a2).

Applying g to both sides yields

g(f (a1)) = g(g−1(a2)) = a2.

h is one-to-one, Case 1 (continued)

From the previous slide we now have g(f (a1)) = a2.

Since a1 ∈ X = ∪n∈Z+An, we can choose some n ∈ Z+ such thata1 ∈ An. Then we have

a2 = g(f (a1)) ∈ g(f (An)) = An+1 ⊆ X ,

and hence a2 ∈ X , contradicting our assumption that a2 ∈ Y .

Thus, both a1, a2 ∈ X , so

f (a1) = h(a1) = h(a2) = f (a2).

But f is one-to-one, and thus a1 = a2.

h is one-to-one, Case 1 (continued)

From the previous slide we now have g(f (a1)) = a2.

Since a1 ∈ X = ∪n∈Z+An, we can choose some n ∈ Z+ such thata1 ∈ An. Then we have

a2 = g(f (a1)) ∈ g(f (An)) = An+1 ⊆ X ,

and hence a2 ∈ X , contradicting our assumption that a2 ∈ Y .

Thus, both a1, a2 ∈ X , so

f (a1) = h(a1) = h(a2) = f (a2).

But f is one-to-one, and thus a1 = a2.

h is one-to-one, Case 1 (continued)

From the previous slide we now have g(f (a1)) = a2.

Since a1 ∈ X = ∪n∈Z+An, we can choose some n ∈ Z+ such thata1 ∈ An. Then we have

a2 = g(f (a1)) ∈ g(f (An)) = An+1 ⊆ X ,

and hence a2 ∈ X , contradicting our assumption that a2 ∈ Y .

Thus, both a1, a2 ∈ X , so

f (a1) = h(a1) = h(a2) = f (a2).

But f is one-to-one, and thus a1 = a2.

h is one-to-one, Case 1 (continued)

From the previous slide we now have g(f (a1)) = a2.

Since a1 ∈ X = ∪n∈Z+An, we can choose some n ∈ Z+ such thata1 ∈ An. Then we have

a2 = g(f (a1)) ∈ g(f (An)) = An+1 ⊆ X ,

and hence a2 ∈ X , contradicting our assumption that a2 ∈ Y .

Thus, both a1, a2 ∈ X , so

f (a1) = h(a1) = h(a2) = f (a2).

But f is one-to-one, and thus a1 = a2.

h is one-to-one, Case 1 (continued)

From the previous slide we now have g(f (a1)) = a2.

Since a1 ∈ X = ∪n∈Z+An, we can choose some n ∈ Z+ such thata1 ∈ An. Then we have

a2 = g(f (a1)) ∈ g(f (An)) = An+1 ⊆ X ,

and hence a2 ∈ X , contradicting our assumption that a2 ∈ Y .

Thus, both a1, a2 ∈ X , so

f (a1) = h(a1) = h(a2) = f (a2).

But f is one-to-one, and thus a1 = a2.

h is one-to-one, Case 2

Case 2: a1 ∈ Y .

We can argue as in Case 1 that a2 ∈ Y .

Thus h(a1) = h(a2) implies that

g−1(a1) = g−1(a2).

Applying g to both sides yields

a1 = g(g−1(a1)) = g(g−1(a2)) = a2.

In either case, we have a1 = a2.

Since a1 and a2 were arbitrary, it follows that h is one-to-one.

h is one-to-one, Case 2

Case 2: a1 ∈ Y .

We can argue as in Case 1 that a2 ∈ Y .

Thus h(a1) = h(a2) implies that

g−1(a1) = g−1(a2).

Applying g to both sides yields

a1 = g(g−1(a1)) = g(g−1(a2)) = a2.

In either case, we have a1 = a2.

Since a1 and a2 were arbitrary, it follows that h is one-to-one.

h is one-to-one, Case 2

Case 2: a1 ∈ Y .

We can argue as in Case 1 that a2 ∈ Y .

Thus h(a1) = h(a2) implies that

g−1(a1) = g−1(a2).

Applying g to both sides yields

a1 = g(g−1(a1)) = g(g−1(a2)) = a2.

In either case, we have a1 = a2.

Since a1 and a2 were arbitrary, it follows that h is one-to-one.

h is one-to-one, Case 2

Case 2: a1 ∈ Y .

We can argue as in Case 1 that a2 ∈ Y .

Thus h(a1) = h(a2) implies that

g−1(a1) = g−1(a2).

Applying g to both sides yields

a1 = g(g−1(a1)) = g(g−1(a2)) = a2.

In either case, we have a1 = a2.

Since a1 and a2 were arbitrary, it follows that h is one-to-one.

h is one-to-one, Case 2

Case 2: a1 ∈ Y .

We can argue as in Case 1 that a2 ∈ Y .

Thus h(a1) = h(a2) implies that

g−1(a1) = g−1(a2).

Applying g to both sides yields

a1 = g(g−1(a1)) = g(g−1(a2)) = a2.

In either case, we have a1 = a2.

Since a1 and a2 were arbitrary, it follows that h is one-to-one.

h is one-to-one, Case 2

Case 2: a1 ∈ Y .

We can argue as in Case 1 that a2 ∈ Y .

Thus h(a1) = h(a2) implies that

g−1(a1) = g−1(a2).

Applying g to both sides yields

a1 = g(g−1(a1)) = g(g−1(a2)) = a2.

In either case, we have a1 = a2.

Since a1 and a2 were arbitrary, it follows that h is one-to-one.

h is one-to-one, Case 2

Case 2: a1 ∈ Y .

We can argue as in Case 1 that a2 ∈ Y .

Thus h(a1) = h(a2) implies that

g−1(a1) = g−1(a2).

Applying g to both sides yields

a1 = g(g−1(a1)) = g(g−1(a2)) = a2.

In either case, we have a1 = a2.

Since a1 and a2 were arbitrary, it follows that h is one-to-one.

Claim: h is onto

Let b ∈ B be arbitrary.

Since g(b) ∈ A, we have two cases to consider:

I Case 1: g(b) ∈ X ;

I Case 2: g(b) ∈ Y .

Claim: h is onto

Let b ∈ B be arbitrary.

Since g(b) ∈ A, we have two cases to consider:

I Case 1: g(b) ∈ X ;

I Case 2: g(b) ∈ Y .

Claim: h is onto

Let b ∈ B be arbitrary.

Since g(b) ∈ A, we have two cases to consider:

I Case 1: g(b) ∈ X ;

I Case 2: g(b) ∈ Y .

Claim: h is onto

Let b ∈ B be arbitrary.

Since g(b) ∈ A, we have two cases to consider:

I Case 1: g(b) ∈ X ;

I Case 2: g(b) ∈ Y .

Claim: h is onto

Let b ∈ B be arbitrary.

Since g(b) ∈ A, we have two cases to consider:

I Case 1: g(b) ∈ X ;

I Case 2: g(b) ∈ Y .

h is onto, Case 1: g(b) ∈ X

Choose n ∈ Z+ such that g(b) ∈ An.

Since g(b) ∈ Ran(g) = R and A1 = A \ R, it follows thatg(b) /∈ A1.

Thus, g(b) ∈ An for some n > 1, so An = g(f (An−1)).

Then we can choose some a ∈ An−1 such that g(f (a)) = g(b).

Since g is one-to-one, it follows that f (a) = b.

Since a ∈ An−1, we know a ∈ X and hence h(a) = f (a) = b.

Thus b ∈ Ran(h).

h is onto, Case 1: g(b) ∈ X

Choose n ∈ Z+ such that g(b) ∈ An.

Since g(b) ∈ Ran(g) = R and A1 = A \ R, it follows thatg(b) /∈ A1.

Thus, g(b) ∈ An for some n > 1, so An = g(f (An−1)).

Then we can choose some a ∈ An−1 such that g(f (a)) = g(b).

Since g is one-to-one, it follows that f (a) = b.

Since a ∈ An−1, we know a ∈ X and hence h(a) = f (a) = b.

Thus b ∈ Ran(h).

h is onto, Case 1: g(b) ∈ X

Choose n ∈ Z+ such that g(b) ∈ An.

Since g(b) ∈ Ran(g) = R and A1 = A \ R, it follows thatg(b) /∈ A1.

Thus, g(b) ∈ An for some n > 1, so An = g(f (An−1)).

Then we can choose some a ∈ An−1 such that g(f (a)) = g(b).

Since g is one-to-one, it follows that f (a) = b.

Since a ∈ An−1, we know a ∈ X and hence h(a) = f (a) = b.

Thus b ∈ Ran(h).

h is onto, Case 1: g(b) ∈ X

Choose n ∈ Z+ such that g(b) ∈ An.

Since g(b) ∈ Ran(g) = R and A1 = A \ R, it follows thatg(b) /∈ A1.

Thus, g(b) ∈ An for some n > 1, so An = g(f (An−1)).

Then we can choose some a ∈ An−1 such that g(f (a)) = g(b).

Since g is one-to-one, it follows that f (a) = b.

Since a ∈ An−1, we know a ∈ X and hence h(a) = f (a) = b.

Thus b ∈ Ran(h).

h is onto, Case 1: g(b) ∈ X

Choose n ∈ Z+ such that g(b) ∈ An.

Since g(b) ∈ Ran(g) = R and A1 = A \ R, it follows thatg(b) /∈ A1.

Thus, g(b) ∈ An for some n > 1, so An = g(f (An−1)).

Then we can choose some a ∈ An−1 such that g(f (a)) = g(b).

Since g is one-to-one, it follows that f (a) = b.

Since a ∈ An−1, we know a ∈ X and hence h(a) = f (a) = b.

Thus b ∈ Ran(h).

h is onto, Case 1: g(b) ∈ X

Choose n ∈ Z+ such that g(b) ∈ An.

Since g(b) ∈ Ran(g) = R and A1 = A \ R, it follows thatg(b) /∈ A1.

Thus, g(b) ∈ An for some n > 1, so An = g(f (An−1)).

Then we can choose some a ∈ An−1 such that g(f (a)) = g(b).

Since g is one-to-one, it follows that f (a) = b.

Since a ∈ An−1, we know a ∈ X and hence h(a) = f (a) = b.

Thus b ∈ Ran(h).

h is onto, Case 1: g(b) ∈ X

Choose n ∈ Z+ such that g(b) ∈ An.

Since g(b) ∈ Ran(g) = R and A1 = A \ R, it follows thatg(b) /∈ A1.

Thus, g(b) ∈ An for some n > 1, so An = g(f (An−1)).

Then we can choose some a ∈ An−1 such that g(f (a)) = g(b).

Since g is one-to-one, it follows that f (a) = b.

Since a ∈ An−1, we know a ∈ X and hence h(a) = f (a) = b.

Thus b ∈ Ran(h).

h is onto, Case 1: g(b) ∈ X

Choose n ∈ Z+ such that g(b) ∈ An.

Since g(b) ∈ Ran(g) = R and A1 = A \ R, it follows thatg(b) /∈ A1.

Thus, g(b) ∈ An for some n > 1, so An = g(f (An−1)).

Then we can choose some a ∈ An−1 such that g(f (a)) = g(b).

Since g is one-to-one, it follows that f (a) = b.

Since a ∈ An−1, we know a ∈ X and hence h(a) = f (a) = b.

Thus b ∈ Ran(h).

h is onto, Case 2: g(b) ∈ Y

In this case, we apply h to g(b) to get

h(g(b)) = g−1(g(b)) = b.

Thus b ∈ Ran(h).

In either case, b ∈ Ran(h).

Since b was arbitrary, h is onto.

h is onto, Case 2: g(b) ∈ Y

In this case, we apply h to g(b) to get

h(g(b)) = g−1(g(b)) = b.

Thus b ∈ Ran(h).

In either case, b ∈ Ran(h).

Since b was arbitrary, h is onto.

h is onto, Case 2: g(b) ∈ Y

In this case, we apply h to g(b) to get

h(g(b)) = g−1(g(b)) = b.

Thus b ∈ Ran(h).

In either case, b ∈ Ran(h).

Since b was arbitrary, h is onto.

h is onto, Case 2: g(b) ∈ Y

In this case, we apply h to g(b) to get

h(g(b)) = g−1(g(b)) = b.

Thus b ∈ Ran(h).

In either case, b ∈ Ran(h).

Since b was arbitrary, h is onto.

h is onto, Case 2: g(b) ∈ Y

In this case, we apply h to g(b) to get

h(g(b)) = g−1(g(b)) = b.

Thus b ∈ Ran(h).

In either case, b ∈ Ran(h).

Since b was arbitrary, h is onto.

Summing up

We have shown that h : A→ B is one-to-one and onto.

Thus A ∼ B.

Summing up

We have shown that h : A→ B is one-to-one and onto.

Thus A ∼ B.

Summing up

We have shown that h : A→ B is one-to-one and onto.

Thus A ∼ B.