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

Quotient ring can be created without generator names #5482

Closed
RalphieBoy mannequin opened this issue Mar 11, 2009 · 10 comments
Closed

Quotient ring can be created without generator names #5482

RalphieBoy mannequin opened this issue Mar 11, 2009 · 10 comments

Comments

@RalphieBoy
Copy link
Mannequin

RalphieBoy mannequin commented Mar 11, 2009

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.

Component: algebra

Author: Alex Ghitza

Reviewer: Mike Hansen

Merged: sage-4.3.alpha0

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

@RalphieBoy
Copy link
Mannequin Author

RalphieBoy mannequin commented Mar 11, 2009

comment:1

Attachment: sage-5482.patch.gz

The fix is to require the generator name at creation time, not when the ring is used.

@RalphieBoy RalphieBoy mannequin changed the title Quotient ring can be created without generator names [With patch] Quotient ring can be created without generator names Mar 11, 2009
@RalphieBoy RalphieBoy mannequin added the s: needs review label Mar 11, 2009
@JohnCremona
Copy link
Member

comment:2

Why do you change the parameter name from "names" to "name"? Is this function only used for univariate polynomial rings? If so, fine.

@sagetrac-mabshoff sagetrac-mabshoff mannequin added this to the sage-3.4.2 milestone Mar 15, 2009
@williamstein
Copy link
Contributor

comment:4

REFEREE REPORT:

  1. It must be "names" not "name", so the R. = foo notation works.

  2. Every patch has to have a doctest that illustrates that it fixes the bug.

@RalphieBoy
Copy link
Mannequin Author

RalphieBoy mannequin commented Mar 16, 2009

comment:5

Replying to @williamstein:

REFEREE REPORT:

  1. It must be "names" not "name", so the R. = foo notation works.

I discovered that while adding doctests. I'll reverse that change.

  1. Every patch has to have a doctest that illustrates that it fixes the bug.

Doctests?

@RalphieBoy RalphieBoy mannequin removed the s: needs work label Mar 16, 2009
@RalphieBoy RalphieBoy mannequin assigned RalphieBoy and unassigned williamstein Mar 16, 2009
@aghitza aghitza changed the title [With patch] Quotient ring can be created without generator names Quotient ring can be created without generator names Nov 15, 2009
@aghitza
Copy link

aghitza commented Nov 15, 2009

comment:7

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.

@aghitza
Copy link

aghitza commented Nov 15, 2009

Author: Alex Ghitza

@aghitza
Copy link

aghitza commented Nov 15, 2009

Attachment: trac_5482.patch.gz

apply this patch only

@mwhansen
Copy link
Contributor

Reviewer: Mike Hansen

@mwhansen
Copy link
Contributor

comment:8

Looks good to me.

@mwhansen
Copy link
Contributor

Merged: sage-4.3.alpha0

This issue was closed.
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

4 participants