272 Chapter 5 • Continuous Functions
where xi, Yi E {O, 2}. Let n denote the first (smallest) natural number such
that Xn -=f. Yn. (These are the first ternary digits of x and y that are not equal.)
Then Xn = 0 and Yn = 2. Thus,
~yi/2 ~xi/2
cpc(Y) - cpc(x) = L 2i - L 2i
i=l i=l
= ~ [t Yi ; Xi + f Yi ; Xi l
i=l i=n+l
= ~ [
2
2n + f Yi; Xi]
i=n+l
1 1 00 0-2
:::: 2n + 2 I: 2i
i=n+l
1 1 2 00 1
= 2n - 2. 2n+l L 2i
i=O
1 1
= 2n - 2n+l (2)
= o.
Thus x < y ::::} cpc (y) -cpc ( x) 2:: 0 ::::} cpc ( x) ~ cpc (y). Therefore, cpc is monotone
increasing on C. •
Definition 5.5. 7 We extend cpc : C ---> [O, 1 J to a function cp : [O, 1 J ---> [O, 1 J as
follows:
For all x E [O, 1], if x E C we define cp(x) = cpc(x). If x rJ. C, then x is a
member of exactly one of the open intervals (a, b) deleted from [O, 1] to create
C ; we define cp(x) = cpc(a) = cpc(b). In summary,
{
cpc(x) if x EC; }
cp~)=.
cpc(a) if x E (a, b), where (a, b) is one of the
intervals removed from [O, 1] to create C 0
This function is called the Cantor function on [O, 1 J. It is constant on each
of the open intervals removed from [O, 1 J in creating the Cantor set. A rough
idea of its graph is sketched at the top of page 273.