M2 icon indicating copy to clipboard operation
M2 copied to clipboard

Issues with ring with Global => false

Open pzinn opened this issue 4 years ago • 5 comments

I have this vague feeling that this can't be a bug because it would've been noticed already... But both o3 and the absence of o4 seem wrong to me.

Macaulay2, version 1.17.2.1
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases, MinimalPrimes,
               PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone

i1 : R = QQ[x,MonomialOrder=>RevLex,Global=>false]

o1 = R

o1 : PolynomialRing

i2 : I=ideal(x-1)

o2 = ideal(- 1 + x)

o2 : Ideal of R

i3 : trim I -- huh?

o3 = ideal 1

o3 : Ideal of R

i4 : R/I -- hangs
^C
Exit (y=yes/n=no/a=abort/b=backtrace)? yes

pzinn avatar Mar 09 '21 02:03 pzinn

@mikestillman

DanGrayson avatar Mar 10 '21 16:03 DanGrayson

When one adds Global=>false, that implies that the usual notions of ideal, etc, are not for the polynomial ring, but instead for the localization of the polynomial ring at the prime ideal of all polynomials which have lead term < 1. Usually, this means the localization at the maximal ideal, as in this case. (This is why one needs to put in a special option. The doc here could perhaps be better: it should still be looked at. to see what it says about this).

That is why trim I gives the unit ideal in this case.

But the hang in i4 is a bug. I'm also surprised it hasn't been detected or posted before...! I am assigning myself to this one.

mikestillman avatar Mar 10 '21 16:03 mikestillman

Thanks Mike. I guess I never understood what Global => false did. (I always thought it just made the variables invertible, not every polynomial with lead term < 1). To be fair, there's not much documentation (if any) on this option. so o3 is OK. but o4 still deserves a fix.

pzinn avatar Mar 11 '21 02:03 pzinn

Hmm, does this make sense?

i3 : R = QQ[x, MonomialOrder => Lex, Global => false]; trim ideal(x+1)

o4 = ideal(x + 1)

o4 : Ideal of R

mahrud avatar Mar 12 '21 19:03 mahrud

@mahrud Just saying Global => false doesn't make it so. Perhaps if that is set, and it is a global order (as is the case here), it should give an error?

mikestillman avatar May 11 '22 01:05 mikestillman