4. Let $x \in\left(-\frac{1}{2}, 0\right)$, the size relationship of the following three numbers $\alpha_{1}=\cos (\sin x \pi), \alpha_{2}=\sin (\cos x \pi), \alpha_{3}=\cos (x+1) \pi$ is
(A) $\alpha_{3}<\alpha_{2}<\alpha_{1}$;
(B) $\alpha_{1}<\alpha_{3}<\alpha_{2}$;
(C) $\alpha_{3}<\alpha_{1}<\alpha_{2}$;
(D) $\alpha_{2}<\alpha_{3}<\alpha_{1}$.
4. (A)

Let $y=-x$, then $y \in \left(0, \frac{1}{2}\right)$, and $\alpha_{1}=\cos (\sin y \pi), \alpha_{2}=$ $\sin (\cos y \pi), \alpha_{3}=\cos (1-y) \pi<0$.
Since $\sin y \pi+\cos y \pi=\sqrt{2} \sin \left(y \pi+\frac{\pi}{4}\right) \leqslant \sqrt{2}<\frac{\pi}{2}$,
we have $0<\cos y \pi<\frac{\pi}{2}-\sin y \pi<\frac{\pi}{2}$.
Thus, $0<\sin (\cos y \pi)<\cos (\sin y \pi)$. Therefore, the answer is (A).