#11890: Sage cannot factor polynomials over number fields with unfactorable
discriminant
-----------------------------------------+----------------------------------
Reporter: jdemeyer | Owner: davidloeffler
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.7.3
Component: number fields | Keywords: nffactor PARI
nfinit pari_nf
Work_issues: | Upstream: N/A
Reviewer: Luis Felipe Tabera Alonso | Author: Jeroen Demeyer
Merged: | Dependencies: #11891, #11130
-----------------------------------------+----------------------------------
Changes (by lftabera):
* reviewer: => Luis Felipe Tabera Alonso
Old description:
> Let `K` be a number field with a discriminant which cannot be factored.
> Let `f` be a polynomial in `K[x]`. Then Sage is unable to factor `f`
> because it calls PARI's `nfinit()` on `K`:
> {{{
> sage: p = next_prime(10^50); q = next_prime(10^51)
> sage: K = QuadraticField(p*q)
> sage: x = polygen(K); factor(x^2+1)
> [... takes a very long time ...]
> }}}
>
> The solution is to call `nfinit()` with the defining polynomial when the
> discriminant cannot be factored. If that fails, fall back to
> `factornf()`.
>
> See also #10910.
>
> '''Apply''' [attachment:11890.patch] and
> [attachment:11890_try_nffactor.patch].
New description:
Let `K` be a number field with a discriminant which cannot be factored.
Let `f` be a polynomial in `K[x]`. Then Sage is unable to factor `f`
because it calls PARI's `nfinit()` on `K`:
{{{
sage: p = next_prime(10^50); q = next_prime(10^51)
sage: K = QuadraticField(p*q)
sage: x = polygen(K); factor(x^2+1)
[... takes a very long time ...]
}}}
The solution is to call `nfinit()` with the defining polynomial when the
discriminant cannot be factored. If that fails, fall back to
`factornf()`.
See also #10910.
'''Apply''' [attachment:11890.patch],
[attachment:11890_try_nffactor.patch] and
[attachment:11890_reviewer.patch].
--
Comment:
The solution here to test the use of nffactor is more elegant than in
#10910 and with these patches there are no known failing cases. All
doctest pases on sage-4.7.2-alpha3 + #11130 + #11891
I give a positive review to Jeroen's patches but I add a patch that needs
review with a couple of things:
-On a complicated case we show that the discriminant is not fully factored
by trial division.
-The second example is a test case that shows that we really need the new
version of Pari in #11130 this case will fail with older versions of Pari
(See Pari bug pari bug #1207)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11890#comment:10>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.