Opened 14 years ago

Closed 10 years ago

#5978 closed defect (fixed)

Can't construct the quotient of an univariate polynomial ring by its zero ideal

Reported by: jmbr Owned by: tbd
Priority: minor Milestone: sage-5.8
Component: algebra Keywords:
Cc: Merged in: sage-5.8.beta1
Authors: Travis Scrimshaw Reviewers: Luis Felipe Tabera Alonso
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by tscrim)

----------------------------------------------------------------------
| Sage Version 3.4.2.rc0, Release Date: 2009-04-30                   |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: R = QQ['x']
sage: R.quotient(R.zero_ideal())
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/mabshoff/.sage/temp/sage.math.washington.edu/1567/_home_mabshoff__sage_init_sage_0.py in <module>()

/scratch/mabshoff/sage-3.4.2.final/local/lib/python2.5/site-packages/sage/rings/ring.so in sage.rings.ring.CommutativeRing.quotient (sage/rings/ring.c:6627)()

/scratch/mabshoff/sage-3.4.2.final/local/lib/python2.5/site-packages/sage/rings/quotient_ring.pyc in QuotientRing(R, I, names)
    137     try:
    138         if I.is_principal():
--> 139             return R.quotient_by_principal_ideal(I.gen(), names)
    140     except (AttributeError, NotImplementedError):
    141         pass

/scratch/mabshoff/sage-3.4.2.final/local/lib/python2.5/site-packages/sage/rings/polynomial/polynomial_ring.pyc in quotient_by_principal_ideal(self, f, names)
   1092         """
   1093         import sage.rings.polynomial.polynomial_quotient_ring
-> 1094         return sage.rings.polynomial.polynomial_quotient_ring.PolynomialQuotientRing(self, f, names)
   1095     
   1096 

/scratch/mabshoff/sage-3.4.2.final/local/lib/python2.5/site-packages/sage/rings/polynomial/polynomial_quotient_ring.pyc in PolynomialQuotientRing(ring, polynomial, names)
    149     c = polynomial.leading_coefficient()
    150     if not c.is_unit():
--> 151         raise TypeError, "polynomial must have unit leading coefficient"
    152     R = ring.base_ring()
    153     if isinstance(R, sage.rings.integral_domain.IntegralDomain):

TypeError: polynomial must have unit leading coefficient

Apply: trac_5978-quotient_zero_ideal-ts.patch

Attachments (1)

trac_5978-quotient_zero_ideal-ts.patch (3.5 KB) - added by jdemeyer 10 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 14 years ago by jmbr

Description: modified (diff)

comment:2 Changed 14 years ago by mabshoff

Description: modified (diff)
Milestone: sage-4.0

Do not attach the error message, but post it verbatim into the ticket.

Also always assign a milestone.

comment:3 Changed 14 years ago by AlexGhitza

Summary: Can't construct the quotient of an univariate polynomial ring by it's zero idealCan't construct the quotient of an univariate polynomial ring by its zero ideal

comment:4 Changed 10 years ago by tscrim

Authors: Travis Scrimshaw
Report Upstream: N/A
Status: newneeds_review

Fixed by making the quotient by a zero ideal return the original ring.

sage: ZZ.quotient(ZZ.zero_ideal()) is ZZ
True
sage: R = QQ['x']
sage: R.quotient(R.zero_ideal()) is R
True

comment:5 Changed 10 years ago by tscrim

Fixed this for quotient_by_principal_ideal() method in polynomial ring as well.

For patchbot:

Apply: trac_5978-quotient_zero_ideal-ts.2.patch

Last edited 10 years ago by tscrim (previous) (diff)

comment:6 Changed 10 years ago by tscrim

Description: modified (diff)

Fixed other doctests.

For patchbot:

Apply: trac_5978-quotient_zero_ideal-ts.patch

comment:7 Changed 10 years ago by lftabera

Reviewers: Luis Felipe Tabera Alonso
Status: needs_reviewpositive_review

the patch looks good to me. I have made also further tests. Positive review.

Apply: trac_5978-quotient_zero_ideal-ts.patch

comment:8 Changed 10 years ago by tscrim

Thank you for the review.

Travis

Changed 10 years ago by jdemeyer

comment:9 Changed 10 years ago by jdemeyer

Rebased to sage-5.8.beta0.

comment:10 Changed 10 years ago by jdemeyer

Merged in: sage-5.8.beta1
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.