## Linear extension of “linear” map on dense subset of Banach space

Let $X, Y$ be Banach spaces over the field $\mathbb{F} (= \mathbb{R} \text{ or } \mathbb{C})$.  Let $Q$ be dense in $\mathbb{F}$, $D$ be dense in $X$, such that $D$ is closed under $Q$-linear combinations.  Let $f \in Y^D$, such that for all $x, y \in D$, $p, q \in Q$, $f(px + qy) = pf(x) + qf(y)$ and for all $x \in D$, $\| f(x) \| \le \| x \|$. Then, there exists $T \in L_1(X,Y)$ such that $T|_D = f$.
Proof.
(a)

First, we define $T:X \to Y$.  Let $x \in X$. There exists $(d_n) \subset D$, such that $d_n \to x$.  Define $T(x) := \lim_{n \to \infty} f( d_n )$. We need to check that $T$ is well-defined.  Let $e_n \to x$, $e_n \in D$.  Now, let $\epsilon > 0$.  Then, since $(d_n)$ is Cauchy, there exists $N$ such that $n, m \ge N$ implies $\| d_n - d_m \| < \epsilon$.  Therefore, $\| f(d_n - d_m) \| \le \| d_n - d_m \| < \epsilon,$ so $(f(d_n))$ converges in $Y$.  Now, there exists $N$ such that $n, m \ge N$ implies $\| d_n - x \| < \epsilon, \| e_m - x \| < \epsilon$. Therefore, $\| e_m - d_n \| < 2 \epsilon$, by the triangle inequality.  So $\|f(e_m) - f(d_n) \| < 2 \epsilon$. Hence
$\| \lim_{m \to \infty} f( e_m ) - \lim_{n \to \infty} f( d_n ) \| \le 2 \epsilon.$
Since $\epsilon, x$ were arbitrary we see that $T$ is well-defined on $X$.
(b)

Now, we check that $T$ is linear.
Let $x, y \in X$.  Then, $x = \lim_{n \to \infty} d_n$, $y = \lim_{n \to \infty} e_n$,  where $\{ d_n, e_n : n \in \mathbb{N} \} \subset D$. Then, $T( x + y ) = \lim_{n \to \infty} f( d_n + e_n ) = \lim_{n \to \infty} f( d_n ) + f( e_n ) = T(x) + T(y),$ so $T$ is additive. The demonstration that $T(rx) = rT(x)$, for $r \in \mathbb{F}$ is quite similar.
(c)

Now, we need to show that $T$ is bounded.  $\| T(x) \| = \| \lim_{n \to \infty} f( d_n ) \| = \lim_{n \to \infty} \| f( d_n ) \| \le \lim_{n \to \infty} \| d_n \| = \| x \|.$ Thus $T$ is bounded with $\| T \| \le 1$. $\blacksquare$