Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The unit ideal is not prime or primary #15745

Closed
JohnCremona opened this issue Jan 27, 2014 · 8 comments
Closed

The unit ideal is not prime or primary #15745

JohnCremona opened this issue Jan 27, 2014 · 8 comments

Comments

@JohnCremona
Copy link
Member

On sage-support on 2014-01-27, Jack kroeker@uni-math.gwdg.de reported:

I'm a bit confused about Sage's answer if Ideal(1) is prime.

R.<x,y>= QQ[]
I = Ideal(R(1))
I.is_prime()

Sage (5.11, not only)  says yes,
conflicting to the definition, http://en.wikipedia.org/wiki/Prime_ideal
Has somebody an expanation of this behaviour?

and in the following discussion it was agreed that this is incorrect, as is I.is_primary()}} (gives True not False) and {{{I.primary_decomposition() (gives a nonempty list) and {{{I.is_maximal())}} (raises an error instead of returning False).

This originates with Singular, but could easily be fixed in Sage.

CC: @pjbruin

Component: algebra

Keywords: unit prime primary ideal

Author: Peter Bruin

Branch/Commit: u/pbruin/15745-primary_decomposition_unit_ideal @ 295c7fd

Reviewer: John Cremona

Issue created by migration from https://trac.sagemath.org/ticket/15745

@JohnCremona JohnCremona added this to the sage-6.1 milestone Jan 27, 2014
@pjbruin
Copy link
Contributor

pjbruin commented Jan 29, 2014

Commit: 295c7fd

@pjbruin
Copy link
Contributor

pjbruin commented Jan 29, 2014

Author: Peter Bruin

@pjbruin
Copy link
Contributor

pjbruin commented Jan 29, 2014

comment:1

In this branch:

  • return empty primary decomposition for the unit ideal
  • fix a different bug uncovered by the above fix (comparison of ideals was wrong in some cases when using different term orders)
  • improve documentation of [complete_]primary_decomposition()

@pjbruin
Copy link
Contributor

pjbruin commented Jan 29, 2014

@JohnCremona
Copy link
Member Author

comment:2

Looks good to me. I am not sure why we need to have a primer about definition and existence of primary decompositions in the docstring at all, let alone three times! But as long as they are correct (which they are, and I should know since I'll lecturing about all that later this term) I am certainly not going to suggest that they are removed.

Apart from tidying the documentation the patch just has two things, the easy one (deal with the unit ideal properly) and something else. Would it be possible to have an example of how the second change corrects something which used to be wrong?

@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@pjbruin
Copy link
Contributor

pjbruin commented Feb 3, 2014

comment:4

Replying to @JohnCremona:

Looks good to me. I am not sure why we need to have a primer about definition and existence of primary decompositions in the docstring at all, let alone three times! But as long as they are correct (which they are, and I should know since I'll lecturing about all that later this term) I am certainly not going to suggest that they are removed.

Yes, given that the small primer was already there I thought it made more sense to tidy it up than to remove it altogether.

Apart from tidying the documentation the patch just has two things, the easy one (deal with the unit ideal properly) and something else. Would it be possible to have an example of how the second change corrects something which used to be wrong?

The thing that failed after I made the first fix was a doctest that checked that the product of the primary ideals in the primary decomposition was equal to the original ideal. The problem was that comparison of ideals was broken in the following situation: I and J are ideals of R = Q[x,y], a Gröbner basis of J has been computed for a different monomial ordering than the default one for R, and no Gröbner basis for I has been computed. The reason why it didn't work is that the equality I = J was tested using the default monomial ordering of R, but with the "wrong" Gröbner basis for J. My fix makes sure that the comparison uses the monomial ordering of the cached Gröbner basis.

How was the bug triggered by the new check for the unit ideal? At the point this check is done, no Gröbner bases have been computed for any ideal, so Sage decides to use the degrevlex ordering, while the R in the doctest has the lex ordering. So a Gröbner basis for the degrevlex ordering is cached, and on the other hand when the product of the ideals in the primary decomposition is made it has no cached Gröbner basis, which brings us in the situation above.

I could have written a new doctest, but since it is already tested by an existing doctest I thought it wasn't really necessary, and I didn't see a natural way of explaining the above problem in the patch. I should have explained in my previous comment why there is no new doctest in the patch, though.

@JohnCremona
Copy link
Member Author

comment:5

That's certainly a good enough explanation for me!

@JohnCremona
Copy link
Member Author

Reviewer: John Cremona

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants