The Gauss Bonnet theorem relates the topology of a 2D surface to its intrinsic curvature. A torus has a total curvature of 0 while a sphere has 4π. A double hole torus has −4π as its total curvature. The curvature at a point here is the product of the two principle curvatures at that point. For initial images, the sphere has positive curvature and a saddle seat has negative curvature. The torus has regions of negative curvature.

The elementary symmetric polynomials in the curvatures play a significant role in the upcoming stuff, especially in more than 2 dimensions. Following this we will write ∏k(x, y, ... z) for the k-th elementary symmetric polynomial.
1(x, y, z) = x+y+z
2(x, y, z) = xy+xz+yz
3(x, y, z) = xyz

The total curvature referred to above can now be defined as ∫∏2(k1, k2)ds integrated over the surface embedded in a flat 3 space.

### The Generalized Gauss Bonnet theorem

This theorem was proven only in 1943 and is presented in the very last chapter of Michael Spivak’s five volume “A Comprehensive Introduction to Differential Geometry”. It is a generalization to n-dimensions and involves integrals over the surface of the elementary symmetric polynomial in the principle curvatures.

We will stick with convex bodies at first, sometimes requiring them to be smooth. One way to think about the theorem for convex 3D bodies is to imagine dropping such a body many times on a table so as to leave a mark on the body where it hit. If the orientations are taken to be random, in some sense that we must make precise, then the number of marks within a region of the surface will be proportional to ∫∏2(k1, k2)ds over that region. Your intuition probably tells you that it falls more densely on its pointy parts than on its flat parts. This is true for non smooth bodies with some appropriate extension of the definition of integral, perhaps along the lines of Stieltjes integrals. A cube will almost almost always fall on one of its corners. We say that all of its curvature is concentrated at its corners.

In n-dimensions we say that a k-space is tangent to a convex body B iff it intersects B’s closure but not B’s interior. We thus include lines that touch a 3D convex body but do not penetrate it. The set of planes that touch B in some region of its surface is larger than for regions with more curvature. How do we measure the size of a set of planes? For now imagine a normal ray from the tangency point extending to sphere of some large radius r centered about B. The set of points on the sphere for each of the tangent planes will have some measure m. We take mr−(n−1) as the size of the set of planes. This is nothing new so far. All of this is widely familiar.

Grassmann manifolds provide a measure for sets of spaces of lesser dimensions.
I think that this does Stieltjes integrals over a region of flat space but perhaps not over a surface.