4. Solve the system $\left\{\begin{array}{l}x^{2}-2 y+1=0 ; \\ y^{2}-4 z+7=0 \\ z^{2}+2 x-2=0 .\end{array}\right.$
Answer: $x=-1, y=1, z=2$.

Solution: Adding all three equations, we get $x^{2}-4 x+y^{2}-2 y+z^{2}-4 z+6=0$. By completing the square, we obtain $(x+1)^{2}+(y-1)^{2}+(z-2)^{2}=0$, from which $x=-1$, $y=1, z=2$. Verification shows that the specified values are a solution to the system.