Skip to content

Commit

Permalink
gh-37366: use Parent in skew polynomials
Browse files Browse the repository at this point in the history
    
instead of the auld-class `Ring`

### 📝 Checklist

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
    
URL: #37366
Reported by: Frédéric Chapoton
Reviewer(s): Travis Scrimshaw
  • Loading branch information
Release Manager committed Feb 21, 2024
2 parents 3ffb70a + c5256fe commit 702e32f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/sage/rings/polynomial/skew_polynomial_finite_order.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ AUTHOR::
# (at your option) any later version.
# https://www.gnu.org/licenses/
# ***************************************************************************
from sage.rings.ring cimport Ring
from sage.structure.parent cimport Parent
from sage.structure.element cimport RingElement
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
from sage.rings.polynomial.skew_polynomial_element cimport SkewPolynomial_generic_dense
Expand Down Expand Up @@ -70,7 +70,6 @@ cdef class SkewPolynomial_finite_order_dense(SkewPolynomial_generic_dense):
self._charpoly = None
self._optbound = None


cdef _matphir_c(self) noexcept:
r"""
Return the matrix of the multiplication by `X^r` on
Expand Down Expand Up @@ -131,7 +130,7 @@ cdef class SkewPolynomial_finite_order_dense(SkewPolynomial_generic_dense):
from sage.matrix.constructor import matrix
cdef Py_ssize_t i, j, deb, k, r = self.parent()._order
cdef Py_ssize_t d = self.degree ()
cdef Ring base_ring = <Ring?>self.parent().base_ring()
cdef Parent base_ring = <Parent?>self.parent().base_ring()
cdef RingElement minusone = <RingElement?>base_ring(-1)
cdef RingElement zero = <RingElement?>base_ring(0)
cdef Polk = PolynomialRing (base_ring, 'xr')
Expand All @@ -152,7 +151,6 @@ cdef class SkewPolynomial_finite_order_dense(SkewPolynomial_generic_dense):
l[i] = self._parent.twisting_morphism()(l[i])
return matrix(Polk, r, r, M)


def reduced_trace(self, var=None):
r"""
Return the reduced trace of this skew polynomial.
Expand Down Expand Up @@ -415,7 +413,7 @@ cdef class SkewPolynomial_finite_order_dense(SkewPolynomial_generic_dense):
coeffs = [center(c) for c in self._charpoly]
return PolynomialRing(center, name=varcharpoly)(coeffs)

def is_central(self):
def is_central(self) -> bool:
r"""
Return ``True`` if this skew polynomial lies in the center.

Expand All @@ -439,7 +437,6 @@ cdef class SkewPolynomial_finite_order_dense(SkewPolynomial_generic_dense):
except ValueError:
return False


def bound(self):
r"""
Return a bound of this skew polynomial (i.e. a multiple
Expand Down

0 comments on commit 702e32f

Please sign in to comment.