Could anyone please help me to prove that a proximal operator of squared Euclidean distance to a set $\mathcal{C}$ is
$$\operatorname{prox}_{t\operatorname{dist}^2}\left(x\right) = \frac{1}{(t+1)} \left( x + t \operatorname{proj}_{\mathcal{C}}\left( x \right) \right)$$ cf. slide#6.21 in [1]?
The squared distance function is (with $1/2$ scaling):
\begin{align} \operatorname{dist}^2\left(x\right) &= \frac{1}{2}\inf_{y \in \mathcal{C}} \| x - y \|^2 \equiv \frac{1}{2}\|x - \operatorname{proj}_{\mathcal{C}}\left( x \right) \|_2^2. \end{align}
Attempt:
Definition: The proximal mapping of closed convex function $f$ is $$\operatorname{prox}_f\left(x\right) = \arg\min_{z} f(z) + \frac{1}{2t} \| z - x\|_2^2 $$
Let $f(z) := \operatorname{dist}^2\left(z\right) = \frac{1}{2}\|z - \operatorname{proj}_{\mathcal{C}}\left( z \right) \|_2^2$.
To this end, we can plugin the definition of the considered function to the proximal mapping such that \begin{align} &0 = \nabla f(z) + \frac{1}{t}\left(z - x\right) \end{align}
Now, I am unsure about the gradient of squared distance function unless I assume that $\operatorname{proj}_{\mathcal{C}}\left( x \right) \leftarrow\operatorname{proj}_{\mathcal{C}}\left( z \right) $, then $\operatorname{proj}_{\mathcal{C}}\left( x\right)$ will be seen as a constant and straightfoward to compute the gradient of $f(z)$, i.e., the gradient is $\nabla f(z) = z - \operatorname{proj}_{\mathcal{C}}\left( x \right)$, otherwise I don't think it is possible to find the gradient in general, correct? Then, we can find the proximal operator $$z = \frac{1}{(t+1)}\left(x + t\operatorname{proj}_{\mathcal{C}}\left( x \right) \right)$$
I think the problem in my understanding is the gradient of such a squared distance to a set. I will raised another question instead for the clarity.