TITLE: Limit at endpoints
QUESTION [6 upvotes]: The definition of limit states (Spivak):

The function $f$ approaches the limit $l$ near $a$ means: for every
  $\varepsilon >0$ there is some $\delta >0$ such that, for all $x$, if
  $0< |x-a|<\delta$, then $|f(x)-l|<\varepsilon$.

and if its not true that $f$ approaches $l$ near $a$:

There is some $\varepsilon>0$ such that for every $\delta>0$ there
  is some $x$  which satisfies $0<|x-a|<\delta$ but not
  $|f(x)-l|<\varepsilon$.

There are some textbooks that provide the definition of limit with the additional condition "for all $x \in D_{f}\dots$", but it seems to me that Spivak doesn't find it necessary.
So, supposing this condition is neither logically necessary nor implicit, suppose $\lim_{x\to a^{+}}g(x)=L$ for some function $g:[a,b]\to \mathbb{R}$.  In order to verify that actually $\lim_{x\to a}g(x)=L$, we could prove that the negated form of the limit definition above is false for $g$ near $a$. However, when $x<a$, $x$ is outside de domain of $g$, and $f(x)$ is not defined. So, perhaps, it's not the case that we have a vacuously true statement, because testing the veracity of an expression containing $|f(x)-L|$ does not even make logical sense at all. 
What happens in a logical statement when a free variable takes a particular instance that turns an expression of it into nonsense? The statement should be ignored as a whole?
In the example above, when $x<a$, for any $\delta>0$ there are plenty of $x$ which satisfy $0<|x-a|<\delta$. But, is it true that  $|f(x)-L|<\varepsilon$?
By which logical means does the definition of limit given still applies when $g$ approaches $a$?

REPLY [3 votes]: A couple of things: As far as I know, the $x\in{D}_f$ is necessary. Spivak is being slightly sloppy, in that when he states for all $x$, he is assuming that $x$ is in the domain of $f$. Afterall, if not, as you note, $f(x)-L$ has no meaning to it. In fact, if you are being precise about it, the domain of a function is a implicitly carried forward. For example, if you consider the sine function on $[0,2\pi]$ and the sine function defined on the whole real line. They are both functions, but certainly are not the same function. (Think about the definition of a function in terms of a set of ordered pairs). 
However is this inability to plugin numbers really a problem? To me this seems to be related to modus ponens in the following way: Consider the statement: if $l_1, l_2$ are two non-parallel lines, then they intersect. Now suppose that you plugin $0$ for $l_1$ and $1$ for $l_2$. Now the statement if $0, 1$ are two non-parallel lines, then they intersect is still true. But the problem is that you can't conclude that $0$ intersets $1$ as a result (i.e. $p$ implies $q$ is true, but in order to conclude $q$ you need $p$ to hold too). So in some sense the issue you raise "non-sensical" things being plugged in is always there, but it doesn't really cause any problems, because while you can plugin "garbage", they don't yield the things you want through modus ponens.