Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 82338dc

Browse files
committed
Fix factorization over fraction fields that are isomorphic to function fields
1 parent effcedb commit 82338dc

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/sage/rings/fraction_field.py

+19
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,25 @@ def class_number(self):
839839
"""
840840
return 1
841841

842+
def _factor_univariate_polynomial(self, f):
843+
r"""
844+
Return the factorization of ``f`` over this field.
845+
846+
EXAMPLES::
847+
848+
sage: k.<a> = GF(9)
849+
sage: K = k['t'].fraction_field()
850+
sage: R.<x> = K[]
851+
sage: f = x^3 + a
852+
sage: f.factor()
853+
(t + 2*a + 1)^3
854+
855+
"""
856+
# The default implementation would try to convert this element to singular and factor there.
857+
# This fails silently over some base fields, see #23642, so we convert
858+
# to the function field and factor there.
859+
return f.change_ring(self.function_field()).factor().base_change(self)
860+
842861

843862
class FractionFieldEmbedding(DefaultConvertMap_unique):
844863
r"""

0 commit comments

Comments
 (0)