Ticket #5477 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

Make R.quotient_ring(I) normalize generator in the univariate case (easy to fix!)

Reported by: was Owned by: malb
Priority: major Milestone: sage-4.3.2
Component: commutative algebra Keywords:
Cc: Work issues:
Report Upstream: N/A Reviewers: Rishikesh
Authors: Alex Ghitza Merged in: sage-4.3.2.alpha0
Dependencies: Stopgaps:

Description

From a Sage Days 14 user (see below).

In short, in the univariate over-a-field case, R.quotient_ring(I) should normalize the generator of the ideal before forming the quotient.

In each case below "I" and "J" are defined by different choices of
generators and are recognized as the same ideal.  In case 1 the
quotients are considered equal and in case 2 they are considered
unequal.

(I checked this with the latest version)

Case 1:
----------

sage: R.<x> = PolynomialRing(QQ)
sage: I = R.ideal([x + x^2, x])
sage: J = R.ideal([2*x + 2*x^2, x])
sage: S = R.quotient_ring(I)
sage: U = R.quotient_ring(J)
sage: I==J
True
sage: S==U
True

Case 2:
----------

sage: R.<x> = PolynomialRing(QQ)
sage: I = R.ideal([x + x^2])
sage: J = R.ideal([2*x + 2*x^2])
sage: S = R.quotient_ring(I)
sage: U = R.quotient_ring(J)
sage: I==J
True
sage: S==U
False

Attachments

trac_5477.patch Download (2.4 KB) - added by AlexGhitza 3 years ago.

Change History

comment:1 Changed 4 years ago by mabshoff

  • Milestone changed from sage-3.4 to sage-3.4.1

comment:2 Changed 3 years ago by AlexGhitza

  • Status changed from new to needs_review
  • Report Upstream set to N/A
  • Authors set to Alex Ghitza

See attached patch for a fix.

Changed 3 years ago by AlexGhitza

comment:3 Changed 3 years ago by rishi

  • Status changed from needs_review to positive_review

Fixes by taking gcd with itself when only one generator is given, thus assuring a normalized generator.

comment:4 Changed 3 years ago by mvngu

  • Status changed from positive_review to closed
  • Reviewers set to Rishikesh
  • Resolution set to fixed
  • Merged in set to sage-4.3.2.alpha0
Note: See TracTickets for help on using tickets.