Solution (source code)

= Solution

The <Theorema Egregium> states that <Gaussian curvature> is determined by the first fundamental form, and therefore preserved by local isometries. For a local surface parametrization $r$, write $g_{ij}=r_i\cdot r_j$, choose a <unit normal> $N$, and set $b_{ij}=r_{ij}\cdot N$. Decomposing the second <derivatives> into tangent and normal parts gives
$$
r_{ij}=\Gamma_{ij}^k r_k+b_{ij}N,\qquad
N_i=-b_i{}^k r_k,\qquad
\Gamma_{ij}^k=\tfrac12g^{k\ell}(\partial_i g_{j\ell}+\partial_j g_{i\ell}-\partial_\ell g_{ij}).
$$
Commute the third partial <derivatives> of $r$ and take tangent components. The terms involving <derivatives> of $b$ are normal; the tangent terms give the <Gauss equation>
$$
\langle R(\partial_1,\partial_2)\partial_2,\partial_1\rangle
=b_{11}b_{22}-b_{12}^2,
$$
where $R$ is computed from <derivatives> and products of the displayed Christoffel symbols, using $R(X,Y)Z=\nabla_X\nabla_YZ-\nabla_Y\nabla_XZ-\nabla_{[X,Y]}Z$. For example the tangent term from differentiating $b_{ij}N$ is $-b_{ij}b_k{}^\ell r_\ell$, which produces exactly the difference of the two products on the right. Consequently
$$
\boxed{K=\frac{b_{11}b_{22}-b_{12}^2}{\det g}
=\frac{\langle R(\partial_1,\partial_2)\partial_2,\partial_1\rangle}{\det g}.}
$$
The last expression depends only on $g$ and its <derivatives>. Pulling back $g$ under a local isometry therefore preserves $K$, proving the theorem.