Two different definitions of limits. There are two definitions of limits that I know of. Definition $(1)$:

Let $X$ be  subset of $\mathbf{R}^n$, and $x_0$ a point in $\overline{X}$. A function $f\colon X\rightarrow\mathbf{R}^m$ has the limit $a$ at $x_0$ if for all $\varepsilon>0$, there exists $\delta>0$ such that for all $x\in X$, we have
$$ |x-x_0|<\delta \implies |f(x)-a|<\varepsilon.$$

Definition $(2)$ is the exact same, except with

$$ 0<|x-x_0|<\delta \implies |f(x)-a|<\varepsilon.$$

I am not exactly sure how to reconcile these two definitions. With the first definition, limits work well with composition. It also has the interesting property, that if you take a limit of a function like $\lim_{x\rightarrow 0}\text{sgn}(x)$, the limit does not exist since $\text{sgn}(0)=0$, as of course $|0-0|<\delta$ for any $\delta>0$. Thus, it seems like for $x_0\in X$, the limit in $(1)$ exists at $x_0$ if and only if $f$ is continuous at $x_0$ (is this correct?).
In $(2)$ however, the limit exists at a jump discontinuity since we are disregarding the point $x_0$, and there are plenty of examples where the limit exists at $x$ while the function $f$ is not continuous at $x$. The $\text{sgn}$ function mentioned previously fits the bill.
Another interesting distinction that I thought of is when taking limits of both sides of an equation. Suppose that the domains of both $f$ and $g$ is $X$ and $x_0\in\overline{X}\setminus X$. Then under definitions $(1)$ and $(2)$, if $f(x)=g(x)$ for all $x$ in a neighborhood of $x_0$, we have
$$\lim_{x\rightarrow x_0}f(x)=\lim_{x\rightarrow x_0}g(x),$$
as $x_0\not\in X$, so the distinction between the two definitions does not show up. Of course, this is provided the limit exists.
However, if we do the same example with $x_0\in X$, where $f(x)=g(x)$ for all $x$ in a neighborhood of $x_0$ excluding $x_0$, under definition $(2)$ we again have the same result, but under definition $(1)$ a jump discontinuity at $x_0$ could imply that
$$\lim_{x\rightarrow x_0}f(x)\neq\lim_{x\rightarrow x_0}g(x).$$
This seems somewhat significant.
Is there a way to fit these together, or in general, what is going on? And how does the distinction get "erased"? I don't think many books dwell on this at all.
 A: I would view the second definition as the correct one, at least for limits. Limit at a point $x_0$ does not care about the behavior of the function at $x_0$. It's only bothered about how the function behaves in a deleted neighborhood around $x_0$. The reason for this is because the function may not even be defined at the point. By putting the $0 < |x - x_0|$ in the second definition, we are ensuring that the value $f$ assumes at $x_0$ is not taken into consideration. If it was considered, you might conclude that the limit does not exist.
For example, consider $f(x) = x$ when $x\neq 1$ and $f(x) = 2$ when $x = 1$. The limit at $x = 1$ you might guess should be $1$, however if we use definition 1, $|f(1) - 1|$ is always $1$ as $x$ approaches $1$, in other words $f(x)$ never gets close to $1$ because no matter what neighborhood you pick, $x = 1$ is in that neighborhood. If however you chose to go with definition 2, $x = 1$ is deleted from the neighborhood and $f(x)$ actually approaches $1$.
I have seen definition 1 more in the context of continuity, where it is implicit that $f(x_0)$ equals its limit at $x_0$.
