This is a bug in PARI, rather than in Sage, apparently:

                  GP/PARI CALCULATOR Version 2.9.4 (released)

          amd64 running linux (x86-64/GMP-6.1.0 kernel) 64-bit version

[...]

? nffactor(y^8 - y^6 + y^4 - y^2 + 1, x^4 + 1) \\ works

%1 =

[x^2 + Mod(-y^5, y^8 - y^6 + y^4 - y^2 + 1) 1]


[ x^2 + Mod(y^5, y^8 - y^6 + y^4 - y^2 + 1) 1]


? nffactor(y^8 - y^6 + y^4 - y^2 + 1, x^4 - 1) \\ boom

  ***   at top-level: nffactor(y^8-y^6+y^4

  ***                 ^--------------------

  *** nffactor: inconsistent concatenation t_VEC (2 elts) , t_COL (2 elts).

  ***   Break loop: type 'break' to go back to GP prompt



On 16 February 2018 at 16:54, <robert.poll...@gmail.com> wrote:

> The following code crashes (in Sage 8.1 and on CoCalc):
>
> sage: K=CyclotomicField(20)
> sage: R.<x>=PolynomialRing(K)
> sage: (x^4-1).factor()
> ------------------------------------------------------------
> ---------------
> PariError                                 Traceback (most
> recent call last)
> <ipython-input-3-12edfe8f4001> in <module>()
> ----> 1 (x**Integer(4)-Integer(1)).factor()
>
> /ext/sage/sage-8.1/src/sage/rings/polynomial/polynomial_element.pyx in
> sage.rings.polynomial.polynomial_element.Polynomial.factor (build/
> cythonized/sage/rings/polynomi
> al/polynomial_element.c:39428)()
>    4127                 # polynomial instead.
>    4128                 Rpari = R.pari_polynomial("y")
> -> 4129             G = list(Rpari.nffactor(f))
>    4130             # PARI's nffactor() ignores the unit, _
> factor_pari_helper()
>    4131             # adds back the unit of the factorization.
>
> cypari2/auto_gen.pxi in cypari2.gen.Gen_auto.nffactor()
>
> cypari2/handle_error.pyx in cypari2.handle_error._pari_err_handle()
>
> PariError: inconsistent concatenation t_VEC (2 elts) , t_COL (2 elts)
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to