Exercise 4.6(b) of do Carmo, Riemannian Geometry 
Let $M$ be a Riemannian manifold. $M$ is a locally symmetric space if $\nabla R = 0$, where $R$ is the curvature tensor of $M$. Prove that if $M$ is locally symmetric, conneced, and has dimension two, then $M$ has constant sectional curvature.

Here are my thoughts:
We consider the curvature tensor $R : \mathcal X(M) \times \mathcal X(M) \times \mathcal X(M) \times \mathcal X(M) \to \mathcal D(M)$ defined by
\begin{align}
R(X,Y,Z,W) &:= \langle R(X,Y)Z,W \rangle \\ 
&:= \langle \nabla_Y\nabla_XZ-\nabla_X\nabla_YZ+\nabla_{[X,Y]}Z,W\rangle
\end{align}
Also consider the sectional curvature defined by
$$
K(X,Y):=\frac{\langle R(X,Y)X,Y\rangle}{|X|^2|Y|^2-\langle X,Y\rangle^2}.
$$
Since $M$ is a locally symmetric space, $\nabla R(X,Y,Z,W)=0$ for all vectors $X,Y,Z,W \in \mathcal X(M)$, and so $R(X,Y,Z,W)=\text{const.}$. As such (?),
$$
K(X,Y)=\frac{\langle R(X,Y)X,Y\rangle}{|X|^2|Y|^2-\langle X,Y\rangle^2}=\frac{R(X,Y,X,Y)}{|X|^2|Y|^2-\langle X,Y\rangle^2}=\text{const.}
$$
First, I was not sure how the denominator $|X|^2|Y|^2-\langle X,Y \rangle^2$ would be constant, so that the whole expression would be constant.
Moreover, in dimension two, there are only two linearly independent vectors. So naturally (since sectional curvature must input two linearly independent vectors), there can only be one expression $K(X,Y)$ up to permutations, as $K(Y,X)=K(X,Y)$. This must be why the hypothesis requires that $M$ have dimension $2$, I think? Because I guess if $M$ has instead dimension $3$, then there can be $K(X,Y)$, $K(X,Z)$ and $K(Y,Z)$, but could these end up with different constants simultaneously and would that pose a problem? I guess I'm also looking for a counterexample for dimension $3$.

N.B.: This question has already been asked here, but I don't think anyone really answered that question. So mine should not be construed as a duplicate.
 A: Let $\gamma \colon [0,1] \rightarrow M$ be a smooth curve and set $\gamma(0) = p$. Choose an orthonormal basis $e_1,e_2 \in T_p M$ and parallel transport it along $\gamma$ to get a parallel frame $e_1(t),e_2(t)$. Denote by $e^1(t), e^2(t)$ the dual coframe which is also parallel by the properties of the covariant derivative. Then $(e^{i} \otimes e^{j} \otimes e^{j} \otimes e^{l})_{1 \leq i,j,k,l \leq 2}$ is a parallel frame of $(T^{*}M)^{\otimes 4}$, again by the properties of the covariant derivative (Leibniz rule). Write 
$$R(t) = R_{ijkl}(t) e^i(t) \otimes e^{j}(t) \otimes e^k(t) \otimes e^l(t), \\
K(t) = K(X(t),Y(t)) = \left< R(t)(e_1(t),e_2(t))e_1(t), e_2(t) \right> = R_{1212}(t).  $$
Since $\nabla R = 0$ and our frame is parallel, we have
$$ 0 = \frac{DR}{dt} =  \dot{R}_{ijkl}(t) e^{i}(t) \otimes e^j(t) \otimes e^k(t) \otimes e^l(t) $$
which means that the components of the Riemann curvature tensor are constant in this frame. Up to this point, everything I wrote works in arbitrary dimension. However, when $\dim M = 2$, the only non-trivial component is $R_{1212}(t)$ which is just the sectional curvature of $M$ at $\gamma(t)$ (this is meaningful only because $\dim M = 2$). Since $\dot{K}(t) = 0$ we see that $K(t)$ is constant along $\gamma$ so the sectional curvature is constant along curves. Since $M$ is connected, we see that the sectional curvature is constant.
