# Constant sectional curvature and unit normal vector to a hypersurface totally geodesic

I was reading about hypersurfaces totally geodesic when I found the next proposition:

The sectional curvature $K$ of $M$ is constant at $p$ if and only if every unit vector in $T_{p}(M)$ is normal to a hypersurface totally geodesic at $p.$ The proof is following by Codazzi equation.

I'm stuck proving this.

If $K$ is constant, we get from Codazzi equation that $R_{xy}x=K(\langle x,x\rangle y-\langle x,y\rangle x).$ Then,for nonnull $x\perp y$such equation becomes $R_{xy}x=\langle x,x\rangle K(x,y) y.$ But I don't get how this works to prove that each unit vector on $T_{p}M$ is normal to a hypersurface totally geodesic. I know that a semi-Riemann submanifold is totally geodesic if the shape tensor vanishes:$II=0$ but I can't see how this works with the above to get the desire result.

For the other direction I'm not sure how to proceed to get that $K$ is constant.

Any kind of help is thanked in advanced.