Opened 15 years ago

Closed 14 years ago

#1245 closed defect (fixed)

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

Reported by: ncalexan Owned by: Martin Albrecht
Priority: critical Milestone: sage-3.1.4
Component: commutative algebra Keywords: coercion coerce multivariate univariate composite
Cc: Robert Bradshaw Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

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 (7)

comment:1 Changed 15 years ago by Michael Abshoff

Milestone: sage-2.10sage-2.9.1

comment:2 Changed 15 years ago by Michael Abshoff

Owner: changed from William Stein to Martin Albrecht

comment:3 Changed 15 years ago by Michael Abshoff

Cc: Robert Bradshaw added

This is still a problem with Sage 2.10.

Cheers,

Michael

comment:4 Changed 15 years ago by Alex Ghitza

Component: algebraic geometrycommutative algebra

comment:5 Changed 15 years ago by Michael Abshoff

Priority: majorcritical

Still an issue with Sage 2.10.2.alpha0.

Cheers,

Michael

comment:6 Changed 14 years ago by Martin Albrecht

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

comment:7 Changed 14 years ago by Mike Hansen

Milestone: sage-3.2.1sage-3.1.4
Resolution: fixed
Status: newclosed

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
Note: See TracTickets for help on using tickets.