4. Let the three medians $A D, B E, C F$ of $\triangle A B C$ intersect at point $G$. If $B C=a, C A=b, A B=c$, then the value of $A G^{2}+$ $B G^{2}+C G^{2}$ is ( ).
(A) $\frac{1}{3}\left(a^{2}+b^{2}+c^{2}\right)$
(B) $\frac{2}{3}\left(a^{2}+b^{2}+c^{2}\right)$
(c) $\frac{1}{3}(a b+b c+c i)$
(D) $\frac{2}{3}(a b+b c+c a)$
4. A.

From the median length formula of a triangle, we have
$$
\begin{array}{l}
2\left(A G^{2}+B G^{2}\right)=A B^{2}+(2 F G)^{2} \\
=A B^{2}+C G^{2} .
\end{array}
$$

Similarly, $2\left(B G^{2}+C G^{2}\right)=B C^{2}+A G^{2}$,
$$
2\left(C G^{2}+A G^{2}\right)=A C^{2}+B G^{2} \text {. }
$$

Adding the three equations and simplifying, we get
$$
\begin{array}{l}
A G^{2}+B G^{2}+C G^{2} \\
=\frac{1}{3}\left(A B^{2}+B C^{2}+C A^{2}\right)=\frac{1}{3}\left(a^{2}+b^{2}+c^{2}\right) .
\end{array}
$$