Hurwitz formΒΆ

This page contains the Maple fragment that computes the discriminant of the determinant of the liner combination of two generic quadrics in the projective space. This is known as the Hurwitz form, we compute its expansion into 67753552 monomials. If you want to run the code yourself, you may download the following file Hurwitz.txt.

interface(quiet=true): with(linalg):

f := u0 + u1*x + u2*x^2 + u3*x^3 + u4*x^4;

dis := 256*u0^3*u4^3-192*u0^2*u1*u3*u4^2-128*u0^2*u2^2*u4^2+144*u0^2*u2*u3^2*u4-27*u0^2*u3^4+144*u0*u1^2*u2*u4^2-6*u0*u1^2*u3^2*u4-80*u0*u1*u2^2*u3*u4+18*u0*u1*u2*u3^3+16*u0*u2^4*u4-4*u0*u2^3*u3^2-27*u1^4*u4^2 +18*u1^3*u2*u3*u4-4*u1^3*u3^3-4*u1^2*u2^3*u4+u1^2*u2^2*u3^2;

 A := array([

B := array([

h := sort(collect(det(matadd(scalarmul(A,x),B)),[x],distributed)):
U0 := coeff(h,x,0):  U1 := coeff(h,x,1):
U2 := coeff(h,x,2):  U3 := coeff(h,x,3):  U4 := coeff(h,x,4):
ss := {u0=U0,u1=U1,u2=U2,u3=U3,u4=U4}:
for s in ss do lprint(s); print(` `); od:
print(nops(U0),nops(U1),nops(U2),nops(U3),nops(U4)); print(` `);

hurwitz := 0:

for i from 1 to nops(dis) do
ergo := sort(expand(subs(ss,op(i,dis)))):
lprint(i,op(i,dis), time(), nops(ergo));
hurwitz := hurwitz + ergo: