4. For real numbers $a, b, c$, satisfying:
$$
a+b, b+c, c+a \in [0,1] \text{.}
$$

Find the maximum value of $a^{2}+b^{2}+c^{2}$.
4. By symmetry, without loss of generality, let $a \geqslant b \geqslant c$.

Since $b-c$ and $b+c$ are both non-negative real numbers, we have
$$
b^{2} \geqslant c^{2} \text {. }
$$

Similarly, $1-b-a$ and $1-b+a$ are both non-negative real numbers.
$$
\begin{array}{l}
\text { Then }(1-b)^{2} \geqslant a^{2} \\
\Rightarrow a^{2}+b^{2}+c^{2} \leqslant(1-b)^{2}+2 b^{2} \\
\quad=1-b(2-3 b) .
\end{array}
$$

Given $1 \geqslant a+b \geqslant 2 b, 2 b \geqslant b+c \geqslant 0$, we know
$$
b \in\left[0, \frac{1}{2}\right] \text {. }
$$

For $b \in\left[0, \frac{1}{2}\right], b(2-3 b) \geqslant 0$, thus, $a^{2}+b^{2}+c^{2} \leqslant 1$, with equality when $(a, b, c)=(1,0,0)$.