4. Solve the system of equations:

$$
\begin{aligned}
& x^{2}+2 y z=1 \\
& y^{2}+2 x z=2 \\
& z^{2}+2 x y=1
\end{aligned}
$$

in the set of real numbers.
4. By adding all 3 equations, we get $(x+y+z)^{2}=4$, i.e., $x+y+z= \pm 2$. By subtracting the third equation from the first, we get $x^{2}-z^{2}+2 y(z-x)=0$, i.e., $(x-z)(x+z-2 y)=0$. We further distinguish four cases.

- $x+y+z=2, x-z=0$ :

By substituting $z=x$ and $y=2-2 x$ into the first equation, we get $-3 x^{2}+4 x-1=0$, whose solution yields 2 solutions: $(x, y, z)=(1,0,1)$ or $(x, y, z)=\left(\frac{1}{3}, \frac{4}{3}, \frac{1}{3}\right)$.

- $x+y+z=-2, x-z=0$ :

By substituting $z=x$ and $y=-2-2 x$ into the first equation, we get $-3 x^{2}-4 x-1=0$, whose solution yields 2 more solutions: $(x, y, z)=(-1,0,-1)$ or $(x, y, z)=\left(-\frac{1}{3},-\frac{4}{3},-\frac{1}{3}\right)$.

- $x+y+z=2, x+z=2 y$ :

From here, it follows that $3 y=2$ and then $x+z=2 y=\frac{4}{3}$, and from the second equation in the problem statement, we get $x z=\frac{2-y^{2}}{2}=\frac{7}{9}$. When we substitute $z=\frac{4}{3}-x$ here, we get $x^{2}-\frac{4}{3} x+\frac{7}{9}=0$, and for the discriminant of this equation, we have $D=\frac{16}{9}-\frac{28}{9}=-\frac{4}{3}<0$, so there are no real solutions here.

- $x+y+z=-2, x+z=2 y$ :

From here, it follows that $3 y=-2$ and then $x+z=2 y=-\frac{4}{3}$, and from the second equation in the problem statement, we get $x z=\frac{2-y^{2}}{2}=\frac{7}{9}$. When we substitute $z=-\frac{4}{3}-x$ here, we get $x^{2}+\frac{4}{3} x+\frac{7}{9}=0$, and for the discriminant of this equation, we have $D=\frac{16}{9}-\frac{28}{9}=-\frac{4}{3}<0$, so there are no real solutions here either.

Therefore, the system under consideration has four real solutions:

$$
(x, y, z) \in\left\{(1,0,1),\left(\frac{1}{3}, \frac{4}{3}, \frac{1}{3}\right),(-1,0,-1),\left(-\frac{1}{3},-\frac{4}{3},-\frac{1}{3}\right)\right\}
$$