Let $H_1=(H_1, (\cdot, \cdot )_1)$ and $H_2=(H_2, (\cdot, \cdot )_2)$ be Hilbert spaces. Suppose that $H_1$ is continuously and densely embedded in $H_2$. Simbolically, $H_1 \stackrel d{\hookrightarrow} H_2$. Let $X \subset H_1$ and $Y \subset H_2$ be closed subspaces such that $X \subset Y$, with $X,Y \neq \emptyset$. I know that $$ X=(X, (\cdot, \cdot )_1) \quad \text{and} \quad Y=(Y, (\cdot, \cdot )_2) \tag{1} $$ are Hilbert spaces.
Question. Is $X \stackrel d{\hookrightarrow} Y$?
Its clear for me that, since $X \subset Y$ and due to $(1)$ that $X$ is continuously embedded in $Y$. But I don't know (and I couldn't prove) that $X$ is dense in $Y$. I tried using the Hahn-Banach theorem, but without success.
Of course not, the question fails trivially in this generality: take any Hilbert space $H$ and let $H_1=H_2=H$. Let $X,Y$ be closed subspaces with $X\subset Y$ and $X\neq Y$. If $X$ embeds densely in $Y$ that means that the identity function $i:X\to Y$ maps $X$ to a dense subspace of $Y$, i.e. $X$ is dense in $Y$, i.e. $\bar{X}=Y$. But $X$ is closed, so $X=Y$, a contradiction since $Y\neq X$.