# Doing calculus on functions restricted to the Cantor set

How does this work exactly? If I take a simple function like f(x) := x and I graph it, I get a solid line, but if I restrict the domain to a Cantor set, then it becomes a dotted line. But does the discontinuity of the domain make the function discontinuous? I wouldn't think so because I can still find the limit of every point in the function, albeit the limits are always one-sided from what I understand. Does this all sound right?

-
Continuity can be defined on general topological spaces, and in particular for general subspaces of $\mathbb{R}$. Disconnectedness of the domain doesn't make functions discontinuous. The limits need not be one-sided limits. E.g., $.0202020202..._3=\frac{1}{4}$ can be approximated from both sides in the Cantor set. – Jonas Meyer Mar 27 '11 at 23:03

"Continuous" is an adjective that applies to functions, not to sets; so it does not really make sense to say "discontinuity of the domain".

The closest notion, which is probably what you are groping for in that sentence, is "connected" vs. "disconnected". This applies to sets. A set $X$ is "disconnected" if you can find two open sets $U$ and $V$ such that $X\subseteq U\cup V$, $X\cap U$ and $X\cap V$ are nonempty, and $X\cap U\cap V$ is empty.

The Cantor set is in fact totally separated, meaning that for any two distinct points $x$ and $y$ in the Cantor set, you can find open sets $U$ and $V$ as above, and with the further property that $x\in U\cap C$ and $y\in V\cap C$.

So you really are asking whether disconnectedness of the domain makes the function discontinuous.

What is leading you astray here is looking at the graph inside the plane. The "gaps" you are seeing in the graph are not because the function is discontinuous, but rather because you are seeing parts of the plane that have nothing to do with the function. Think of this analogy: the graph of a continuous function from $\mathbb{R}^2$ to $\mathbb{R}$ is a surface with no holes or breaks. If you take a function from $\mathbb{R}$ to $\mathbb{R}$, you can graph it in $3$-space, and you'll get a single line, not a surface; does that mean that the function is not continuous, given that the graph is not a surface? No, because you are not looking at the graph in the "right" context.

What is the definition of "continuity" for a real-valued function of real variable? To accommodate functions whose domains are not all of the real numbers, the usual definition is as follows:

Definition. A function $f\colon D\to\mathbb{R}$ (where $D\subseteq\mathbb{R}$) is *continuous at $a\in D$ if and only if for every $\epsilon\gt 0$ there exists $\delta\gt 0$ such that for all $x\in D$, if $|x-a|\lt\delta$, then $|f(x)-f(a)|\lt \epsilon$.

Note the clause "$x\in D$". We only care about what happens inside the domain. (In particular, a function is always continuous at an isolated point of its domain). Then we define

Definition. A function $f\colon D\to\mathbb{R}$ (where $D\subseteq \mathbb{R}$) is continuous if and only if it is continuous at every $a\in D$.

That is: a function is continuous if and only if it is continuous at every point in its domain.

This definition makes perfect sense for functions defined only inside the Cantor set; the notion of continuous that is "visual" ("the graph has no jumps, breaks, or holes") doesn't work here because (i) it is a fuzzy notion anyway; and (ii) the domain is not connected, which is what is really behind that fuzzy notion. The function $f\colon C\to\mathbb{R}$ given by $f(c)=c$ is continuous.

So you are right: you can still talk about limits, and discuss continuity in terms of limits. Similarly for derivatives, which are defined in terms of limits, for real valued functions of Cantor-set-variables (functions $f\colon C\to\mathbb{R}$). You can also restrict yourself to Cantor-set-valued functions of Cantor-set-variable (that is, functions $f\colon C\to C$. Since $C$ is a complete metric space, you won't run into problems related to "missing limits" the way you do with the rationals.

-
 A small point: the thing you call "totally disconnected" is actually "totally separated". Totally disconnected means that no subset of one than one point is connected. Totally separated implies totally disconnected but the converse fails for general topological spaces. – Chris Eagle Mar 27 '11 at 23:29 @Chris: Thanks. – Arturo Magidin Mar 27 '11 at 23:36 Thanks Arturo! This is amazing. – Matt Gregory Mar 27 '11 at 23:48

Edit: The Cantor set can be thought of as the set of real numbers in base $3$ which have a decimal expansion free of $1$'s. It is a closed subset of the real numbers, and as such is a complete metric space. This means that any sequence of members of the Cantor set which converges to some real number in fact converges to a member of the Cantor set, and so you can still work with limits in the Cantor set the same way you do with limits in the reals. So yes, calculus is still applicable as far as I know.

-
Hmmm... in the versions of the Cantor set that I know, the Cantor set is closed, hence sequence inside the cantor set that converges to some real number converges to a number inside the Cantor set; the Cantor set I'm familiar with does include $1$, which has ternary expansion $0.2222\ldots$. – Arturo Magidin Mar 27 '11 at 23:07
Oh. In that case it would be complete then, correct? – Alex Becker Mar 27 '11 at 23:09
Yes: the Cantor set is a complete metric space, as it happens. – Arturo Magidin Mar 27 '11 at 23:09
@Arturo: Fixed, thanks. – Alex Becker Mar 27 '11 at 23:15