Solution (source code)

= Solution

Take $\mathbf n$ to be the <unit normal>, so $P(v)=v-\langle v,\mathbf n\rangle\mathbf n$ is <orthogonal projection> onto $TM$. With $D$ the Euclidean <Levi-Civita connection>, the proposed derivative is
$$
\nabla_XY=P(D_{\widetilde X}\widetilde Y)|_M.
$$
It is a smooth tangent field, and independence of the extensions is given. Linearity follows from linearity of $D$ and $P$. Moreover, for $f\in C^\infty(M)$, take local extensions of $f,X,Y$ to obtain
$$
\nabla_{fX}Y=f\nabla_XY,\qquad \nabla_X(fY)=X(f)Y+f\nabla_XY,
$$
since $PY=Y$. Thus it is an <affine connection> on $M$.

For tangent fields $Y,Z$, the normal component of $DY$ pairs to zero with $Z$. Differentiating the ambient <inner product> along $X$ gives
$$
Xg(Y,Z)=\langle D_XY,Z\rangle+\langle Y,D_XZ\rangle
=g(\nabla_XY,Z)+g(Y,\nabla_XZ).
$$
Hence it is a <metric connection> for the induced <Riemannian metric>. The ambient torsion vanishes, so
$$
\nabla_XY-\nabla_YX=P(D_XY-D_YX)=P[X,Y]=[X,Y].
$$
Here the restriction of the ambient bracket is the intrinsic bracket and is tangent to $M$: <derivations> of functions restricted to $M$ give the same bracket, or this follows in submanifold coordinates. Thus the projected derivative is also a <torsion-free connection>. Uniqueness now proves
$$
\boxed{\nabla\text{ is the Levi-Civita connection of the induced metric.}}
$$
This is the <projected ambient connection>. The projection formula requires a <unit normal>. If a nonunit normal is used, its normal term must instead be $\langle DY,\mathbf n\rangle\mathbf n/\langle\mathbf n,\mathbf n\rangle$. For example, on the unit <circle>, taking $\mathbf n=2p$ and differentiating its unit tangent along itself gives $DY=-p$; the unnormalized printed expression would be $3p$, which is not tangent. Normalizing the normal removes that ambiguity.