Opened 14 years ago
Closed 13 years ago
#5482 closed defect (fixed)
Quotient ring can be created without generator names
Reported by: | Justin Walker | Owned by: | Justin Walker |
---|---|---|---|
Priority: | major | Milestone: | sage-4.3 |
Component: | algebra | Keywords: | |
Cc: | Merged in: | sage-4.3.alpha0 | |
Authors: | Alex Ghitza | Reviewers: | Mike Hansen |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
The following code works:
sage: R.<x> = PolynomialRing(QQ) sage: f = x^2-1 sage: S = R.quotient_by_principal_ideal(f)
but then this fails:
sage: S --------------------------------------------------------------------------- ValueError Traceback (most recent call last) ...[snip] /Users/tmp/sage-3.4.alpha0/local/lib/python2.5/site-packages/sage/structure/category_object.so in sage.structure.category_object.CategoryObject.variable_names (sage/structure/category_object.c:3530)() ValueError: variable names have not yet been set using self._assign_names(...)
The routine should require that the name(s) be provided.
Attachments (2)
Change History (11)
Changed 14 years ago by
Attachment: | sage-5482.patch added |
---|
comment:1 Changed 14 years ago by
Summary: | Quotient ring can be created without generator names → [With patch; needs review] Quotient ring can be created without generator names |
---|
comment:2 Changed 14 years ago by
Why do you change the parameter name from "names" to "name"? Is this function only used for univariate polynomial rings? If so, fine.
comment:3 Changed 14 years ago by
Milestone: | → sage-3.4.2 |
---|
comment:4 follow-up: 5 Changed 14 years ago by
Summary: | [With patch; needs review] Quotient ring can be created without generator names → [With patch; needs work] Quotient ring can be created without generator names |
---|
REFEREE REPORT:
- It *must* be "names" not "name", so the R.<x> = foo notation works.
- Every patch has to have a doctest that illustrates that it fixes the bug.
comment:5 Changed 14 years ago by
Owner: | changed from William Stein to Justin Walker |
---|---|
Status: | new → assigned |
Replying to was:
REFEREE REPORT:
- It *must* be "names" not "name", so the R.<x> = foo notation works.
I discovered that while adding doctests. I'll reverse that change.
- Every patch has to have a doctest that illustrates that it fixes the bug.
Doctests?
comment:6 Changed 13 years ago by
Component: | algebraic geometry → algebra |
---|---|
Summary: | [With patch; needs work] Quotient ring can be created without generator names → Quotient ring can be created without generator names |
comment:7 Changed 13 years ago by
Authors: | → Alex Ghitza |
---|---|
Status: | needs_work → needs_review |
I attached a new patch that assigns names automatically if they are not specified by the user, e.g. a quotient of R.<x>
will have variable name xbar
. This is standard behaviour in other places in Sage.
Apply trac_5482.patch only.
comment:8 Changed 13 years ago by
Reviewers: | → Mike Hansen |
---|---|
Status: | needs_review → positive_review |
Looks good to me.
comment:9 Changed 13 years ago by
Merged in: | → sage-4.3.alpha0 |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
The fix is to require the generator name at creation time, not when the ring is used.