Connection between limits of sequences and limits of functions on topological spaces Let $(X,\mathcal{T}_{1})$ and $(Y,\mathcal{T}_{2})$ be topological spaces. Let $\mathcal{U}_{x}$ denote the neighbourhood system of a point $x$.

*

*Let $A\subseteq X$ and let $f:A \rightarrow Y$ be a map. A point $y\in Y$ is called a limit of $f$ at a point $x_{0}\in X$ if for all neighbourhoods $V$ of $y$ there exists a neighbourhood $U$ of $x_{0}$ such that $f(U\cap A)\subseteq V$. We write for this $y=\lim \limits_{\substack{x\rightarrow x_{0}\\ x\in A}} f(x)$. So we have
\begin{align*}
y=\lim\limits_{\substack{x\rightarrow x_{0}\\ x\in A}}f(x)\quad\Longleftrightarrow\quad
(\forall V\in \mathcal{U}_{y})(\exists U\in\mathcal{U}_{x_{0}}):f(U\cap A)\subseteq V
\end{align*}


*Let $(x_{n})_{n\in\mathbb{N}}$ be a sequence, i.e. a map $\mathbb{N}\rightarrow X$ defined as $n\mapsto x_{n}$. A point $x\in X$ is called limit of $(x_{n})_{n\in\mathbb{N}}$ if for all neighbourhoods $U$ of $x$ there exists a $n\in\mathbb{N}$, such that $x_{m}\in U$ for all $m\geq n$. We write for this $x=\lim\limits_{n\rightarrow \infty} x_{n}$. So we have
\begin{align*}
x=\lim\limits_{n\rightarrow \infty}x_{n}\quad\Longleftrightarrow\quad (\forall U\in\mathcal{U}_{x})(\exists n\in\mathbb{N})(\forall m\in\mathbb{N}):m\geq n\Rightarrow x_{n}\in U
\end{align*}
I hope I got everything right so far. Anyways, since sequences are special functions it should be possible to define limits just once for functions and then prove the above statement for sequences. I might have to adjust my definitions a bit since the first one defines the limit of a function at a point $x_{0}$, whereas the second one defines the limit of a secuence as $n\rightarrow \infty$. Any ideas?
 A: Your definition of a limit of a function in a topological space is wrong. The limit of a function $f$ at a point $x_0$ should not depend on the values of $f$ at $x_0$, only on its behavior near that point. For instance, let $f: \mathbb R \longrightarrow \mathbb R$ via $f(0) = 1$ and $f(x) = 0$ for all $x \neq 0$. In your definition, there would be no value $\lim_{x \to 0} f(x)$, but we know that this should be $0$. You instead want to say that a limit as $x \to x_0$ of $f$ is some value $y \in Y$ such that for every neighborhood $y \in V$ there is a neighborhood $x_0 \in U$ such that $f[(U - \{x_0\}) \cap A] \subseteq V$. If you're familiar with $\varepsilon-\delta$ limits in analysis, then this is analogous to the fact that we look for $0 < |x - a| < \delta \implies |f(x) - L| < \varepsilon$ to prove $\lim_{x \to a} f(x) = L$, not $|x - a| < \delta \implies |f(x) - L| < \varepsilon$.
Now let me remark as well that this definition is pretty silly unless $x_0$ is a limit point of $A$. Otherwise, there would be some neighborhood $x_0 \in U$ such that $U \cap A \subseteq \{x_0\}$. But then $(U - \{x_0\}) \cap A = \emptyset$ so every single $y \in Y$ would be a limit of $f$ as $x \to x_0$ in $A$.
This brings up another point. You should be very careful writing $\lim_{x \to x_0, x \in A} f(x) = y$, since in general there can be many distinct values of $y$ which work. You will get uniqueness if $Y$ is Hausdorff though. In any case, I'll keep using this notation, but I recommend you heed this warning when you use it as well.
Now, your idea that the limit of a sequence is a special case of the limit of a function is correct. The idea is to consider the set $\mathbb N \cup \{\infty\}$. A map $f: \mathbb N \longrightarrow X$ will then have two interpretations of a limit $\lim_{n \to \infty} f(n)$ - the limit of the function $f$ at $\infty$ on the subspace $\mathbb N \subseteq \mathbb N \cup \{\infty\}$ and the limit of the sequence $\{f(n)\}$. Note that both definitions depend on the topology of $X$, but the former also depends on a topology on $\mathbb N \cup \{\infty\}$ that we haven't defined yet. If we choose this topology right, these definitions will perfectly coincide.
So how do we topologize $\mathbb N \cup \{\infty\}$? Shortly, give $\mathbb N$ the discrete topology and take the one point compactification. Or order $\mathbb N \cup \{\infty\}$ so that $\infty$ is larger than every natural and take the order topology. If you don't know what any of that means, I'll describe this explicitly. The open subsets of $\mathbb N \cup \{\infty\}$ will be the subsets of $\mathbb N$ as well as the subsets $S \subseteq \mathbb N \cup \{\infty\}$ which contain $\infty$ and whose complements are finite. I'll leave it to you to prove that this is a topology. Away from $\infty$ this is uninteresting, but what do the neighborhoods of $\infty$ look like? An essential example is a set of the form $\{\infty\} \cup \{n \in \mathbb N : n \geq N\}$ for some fixed $N$. I'll call this $U_N$. Every neighborhood of $\infty$ in this space will look like some $\{a_1, \dots, a_k\} \cup U_N$. From this it's easy to see that $\infty$ is a limit point of $\mathbb N$.
So now we have two competing notions of what $\lim_{n \to \infty} f(n)$ means for a function $f: \mathbb N \longrightarrow X$ and we want to show that they are the same. Notationally, I'll write the limit of the function $f$ in the former definition as $\lim_{n \to \infty, n \in \mathbb N} f(n)$ and the limit of the sequence as just $\lim_{n \to \infty} f(n)$. I claim that these two are precisely the same. Now, to say $\lim_{n \to \infty} f(n) = y$ as a sequence means that for all neighborhoods $y \in V$ there is some $N \geq 0$ such that for all $n \geq N$ we have $f(n) \in V$. In other words, we have that $f[U_N - \{\infty\}] \subseteq V$. As discussed, $U_N$ is an open neighborhood of $\infty$ so this shows that $\lim_{n \to \infty} f(n) = y$ as a sequence implies that $\lim_{n \to \infty, n \in \mathbb N} f(n) = y$ as a function.
Conversely, let $\lim_{n \to \infty, n \in \mathbb N} f(n) = y$ as a function. Then for any $y \in V$ open we have some $\infty \in U$ open such that $f[U - \{\infty\}] \subseteq V$. We can write $U = \{a_1, \dots, a_k\} \cup U_N$. Thus, we have in particular some $N \geq 0$ such that for all $n \geq N$, $f(n) \in V$. This shows precisely that $\lim_{n \to \infty} f(n) = y$ as a sequence. Hence, the limit of a sequence is indeed a special case of the limit of a function.
