A syzygy among the columns of a matrix is, by definition, an element of the kernel of the corresponding map between free modules, and the easiest way to compute the syzygies applying the function kernel.
i1 : R = QQ[x..z]; |
i2 : f = vars R |
i3 : K = kernel f |
The answer is provided as a submodule of the source of f. The function super can be used to produce the module that K is a submodule of; indeed, this works for any module.
i4 : L = super K |
i5 : L == source f |
The matrix whose columns are the generators of K, lifted to the ambient free module of L if necessary, can be obtained with the function generators, an abbreviation for which is gens.
i6 : g = generators K |
We can check at least that the columns of g are syzygies of the columns of f by checking that f*g is zero.
i7 : f*g |
i8 : f*g == 0 |
Use the function syz if you need detailed control over the extent of the computation.