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

Commit

Permalink
Improved doc and example of _base_ring_to_fraction_field
Browse files Browse the repository at this point in the history
  • Loading branch information
johanrosenkilde committed Aug 16, 2016
1 parent db72757 commit 115cf04
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions src/sage/rings/polynomial/skew_polynomial_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.<t> = ZZ[]
sage: sigma = R.hom([t+1])
sage: T.<x> = 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.<x> = 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):
Expand Down

0 comments on commit 115cf04

Please sign in to comment.