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

factor is broken for polynomials over relative number fields #11218

Closed
lftabera opened this issue Apr 19, 2011 · 6 comments
Closed

factor is broken for polynomials over relative number fields #11218

lftabera opened this issue Apr 19, 2011 · 6 comments

Comments

@lftabera
Copy link
Contributor

I suspect this is a regression, but I do not have and old sage copy right now

sage: K=QQ[I]['x,t']
sage: K.inject_variables()
Defining x, t
sage: f=t^2+1
sage: f.factor()
(t + (-I)) * (t + (I))
sage: K=QQ[sqrt(5),I]['t']  
sage: K.inject_variables()
Defining t
sage: f=t^2+1   
sage: f.factor()
(x + I) * (x - I)
sage: prod(f.factor())==f
False
sage: f.parent()
Univariate Polynomial Ring in t over Number Field in sqrt5 with defining polynomial x^2 - 5 over its base field
sage: prod(f.factor()).parent()
Univariate Polynomial Ring in x over Number Field in sqrt5 with defining polynomial x^2 - 5 over its base field

Factor of uni-variate polynomials in polynomial rings (uni and multivariate) over towers of number fields are broken, since the output variable is always 'x', so it the output is in the wrong ring.

Component: factorization

Keywords: factorization, tower of number fields

Author: Francis Clarke

Reviewer: Luis Felipe Tabera Alonso

Merged: sage-4.7.1.alpha3

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

@lftabera lftabera added this to the sage-4.7.1 milestone Apr 19, 2011
@sagetrac-fwclarke
Copy link
Mannequin

sagetrac-fwclarke mannequin commented May 4, 2011

Attachment: trac_11218_factorization_fix.patch.gz

@sagetrac-fwclarke
Copy link
Mannequin

sagetrac-fwclarke mannequin commented May 4, 2011

comment:1

In the attached patch this defect is corrected very easily and a doctest is altered to demonstrate that the problem is solved.

@sagetrac-fwclarke
Copy link
Mannequin

sagetrac-fwclarke mannequin commented May 4, 2011

Author: Francis Clarke

@sagetrac-fwclarke sagetrac-fwclarke mannequin added t: bug labels May 4, 2011
@lftabera
Copy link
Contributor Author

lftabera commented Jun 7, 2011

comment:2

The problem has been solved. It was an easy mistake in the code. The doctest shows that the problem has disapeared and the documentation looks god.

Buildbot says that doctest pass.

Positive review.

@jdemeyer
Copy link

jdemeyer commented Jun 8, 2011

Reviewer: Luis Felipe Tabera Alonso

@jdemeyer
Copy link

jdemeyer commented Jun 8, 2011

Merged: sage-4.7.1.alpha3

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