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

Commit 858c9e7

Browse files
committed
Merge branch 'skew_polynomial_finite_order' into skew_polynomial_finite_field
2 parents 1bcdf9a + 3db3ff2 commit 858c9e7

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/sage/rings/polynomial/skew_polynomial_finite_order.pyx

+10-2
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,13 @@ cdef class SkewPolynomial_finite_order_dense(SkewPolynomial_generic_dense):
293293
sage: a.reduced_norm() * b.reduced_norm() == (a*b).reduced_norm()
294294
True
295295
296+
We check that the reduced norm is correctly computed for a
297+
constant polynomial::
298+
299+
sage: c = k.random_element()
300+
sage: S(c).reduced_norm() == c.norm()
301+
True
302+
296303
ALGORITHM:
297304
298305
If `r` (= the order of the twist map) is small compared
@@ -306,7 +313,6 @@ cdef class SkewPolynomial_finite_order_dense(SkewPolynomial_generic_dense):
306313
polynomial of the left multiplication by `X` on the quotient
307314
`K[X,\sigma] / K[X,\sigma] P` (which is a `K`-vector space
308315
of dimension `d`).
309-
310316
"""
311317
if self._norm is None:
312318
if self.is_zero():
@@ -317,7 +323,9 @@ cdef class SkewPolynomial_finite_order_dense(SkewPolynomial_generic_dense):
317323
exp = (parent.base_ring().cardinality() - 1) / (parent._constants.cardinality() - 1)
318324
order = self.parent()._order
319325
lc = section(self.leading_coefficient()**exp)
320-
if order < self.degree():
326+
if self.degree() == 0:
327+
self._norm = [ lc ]
328+
elif order < self.degree():
321329
M = self._matmul_c()
322330
self._norm = [ lc*section(x) for x in M.determinant().monic().list() ]
323331
else:

0 commit comments

Comments
 (0)