From 115cf04ca51ba1ce82aa6e8c530a758dbb3b627b Mon Sep 17 00:00:00 2001 From: "Johan S. R. Nielsen" Date: Tue, 16 Aug 2016 16:43:38 +0200 Subject: [PATCH] Improved doc and example of _base_ring_to_fraction_field --- .../rings/polynomial/skew_polynomial_ring.py | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/sage/rings/polynomial/skew_polynomial_ring.py b/src/sage/rings/polynomial/skew_polynomial_ring.py index 5dc69188526..0c5135d6147 100644 --- a/src/sage/rings/polynomial/skew_polynomial_ring.py +++ b/src/sage/rings/polynomial/skew_polynomial_ring.py @@ -53,28 +53,26 @@ def _base_ring_to_fraction_field(S): """ - TODO - Return the indeterminate generator, one and twist map of - ``self``, or of the skew polynomial ring `S` associated - with the fraction field of the base ring of ``self`` if - the base ring of ``self`` is not a field (internal method). + Return the unique skew polynomial ring over the fraction field of + ``S.base_ring()`` which has ``S`` a sub-ring (internal method). - OUTPUT: + INPUT: - - ``x`` -- indeterminate generator of ``self`` or `S` + - ``S`` -- a skew polynomial ring. - - ``one`` -- one of ``self`` or `S` + OUTPUT: - - ``sigma`` -- twist map of ``self`` or `S` + - ``Q`` -- the skew polynomial ring over the fraction field of + ``S.base_ring``. EXAMPLES: + sage: from sage.rings.polynomial.skew_polynomial_ring import _base_ring_to_fraction_field sage: R. = ZZ[] sage: sigma = R.hom([t+1]) - sage: T. = R['x', sigma] - sage: points = [ (t, 3*t^2 + 4*t + 4) , (t^2, 4*t) ] - sage: p = T.lagrange_polynomial(points); p #indirect doctest - ((3*t^3 + 4*t^2)/(-t - 1))*x + (-3*t^3 - 7*t^2 - 4*t - 4)/-t + sage: S. = R['x', sigma] + sage: _base_ring_to_fraction_field(S) + Skew Polynomial Ring in x over Fraction Field of Univariate Polynomial Ring in t over Integer Ring twisted by t |--> t + 1 """ R = S.base_ring() if isinstance(R, Field):