restart; with(combinat): with(LinearAlgebra): #Definition of the roots of E7 s := 1; for ij in choose(8, 2) do beta[s] := e[ij[1]]-e[ij[2]]; beta[s+1] := -beta[s]; s := s+2 end do: for ijkl in choose(8, 4) do beta[s] := e[ijkl[1]]+e[ijkl[2]]+e[ijkl[3]]+e[ijkl[4]]; s := s+1 end do: dual_adj := product(beta[i], i = 1 .. 126); #This gives the transition between the usual cartan subalgebra (with basis x[1]..x[8] such that sum x[i]=0) and the cartan subalgebra of semi-simple 2222 tensors): myrules:={ e[1] = z[1]+z[2]+z[3]+z[4], e[2] = z[1]-z[2]-z[3]+z[4], e[3] = z[1]+z[2]-z[3]-z[4], e[4] = z[1]-z[2]+z[3]-z[4], e[5] = -z[1]-z[2]-z[3]-z[4], e[6] = -z[1]+z[2]+z[3]-z[4], e[7] = -z[1]-z[2]+z[3]+z[4], e[8] = -z[1]+z[2]-z[3]+z[4]}; h:=1: for i from 1 to 126 do if subs(myrules,beta[i]) <>0 then h:=h*subs(myrules,beta[i]); fi;od: factor(h); h := factor(h/340282366920938463463374607431768211456); M:=Matrix( [[1,1,1,1], [z[1]^2,z[2]^2,z[3]^2,z[4]^2],[z[1]^4,z[2]^4,z[3]^4,z[4]^4], [z[1]^6,z[2]^6,z[3]^6,z[4]^6]] ); Determinant(M);sq:=factor(%);degree(%); degree(h); factor(h/sq^8);sort(%); h; #the generators of the algebra of invariants have degrees 2, 6, 8, 12 (Chterental - Djkovic) monlist:=proc(dd) local L, i2, i6, i8, i12; L := {}: for i2 from 0 to floor(dd/2) do for i6 from 0 to floor(dd/6) do for i8 from 0 to floor(dd/8) do for i12 from 0 to floor(dd/12) do if 2*i2 + 6*i6 + 8*i8 + 12*i12 = dd then L:= {op(L), [i2, i6, i8, i12]} end if end do end do end do end do: L; end proc: I2 := simplify(`+`(seq(simplify(subs(myrules,beta[i]^2)), i = 1 .. 126))); I2:= I2/igcd(coeffs(expand(I2))); I6 := simplify(`+`(seq(simplify(subs(myrules,beta[i]^6)), i = 1 .. 126))); I6:= expand(%/igcd(coeffs(expand(%)))); #I6 cannot be written as a combination of the lower degree invariants: L:=monlist(6); tmp:=`+`(seq( c[i]*I2^L[i][1]* I6^L[i][2]* I8^L[i][3]*I12^L[i][4],i=1..nops(L) )): expand(expand(I6) - expand(tmp)): vals:=solve({coeffs(%, [seq(z[i], i=1..4)])}); simplify(`+`(seq(simplify(subs(myrules,beta[i]^8)), i = 1 .. 126))); I8:= expand(%/igcd(coeffs(expand(%)))); #I8 cannot be written as a combination of the lower degree invariants: L:=monlist(8); tmp:=`+`(seq( c[i]*I2^L[i][1]* I6^L[i][2]* I8^L[i][3]*I12^L[i][4],i=1..nops(L) )): expand(expand(I8) - expand(tmp)): vals:=solve({coeffs(%, [seq(z[i], i=1..4)])}); simplify(`+`(seq(simplify(subs(myrules,beta[i]^10)), i = 1 .. 126))): I10:=factor(expand(%/igcd(coeffs(expand(%))))); #I10 can be written as a combination of the lower degree invariants: L:=monlist(10); tmp:=`+`(seq( c[i]*I2^L[i][1]* I6^L[i][2]* I8^L[i][3]*I12^L[i][4],i=1..nops(L) )): expand(expand(I10) - expand(tmp)): vals:=solve({coeffs(%, [seq(z[i], i=1..4)])}); disp:=factor(subs(vals,`+`(seq(c[i]*f[2]^L[i][1]* f[6]^L[i][2]* f[8]^L[i][3]* f[12]^L[i][4],i=1..nops(L))))); #notice that each of the monomials in invariants has at least a factor of I2, which shows up as a factor of I10 simplify(`+`(seq(simplify(subs(myrules,beta[i]^12)), i = 1 .. 126))): I12:=factor(expand(%/igcd(coeffs(expand(%))))); #I12 cannot be written as a combination of the lower degree invariants: L:=monlist(12); tmp:=`+`(seq( c[i]*I2^L[i][1]* I6^L[i][2]* I8^L[i][3]*I12^L[i][4],i=1..nops(L) )): expand(expand(I12) - expand(tmp)): vals:=solve({coeffs(%, [seq(z[i], i=1..4)])}); simplify(`+`(seq(simplify(subs(myrules,beta[i]^14)), i = 1 .. 126))): I14:=factor(expand(%/igcd(coeffs(expand(%))))): #I14 can be written as a combination of the lower degree invariants: L:=monlist(14); tmp:=`+`(seq( c[i]*I2^L[i][1]*I6^L[i][2]*I8^L[i][3]*I12^L[i][4],i=1..nops(L) )): expand(expand(I14) -expand(tmp)): vals:=solve({coeffs(%, [seq(z[i], i=1..4)])}); disp:=factor(subs(vals,`+`(seq( c[i]*f[2]^L[i][1]* f[6]^L[i][2]* f[8]^L[i][3]*f[12]^L[i][4],i=1..nops(L) )))); lprint(disp); simplify(`+`(seq(simplify(subs(myrules,beta[i]^18)), i = 1 .. 126))): I18:=factor(expand(%/igcd(coeffs(expand(%))))): #I18 can be written as a combination of the lower degree invariants: L:=monlist(18); tmp:=`+`(seq( c[i]*I2^L[i][1]*I6^L[i][2]*I8^L[i][3]*I12^L[i][4],i=1..nops(L) )): expand(expand(I18) -expand(tmp)): vals:=solve({coeffs(%, [seq(z[i], i=1..4)])}); disp:=(subs(vals,`+`(seq( c[i]*f[2]^L[i][1]* f[6]^L[i][2]* f[8]^L[i][3]*f[12]^L[i][4],i=1..nops(L) )))); #These coefficients are different than Chen Djkovic because of our choice in normalizations #from above, we think that the hyperdeterminant on semi-simple elements is the product of the differenes and sums of roots (perhaps squared) sq; L:=monlist(24); tmp:=`+`(seq( c[i]*I2^L[i][1]*I6^L[i][2]*I8^L[i][3]*I12^L[i][4],i=1..nops(L) )): expand(expand(sq^2) -expand(tmp)): vals:=solve({coeffs(%, [seq(z[i], i=1..4)])}); disp:=(subs(vals,`+`(seq( c[i]*f[2]^L[i][1]* f[6]^L[i][2]* f[8]^L[i][3]*f[12]^L[i][4],i=1..nops(L) )))); factor(I2); factor(I6); factor(I8); factor(I12); ex:=(z[1]+z[2]+z[3]+z[4])^2* (z[1]-z[2]-z[3]+z[4])^2* (z[1]+z[2]-z[3]-z[4])^2* (z[1]-z[2]+z[3]-z[4])^2* (z[1]+z[2]-z[3]+z[4])^2* (z[1]-z[2]+z[3]+z[4])^2* (z[1]+z[2]+z[3]-z[4])^2* (z[1]-z[2]-z[3]-z[4])^2* z[1]^2*z[2]^2*z[3]^2*z[4]^2 ; degree(ex); factor(ex); #new factor as a combination of the lower degree invariants: L:=monlist(24); tmp:=`+`(seq( c[i]*I2^L[i][1]* I6^L[i][2]* I8^L[i][3]*I12^L[i][4],i=1..nops(L) )): expand(expand(ex/16) - expand(tmp)): vals:=solve({coeffs(%, [seq(z[i], i=1..4)])}); disp:=(subs(vals,`+`(seq( c[i]*f[2]^L[i][1]* f[6]^L[i][2]* f[8]^L[i][3]*f[12]^L[i][4],i=1..nops(L) )))); sq; L:=monlist(24); tmp:=`+`(seq( c[i]*I2^L[i][1]*I6^L[i][2]*I8^L[i][3]*I12^L[i][4],i=1..nops(L) )): expand(expand(sq^2) -expand(tmp)): vals:=solve({coeffs(%, [seq(z[i], i=1..4)])}); hd:=(subs(vals,`+`(seq( c[i]*f[2]^L[i][1]* f[6]^L[i][2]* f[8]^L[i][3]*f[12]^L[i][4],i=1..nops(L) )))); disp-hd; factor(%);