Solution (source code)

= Solution

Normalize the nonvanishing loop to $\gamma(t)/|\gamma(t)|$. A continuous <argument> lift is a <continuous function> $\theta:[0,1]\to\mathbb R$ such that $\gamma(t)/|\gamma(t)|=e^{i\theta(t)}$. Such a lift exists on an interval; any two differ by a constant <integer> multiple of $2\pi$. The <winding number> is
$$
\boxed{w(\gamma;0)=\frac{\theta(1)-\theta(0)}{2\pi}\in\mathbb Z.}
$$
Its value is independent of the lift. This definition applies to continuous loops without assuming a differentiable contour.

The <homotopy invariance of winding number> states: if $H:[0,1]^2\to\mathbb C\setminus\{0\}$ is continuous and $H(s,0)=H(s,1)$ for every $s$, then $w(H(s,\cdot);0)$ is independent of $s$. Neither the loops nor their moving basepoints may pass through zero. One may justify invariance by uniformly subdividing the <homotopy> into nearby loops whose normalized values have a continuous argument difference of magnitude less than $\pi$; that argument difference has equal endpoint values, so their <winding numbers> agree.