Q = [2,1;1,2]; qfeval(Q,[x,y]) [x,y]*Q*[x,y]~ qfeval(Q,[x1,y1],[x2,y2]) [x1,y1]*Q*[x2,y2]~ R = [1,2,3;2,4,2;3,2,5]; matdet(R) qfsign(R) [U,V]=qfgaussred(R,1) U~*matdiagonal(V)*U == R [L, V]=qfjacobi(Q) norml2(V~*Q*V - matdiagonal(L)) V~*V==1 L = qfcholesky(Q) L~*L==Q L = [1,0,0;0,1,0;4,5,6]; [q,r]=matqr(L); q r norml2(q*r-L) M = R~*R qfsign(M) T = qflllgram(M) T~*M*T L = qfcholesky(M); S = qflll(L) S == T round((L*S)~*(L*S)) z7 = zeta(7); z25=zeta(2)*zeta(5); z43 = zeta(4)*zeta(3); lindep([zetamult([3,2,2]),z7,z25,z43]) (157*z7-120*z25+36*z43)/16 - zetamult([3,2,2]) qfminim(Q) qfminim(Q,10) qfcvp(Q,[10/3,10/3]) qfrep(Q,20) L = lfunqf(Q); lfunan(L,20) lfunparams(L) lfun(L,1) - 2*Pi/sqrt(3)/x [mf,F,v] = mffromqf(Q); mfcoefs(F,20) mfparams(F) p = x^6+6*y*x^5-20*y^3*x^3-15*y^4*x^2+y^6; p'' - deriv(p',y) + derivn(p,2,y) [mf2,F2,v2] = mffromqf(Q, p); mfcoefs(F2,20) mfparams(F2) qfperfection(Q) qfsolve([1,0,0;0,3,0;0,0,-21]) M = qfparam([1,0,0;0,3,0;0,0,-21],[3,2,1]~) v = y^2 * M*[1,x/y,(x/y)^2]~ v[1]^2+3*v[2]^2-21*v[3]^2 G = matdiagonal([650, -104329, -104329]); [H,U]=qfminimize(G); H U U~*G*U qfauto(matid(3)) K=nfinit(x^3-3*x+1); L=round(K.t2) qfauto(L) T=qflllgram(L); M = T~*L*T; qfisom(L,M) Q=qfisominit(L); qfisom(Q,M) Q=matid(6); G=qfauto(Q); V=qfminim(Q,3); apply(x->[x[1],#x],qforbits(G,V)) E8 = matrix(8,8,i,j,if(i==1&&j==1,4, \ i==j || (i==1 && j<8) || (j==1 && i<8),2,1)); E8==E8~ \\ symmetric matdet(E8) \\ unimodular qfsign(E8) \\ signature L = qfminim(E8); L[1..2] \\ 240 minimal vectors V = L[3][,1] \\ first minimal vector qfeval(E8,V) \\ the norm is 2 qfperfection(E8) \\ perfection rank G=qfauto(E8); G[1] \\ number of isometries A=G[2][1] \\ one isomorphim A~*E8*A==E8 [mf,F,C]=mffromqf(E8); mfparams(F) mfcoefs(F,10) mfcoef(F,100003) L = lfunqf(E8); lfunparams(L) lfun(L,0) V=concat([vector(23,i,2*i+1),51,145]); K=matkerint(Mat(V)); M=matdiagonal(vector(25,i,if(i==25,-1,1))); L24 = K~*M*K; \\ Leech lattice matdet(L24) \\ unimodular L = qfminim(L24); L[1..2] qfperfection(L24) G=qfauto(L24); G[1] \\ number of isometries [mf,F,C]=mffromqf(L24); mfparams(F) mfcoef(F,100003)