I think I have a counterexample to Spivak Calculus on Manifolds Theorem 1-8, what mistake am I making

general-topologymultivariable-calculusreal-analysis

The statement of the theorem, and its proof.

My (presumably incorrect counterexample) is as follows:
Let $f:\mathbb{R}\backslash{0} \rightarrow \mathbb{R}$ be the identity function on $f:\mathbb{R}\backslash{0}$. That is, $f(x) = x$ for all $x\neq 0$. Then, it seems to me that for any open set $U \subset \mathbb{R}$, we can just define an open set $V = U$, and then it's true that $V \cap (\mathbb{R}\backslash 0) = f^{-1}(U)$.

My first thought was that $f^{-1}(U)$ would be undefined, as if $0 \in U$, then $U$ contains an element not in the range of $f$. However, Spivak defined $f^{-1}(C)$ for $C \subset \mathbb{R^n}$ as $\{x \in domain(f): f(x) \in C\}$, which doesn't seem to me to require $U$ to be a subset of the range of $f$.

Spivak also doesn't seem to require $V \subset domain(f)$, it just needs to be a subset of $\mathbb{R^n}$.

So, it seems that $f$ is a function that isn't continuous, and yet satisfies the theorem, which is supposed to be an if and only if. What am I missing with this counterexample?

It's possible $f$ is indeed continuous on it's domain, and that's what Spivak meant, but up until this point he's talking about $R^{n}$, and in the statement of the theorem he just says "continuous", which I took to mean on $R$, which $f$ clearly isn't.

Best Answer

Spivak introduces the concept of a function $f : A \to \mathbb R^m$ which is defined for all $x \in A = \operatorname{domain}(f)$. For $x \notin A$ there does not exist an associated $f(x)$. He then defines the meaning of $\lim_{x \to a} f(x) = b \in \mathbb R^m$ by the usual $\epsilon$-$\delta$-approach. Here of course all occurring $x$ must be in $A$. Finally he says that $f$ is continuous if for all $a \in A$ one has $\lim_{x \to a} f(x) = f(a)$.

In your example you have $A = \mathbb R \setminus \{0\}$ and clearly your function $f$ is continuous. In fact, for each $a \in A$ we have $f(a) = a$, thus given $\epsilon > 0$, we may take $\delta = \epsilon$. Then for all $x \in A$ such that $0 < \lvert x - a \rvert < \delta$ we have $\lvert f(x) - f(a) \rvert = \lvert x - a \rvert < \epsilon$. This shows $\lim_{x \to a} f(x) = f(a)$.

Related Question