#Scott Carnahan 2022 - public domain # This is some basic code for computing Head characters (meaning the decomposition of the weight spaces in V^\natural into irreducible representations of the monster) and McKay-Thompson series (meaning the graded traces of elements of the monster on V^\natural) in GAP. If you want to run this code, you need to have the GAP CharacterTable library loaded, e.g., using LoadPackage( "ctbllib" ); ct:= CharacterTable("M");; # We start with the coefficients MT[n] of q^n for n \leq 5, written as class functions. The formulas are given by the decomposition of V^\natural_{n+1} conjectured in Table 1a in Conway-Norton ``Monstrous Moonshine'' and proved in section 9 of Borcherds's ``Monstrous moonshine and monstrous Lie superalgebras''. MT := []; MT[1] := Irr(ct)[1] + Irr(ct)[2]; MT[2] := Irr(ct)[1] + Irr(ct)[2] + Irr(ct)[3]; MT[3] := 2*Irr(ct)[1] + 2*Irr(ct)[2] + Irr(ct)[3] + Irr(ct)[4]; MT[4] := 2*Irr(ct)[1] + 3*Irr(ct)[2] + 2*Irr(ct)[3] + Irr(ct)[4] + Irr(ct)[6]; MT[5] := 4*Irr(ct)[1] + 5*Irr(ct)[2] + 3*Irr(ct)[3] + 2*Irr(ct)[4] + Irr(ct)[5] + Irr(ct)[6] + Irr(ct)[7]; #We need some doubling maps for the recursion relations, so we construct a new table of McKay-Thompson series for doubled classes. These are the class functions g -> c_{g^2}(n) PM2 := PowerMap( ct, 2 ); MT2 := []; for i in [Length(MT2)+1..Length(MT)] do a := []; for j in [1..Length(MT[i])] do Add(a,MT[i][PM2[j]]); od; Add(MT2,ClassFunction(ct,a)); od; # Then, use the recursions in Borcherds's "Monstrous Moonshine..." section 9 to produce the coefficients of the McKay-Thompson series. As written, the loop runs to q^{100}, but you can just change the last number in the first line to whatever you want. for n in [Length(MT)+1..100] do r := n mod 4; k := (n-r)/4; if r = 0 then a := MT[2*k+1] + (MT[k]^2 - MT2[k])/2; for i in [1..k-1] do a := a + MT[i]*MT[2*k-i]; od; elif r = 1 then a := MT[2*k+3] - MT[2]*MT[2*k] + (MT[2*k]^2 + MT2[2*k])/2 + (MT[k+1]^2-MT2[k+1])/2; for i in [1..k] do a := a + MT[i]*MT[2*k-i+2]; od; for i in [1..k-1] do a := a + MT2[i]*MT[4*k-4*i]; od; for i in [1..2*k-1] do a := a + (-1)^i*MT[i]*MT[4*k-i]; od; elif r = 2 then a := MT[2*k+2]; for i in [1..k] do a := a + MT[i]*MT[2*k-i+1]; od; else a := MT[2*k+4] - MT[2]*MT[2*k+1] - (MT[2*k+1]^2-MT2[2*k+1])/2; for i in [1..k+1] do a := a + MT[i]*MT[2*k-i+3]; od; for i in [1..k] do a := a + MT2[i]*MT[4*k-4*i+2]; od; for i in [1..2*k] do a := a + (-1)^i * MT[i]*MT[4*k-i+2]; od; fi; Add(MT,ClassFunction(ct,a)); for i in [Length(MT2)+1..Length(MT)] do a := []; for j in [1..Length(MT[i])] do Add(a,MT[i][PM2[j]]); od; Add(MT2,ClassFunction(ct,a)); od; od; # You can extract the q^n coefficient in the McKay-Thompson series of the i-th conjugacy class in the Monster (according to ATLAS ordering) by typing "MT[n][i];". # The head character multiplicities can be extracted from traces by taking inner products. head := []; for i in [Length(head)+1..Length(MT)] do Add(head,[]); for j in Irr(ct) do Add(head[i],ScalarProduct( ct, j, MT[i] )); od; od; # You can extract the multiplicity of the j-th smallest irreducible representation of the monster in V^\natural_{i+1} by typing "head[i][j];".