Opened 15 years ago

Closed 15 years ago

#1804 closed defect (fixed)

[with patch, positive review] Factorization.__mul__ assumes that the primes in the factorization commute, which may not be a valid assumption

Reported by: William Stein Owned by: somebody
Priority: major Milestone: sage-2.10.1
Component: basic arithmetic Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

This is LAME:

sage: R.<x,y> = FreeAlgebra(QQ, 2)
sage: F = Factorization([(x,3), (y,2)]); F
x^3 * y^2
sage: F*F
x^6 * y^4

Attachments (1)

ncalexan-1804.patch (8.1 KB) - added by ncalexan 15 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 15 years ago by William Stein

Same comments apply to invert in the file factorization.py.

sage: R.<x,y> = FreeAlgebra(QQ, 2)
sage: F = Factorization([(x,3), (y,2)]); F
x^3 * y^2
sage: F^(-1)
x^-3 * y^-2

Changed 15 years ago by ncalexan

Attachment: ncalexan-1804.patch added

comment:2 Changed 15 years ago by ncalexan

Summary: Factorization.__mul__ assumes that the primes in the factorization commute, which may not be a valid assumption[with patch, needs review] Factorization.__mul__ assumes that the primes in the factorization commute, which may not be a valid assumption

comment:3 Changed 15 years ago by Mike Hansen

Summary: [with patch, needs review] Factorization.__mul__ assumes that the primes in the factorization commute, which may not be a valid assumption[with patch, positive review] Factorization.__mul__ assumes that the primes in the factorization commute, which may not be a valid assumption

Looks good to me.

comment:4 Changed 15 years ago by Michael Abshoff

Resolution: fixed
Status: newclosed

Merged in Sage 2.10.1.alpha1

Note: See TracTickets for help on using tickets.