I love short code. My experimentation code for random manifolds had been several dozen lines. I spent the evening yesterday to shorten it to 6 lines. I get a kick of programming on the bottom, without looking anything up. It is like writing a poem. What the program does is to take a simplicial complex (3 examples are added, a 1-manifold, a 3 manifold and a random complex), constructs randomly submanifolds, and averages the Euler characteristic of these spaces, then compares it with what the random manifold theorem tells it should be 2-2K(G)-X(G) . The Monte Carlo computation reports the results after each batch of 1000 manifolds computed. The probability space used is the Bayes space: first role a random number generator p to get a number in [0,1], then computer random Binomial distributed spin field on the vertices, which defines a submanifold. This produces the Bayes measure described first by Bayes in 1763. The spin values are then no more independent (they are now positively correleated) but the random variable giving the number of spin up values is uniformly distributed. Note the minus sign in the e=-Chi[Surface[G,g]] part. This is because sub-manifolds are a priori only delta sets in which the smallest dimensional parts (the points) are 1-simplices. That shifts Euler characteristic. It is reflected in my “index formula” (from 2012).
Generate[A_]:=If[A=={},{},Sort[Delete[Union[Sort[Flatten[Map[Subsets,A],1]]],1]]];
Whitney[s_]:=Generate[FindClique[s,Infinity,All]]; L=Length; R:=Random[]; T=True;
Surface[G_,g_]:=Select[G,SubsetQ[#/.g,{1,2}] &]; w[x_]:=-(-1)^L[x]; Chi[G_]:=Total[Map[w,G]];
K[G_]:=1-Sum[x=G[[k]];w[x]/(L[x]+1),{k,L[G]}]; X[G_]:=2-2K[G]-Chi[G]; V[G_]:=Union[Flatten[G]];
M[G_]:=Module[{k=0,t=0,W=V[G],q=X[G],g,p},While[T,k++;p=R;g=Table[W[[j]]->If[R<p,1,2],{j,L[W]}];
e=-Chi[Surface[G,g]]; t=t+e; If[Mod[k,1000]==0,Print[N[{k,e,q,t/k}]]]]];
G=Whitney[CycleGraph[11]]; M[G];
G=Whitney[GraphJoin[CycleGraph[9],CycleGraph[7]]]; M[G];
G=Whitney[RandomGraph[{15,50}]]; M[G]
Maybe an other philosophical remark here: Humans have always contemplated “happiness”. Arthur C. Brooks has a good formula in his books: it is enjoyment, satisfaction and meaning. I can confirm this personally: there is little joy with writing a program using AI for example. Vibe programming is effective, but it is cheap, it is demoralizing. It does not give joy, it does not give satisfaction. It is outsourcing the work. There is no challenge. It is even agonizing as we begin to realize that we will become irrelevant, that knowledge labor and creativity has become cheap. That there is little purpose in having something done for you. It might be necessary to “have”, but it is not to “be” to say it with Erich Fromm. Prompt generation is easy and is the first skill that will be replaced (Proof: prompt generation has been mastered by millions of folks in the fall of 2022 already. It is easy because you just need to say what you want to do! Last year was the year of AI slop and it has only become more disgusting still how much crab is generated that is cheap kitsch). I myself look back almost with disdain at a time in 2023, when I myself had been producing AI slop, like for these slides, it is even worse than using stock photos or slide templates for presentations. As a technology interested person, I of course had to try out what so called vibe programming can do (and my son helped me to write in 30 minutes a program that would take a kindle book, take screenshots on my linux machine while reading, remove duplicates, OCR it and produce a text.) I have done similar things myself using shell scripts, using tesseract, using diff to remove duplicated pictures, but such things need time, weekends. I have spent the entire summer of 2001 even to write from scratch a C program that would OCR a text because I thought then that OCR using the Hausdorff moment theorem. It needed to read the file, use Fourier theory to figure out how to turn it to have the lines horizontal, then identify the individual letters etc. It was not good and the summer was too short but it was fun and joy. The point is that if can do something complex with immediate gratification, there is no satisfaction because there is nothing to be proud about. Climbing the Matterhorn with a helicopter is not an achievement. I personally had satisfaction and joy running up the Mont Blanc (with a paraglider in the backpack), but I hardly remember a trip to the Aiguille de Midi with the cable car. I love mathematics that I have discovered even if it was already known. It was easier when I was young to think independently. One of the earliest example is the Binomial distribution. Before ever getting exposed to probability, I remember having battled the basic question: what is probability, especially in the context of games? I remember to think as a kid on the alp Salmenfee about the question what the probability is to have a dice show a specific number and I tossed around with definitions like 1: 5 because there is one good case and 5 bad cases. This was the wrong definition. It became clear when thinking about coin tosses. 1:1 would not be a good answer. It is better to use 1/2 there. Then the question comes up what happens, if we have several coins. In that context the Binomial distribution comes up naturally. Discovering such things by experimentation are moments of happiness which nobody can take away from you, even so the knowledge had been discovered already hundreds of years ago. The reason is that many other things come with it. Like what Binomial coefficients are, what the Pascal triangle is, why algebra is powerful. It is much more difficult now to shield ourselves from instant gratification. I think this is the biggest challenge for modern students. There was a similar challenge when the web browser has appeared in 1994 (I remember the big signs “Mosaic is here!” on the SUN workstations at ETH). We have maybe have learned how to manage the web, especially as the greed of companies has made information retrieval almost as difficult as during the good old time of “gopher”. The new challenge is a more difficult. Now, it needs effort and an iron will to stay detached from the “AI gods”, almighty entities that live in the cloud. It will again come better, once the greed of companies (driven by the necessity to get back the investment) will make these tools unbearable. Already now, many students are unable to think without machine any more. Those who can no more think independently are the ones that are replaced first in the future. Having our thinking outsourced is giving away what makes us human. And we might very well be doomed. At the moment, I will like Odysseus need to myself from the enchantment of the sirens who try to lure with irresistible singing. The 1891 painting of Waterhouse illustrates what story ow again in the movies. (I have only seen the 1997 movie Odyssee so far). The problem is that we might not be able to shield ourselves from the AI Sirens song. I currently can still manage to do that. For the project “topics of geometry”, I religiously refused to use any AI, not even for proof reading nor grammar. AI is a cancer. In the climbing allegory, to use it it is like pulling yourself up at the rope or step on a bolt. I have little respect for mathematics that has been done by AI. The biggest satisfaction comes from climbing without cheating, which means in math discovering and developing things without any artificial equipment. Or run a marathon without sitting into a car to drive the distance. Or to spend a Sunday evening to write some computer algebra poem that computes random manifold statistics and not using any help doing that. I myself had a great happy time doing that and will remember that. I hardly will remember the vibe programming of writing a program that hacks a kindle book by OCR’ing it from the screen. The later is “to have”, the former is “to be”. We all know Descartes “cogito ergo sum”. Maybe more relevant these days is “Non cogito, ergo non sum”. Note that this is logically not a consequence of Descartes! It is equivalent to “Sum ergo Cogito”. Together with Descartes, it combines to “cogito” (I think) is equivalent to “sum” (I am). A consequence is that if we start outsourcing our thinking, then we will stop to exist.
