Ticket #1245 (closed defect: fixed)

Opened 1 year ago

Last modified 2 weeks ago

Error coercing multivariate polynomial rings with one variable into composite integer rings

Reported by: ncalexan Assigned to: malb
Priority: critical Milestone: sage-3.1.4
Component: commutative algebra Keywords: coercion coerce multivariate univariate composite
Cc: robertwb

Description

This works:

sage: PolynomialRing(ZZ, 2, 'x').gen() * Mod(1, 9)
x0
sage: PolynomialRing(ZZ, 2, 'x').gen() * Mod(1, 3)
x0

This doesn't:

sage: PolynomialRing(ZZ, 1, 'x').gen() * Mod(1, 3)
x
sage: PolynomialRing(ZZ, 1, 'x').gen() * Mod(1, 9)
---------------------------------------------------------------------------
<type 'exceptions.TypeError'>             Traceback (most recent call last)

/Users/ncalexan/<ipython console> in <module>()

/Users/ncalexan/element.pyx in sage.structure.element.RingElement.__mul__()

/Users/ncalexan/coerce.pyx in sage.structure.coerce.CoercionModel_cache_maps.bin_op_c()

<type 'exceptions.TypeError'>: unsupported operand parent(s) for '*': 'Multivariate Polynomial Ring in x over Integer Ring' and 'Ring of integers modulo 9'

Change History

12/19/2007 07:02:10 PM changed by mabshoff

  • milestone changed from sage-2.10 to sage-2.9.1.

12/19/2007 07:03:04 PM changed by mabshoff

  • owner changed from was to malb.

01/19/2008 07:03:34 PM changed by mabshoff

  • cc set to robertwb.

This is still a problem with Sage 2.10.

Cheers,

Michael

01/24/2008 01:00:22 AM changed by AlexGhitza

  • component changed from algebraic geometry to commutative algebra.

02/15/2008 03:02:49 PM changed by mabshoff

  • priority changed from major to critical.

Still an issue with Sage 2.10.2.alpha0.

Cheers,

Michael

08/18/2008 04:13:49 AM changed by malb

I'm stuck with this bug, I don't know where to look. Robert, can you take a look?

11/14/2008 01:41:04 AM changed by mhansen

  • status changed from new to closed.
  • resolution set to fixed.
  • milestone changed from sage-3.2.1 to sage-3.1.4.

This has been fixed in at least Sage 3.1.4

sage: sage: PolynomialRing(ZZ, 1, 'x').gen() * Mod(1, 3)
x
sage: sage: PolynomialRing(ZZ, 1, 'x').gen() * Mod(1, 9)
x
sage: _.parent()
Univariate Polynomial Ring in x over Ring of integers modulo 9