File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
src/sage/rings/polynomial Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -2151,6 +2151,18 @@ cdef class Polynomial(CommutativePolynomial):
2151
2151
True
2152
2152
sage: f % f actor == 0
2153
2153
True
2154
+
2155
+ TESTS:
2156
+
2157
+ Ensure that :issue:`37445` is fixed::
2158
+
2159
+ sage: R.<x> = GF(13)[]
2160
+ sage: def irr(d, R): return f.monic() if (f := R.random_element(d)).is_irreducible() else irr(d, R)
2161
+ sage: f = prod(irr(6, R) for _ in range(10))
2162
+ sage: irr = f._cantor_zassenhaus_split_to_irreducible(6)
2163
+ sage: assert irr.degree() == 6
2164
+ sage: assert f % i rr == 0
2165
+ sage: assert irr.is_irreducible()
2154
2166
"""
2155
2167
R = self .parent()
2156
2168
q = self .base_ring().order()
@@ -2174,7 +2186,7 @@ cdef class Polynomial(CommutativePolynomial):
2174
2186
2175
2187
# Need to handle odd and even characteristic separately
2176
2188
if q % 2 :
2177
- h = self .gcd(pow (T, (q- 1 )// 2 , self ) - 1 )
2189
+ h = self .gcd(pow (T, (q** degree - 1 )// 2 , self ) - 1 )
2178
2190
else :
2179
2191
# Compute the trace of T with field of order 2^k
2180
2192
# sum T^(2^i) for i in range (degree * k)
You can’t perform that action at this time.
0 commit comments