# HG changeset patch
# User André Apitzsch <andre.apitzsch@st.ovgu.de>
# Date 1289833878 3600
# Node ID 12b28349045146d67ceb9b675cd9b94729bd6222
# Parent 470a408c7d96852070c8c0dc7ab70de1ed8d94b6
trac 10270: proof.polynomial factor
diff r 470a408c7d96 r 12b283490451 sage/rings/polynomial/multi_polynomial_libsingular.pyx
a

b


3469  3469  
3470  3470  return f 
3471  3471  
3472   def factor(self, proof=True): 
 3472  def factor(self, proof=None): 
3473  3473  r""" 
3474  3474  Return the factorization of this polynomial. 
3475  3475  
… 
… 

3585  3585  parent = self._parent 
3586  3586  _ring = parent._ring 
3587  3587  
 3588  if proof is None: 
 3589  from sage.structure.proof.proof import get_flag 
 3590  proof = get_flag(proof, "polynomial") 
 3591  
3588  3592  if(_ring != currRing): rChangeCurrRing(_ring) 
3589  3593  
3590  3594  if p_IsConstant(self._poly, _ring): 
# HG changeset patch
# User André Apitzsch <andre.apitzsch@st.ovgu.de>
# Date 1289896398 3600
# Node ID a26d8bd06640465f4b3d54fb70b93cfc8a803c88
# Parent c4d6f992ad8791d3dadc2a83da0b7a98f4a81ec3
trac 10270: add a test
diff r c4d6f992ad87 r a26d8bd06640 sage/rings/polynomial/multi_polynomial_libsingular.pyx
a

b


3573  3573  Traceback (most recent call last): 
3574  3574  ... 
3575  3575  NotImplementedError: Factorization of multivariate polynomials over nonfields is not implemented. 
 3576  
 3577  This shows that ticket \#10270 is fixed:: 
 3578  
 3579  sage: R.<x,y,z> = GF(3)[] 
 3580  sage: f = x^2*z^2+x*y*zy^2 
 3581  sage: proof.polynomial(False) 
 3582  sage: f.factor() 
 3583  x^2*z^2 + x*y*z  y^2 
 3584  sage: proof.polynomial(True) 
 3585  sage: f.factor() 
 3586  Traceback (most recent call last): 
 3587  ... 
 3588  NotImplementedError: proof = True factorization not implemented. Call factor with proof=False. 
3576  3589  """ 
3577  3590  cdef ring *_ring 
3578  3591  cdef poly *ptemp 