M2
M2 copied to clipboard
bug in hook for (quotient, Matrix, Matrix) in local rings
@mahrud, @ggsmith: the following example is a boiled down version of a bug found by Hugh Geller, Tony Se, and Ela Celikbas. We suspect that the hook is somehow introducing permutations of the columns, but we haven't investigated that.
needsPackage "LocalRings"
R = localRing(QQ[a,b,c,u,v,w],ideal(a,b,c,u,v,w))
F = map(R^{{-4}, {-4}, {-5}, {-4}, {-4}, {-3}, {-3}, {-4}, {-4}, {-4}, {-4}, {-3}, {-4}},
R^{{-5}, {-5}, {-5}, {-5}, {-5}, {-5}, {-4}, {-4}, {-4}, {-4}, {-4}, {-4}, {-4}, {-4}, {-4}, {-4}, {-4}, {-4}, {-4}, {-4}, {-4}},
{{0, 0, 0, 0, 0, 0, (c^2*v)/(a+1), 0, -v, 0, (-b*c^2)/(a+1), 0, 0, (-c^3-a^2-a)/(a+1), 0, 0, -b, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, (b^2*v+v)/(a+1), -v, 0, 0, (-b^3-a^2-a-b)/(a+1), 0, 0, (-b^2*c-c)/(a+1), 0, 0, c, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, (-b*v)/(u+1), (-b*w)/(u+1), 0, (-c*v)/(u+1), (-c*w)/(u+1), 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, (v^3+u^2+u+v)/(u+1), (v^2*w+w)/(u+1), -w, 0, 0, 0, 0, 0, 0, (-c*v^2-c)/(u+1), c, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (v^3+u^2+u+v)/(u+1), (v^2*w+w)/(u+1), -w, 0, 0, 0, (b*v^2+b)/(u+1), -b, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (v^3+u^2+u+v)/(u+1), (v^2*w+w)/(u+1), -w, (-a*v^2-a)/(u+1), a, 0},
{0, 0, 0, 0, 0, 0, 0, (-c^2*u)/(b^2+1), u, 0, 0, (a*c^2)/(b^2+1), 0, 0, -a, 0, 0, (-b^3-c^3-b)/(b^2+1), 0, 0, 0},
{0, 0, 0, 0, 0, 0, (-b^2*w-w)/(a+1), w, 0, (-b^3-a^2-a-b)/(a+1), 0, 0, (-b^2*c-c)/(a+1), 0, 0, c, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, (-c^2*w)/(a+1), 0, w, (-b*c^2)/(a+1), 0, 0, (-c^3-a^2-a)/(a+1), 0, 0, -b, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, (v*w^2)/(u+1), (w^3+u^2+u)/(u+1), v, 0, 0, 0, 0, 0, 0, (-c*w^2)/(u+1), 0, c},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (v*w^2)/(u+1), (w^3+u^2+u)/(u+1), v, 0, 0, 0, (b*w^2)/(u+1), 0, -b},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (v*w^2)/(u+1), (w^3+u^2+u)/(u+1), v, (-a*w^2)/(u+1), 0, a},
{0, 0, 0, 0, 0, 0, u, (-a*u-u)/(b^2+1), 0, 0, 0, (b^3+a^2+a+b)/(b^2+1), 0, 0, c, 0, 0, (-a*c-c)/(b^2+1), 0, 0, 0}
})
G = map(R^{{-4}, {-4}, {-5}, {-4}, {-4}, {-3}, {-3}, {-4}, {-4}, {-4}, {-4}, {-3}, {-4}},
R^{{-5}, {-5}, {-6}, {-6}, {-5}, {-5}, {-6}, {-6}, {-5}, {-5}, {-5}, {-4}, {-5}},
{{-v, 0, 0, 0, 0, 0, (b*c^2)/(a+1), (c^3+a^2+a)/(a+1), b, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, (b^3+a^2+a+b)/(a+1), (b^2*c+c)/(a+1), -c, 0, 0, 0, -v},
{0, 0, (b*v)/(u+1), (c*v)/(u+1), 0, 0, (b*w)/(u+1), (c*w)/(u+1), 0, 0, 0, 0, 0},
{0, c, (-v^3-u^2-u-v)/(u+1), 0, 0, 0, (-v^2*w-w)/(u+1), 0, 0, w, 0, 0, 0},
{0, -b, 0, (-v^3-u^2-u-v)/(u+1), 0, 0, 0, (-v^2*w-w)/(u+1), 0, 0, w, 0, 0},
{0, a, 0, 0, (-v^3-u^2-u-v)/(u+1), 0, 0, 0, (-v^2*w-w)/(u+1), 0, 0, w, 0},
{u, 0, 0, 0, 0, 0, 0, 0, 0, (-a*c^2)/(b^2+1), a, (b^3+c^3+b)/(b^2+1), (-c^2*u)/(b^2+1)},
{0, 0, (b^3+a^2+a+b)/(a+1), (b^2*c+c)/(a+1), -c, 0, 0, 0, 0, 0, 0, 0, w},
{w, 0, (b*c^2)/(a+1), (c^3+a^2+a)/(a+1), b, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, (-v*w^2)/(u+1), 0, 0, c, (-w^3-u^2-u)/(u+1), 0, 0, -v, 0, 0, 0},
{0, 0, 0, (-v*w^2)/(u+1), 0, -b, 0, (-w^3-u^2-u)/(u+1), 0, 0, -v, 0, 0},
{0, 0, 0, 0, (-v*w^2)/(u+1), a, 0, 0, (-w^3-u^2-u)/(u+1), 0, 0, -v, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, (-b^3-a^2-a-b)/(b^2+1), -c, (a*c+c)/(b^2+1), (-a*u-u)/(b^2+1)}
})
matrix{for i from 0 to numcols F - 1 list F_{i} % G}
F % G -- this should give the same answer as the previous line
matrix{for i from 0 to numcols F - 1 list F_{i} // G}
F // G -- this should give the same answer as the previous line
We suspect that the hook is somehow introducing permutations of the columns, but we haven't investigated that.
It's definitely permuting the columns, because the columns of syz(F | G) seem to be sorted incorrectly for some reason. I recall asking about this on google groups, but there wasn't a solution, so instead I resorted to kludge ... which included a bug because I didn't reverse the permutation. Should be fixed by #2543.
If you happen to have time to take a fresh look at this, the relevant email is here: https://groups.google.com/g/macaulay2/c/h0IXFj3oMz4/m/LKFDWcN0BAAJ I'd love a better solution so I can remove this column reordering hack!