#13054: Pernicious bug for algebraic numbers
---------------------------------+------------------------------------------
Reporter: rbeezer | Owner: davidloeffler
Type: defect | Status: new
Priority: major | Milestone: sage-5.7
Component: number fields | Resolution:
Keywords: sd40.5 | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Description changed by jdemeyer:
Old description:
> I hit this bug '''all''' the time when doing linear algebra over `QQbar`
> - just as soon as matrices get to be about 10 x 10. David Roe helped
> locate the problem, I have no ideas about solutions.
>
> Line 1563 (5.1.beta0) of sage/rings/qqbar.py:
>
> {{{
> rev = parent(best_elt.Mod(pari_poly).modreverse().lift())
> }}}
>
> Bug results in the situation when {{{best_elt.Mod(pari_poly)}}} is not
> square free, in contrast to the PARI docs, which say:
>
> {{{
> Help: modreverse(a): reverse polymod of the polmod a, if it exists
> Doc: $a$ being a polmod $A(X)$ modulo $T(X)$, finds
> the ``reverse polmod'' $B(X)$ modulo $Q(X)$, where $Q$ is the minimal
> polynomial of $a$, which must be equal to the degree of $T$, and such
> that if
> $\theta$ is a root of $T$ then $\theta=B(\alpha)$ for a certain root
> $\alpha$
> of $Q$.
> }}}
>
> So the assumption of the equality of the degrees is violated. This
> causes a trap in PARI.
>
> It would make a lot of exact linear algebra '''much''' more reliable if
> this was resolved.
>
> I'll try to find a reproducible example.
New description:
PARI's `polred()` returns reducible polynomials. GP session:
{{{
gp> pol = x^4 - 4294967296*x^2 + 54265257667816538374400;
gp> L = polred(pol);
gp> factor(L[4])
%14 =
[x^2 + 211955648366398871041 2]
}}}
This bug causes problem with arithmetic over `QQbar`:
Line 1563 (5.1.beta0) of sage/rings/qqbar.py:
{{{
rev = parent(best_elt.Mod(pari_poly).modreverse().lift())
}}}
Here, we are calling `modreverse()` on a element of a subfield. It would
make a lot of exact linear algebra '''much''' more reliable if this was
resolved.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13054#comment:6>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.