Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in unit part of factorizations of multivariate polynomials #1391

Closed
williamstein opened this issue Dec 4, 2007 · 7 comments
Closed

bug in unit part of factorizations of multivariate polynomials #1391

williamstein opened this issue Dec 4, 2007 · 7 comments

Comments

@williamstein
Copy link
Contributor

Behold this behavior:

sage: R.<a,b,c,d> = QQ[]
sage: f =  (-1) * (a - d) * (-a + b) * (b - d) * (a - c) * (b - c) * (c - d)
sage: f.factor()
(-1) * (a - d) * (-a + b) * (b - d) * (a - c) * (b - c) * (c - d)
sage: F = f.factor()
sage: F[0][0]
-1
sage: F.unit_part ()
1

However it should be that F.unit_part() is -1 and F[0][0] is a-d.

Component: commutative algebra

Issue created by migration from https://trac.sagemath.org/ticket/1391

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Dec 26, 2007

comment:1

Bug Day material?

Cheers,

Michael

@sagetrac-mabshoff sagetrac-mabshoff mannequin modified the milestones: sage-2.10, sage-2.9.2 Dec 26, 2007
@malb
Copy link
Member

malb commented Jan 16, 2008

Attachment: trac_1391.patch.gz

@malb
Copy link
Member

malb commented Jan 16, 2008

comment:2

The attached patch fixes the issue

@ncalexan
Copy link
Mannequin

ncalexan mannequin commented Jan 19, 2008

comment:3

Patch looks reasonable. The parameter to factor() is not standard sage but seems appropriate. I say apply!

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Jan 20, 2008

comment:4

The patch no longer applies to me in 2.10.1.alpha0, so it probably needs just a rebase:

sage-2.10.1.alpha0/devel/sage$ patch -p1 --dry-run < trac_1391.patch
patching file sage/rings/polynomial/multi_polynomial_libsingular.pyx
Hunk #1 FAILED at 3096.
Hunk #2 succeeded at 3159 (offset 22 lines).
1 out of 2 hunks FAILED -- saving rejects to file sage/rings/polynomial/multi_polynomial_libsingular.pyx.rej

Cheers,

Michael

@sagetrac-mabshoff sagetrac-mabshoff mannequin changed the title bug in unit part of factorizations of multivariate polynomials [needs rebase] bug in unit part of factorizations of multivariate polynomials Jan 20, 2008
@williamstein
Copy link
Contributor Author

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Jan 20, 2008

comment:5

Merged in Sage 2.10.1.alpha0

@sagetrac-mabshoff sagetrac-mabshoff mannequin changed the title [needs rebase] bug in unit part of factorizations of multivariate polynomials bug in unit part of factorizations of multivariate polynomials Jan 20, 2008
@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Jan 20, 2008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants