Let $E$ be a Hausdorff topological vector space. Then $K\subseteq E$ is compact if and only if $K$ is complete and precompact (i.e., the closure of $K$ in the completion $\hat{E}$ of $E$ is compact).
For the $\Leftarrow$-proof, we can say:$K$ is complete therefore $K=\overline{K}^{\hat{E}}$; $K$ is precompact, therefore $\overline{K}^{\hat{E}}$ is compact. We conclude that $K$ is compact.
Now, why is $K=\overline{K}^{\hat{E}}$? We know that there is an ismorphism $i:E\to\hat{E}$, so we can identify $K$ as a subset of $\hat{E}$, which shows $K\subseteq \overline{K}^{\hat{E}}$. For the other direction, I know that $K=\overline{K}^E$ (i.e., closed in the Hausdorff space $E$, since $K$ is complete). Is $\overline{K}^{\hat{E}}=\overline{K}^E$? Or $K=E\cap \overline{K}^{\hat{E}}$?
Thanks.

For general sets $K$, $\overline K^E = \overline K^{\hat E}$ would be false. But because $K$ is complete in $E$, it will also be complete in $\hat E$. And since complete sets are closed, $\overline K^E = K = \overline K^{\hat E}$.
So why does completeness in $E$ imply completeness in $\hat E$? Suppose $\{v_n\} \subset K$ is a Cauchy sequence in $\hat E$. Let $U$ be a neighborhood of $0$ in $E$. Then there is some neighborhood $\hat U$ in $\hat E$ with $U = \hat U\cap E$. Thus there is some $N$ with $v_n - v_m \in \hat U$ for all $m, n > N$. But $v_n, v_m \in K \subset E$, and so $v_n - v_m \in E$, and thus $v_n - v_m \in \hat U \cap E = U$ for all $n,m > N$. Therefore $\{v_n\}$ is a Cauchy sequence in $E$ as well. Since $K$ is complete in $E$, we have $v_n \to v \in K$, and therefore in $\hat E$ as well.