4. Given $x \cdot y \in\left[-\frac{\pi}{4} \cdot \frac{\pi}{4}\right], a \in \mathbf{R}$, and $\left\{\begin{array}{l}x^{3}+\sin x-2 a=0 \\ 4 y^{3}+\frac{1}{2} \sin 2 y-a=0\end{array}\right.$, then $\cos (x+2 y)=$

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
4. 1 .

Solution: From the original system of equations, we get $\left\{\begin{array}{l}x^{3}+\sin x=2 a \\ (-2 y)^{3}+\sin (-2 y)=2 a\end{array}\right.$, let $f(t)=t^{3}+\sin t$, then $f(t)$ is a monotonically increasing function on $\left[-\frac{\pi}{2}, \frac{\pi}{2}\right]$,
and $x-2 y \in\left[-\frac{\pi}{2}, \frac{\pi}{2}\right]$, and $f(x)=f(-2 y)$ $\therefore x=-2 y$.
Thus, $x+2 y=0 \quad \therefore \cos (x+2 y)=1$.