Energy of a simplicial complex

The energy theorem tells that the sum over all g(x,y) is the Euler characteristic of a complex G, if g is the Green's function, the inverse of the connection matrix of G. A rehearsal of 10/9/2017 for a talk on 10/10/2017.
I) I used the notation {(12),(23),(1),(2),(3)} to save curly brackets and commas. {{1,2},{2,3},{1},{2},{3}} would been better. II) The prove that omega(x) = i(x) is an index verifies in full generality that the Euler characteristic is invariant under Barycentric refinement. This follows also from the Barycentric refinement operator. III) Integral geometric approaches to Gauss-Bonnet have along tradition as the Blaschke-Chern-Banchoff generation line shows. I asked at various occasions what curvature we get if we gake normalized volume measure P on a compact Riemannian manifold and for every x, we assign either a heat signature function y o exp(-t L)(x,h) or y -> g(x,y) for the Green function on the manifold is taken. IV) A hyperbolic structure allows to define Morse cohomology. Almost by definition, Morse cohomology for the gradient flow of dim is simplicial cohomology of G. V) The proof of multiplicative Poincare-Hopf needs for the valuation argument that psi(G+x) = 0 if we glue a new cell along a complete complex. This can be analyzed by looking at the cycle structure of the Fredholm determinant and is related to the fact that the Fredholm determinant of the adjacency matrix of a complete graph is zero. VI) The talk mentions Boolean algebra. It is only a Boolean lattice. The fact that the class of subcomplexes does not form a Boolean algebra was one reason why it took so long for me to find a proof of unimodularity. VII) In McKean-Singer, str(L^-t))=X(G) only works for t=1 unlike in the Hodge case, where it is just a manifestation of super symmetry. VIII) There is more to potential energy. We take the uniform measure (which maximizes entropy). One can look for example at the minimal energy mass on a subcomplex as in classical potential theory. Entropy and Euler characteristic both enjoy naturalness (uniqueness theorems of Shannon for entropy and Meyer of Euler characteristic). Its natural to look at Helmholtz free energy. Already for small complexes, catastrophic phase transitions occur when changing temperature.
Here is 6 the line Mathematica code computing the energy and Euler characteristic in the case of a complex generated by a set A. The example is the Klein bottle, a complex of Euler characteristic 0, Fermi characteristic 1 and f-vector (8,24,16). To the right, we see the graph of its Barycentric refinement G1 (whose Whitney complex is the Barycentric refinement as a complex). It is the graph in which we do the thinking. The vertices of this graph are the sets of G. Talking about a unit sphere in this graph is more intuitive than talking about links or other constructs in G.
Omega[x_]:=-(-1)^Length[x];   DJ[a_,b_]:=DisjointQ[a,b]; 
EulerChi[G_]:=Total[Map[Omega,G]];
FermiPhi[G_]:=Exp[Total[Log[Map[Omega,G]]]];
Generate[A_]:=Delete[Union[Sort[Flatten[Map[Subsets,A],1]]],1]
CL[G_]:=Table[If[DJ[G[[k]],G[[l]]],0,1],{k,Length[G]},{l,Length[G]}];
Energy[G_]:=Total[Flatten[Inverse[CL[G]]]];
A={{2,3,7},{1,2,3},{1,3,5},{1,5,7},{1,4,7},{2,4,6},{1,2,6},{1,6,0},
   {1,4,0},{2,4,0},{3,4,7},{3,4,6},{3,5,6},{5,6,0},{2,5,0},{2,5,7}};
G = Union[Map[Sort,Generate[A]]]; L = CL[G];
Print[{Det[L],FermiPhi[G]}]; Print[{Energy[G],EulerChi[G]}];
And here is a tweeted 140 Character code of the Energy computation of the example given in the talk:
L[G_]:=Table[If[DisjointQ[G[[k]],G[[l]]],0,1],{k,Length[G]},{l,Length[G]}]
X[G_]:=Total[Flatten[Inverse[L[G]]]]
X[{{1,2},{2,3},{1},{2},{3}}]
And this is the first preparation board when organizing the talk.