The following is apparently not implemented (see 3.1.2 traceback at bottom): --- sage: R.<x1, x2> = PolynomialRing(Integers(), 2) sage: (x1*x2).factor() --- However, I think it would be trivial to implement: change the base ring of the polynomial to Rationals() and then factor. I believe the result returned by Singular is then guaranteed to have integer coefficients, so it can be coerced back.
Can someone more familiar with Singular confirm that? And if I am correct, would it be worth hacking factor() to enable this? Kiran --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /home/sdb1/r1/kedlaya/<ipython console> in <module>() /scratch/sage-x64/local/lib/python2.5/site-packages/sage/rings/ polynomial/multi_polynomial_element.py in factor(self) 1349 pass 1350 -> 1351 R._singular_().set_ring() 1352 S = self._singular_().factorize() 1353 factors = S[1] /scratch/sage-x64/local/lib/python2.5/site-packages/sage/rings/ polynomial/polynomial_singular_interface.py in _singular_(self, singular, force) 172 return R 173 except (AttributeError, ValueError): --> 174 return self._singular_init_(singular, force) 175 176 def _singular_init_(self, singular=singular_default, force=False): /scratch/sage-x64/local/lib/python2.5/site-packages/sage/rings/ polynomial/polynomial_singular_interface.py in _singular_init_(self, singular, force) 243 244 else: --> 245 raise TypeError, "no conversion to a Singular ring defined" 246 247 return self.__singular TypeError: no conversion to a Singular ring defined --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---