hyperdeterminant f
This constructs the hyperdeterminant of a tensor of boundary format, where we say that a $a\times b_1\times \dots \times b_n$ has boundary format if $$ a-\sum_{i=1}^n (b_i-1)=1. $$ We construct the hyperdeterminant as the determinant of a certain square matrix derived from $f$. The hyperdeterminant function outputs the hyperdeterminant itself, whereas the hyperdeterminantMatrix function outputs the matrix used to compute the hyperdeterminant. (For background on computing hyperdeterminants, see Section 14.3 of the book ``Discriminants, resultants, and multidimensional determinants '' by Gelfand-Kapranov-Zelevinsky.)
The following constructs the generic hyperdeterminant of format $3\times 2\times 2$, which is a polynomial of degree 6 consisting of 66 monomials.
|
|
|
|
|
There is bug involving the graded structure of the output. Namely, the code assumes that all entries of f have degree 1, and gives the wrong graded structure if this is not the case. If ring f is not graded, then the code gives an error.
The object hyperdeterminant is a method function.