Spivak Calculus, Ch 5 Limits, Problem 11: What exactly does it mean that limits are a local property? 
Suppose there is a $\delta>0$ such that $f(x)=g(x)$ when
$0<|x-a|<\delta$. Prove that $\lim\limits_{x\to a}f(x)=\lim\limits_{x
> \to a}g(x)$. In other words, $\lim\limits_{x\to a}f(x)$ depends only
on the values of $f(x)$ near $a$ - this fact is often expressed by
saying that limits are a "local property." (It will clearly help to
use $\delta'$, or some other letter, instead of $\delta$, in the
definition of limits.)

I feel like this problem isn't clear enough about assumptions. The solution starts by assuming that $$\lim\limits_{x\to a}f(x)=l$$
$\lim\limits_{x\to a}f(x)$ means that $\forall \epsilon>0$ we can choose a $\delta'>0$ such that $|x-a|<\delta' \implies |f(x)-l|<\epsilon$.
If we choose $\delta'<\delta$ then $|x-a|<\delta' \implies f(x)=g(x)$ $\forall x$, so $|g(x)-l|<\epsilon$, and $\lim\limits_{x \to a}g(x)=l$.
What does it mean that limits are a "local property"?
The way I understand it in this problem it means that $g(x)$ and $f(x)$ might be different functions, but as long as the relationship $|x-a|<\delta \implies f(x)=g(x)$ holds, ie $f(x)$ and $g(x)$ assume the same values in an interval around $a$, and the limit at $a$ exists for one of the functions, then the limits of both functions coincide at this point. The limit depends only on the behavior of the functions near the point at which the limit is taken.
Is this the gist of it, or is there some other interesting observation about this problem?
 A: Yes, the point is that if $f$ and $g$ agree on some punctured neighbourhood* of $a$, then their limits at $a$ will be the same. Therefore, to calculate $\lim_{x\to a}f(x)$, we can restrict our attention to an arbitrarily small region. For instance, let $I=(-0.0000001,0.0000001)\setminus\{0\}$, and consider the function $f:\mathbf R\to\mathbf R$ given by
$$
f(x)=\begin{cases}
x &\text{if $x\in I$} \\
1 &\text{if $x\not\in I$ and $x$ is rational} \\
0&\text{if $x\not\in I$ and $x$ is irrational}
\end{cases}
$$
When trying to calculate $\lim_{x\to 0}f(x)$, the fact that $f$ is wildly discontinuous outside $I$ is immaterial. Since $f(x)=x$ for all $x$ satisfying $0<|x|<0.0000001$, it follows that
$$
\lim_{x\to 0}f(x)=\lim_{x\to 0}x=0 \, .
$$
Here is an exercise to drive this point home: let $f$ and $g$ be functions from $\mathbf R$ to $\mathbf R$. Prove that if $f=g$ except at finitely many points, then for all $a\in\mathbf R$,

*

*(i) $\lim_{x\to a}f(x)$ exists if and only if $\lim_{x\to a}g(x)$ exists.

*(ii) Whenever $\lim_{x\to a}f(x)$ does exist, $\lim_{x\to a}f(x)=\lim_{x\to a}g(x)$.


*A punctured neighbourhood of $a$ is a set of the form $\{x:0<|x-a|<\delta\}$, for some $\delta>0$.
