M2
M2 copied to clipboard
Error in tensor(Ring, Ring, Join => false)
Here's an unexpected error:
i1 : S1 = QQ[x,y, DegreeRank => 1];
i2 : S2 = QQ[x,y, DegreeRank => 2];
i3 : tensor(S1, S2, Join => false)
stdio:3:1:(3): error: with Join => false, expected degree map to return a list of length at most 1
i4 : tensor(S2, S1, Join => false)
o4 = QQ[x , y , x , y ]
0 0 1 1
o4 : PolynomialRing
Looking at the code, I can't figure out what was the intention here: https://github.com/Macaulay2/M2/blob/5572c8a245d187f6c22f8eaa0b03cac0b8d86e02/M2/Macaulay2/m2/monoids.m2#L703-L705
More generally, when tensoring two (or more) rings, why are DegreeMap and DegreeLift only mapping the degrees of the first factor and the tensor ring?
The meaning of Join => true is that the degrees from the various factors are concatenated to get the degrees in the tensor product. The meaning of Join => false is that they are not, so they all have to be the same length.
I don't understand your point. In both examples above I'm using Join => false with the same rings.
S1 has degrees of length 1 and S2 has degrees of length 2. There is no sensible way to combine these in a tensor product.
Once again, that doesn't explain why switching the order of S1 and S2 changes the result. Can you clarify what is your definition of tensor product where A⊗B and B⊗A are not only non-isomorphic, but only one is defined and there is no sensible way to define the other?!
What should the degrees of the generators in the tensor product be if Join => false is used? I'm not sure...
I think there's a misunderstanding about what the issue is. I'm not asking something about Join => true vs. Joint => false. I'm only switching the order of the two rings:
i3 : tensor(S1, S2, Join => false)
stdio:3:1:(3): error: with Join => false, expected degree map to return a list of length at most 1
i4 : tensor(S2, S1, Join => false)
o4 = QQ[x , y , x , y ]
0 0 1 1
I claim the results should be the same, so either both should give an error, or the outputs should be isomorphic, except with different degrees:
i3 : degrees tensor(S2, S1, Join => false)
o3 = {{1, 0}, {0, 1}, {0, 1}, {0, 1}}
o3 : List
i4 : degrees tensor(S1, S2, Join => false)
o4 = {{1, 0}, {1, 0}, {1, 0}, {0, 1}} -- hypothetical answer
o4 : List
Good point!
By the way, use Join=>true to get the degree group of the tensor product to be G1++G2.
By the way, use Join=>true to get the degree group of the tensor product to be G1++G2.
Correct. I edited this out because it wasn't relevant.
This is causing a bug in PushForward package:
Here is a basic example from docs for
reesAlgebra:needsPackage "PushForward" needsPackage "ReesAlgebra" 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) assert isHomogeneous fIt seems like
pushForwardfrom Core works fine butpushFwdloses homogeneity:isHomogeneous(N = coker basis(2, R^1)) -- true isHomogeneous pushForward_f N -- true isHomogeneous pushFwd_f N -- false
See @devlin-mallory's comment in https://github.com/Macaulay2/M2/issues/3077#issuecomment-1901395089.