Opened 10 years ago

Last modified 11 months ago

#10708 new defect

Ideal dimension wrong, depends on term order.

Reported by: vbraun Owned by: malb
Priority: major Milestone:
Component: commutative algebra Keywords: Singular ideal dimension
Cc: Bouillaguet, malb, mstreng, jakobkroeker Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


The dimension of an ideal, that is the Krull dimension of the quotient R/I, does not depend on the monomial order. But

sage: P.<x,y> = PolynomialRing(QQ,order='neglex')
sage: P.ideal(x).dimension()
sage: P.ideal(x-1).dimension()

I think this uses Singular "ls" ordering which is related to the localization at <x,y> though I have never used (or properly understood) that functionality in Singular.

Maybe we need to change the term order to a global one internally?

Change History (13)

comment:1 Changed 8 years ago by Bouillaguet

  • Cc Bouillaguet added

More fundamentally, a (Krull) dimension should not be negative, should it?

comment:2 Changed 8 years ago by vbraun

Well I don't mind denoting the dimension of the emtpy set at -1. Or, in this case, the supremum of the lengths of the elements of the empty set. Its of course more a matter of definition...

comment:3 Changed 8 years ago by Bouillaguet

Apparently some other things go wrong :

sage: P.<x,y> = PolynomialRing(QQ,order='neglex')
sage: 1 in P.ideal(x-1)
sage: P.ideal(x-1).groebner_basis()

This is obviously crazy. And membership inside an ideal should not depend on the term order:

sage: P.<x,y> = PolynomialRing(QQ)
sage: sage: 1 in P.ideal(x-1)
sage: sage: P.ideal(x-1).groebner_basis()
[x - 1]
Last edited 8 years ago by Bouillaguet (previous) (diff)

comment:4 Changed 8 years ago by Bouillaguet

  • Cc malb mstreng added
  • Component changed from algebra to commutative algebra
  • Owner changed from AlexGhitza to malb

comment:5 Changed 8 years ago by Bouillaguet

The problem could be caused by the fact that neglex is not a "monomial order" in the usual sense, as it is not Well-founded:

sage: R.<x,y> = PolynomialRing(QQ, order='neglex')
sage: 1 > x > x^2 > x^3 > x^4

This clearly is an infinite descending chain.

comment:6 Changed 8 years ago by vbraun

Thats definitely the problem, but how to fix it?

comment:7 Changed 8 years ago by Bouillaguet

More generally, it seems that the problem occurs with all the "negated" term orders.

sage: P.<x,y> = PolynomialRing(QQ,order='neglex')
sage: P.ideal(x-1).groebner_basis()

With "negdegrevlex":

sage: P.<x,y> = PolynomialRing(QQ,order='negdegrevlex')
sage: P.ideal(x-1).groebner_basis()

With "negdeglex":

sage: P.<x,y> = PolynomialRing(QQ,order='negdeglex')
sage: P.ideal(x-1).groebner_basis()

With "negwdegrevlex"

sage: P.<x,y> = PolynomialRing(QQ, order=TermOrder('negwdegrevlex',(1,2)))
sage: P.ideal(x-1).groebner_basis()

Digging deeper into this, it seems that we imported from singular the concepts of global and local orderings. The global ones match my own understanding of what a "monomial order" is. In singular they also allow a generalization thereof, by dropping the well-foundedness requirement (the "local" orderings are those such that 1 > x).

Pretty much everything will eventually rely on the groebner basis computation routine, which apparently only works properly on "global" orderings. So a cheap fix would consist in raising an exception in I.groebner_basis if the underlying term-order is not "global"...


In fact, the page of the reference manual on term orderings specifies which orders are "global", but it does not specify what this means (this notion is not present in the textbooks I used to work with, and I suspect that some users won't know about it). It does not say that most routines are broken on the non-global orders. This could possibly be confusing to some users. We should at least mimic the singular documentation on term orderings, which is much more explicit and less confusing about all this.

comment:8 Changed 8 years ago by mstreng

I assume "local" here means "locally around (0,0)" (which is the only interpretation of the word "local" that makes sense to me in this context). Then these algorithms are not for the ring QQ[x,y], but for the localization (or maybe the completion) of that ring at (x,y), i.e., these algorithms assume that all polynomials f with f(0,0)!=0 are invertible. So the Groebner basis [1] with dimension -1 makes complete sense, as the ideal is the unit ideal locally at (0,0).

I don't know about the design of these PolynomialRing objects with "order=", and I don't know how Singular works, so I don't know whether what happens here is "wrong". Maybe the functionality of the local orderings is in the wrong place? Or maybe even though it only makes sense mathematically for localizations, it is a function of polynomials for efficiency reasons?

comment:9 Changed 8 years ago by Bouillaguet

While this "functionality" may have some use, it is very confusing. The content of an ideal should not depend on the term order. Either a given polynomial belongs to I, or it doesn't --- the order plays no role here. However, currently we allow the counter-intuitive example in comment 3, where the term order influences the content of an ideal.

This (indirectly) surprised vbraun, the original author of the ticket, and I don't like it either. It looks like a computational hack is exposed to the user, and messes with the usual mathematical definitions.

If the functionality is useful, we should probably not remove it, but we should at least be very explicit that contrarily to what one would expect following the usual textbooks, some orders will change the contents of your ideals.

comment:10 Changed 8 years ago by Bouillaguet

In fact, we have two options :

  • either we close this ticket as invalid, acknowledging that the use of "local" orders is fine, and that users should know what they are doing (i.e. the singular approach).
  • or we prevent users from using "local" orders in the same way they would use normal orders (for instance by requesting them to explicitly pass a Localization=True flag to the PolynomialRing constructor). This way, our intuitive understanding of most properties (e.g., the ideal dimension, or content) would not depend on the term order, unless the user explicitly says so.

I vote for the second one...


comment:11 Changed 6 years ago by nbruin

I concur that "neglex" should not be allowed as a term order on a *polynomial ring*. Instead, we can have LocalPolynomialRing or something similar that interfaces somehow with this functionality in singular.

This looks like an abuse of terminology on the side of Singular. Probably one that is algorithmically very advantageous for them, but you clearly need to work very carefully with these rings, because there are now "units" in the ring for which the inverse is not expressible in the representation used:

sage: R.<x,y>=PolynomialRing(QQ,order='neglex')
sage: (1+x).is_unit()
sage: 1/(1+x)
sage: (1+x) * (1/(1+x))
1 + x

I am sure the functionality in singular is very useful, but we can't expose it in the way we're doing here.

comment:12 Changed 6 years ago by jakobkroeker

  • Cc jakobkroeker added

comment:13 Changed 11 months ago by soehms

See new discussion about this on sage-devel.

Note: See TracTickets for help on using tickets.