Opened 14 years ago

Closed 13 years ago

#1245 closed defect (fixed)

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

Reported by: ncalexan Owned by: malb
Priority: critical Milestone: sage-3.1.4
Component: commutative algebra Keywords: coercion coerce multivariate univariate composite
Cc: robertwb Merged in:
Authors: Reviewers:
Report Upstream: 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 14 years ago by mabshoff

  • Milestone changed from sage-2.10 to sage-2.9.1

comment:2 Changed 14 years ago by mabshoff

  • Owner changed from was to malb

comment:3 Changed 14 years ago by mabshoff

  • Cc robertwb added

This is still a problem with Sage 2.10.

Cheers,

Michael

comment:4 Changed 14 years ago by AlexGhitza

  • Component changed from algebraic geometry to commutative algebra

comment:5 Changed 14 years ago by mabshoff

  • Priority changed from major to critical

Still an issue with Sage 2.10.2.alpha0.

Cheers,

Michael

comment:6 Changed 13 years ago by malb

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

comment:7 Changed 13 years ago by mhansen

  • Milestone changed from sage-3.2.1 to sage-3.1.4
  • Resolution set to fixed
  • Status changed from new to closed

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.