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

Incorrect output of squarefree_decomposition for polynomials over finite fields #20003

Closed
lennartack mannequin opened this issue Feb 2, 2016 · 4 comments · Fixed by #35848
Closed

Incorrect output of squarefree_decomposition for polynomials over finite fields #20003

lennartack mannequin opened this issue Feb 2, 2016 · 4 comments · Fixed by #35848

Comments

@lennartack
Copy link
Mannequin

lennartack mannequin commented Feb 2, 2016

When using squarefree_decomposition on linear polynomials over a finite field, the coefficients are not divided by the unit part, resulting in an incorrect output.

sage: K.<x> = GF(7)[]
sage: (6*x+3).squarefree_decomposition()
(6) * (6*x + 3)
sage: (6*x+3).squarefree_decomposition().expand()
x + 4
sage: K.<x> = GF(5)[]
sage: (2*x).squarefree_decomposition()
(2) * 2*x

CC: @wbhart @mstreng

Component: factorization

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

@lennartack lennartack mannequin added this to the sage-7.1 milestone Feb 2, 2016
@lennartack

This comment has been minimized.

@mstreng
Copy link

mstreng commented Feb 3, 2016

comment:2

Is this a bug in Flint or does Sage wrap Flint incorrectly in factor_helper?

@lennartack
Copy link
Mannequin Author

lennartack mannequin commented Feb 4, 2016

comment:3

It seems Flint doesn't return a monic factor in case of a linear input. I attached a patch to "fix" it.

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 29, 2022

comment:4

Attachment: nmod_poly_linkage.pxi.patch.gz

@mkoeppe mkoeppe removed this from the sage-7.1 milestone Dec 29, 2022
mezzarobba added a commit to mezzarobba/sage that referenced this issue Jul 4, 2023
mezzarobba added a commit to mezzarobba/sage that referenced this issue Jul 4, 2023
mezzarobba added a commit to mezzarobba/sage that referenced this issue Oct 9, 2023
mezzarobba added a commit to mezzarobba/sage that referenced this issue Oct 13, 2023
mezzarobba added a commit to mezzarobba/sage that referenced this issue Oct 13, 2023
mezzarobba added a commit to mezzarobba/sage that referenced this issue Oct 15, 2023
mezzarobba added a commit to mezzarobba/sage that referenced this issue Oct 15, 2023
mezzarobba added a commit to mezzarobba/sage that referenced this issue Oct 21, 2023
mezzarobba added a commit to mezzarobba/sage that referenced this issue Oct 22, 2023
mezzarobba added a commit to mezzarobba/sage that referenced this issue Oct 31, 2023
mezzarobba added a commit to mezzarobba/sage that referenced this issue Nov 12, 2023
mezzarobba added a commit to mezzarobba/sage that referenced this issue Nov 13, 2023
vbraun pushed a commit to vbraun/sage that referenced this issue Dec 4, 2023
    
Upgrade to flint3.

Current Sage versions are not compatible with flint ≥ 3, and, though the
diff is not huge, there are enough changes that versions including this
PR will be incompatible with flint < 3.

Fixes sagemath#20003.
Closes sagemath#35993 as no longer relevant.

Related PRs in upstream projects:
* Singular/Singular#1177
* flintlib/flint#1408
* flintlib/flint#1489
* flintlib/flint#1492
* flintlib/flint#1611
* algebraic-solving/msolve#76
* flatsurf/e-antic#264

Additional changes still needed for optional packages to work:
* sagemath#36677
* upgrade e-antic
* possibly more

Planned follow-ups:
* sagemath#36449
* sagemath#36433
    
URL: sagemath#35848
Reported by: Marc Mezzarobba
Reviewer(s): Vincent Delecroix
@vbraun vbraun closed this as completed in a7b9ebc Dec 6, 2023
@mkoeppe mkoeppe added this to the sage-10.3 milestone Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants