# HG changeset patch
# User Maarten Derickx <m.derickx.student@gmail.com>
# Date 1320671100 28800
# Node ID 3f460566bb7ef859531f4055434a630ae8f9bcab
# Parent e9358921aa011e6d19abdcf60337ead44f405d57
#9054 fix last few doctests.
diff git a/sage/rings/function_field/function_field_order.py b/sage/rings/function_field/function_field_order.py
a

b


214  214  sage: O = L.equation_order(); O 
215  215  Order in Function field in y defined by y^4 + x*y + 4*x + 1 
216  216  sage: type(O) 
217   <class 'sage.rings.function_field.function_field_order.FunctionFieldOrder_basis'> 
 217  <class 'sage.rings.function_field.function_field_order.FunctionFieldOrder_basis_with_category'> 
218  218  
219  219  The basis only defines an order if the module it generates is closed under multiplication 
220  220  and contains the identity element (only checked when ``check`` is True):: 
… 
… 

365  365  sage: R = K.maximal_order(); R 
366  366  Maximal order in Rational function field in t over Finite Field of size 19 
367  367  sage: type(R) 
368   <class 'sage.rings.function_field.function_field_order.FunctionFieldOrder_rational'> 
 368  <class 'sage.rings.function_field.function_field_order.FunctionFieldOrder_rational_with_category'> 
369  369  """ 
370  370  FunctionFieldOrder.__init__(self, function_field) 
371  371  PrincipalIdealDomain.__init__(self, self, names = function_field.variable_names(), normalize = False) 
diff git a/sage/rings/polynomial/polynomial_element.pyx b/sage/rings/polynomial/polynomial_element.pyx
a

b


48  48  import sage.rings.finite_rings.integer_mod_ring 
49  49  import sage.rings.complex_field 
50  50  import sage.rings.fraction_field_element 
51   import sage.rings.function_field.function_field 
52  51  import sage.rings.infinity as infinity 
53  52  #import sage.misc.misc as misc 
54  53  from sage.misc.sage_eval import sage_eval 
… 
… 

2490  2489  that this method is called instead to factor univariate 
2491  2490  polynomials over this ring. This facility can be used to 
2492  2491  easily extend polynomial factorization to work over new rings 
2493   you introduce:: 
 2492  you introduce.:: 
2494  2493  
2495  2494  sage: R.<x> = QQ[] 
2496  2495  sage: (x^2 + 1).factor() 
2497  2496  x^2 + 1 
2498   sage: QQ._factor_univariate_polynomial = lambda f: f.change_ring(CDF).factor() 
 2497  sage: QQ._factor_univariate_polynomial = lambda f, proof: f.change_ring(CDF).factor() 
2499  2498  sage: fz = (x^2 + 1).factor(); fz # random order of factors, with noise 
2500  2499  (x  ... + I) * (x  I) 
2501  2500  sage: # Change noisy zero term which affects the order of factors: 
… 
… 

2796  2795  
2797  2796  R = self.parent().base_ring() 
2798  2797  if hasattr(R, '_factor_univariate_polynomial'): 
2799   return R._factor_univariate_polynomial(self) 
 2798  return R._factor_univariate_polynomial(self,proof=proof) 
2800  2799  
2801  2800  G = None 
2802  2801  ch = R.characteristic() 
… 
… 

2958  2957  else: 
2959  2958  G = self._pari_with_name('x').factor() 
2960  2959  
2961   elif sage.rings.function_field.function_field.is_FunctionField(R): 
2962   return R._factor_univariate_polynomial(self, proof=proof) 
2963  2960  
2964  2961  #elif padic_field.is_pAdicField(R): 
2965  2962  # G = list(self._pari_with_name('x').factorpadic(R.prime(), R.prec())) 