Let $E$ be a (complete) topological vector space, and $u:E\to E$ be continuous. Is it always true that if ${\rm Im}(u)$ is of finite codimension in $E$, then it is closed in $E$ or do we have to assume something on $E$? (It is OK if $E$ is Frechet by the open mapping theorem applied to ${\rm id}\oplus u:F\oplus E\to E$, where $F$ is a supplementary subspace to $E$.)



finite codimension implies closed?
No. For $E$ take $X\oplus \ell\_2$, where $X$ is the direct sum of continuum many copies of the scalar field under the direct sum topology. This is the largest locally convex topology on $X$ and any linear mapping from $X$ into a locally convex space is continous. Write $X=X\_1 \oplus X\_2$ with each $X\_i$ isomorphic to $X$ and $\ell\_2 = Y\_1 \oplus Y\_2$ with $Y\_1$ and $Y\_2$ closed and infinite dimensional. Let $Y\_0$ be a dense codimension one subspace of $Y\_1$. Define $T$ by having $T$ map $X\_1$ one to one onto $X$, $T$ maps $X\_2$ one to one onto $Y\_0$, and $T$ maps $\ell\_2$ isometrically onto $Y\_2$. Then $T$ is one to one, continuous, and maps $E$ onto a dense codimension one subspace of $E$.


