$A,B$ are locally convex topological spaces, $f:A\to B$ is linear, continuous. I want to verify the adjoint map has dense image in $A^*$ with respect to the weak* topology if and only if $f$ is injective.
Attempted Proof: If $fx=0$ then $\langle fx,g\rangle=0$ for each $g\in A^*$. Hence $\langle x,f^*g\rangle=0$ so the denseness implies $\langle x,g\rangle=0$ for each $g\in A^*$. Thus $x=0$.
On the other hand, suppose the range is not dense. By Hahn Banach, there is some nonzero $g\in A^*$ such that $g(fx)=0$ for each $x\in A$. Then $\langle x,f^*g \rangle=0$ for all $x$. So $f^*g=0$. This is a contradiction since injectivity of $f^*$ means that $g=0$.
Question: Am I using the correct version of Hahn-Banach? And does my argument show that $f^*$ has dense image with respect to the weak topology?