Opened 7 years ago
Closed 7 years ago
#20514 closed defect (fixed)
is_trivial should be implemented for ideals in multivariate polynomial rings
Reported by: | kedlaya | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-7.2 |
Component: | algebra | Keywords: | polynomial ring, trivial ideal |
Cc: | Merged in: | ||
Authors: | Kiran Kedlaya | Reviewers: | Vincent Delecroix |
Report Upstream: | N/A | Work issues: | |
Branch: | 5e83ce7 (Commits, GitHub, GitLab) | Commit: | 5e83ce7065d4ae53a06f2658e0ddbe32e571008f |
Dependencies: | Stopgaps: |
Description
This is easy to fix (by overriding the default method):
sage: R.<x,y> = PolynomialRing(QQ,2) sage: I = R.ideal(0,1) sage: I == R.unit_ideal() True sage: I.is_trivial() # should give the same answer! --------------------------------------------------------------------------- NotImplementedError Traceback (most recent call last) <ipython-input-15-f115fda66859> in <module>() ----> 1 I.is_trivial() /projects/b8cc019c-1204-44b1-bea9-eb81c119388e/sage/local/lib/python2.7/site-packages/sage/rings/ideal.pyc in is_trivial(self) 945 return True 946 # If self is principal, can give a complete answer --> 947 if self.is_principal(): 948 return self.gens()[0].is_unit() 949 # If self is not principal, can only give an affirmative answer /projects/b8cc019c-1204-44b1-bea9-eb81c119388e/sage/local/lib/python2.7/site-packages/sage/rings/ideal.pyc in is_principal(self) 906 if len(self.gens()) <= 1: 907 return True --> 908 raise NotImplementedError 909 910 def is_trivial(self): NotImplementedError:
Change History (9)
comment:1 Changed 7 years ago by
comment:2 Changed 7 years ago by
The docstring for is_trivial
states:
Return ``True`` if this ideal is `(0)` or `(1)`.
Setting aside the zero ring (where all possible interpretations seem to lead to the answer True
), there seem to be three different definitions floating around for what constitutes a trivial ideal of a ring: the zero ideal; the unit ideal; or both. In commutative algebra, I'm generally used to seeing the second interpretation. The first interpretation is the one compatible with group theory, where triviality tends to refer exclusively to the one-element subgroup.
This ambiguity makes me wonder whether we should even provide this method at all! But if we do provide it, then it should be implemented using comparisons with the zero_ideal
and/or unit_ideal
of the parent ring.
comment:3 Changed 7 years ago by
Branch: | → u/kedlaya/is_trivial_should_be_implemented_for_ideals_in_multivariate_polynomial_rings |
---|
comment:4 Changed 7 years ago by
Authors: | → Kiran Kedlaya |
---|---|
Commit: | → dce7e0b72996bdfb62a80791ceae9ee5ea5b7409 |
Status: | new → needs_review |
This patch changes the implementation as proposed, without changing the mathematical definition. If there is interest in changing the mathematical definition, that should (be discussed elsewhere and then) happen on a separate ticket.
New commits:
dce7e0b | Test is_trivial using comparison to unit ideal
|
comment:5 follow-up: 7 Changed 7 years ago by
Reviewers: | → Vincent Delecroix |
---|---|
Status: | needs_review → needs_work |
Work issues: | → documentation formatting |
There must be a line break between the documentation string ...ticket :trac:`20514`::
and the begining of the tests.
comment:6 Changed 7 years ago by
Commit: | dce7e0b72996bdfb62a80791ceae9ee5ea5b7409 → 5e83ce7065d4ae53a06f2658e0ddbe32e571008f |
---|
Branch pushed to git repo; I updated commit sha1. New commits:
5e83ce7 | Correct docstring formatting
|
comment:7 Changed 7 years ago by
Replying to vdelecroix:
There must be a line break between the documentation string
...ticket :trac:`20514`::
and the begining of the tests.
Corrected in the last commit.
comment:8 Changed 7 years ago by
Status: | needs_work → positive_review |
---|---|
Work issues: | documentation formatting |
comment:9 Changed 7 years ago by
Branch: | u/kedlaya/is_trivial_should_be_implemented_for_ideals_in_multivariate_polynomial_rings → 5e83ce7065d4ae53a06f2658e0ddbe32e571008f |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
On second thought, would it be better to change the default method itself, to test equality against the
unit_ideal
of the parent ring? After all, if you are working with a ring where you can't test equality, then there's no sense in being able to test for triviality either.