Solution (source code)

= Solution

A connected <smooth manifold> is path connected because it is locally path connected. Each connected component $C$ of the <orientation double cover> is itself path connected. Choose a point of $C$ over $p$. For any $q\in M$, lift a path from $p$ to $q$ starting at that chosen point, using the <path lifting theorem>. The lifted path lies in $C$ and ends above $q$. Therefore every component maps onto $M$.

Fix one fibre, containing exactly two points. Every component meets that fibre, and distinct components meet disjoint subsets of it, so \b[there are at most two connected components].

If $M$ is orientable, a global continuous choice of tangent-space <orientation> $o$ gives two disjoint sheets
$$
M_+=\{(p,o_p):p\in M\},\qquad
M_-=\{(p,-o_p):p\in M\}.
$$
They are open: on a sufficiently small oriented coordinate neighborhood the global choice agrees consistently with one of the two local sheets. Each projects homeomorphically to the connected base, so these are precisely two connected components.

Conversely suppose the cover is disconnected. It has exactly two components $C_+,C_-$. Both project onto the base and each fibre contains only two points, so each component meets every fibre exactly once. The restriction $\pi:C_+\to M$ is consequently a bijective local <diffeomorphism>, hence a global <diffeomorphism>. Transporting the canonical <orientation> of $C_+$ through this map or, equivalently, using its smooth inverse section, gives a global <orientation> of $M$. Thus the <connectedness criterion for the orientation double cover> is
$$
\boxed{M\text{ is orientable}\iff\widehat M\text{ has two components}\iff\widehat M\text{ is disconnected}.}
$$