[proofplan]
We prove the equivalence directly in the completion. If $A$ is totally bounded, then the isometry transfers finite ball covers of $A$ to finite ball covers of $i(A)$, and taking the closure only requires a harmless enlargement of the radius. The [closed set](/page/Closed%20Set) $\overline{i(A)}^{\,\widehat X}$ is therefore complete and totally bounded; we prove from these two properties that it is compact. Conversely, if the closure is compact, then finitely many completion-balls cover it, and density of $i(X)$ lets us replace their centers by points coming from $X$, giving a finite ball cover of $A$ in the original metric.
[/proofplan]
[step:Handle the empty set separately]
If $A=\varnothing$, then $i(A)=\varnothing$ and $\overline{i(A)}^{\,\widehat X}=\varnothing$. The empty subset is compact, and it is totally bounded because every required finite cover may be taken to be the empty cover. Hence the theorem holds in this case.
For the remainder of the proof, assume $A\neq\varnothing$.
[/step]
[step:Show that total boundedness of $A$ makes its closure in the completion totally bounded]
Let
\begin{align*}
K:=\overline{i(A)}^{\,\widehat X}\subset \widehat X.
\end{align*}
Assume that $A$ is totally bounded in $(X,d)$. We prove that $K$ is totally bounded in $(\widehat X,\widehat d)$.
Fix $\varepsilon>0$. Since $A$ is totally bounded, there exist points $x_1,\dots,x_n\in X$ such that
\begin{align*}
A\subset \bigcup_{j=1}^n B_d(x_j,\varepsilon/3).
\end{align*}
We claim that
\begin{align*}
K\subset \bigcup_{j=1}^n B_{\widehat d}(i(x_j),\varepsilon).
\end{align*}
Let $y\in K$. Since $K$ is the closure of $i(A)$ in $\widehat X$, there exists $a\in A$ such that
\begin{align*}
\widehat d(y,i(a))<\varepsilon/3.
\end{align*}
Choose $j\in\{1,\dots,n\}$ with $d(a,x_j)<\varepsilon/3$. Because $i$ is an isometry,
\begin{align*}
\widehat d(i(a),i(x_j))=d(a,x_j)<\varepsilon/3.
\end{align*}
The triangle inequality in $(\widehat X,\widehat d)$ gives
\begin{align*}
\widehat d(y,i(x_j))\le \widehat d(y,i(a))+\widehat d(i(a),i(x_j))<2\varepsilon/3<\varepsilon.
\end{align*}
Thus $K$ is covered by finitely many $\widehat d$-balls of radius $\varepsilon$, so $K$ is totally bounded.
[/step]
[step:Prove that a complete totally bounded metric space is compact]
We use the following elementary compactness criterion.
[claim:Every complete totally bounded metric space is compact]
Let $(M,\rho)$ be a complete totally bounded [metric space](/page/Metric%20Space). Then $M$ is compact.
[/claim]
[proof]
Let $\mathcal U$ be an [open cover](/page/Open%20Cover) of $M$. Suppose, for contradiction, that no finite subcollection of $\mathcal U$ covers $M$.
Since $M$ is totally bounded, finitely many open $\rho$-balls of radius $1$ cover $M$. At least one of these balls has closure in $M$ which cannot be covered by finitely many members of $\mathcal U$; call that closed set $F_1$. Inductively, once a nonempty closed set $F_m\subset M$ has no finite subcover from $\mathcal U$, choose points $z_1,\dots,z_N\in M$ such that the open $\rho$-balls $B_\rho(z_1,2^{-m}),\dots,B_\rho(z_N,2^{-m})$ cover $F_m$. At least one of the closed intersections
\begin{align*}
F_m\cap \overline{B}_\rho(z_\ell,2^{-m})
\end{align*}
for $\ell\in\{1,\dots,N\}$ has no finite subcover from $\mathcal U$; define $F_{m+1}$ to be one such closed intersection. This constructs a nested sequence of nonempty closed sets
\begin{align*}
F_1\supset F_2\supset F_3\supset \cdots
\end{align*}
such that each $F_m$ has no finite subcover from $\mathcal U$ and
\begin{align*}
\operatorname{diam}(F_m)\le 2^{2-m}
\end{align*}
for every $m\ge 2$.
For each $m\in\mathbb N$, choose $p_m\in F_m$. If $r\ge m$, then $p_r,p_m\in F_m$, so
\begin{align*}
\rho(p_r,p_m)\le \operatorname{diam}(F_m).
\end{align*}
Since $\operatorname{diam}(F_m)\to 0$, the sequence $(p_m)_{m=1}^{\infty}$ is Cauchy. Completeness of $M$ gives a point $p\in M$ such that $p_m\to p$ in $(M,\rho)$.
Because $\mathcal U$ covers $M$, choose $U\in\mathcal U$ with $p\in U$. Since $U$ is open, there exists $\delta>0$ such that
\begin{align*}
B_\rho(p,\delta)\subset U.
\end{align*}
Choose $m$ so large that $p_m\in B_\rho(p,\delta/2)$ and $\operatorname{diam}(F_m)<\delta/2$. For every $q\in F_m$,
\begin{align*}
\rho(q,p)\le \rho(q,p_m)+\rho(p_m,p)<\delta/2+\delta/2=\delta.
\end{align*}
Thus $F_m\subset U$, so $F_m$ is covered by the single member $U$ of $\mathcal U$. This contradicts the construction of $F_m$ as a set with no finite subcover. Therefore every open cover of $M$ has a finite subcover, and $M$ is compact.
[/proof]
Now return to
\begin{align*}
K=\overline{i(A)}^{\,\widehat X}.
\end{align*}
The set $K$ is closed in $\widehat X$ by definition of closure. Since $\widehat X$ is complete, every [Cauchy sequence](/page/Cauchy%20Sequence) in $K$ converges in $\widehat X$, and closedness of $K$ forces the limit to belong to $K$; hence $K$ is complete with the restricted metric. From the previous step, $K$ is totally bounded. Applying the claim to the metric space $(K,\widehat d|_{K\times K})$, we conclude that $K$ is compact.
[guided]
The point of this step is to turn the analytic information obtained from [total boundedness](/page/Total%20Boundedness) into topological compactness. We cannot simply say that a closed bounded set is compact, since that is special to finite-dimensional Euclidean spaces. Instead, the correct metric-space replacement is: completeness plus total boundedness implies compactness.
We prove that replacement directly. Let $(M,\rho)$ be complete and totally bounded, and let $\mathcal U$ be an open cover of $M$. Assume that no finite subcollection of $\mathcal U$ covers $M$. Total boundedness gives finitely many balls of radius $1$ covering $M$. If every one of the relevant closed pieces were finitely coverable by members of $\mathcal U$, then their finite union would finitely cover $M$, contradicting the assumption. Hence one closed piece, call it $F_1$, still has no finite subcover.
We repeat this construction. Given a closed set $F_m$ with no finite subcover, total boundedness gives points $z_1,\dots,z_N\in M$ such that the balls $B_\rho(z_1,2^{-m}),\dots,B_\rho(z_N,2^{-m})$ cover $F_m$. At least one closed intersection
\begin{align*}
F_m\cap \overline{B}_\rho(z_\ell,2^{-m})
\end{align*}
for some $\ell\in\{1,\dots,N\}$ still has no finite subcover; otherwise finitely many finite subcovers would cover all of $F_m$. We call that intersection $F_{m+1}$. This gives nested nonempty closed sets
\begin{align*}
F_1\supset F_2\supset F_3\supset \cdots
\end{align*}
whose diameters tend to $0$.
Choose $p_m\in F_m$ for every $m\in\mathbb N$. If $r\ge m$, then both $p_r$ and $p_m$ lie in $F_m$, so
\begin{align*}
\rho(p_r,p_m)\le \operatorname{diam}(F_m).
\end{align*}
Since the diameters tend to $0$, the sequence $(p_m)$ is Cauchy. Completeness of $M$ gives a point $p\in M$ with $p_m\to p$.
Now use the open cover. Choose $U\in\mathcal U$ with $p\in U$. Since $U$ is open, there is $\delta>0$ such that
\begin{align*}
B_\rho(p,\delta)\subset U.
\end{align*}
For $m$ sufficiently large, we have $p_m\in B_\rho(p,\delta/2)$ and $\operatorname{diam}(F_m)<\delta/2$. Then every $q\in F_m$ satisfies
\begin{align*}
\rho(q,p)\le \rho(q,p_m)+\rho(p_m,p)<\delta.
\end{align*}
Therefore $F_m\subset U$, so $F_m$ is covered by one member of $\mathcal U$, contradicting the defining property of $F_m$. This contradiction proves compactness.
Applying this to $K=\overline{i(A)}^{\,\widehat X}$ is legitimate because $K$ is closed in the [complete metric space](/page/Complete%20Metric%20Space) $\widehat X$. A closed subset of a complete metric space is complete: every Cauchy sequence in $K$ converges in $\widehat X$, and closedness puts its limit back in $K$. Since the previous step proved that $K$ is totally bounded, the criterion applies and $K$ is compact.
[/guided]
[/step]
[step:Derive total boundedness of $A$ from compactness of its closure]
Assume conversely that
\begin{align*}
K:=\overline{i(A)}^{\,\widehat X}
\end{align*}
is compact in $\widehat X$. Fix $\varepsilon>0$. The family
\begin{align*}
\{B_{\widehat d}(y,\varepsilon/3):y\in K\}
\end{align*}
is an open cover of $K$. By compactness, there exist points $y_1,\dots,y_n\in K$ such that
\begin{align*}
K\subset \bigcup_{j=1}^n B_{\widehat d}(y_j,\varepsilon/3).
\end{align*}
Since $i(X)$ is dense in $\widehat X$, for each $j\in\{1,\dots,n\}$ choose $x_j\in X$ such that
\begin{align*}
\widehat d(y_j,i(x_j))<\varepsilon/3.
\end{align*}
Let $a\in A$. Since $i(a)\in i(A)\subset K$, choose $j\in\{1,\dots,n\}$ with
\begin{align*}
\widehat d(i(a),y_j)<\varepsilon/3.
\end{align*}
Using the triangle inequality and the isometry property of $i$, we obtain
\begin{align*}
d(a,x_j)=\widehat d(i(a),i(x_j))\le \widehat d(i(a),y_j)+\widehat d(y_j,i(x_j))<2\varepsilon/3<\varepsilon.
\end{align*}
Thus
\begin{align*}
A\subset \bigcup_{j=1}^n B_d(x_j,\varepsilon).
\end{align*}
Since $\varepsilon>0$ was arbitrary, $A$ is totally bounded in $X$.
[/step]
[step:Translate the equivalence into precompactness]
We have proved that $\overline{i(A)}^{\,\widehat X}$ is compact in $\widehat X$ if and only if $A$ is totally bounded in $X$. Under the stated convention, $A$ is precompact precisely when $\overline{i(A)}^{\,\widehat X}$ is compact. Therefore $A$ is precompact if and only if $A$ is totally bounded.
[/step]