M2
M2 copied to clipboard
Homogeneity bug in basis(..., SourceRing => ...)
Starting with the same example as in #3077:
needsPackage "ReesAlgebra"
kk = ZZ/101;
S = kk[x_0..x_4]
I = trim monomialCurveIdeal(S, {2,3,5,6})
R = reesAlgebra I
It seems like basis loses homogeneity:
M = R^1
i = 1
B = basis(i, M, SourceRing => S)
isHomogeneous B -- false!!
The target (at least in this case) is fine, but the source is wrong:
source basis(i, M) -- R^7, free, degrees {3:{1, 2}, 4:{1, 3}}
source B -- S^7, free, degrees {7:{0}}
So the issue stems from here:
https://github.com/Macaulay2/M2/blob/776fd94fa0060f047234ac837464962d3581609f/M2/Macaulay2/m2/basis.m2#L73-L81
presumably because DegreeLift isn't defined in the ring map ... but which ring map? This ring map that the user can't provide:
https://github.com/Macaulay2/M2/blob/776fd94fa0060f047234ac837464962d3581609f/M2/Macaulay2/m2/basis.m2#L200-L203
@mikestillman do you know in the examples below why rawIsHomogeneous is returning false?
kk = ZZ/101;
S = kk[x_0..x_4]
I = trim monomialCurveIdeal(S, {2,3,5,6})
R = reesAlgebra I
f = map(R, S, DegreeMap => prepend_0, DegreeLift => a -> drop(a, 1))
debug Core
-- without a ring map, everything is fine:
B = map(R^1, , {{w_0,w_1,w_2,w_3,w_4,w_5,w_6}})
assert isHomogeneous B -- pass
-- with a ring map, something fails:
B = map(R^1, , f, {{w_0,w_1,w_2,w_3,w_4,w_5,w_6}})
assert rawIsHomogeneous raw B -- fails
B = map(R^1, S^(-{2, 2, 2, 3, 3, 3, 3}), f,
{{w_0,w_1,w_2,w_3,w_4,w_5,w_6}})
assert rawIsHomogeneous raw B -- fails
-- even if DegreeLift and DegreeMap are explicitly provided:
B = map(R^1, S^(-{2, 2, 2, 3, 3, 3, 3}), f,
{{w_0,w_1,w_2,w_3,w_4,w_5,w_6}},
DegreeMap => f.cache.DegreeMap,
DegreeLift => f.cache.DegreeLift)
assert rawIsHomogeneous raw B -- fails
-- note that this doesn't fail automatically
m = map(R^1, S^1, f, matrix{{1_R}})
assert isHomogeneous m
-- though this one does:
assert isWellDefined m -- fails