# g2direct-sample # Maple code example of a direct computation of the hyperKaehler # potential for the next-to-minimal nilpotent orbit in G2 # by # Piotr Kobak and Andrew Swann # # This code is generated from a noweb source file g2.nw # See that for further description and comments. # RCS info from g2.nw: # $Id: g2.nw,v 1.4 2000/01/05 14:10:18 swann Exp $ restart; MetricNormalisation:=k^2; read `g2nmin-direct`; A := matrix(3,3,0): A[2,3] := 1/s: print(A); xA := so7Lb(X,sl3(A)); A1 := J2stP(xA,1); print(`First equation`); e1 := -numer(A1[1,3]); A := matrix(3,3,0): A[1,1]:=1: A[3,3]:=-1: print(A); xA := so7Lb(X,sl3(A)); A2 := J2stP(xA,1); A2e := [numer(A2[1,2]), numer(A2[1,4]/t/sqrt(2)), numer(A2[2,7])]; A2c := map(collect,A2e,{rhoss,rhost,rhott},distribute,factor); A2e2 := [ coeff(A2c[2],rhoss)*A2c[1] - coeff(A2c[1],rhoss)*A2c[2], coeff(A2c[3],rhoss)*A2c[1] - coeff(A2c[1],rhoss)*A2c[3] ]; A2c2 := map(collect,A2e2,{rhoss,rhost,rhott},distribute,factor); A2e3 := expand(coeff(A2c2[2],rhost)*A2c2[1] - coeff(A2c2[1],rhost)*A2c2[2]); print(`Second equation`); e2 := factor(A2e3); print(`Solutions to e2`); sollist := [ -2*s*rhos/t, 9*t*rhos/s ]; print(`These two expressions should give zero`); subs(rhot=sollist[1],e2); subs(rhot=sollist[2],e2); print(`Substitute first solution in e1`); factor(subs(rhot=op(1,sollist),e1)); print(`Substitute second solution in e1`); s2 := simplify(subs(rhot=op(2,sollist),e1)); s3 := collect(numer(s2),rhos); print(`Solutions for rhos and rhot are`); solrhos := 2*k^2*s/sqrt(s^2+9*t^2); solrhot := 18*k^2*t/sqrt(s^2+9*t^2); print(`The following three expressions should be zero`); subs(rhos=solrhos,s3); simplify(subs([rhos=solrhos,rhot=solrhot],e1)); subs([rhos=solrhos,rhot=solrhot],e2); int(solrhos,s)+fun1(t); int(solrhot,t)+fun2(s); solrho := int(solrhos,s); print(`The following should be zero`); radsimp(k*sqrt(2*(eta1+sqrt(6*(eta1^2-k^2*eta2))))) -solrho; rhos:=diff(solrho,s); rhot:=diff(solrho,t); rhoss:=diff(rhos,s); rhost:=diff(rhos,t); rhott:=diff(rhot,t); print(`All the remaining matrices should be zero`); for i from 1 to 3 do for j from 1 to 3 do A := matrix(3,3,0); A[i,j]:=1; if i=j then A[3,3]:=-A[i,i] fi; xA := so7Lb(X,sl3(A)); print(map(simplify,J2stP(xA,1))); od; od; for i from 1 to 3 do v:=[0,0,0]; v[i]:=1; xA := so7Lb(X,V10(v)); print(map(simplify,J2stP(xA,1))); xA := so7Lb(X,V01(v)); print(map(simplify,J2stP(xA,1))); od;