Re: [sage-devel] Re: Factorization of multivariate integer polynomial

2013-10-07 Thread Marco Streng
2013/10/7 Jori Mantysalo > On Mon, 7 Oct 2013, John Cremona wrote: > > sage: R. = ZZ[]; print (4*x^2-1).factor() >> --**--** >> --- >> NotImplementedError Traceback (most recent call >> last) >> > > But tha

Re: [sage-devel] Re: Factorization of multivariate integer polynomial

2013-10-07 Thread Jori Mantysalo
On Mon, 7 Oct 2013, John Cremona wrote: sage: R. = ZZ[]; print (4*x^2-1).factor() --- NotImplementedError Traceback (most recent call last) But that is just what I would like to "implement", i.e. make

Re: [sage-devel] Re: Factorization of multivariate integer polynomial

2013-10-07 Thread John Cremona
On 7 October 2013 08:15, Jori Mantysalo wrote: > On Fri, 4 Oct 2013, Marco Streng wrote: > >> Just take the factorization over QQ, then for each factor, make it a >> primitive integral polynomial, i.e., multiply by the lcm of the >> denominators of the coefficients and divide by the gcd of the num

Re: [sage-devel] Re: Factorization of multivariate integer polynomial

2013-10-07 Thread Jori Mantysalo
On Fri, 4 Oct 2013, Marco Streng wrote: Just take the factorization over QQ, then for each factor, make it a primitive integral polynomial, i.e., multiply by the lcm of the denominators of the coefficients and divide by the gcd of the numerators of the coefficients. Then you have a factorization

Re: [sage-devel] Re: Factorization of multivariate integer polynomial

2013-10-04 Thread Marco Streng
2013/10/4 Jori Mantysalo > On Fri, 4 Oct 2013, Volker Braun wrote: > > If the integral polynomial is not monic then the roots need not be >> integral: >> >> sage: R. = QQ[] >> sage: (4*x^2-1).factor() >> (4) * (x - 1/2) * (x + 1/2) >> > (4*x^2-1) = (2*x-1)*(2*x+1) ZZ[x] has unique factorization

Re: [sage-devel] Re: Factorization of multivariate integer polynomial

2013-10-04 Thread Jori Mantysalo
On Fri, 4 Oct 2013, Volker Braun wrote: If the integral polynomial is not monic then the roots need not be integral: sage: R. = QQ[] sage: (4*x^2-1).factor() (4) * (x - 1/2) * (x + 1/2) So this would not be factorizable in ZZ[x] but is factorizable in QQ[x] Of course. Duh. Anyways, is this

[sage-devel] Re: Factorization of multivariate integer polynomial

2013-10-04 Thread Volker Braun
If the integral polynomial is not monic then the roots need not be integral: sage: R. = QQ[] sage: (4*x^2-1).factor() (4) * (x - 1/2) * (x + 1/2) So this would not be factorizable in ZZ[x] but is factorizable in QQ[x] On Friday, October 4, 2013 12:44:41 PM UTC+1, Jori Mantysalo wrote: > > $SAG