# Why is interchanging the order of limits in this situation equivalent to asking for continuity?

The following is an excerpt from Rudin's book in mathematical analysis. Here he states:

The part highlighted in red is the one I can't seem to wrap my head around. I thought that if we wanted to know whether the limit, say $f$, of a sequence of functions, say $f_n$, is continuous or not then we would just need: $$\lim_{t\to x} (\lim_{n \to \infty}f_n(t)) = f(x)$$

I.e. just that the limit of functions $f_n$, assumed to be $f$, is continuous by definition. So I don't understand the right hand side of the equation in red. Can somebody explain this?

To ask, whether $f$, given by $f(t) := \lim_n f_n(t)$ for each $t$, is continuous at $x$, is asking whether $$\tag 1 \lim_{t\to x} f(t) = f(x)$$ Now, let's plug in the definition of $f$ as the limit of the $f_n$ on both sides of (1). We get (as both $f(x) = \lim_n f_n(x)$ and $f(t) = \lim_n f_n(t)$ hold), that $$\tag 2 \lim_{t\to x} \lim_n f_n(t) = \lim_n f_n(x)$$ As the $f_n$ are continuous by assumption, we may write $f_n(x) = \lim_{t\to x} f_n(t)$ in (2), giving us $$\tag 3 \lim_{t\to x} \lim_n f_n(t) = \lim_n \lim_{t\to x} f_n(t)$$ which is Rudin's red formula.

Since each $f_n$ is continuous, $\lim\limits_{t \to x}f_n(t)=f_n(x).$ By definition of the limit function (used on the last equality to come), $\lim\limits_{n \to \infty} \lim\limits_{t \to x} f_n(t)=\lim\limits_{n \to \infty} f_n(x)=f(x)$.

By definition of a continuous function $$\lim_{t \rightarrow x} f(t) = f(x) \qquad (A)$$

We have a series of continuous functions, so we may add index $n$ to each one of these in the previous expression.

$$\lim_{t \rightarrow x} f_n(t) = f_n(x) \qquad (B)$$

We also have the recently introduced definition of a limit function, marked by (1) in the text. Below we replaced $x$ with $t$ without loss of generality

$$f(t) = \lim_{n \to \infty} f_n (t) \qquad (C)$$

Now, we may take (A) as a starting point and do the following $$\lim_{t \to x} \underbrace{ \lim_{n \to \infty} f_n(t) }_\text{f(t) of (A) replaced by (C)} = \underbrace{ \lim_{n \to \infty} f_n(x) }_\text{right hand side of (A) replaced by (C)} = \lim_{n \to \infty} \underbrace{ \lim_{t \to x} f_n(t) }_\text{replaced by left hand side of (B)}$$