# Extending continuous, densely-defined linear maps between locally convex spaces

Let $X$ and $Y$ be locally convex topological vector spaces, say over $\mathbb{C}$. To set the stage a bit, I'll say that the topology on $X$ is given by a separating family of semi-norms $(p_i)_{i \in I}$ and, similarly, the topology on $Y$ is given by a family $(q_j)_{j \in J}$.

Now, suppose that $V \subset X$ is a dense subspace of $X$ and $T : V \to Y$ is a continuous linear map. Does there exist, then, a (unique) continuous extension $\overline T : X \to Y$ of $T$?

The answer is yes for Banach spaces, and this is an incredibly useful fact. The norm seems pretty crucial to the proof though. Any easy counterexamples?

Crucial is the completeness of $Y$. Take any non-complete normed space $V$, choose $Y=V$ and $T$ the identity operator. Let $X$ be the completion of $V$ and assume $\overline{T}:X\to V$ the continuous extension of $T$.
As $V$ is not complete, there is a sequence $(v_n)_n$ in $V$ converging to some $x\in X\setminus V$. Then $\overline{T}(v_n)$ converges to $T(x)\in V$, but $T(v_n)=v_n$, so $x=T(x)\in V$, a contradiction.
If $Y$ is complete, such an extension always exists (see e.g. Theorem 5.1 in F. Treves' book "Topological Vector Spaces, Distributions and Kernels").