This is an implementation of Theorem 3.3, Chapter 14, in Discriminants, Resultants, and Multidimensional Determinants.
i1 : M = randomMultidimensionalMatrix {4,2,3} o1 = {{{8, 1, 3}, {7, 8, 3}}, {{3, 7, 8}, {8, 5, 7}}, {{8, 5, 2}, {3, 6, 3}}, ------------------------------------------------------------------------ {{6, 8, 6}, {9, 3, 7}}} o1 : 3-dimensional matrix of shape 4 x 2 x 3 over ZZ |
i2 : S = sylvesterMatrix M o2 = | 8 1 3 0 0 0 7 8 3 0 0 0 | | 0 8 0 1 3 0 0 7 0 8 3 0 | | 0 0 8 0 1 3 0 0 7 0 8 3 | | 3 7 8 0 0 0 8 5 7 0 0 0 | | 0 3 0 7 8 0 0 8 0 5 7 0 | | 0 0 3 0 7 8 0 0 8 0 5 7 | | 8 5 2 0 0 0 3 6 3 0 0 0 | | 0 8 0 5 2 0 0 3 0 6 3 0 | | 0 0 8 0 5 2 0 0 3 0 6 3 | | 6 8 6 0 0 0 9 3 7 0 0 0 | | 0 6 0 8 6 0 0 9 0 3 7 0 | | 0 0 6 0 8 6 0 0 9 0 3 7 | 12 12 o2 : Matrix ZZ <--- ZZ |
i3 : det M o3 = 910015877 |
i4 : det S o4 = 910015877 |
i5 : assert(oo == ooo or oo == -ooo) |
The object sylvesterMatrix is a method function.