If the integral polynomial is not monic then the roots need not be integral:

sage: R.<x> = 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:
>
> $SAGE_ROOT/devel/sage-main/sage/rings/polynomial/multi_polynomial_libsingular.pyx
>  
>
> contains 
>
> if not self._parent._base.is_field(): 
>     raise NotImplementedError, "Factorization of multivariate polynomials 
> over non-fields is not implemented." 
>
> It seems trivial to have at least working (but maybe slow) fix for ZZ: 
>
> if not self._parent._base.is_field(): 
>      if 
> type(self._parent._base)==sage.rings.integer_ring.IntegerRing_class: 
>          return sage.structure.factorization.Factorization ( [ 
> (t[0].change_ring(sage.rings.integer_ring.ZZ), t[1]) for t in 
> self.change_ring(sage.rings.rational_field.QQ).factor(proof) ] ) 
>      else: 
>          raise NotImplementedError, "Factorization of multivariate 
> polynomials over non-fields (except ZZ) is not implemented." 
>
> However, this sounds TOO easy. Is there some untriviality lying somewhere? 
>
> -- 
> Jori M�ntysalo 
>

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to