Solution (source code)

= Solution

For $x\in\mathbb R^d$, the <euclidean projection onto a convex set> $C$ is
$$
\boxed{
\pi_C(x)=\operatorname*{argmin}_{z\in C}\|x-z\|_2
}.
$$
The squared distance $z\mapsto\|x-z\|_2^2$ is a <strictly convex function>. Its restriction to the <convex set> $C$ can therefore have at most one minimizer by part (b). Closedness, together with finite dimensionality, supplies existence, although existence was not required to be proved.