Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use Parent in skew polynomials #37366

Merged
merged 1 commit into from
Feb 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading