# Limit of a function as accumulation point

In the context of this answer to another question about representing I thought of the following possible description of the limit of a function:

$\lim_{x\to a}f(x)=y$ iff $(a,y)$ is an accumulation point of $f$ (interpreted as a set of pairs) and there's no $y′≠y$ so that $(a,y′)$ is also an accumulation point of $f$.

Now my question is: Is that claim correct?

-
Well, first of all, you would need that $(a,y)$ is an accumulation point, since $x$ is a bound variable in the expression. (And similarly, $(a,y')$...) Not sure if that is enough to make the statements equivalent. – Thomas Andrews Aug 8 '12 at 20:01
Oops, you're right. I'll immediately fix that. – celtschk Aug 8 '12 at 20:02

This would work in a compact space, in which values $y'$ that don't tend to the limit have to have some other accumulation point. However, if the space is not compact, there need no be a second accumulation point. For instance, the function
$$f(x)=\begin{cases}1/x&1/x\in\mathbb N\\0&\text{otherwise}\end{cases}$$
has no limit for $x\to0$, but according to your description it would, since $(0,0)$ is the only accumulation point of the set of pairs.
So if I first compactify the codomain of $f$, then it works? – celtschk Aug 8 '12 at 20:35