Rudin Chapter 1 Problem 19 Suppose $M$ is a dense subspace of a topological vector space $X$, $Y$ is an $F$-space and $\phi : M \rightarrow Y$ is a continuous linear map. Prove that $\phi$ has a continuous linear extension $\phi^{'}:X\rightarrow Y$.
My approach is as follows : Since $Y$ is an $F$ Space hence topology on $Y$ is induced by a complete invariant metric say $d$. Then for each ${n}\in N,$ $B(0,2^{-n})$ is a neighborhood of $0$ in $Y$ and $\phi^{-1}(B(0,2^{-n}))$ is an open set in $M$ say $\phi^{-1}(B(0,2^{-n}))=M\cap V_n$ for some $V_n$ open in $X$, then clearly $V_{n+1} + V_{n+1}\subset V_n$ then for any $x\in X$ and $x_n\in (x+V_n)\cap M$ we have $\{\phi(x_n)\}$ is a cauchy sequence in $Y$ and since $Y$ is complete $\{\phi(x_n)\}$ converges say $\phi^{'}(x)$ be the limit of $\phi(x_n)$.
Now i am not getting how to prove linearity and continuity of $\phi^{'}$.
Any kind of help will be appreciated. Thanks in advance.
 A: Without some topological theorems to draw upon, things are a bit complicated. Rudin gives a suggestion, and you broadly follow that suggestion so far. There's one point where I don't agree with you, I don't think it is actually clear that $V_{n+1} + V_{n+1} \subset V_n$ under the given conditions. I think it is in fact not necessarily true. But it is clear that one can choose a sequence $(V_n)$ of balanced open neighbourhoods in $X$ such that $V_{n+1} + V_{n+1} \subset V_n$ and $\phi(V_n\cap M) \subset B(0,2^{-n})$ for all $n$.
Then, it follows easily that, given $x\in X$, for every sequence $(x_n)$ such that $x_n \in (x + V_n) \cap M$ for all $n$ the sequence $\phi(x_n)$ is a Cauchy sequence in $Y$. For if $m > n > 0$, then $x_n - x_m \in M$ and
$$x_n - x_m \in V_n - V_m = V_n + V_m \subset V_n + V_n \subset V_{n-1},$$
whence $\phi(x_n) - \phi(x_m) = \phi(x_n - x_m) \in B(0,2^{1-n})$.
We want to define $\phi'(x) = \lim\limits_{n\to \infty} \phi(x_n)$. For that, we must check that this is well-defined, i.e. independent of the choice of the sequence $(x_n)$. So let $(y_n)$ be another sequence with $y_n \in (x + V_n) \cap M$ for all $n$. The sequence given by
$$z_n = \begin{cases} x_n &, n \text{ odd} \\ y_n &, n \text{ even} \end{cases}$$
also satisfies $z_n \in (x + V_n) \cap M$ for all $n$, hence by the above $\bigl(\phi(z_n)\bigr)$ is a Cauchy sequence, so $\tilde{z} = \lim\limits_{n\to \infty} \phi(z_n)$ exists. But then
$$\lim_{n\to \infty} \phi(x_n) = \lim_{n\to \infty} \phi(x_{2n+1}) = \lim_{n\to \infty} \phi(z_{2n+1}) = \tilde{z} = \lim_{n\to \infty} \phi(z_{2n}) = \lim_{n\to \infty} \phi(y_{2n}) = \lim_{n\to \infty} \phi(y_n).$$
So indeed $\phi'$ is well-defined.
Now we need to check that $\phi'(x) = \phi(x)$ for $x\in M$. Note that $\phi(x_n) - \phi(x) \in B(0,2^{-n})$ and hence $\lim\limits_{n\to \infty} \phi(x_n) = \phi(x)$, as desired.
Next we show linearity. Given $x,y \in X$, we can choose our corresponding sequences so that in fact $x_n \in (x + V_{n+1}) \cap M$, and analogously for $(y_n)$. Then $(x_n + y_n)$ is an admissible sequence for $x+y$ - $x_n + y_n \in (x + y + V_n) \cap M$ since $V_{n+1} + V_{n+1} \subset V_n$ - and hence
$$\phi'(x+y) = \lim_{n\to\infty} \phi(x_n + y_n) = \lim_{n\to \infty} \bigl(\phi(x_n) + \phi(y_n)\bigr) = \lim_{n\to \infty} \phi(x_n) + \lim_{n\to \infty} \phi(y_n) = \phi'(x) + \phi'(y).$$
Given $x\in X$ and a scalar $c$, we choose $x_n \in \bigl(x + \frac{1}{1+\lvert c\rvert}V_n\bigr)\cap M$, then - by balancedness of $V_n$ - we have $c x_n \in (cx + V_n)\cap M$, and the linearity of $\phi$ gives
$$\phi'(cx) = \lim_{n\to \infty} \phi(c x_n) = c\lim_{n\to \infty} \phi(x_n) = c\phi(x).$$
Finally, we attack the continuity. Since we know that $\phi'$ is linear, it suffices to check continuity at $0$. We shall prove that $\phi'(V_{k+2}) \subset B(0,2^{-k})$ for every $k$. Since these balls form a local basis at $0$ in $Y$, that proves continuity at $0$. So choose $k\in \mathbb{N}$ and let $x \in V_{k+2}$. Choosing a corresponding sequence $(x_n)$, we see that for $n \geqslant k+2$ we have $x_n \in (x + V_n) \cap M \subset (V_{k+2} + V_n)\cap M \subset V_{k+1} \cap M$, and so $\phi(x_n) \in B(0,2^{-k-1})$. Hence
$$d(0,\phi'(x)) = \lim_{n\to \infty} d(0,\phi(x_n)) \leqslant 2^{-k-1} < 2^{-k},$$
i.e. $\phi'(x) \in B(0,2^{-k})$, as claimed.

With some topological background, everything becomes much shorter. Continuous linear maps between topological vector spaces are uniformly continuous, and we have the nice theorem that every uniformly continuous map from a dense subspace $D$ of a uniform space $U$ to a complete uniform space $R$ has a uniformly continuous extension to $U$ (unique if $R$ is Hausdorff). That immediately gives the extension $\phi'$ and its continuity. The linearity then follows by looking at the continuus maps
\begin{aligned}
\alpha &\colon X\times X \to Y,& (x,y) &\mapsto \phi'(x) + \phi'(y) - \phi'(x+y), \\
\beta &\colon \mathbb{C} \times X \to Y,& (c,x) &\mapsto \phi'(cx) - c\phi'(x).
\end{aligned}
They vanish on the dense subspaces $M\times M$ resp. $\mathbb{C}\times M$ of the domain, hence by continuity everywhere, and that is just the linearity of $\phi'$.
