15 lines for dynamical connection and Green functions

15 lines for dynamical connection and Green functions

Here is my “discovery code” used over the weekend to detect first experimentally that there are dynamical connection and green function matrices which are inverse of each other. I might talk about the proof next time. But first to the experiments. I take here a concrete example of a finite abstract simplicial complex G which has some symmetry then chose a random automorphism T of this complex then compute the dynamical connection matrix L and dynamical Green function matrix g and check that they are inverse of each other and that the sum of the Green function entries is the Euler characteristic (the potential energy theorem). Unlike for the previously considered case, where T was the identity, we do not always have that det(L) is the Fermi characteristic. We still have to explore what the meaning of det(L) is. It is always either 1 or -1 and it obviously depends on the transformation T whether it is the Fermi characteristic or not. We guess at the moment that it is some sort of signature restricted to the odd dimensional simplices. We also do not understand the spectrum yet. Unlike when T is the identity, the spectrum can now become complex as the matrices are no more symmetric in general. In the case of the identity we were able to “hear the Euler characteristic” as it was the number of positive minus the number of negative eigenvalues. This is no more true in general and the question is what the spectrum tells about the dynamics T. As for now, here is just the code. As usual, I keep it independent of anything else. It is a poem. One should be able to read this also in 1000 years when languages have long morphed. Below are the matrices in a particular case, where T={7, 6, 5, 4, 3, 1, 2}. Then afterwards, I plot the eigenvalues in the complex plane. in this case, they form a cross on the axes but that is not always the case.

(* Dynamic Connection and Green functions, September 13, 2025, Oliver Knill                *)
CleanGraph[s_]:=AdjacencyGraph[AdjacencyMatrix[s]];CleanComplex[G_]:=Union[Sort[Map[Sort,G]]];
Generate[A_]:=If[A=={},A,CleanComplex[Delete[Union[Sort[Flatten[Map[Subsets,A],1]]],1]]];
Whitney[s_]:=Generate[FindClique[s,Infinity,All]]; L=Length; w[x_]:=-(-1)^L[x];
CC[G_,x_]:=Module[{U={}},Do[If[SubsetQ[x,G[[k]]],U=Append[U,G[[k]]]],{k,L[G]}];U]; (* core *)
UU[G_,x_]:=Module[{U={}},Do[If[SubsetQ[G[[k]],x],U=Append[U,G[[k]]]],{k,L[G]}];U]; (* star *)
F[G_,k_]:=Map[Sort,Select[G,L[#]==k&]];Euler[G_]:=Total[Map[w,G]];Prod[X_]:=Exp[Total[Log[X]]];
S[G_,T_]:=Module[{V=Flatten[F[G,1]]},Table[V[[j]]->T[[j]],{j,L[V]}]];Fermi[G_]:=Prod[Map[w,G]];
AutQ[G_,T_]:=Module[{H=F[G,2],V=Flatten[F[G,1]]},H==Sort[Map[Sort,(H/.S[G,T])]]];
FindAut[G_]:=Module[{V=Flatten[F[G,1]],T},T=Permute[Range[L[V]],RandomPermutation[L[V]]];
   While[Not[AutQ[G,T]],T=Permute[Range[L[V]],RandomPermutation[L[V]]]]; T];
t=CompleteGraph[{2,3,2}]; G=Whitney[t]; n=L[G]; T=FindAut[G];  ST=S[G,T]; IS=Intersection;
l[G_,T_]:=Table[x=G[[i]];y=G[[j]]/.ST;          Euler[IS[CC[G,x],CC[G,y]]],{i,n},{j,n}];
g[G_,T_]:=Table[x=G[[i]];y=G[[j]]/.ST;w[x]*w[y]*Euler[IS[UU[G,x],UU[G,y]]],{i,n},{j,n}];
{ Inverse[l[G,T]]==Transpose[g[G,T]],  Total[Flatten[g[G,T]]]==Euler[G] }  (* always true  *)
{ Det[l[G,T]]==Fermi[G] , Total[Sign[N[Eigenvalues[l[G,T]]]]]==Euler[G] }  (* not always   *)