Skip to content

Commit f2f9c10

Browse files
committed
small fix
1 parent f0aed91 commit f2f9c10

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

src/sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
from .drinfeld_module import DrinfeldModule
2828

29-
from sage.functions.other import ceil
3029
from sage.rings.integer_ring import ZZ
3130

3231
from sage.matrix.constructor import matrix
@@ -449,18 +448,19 @@ def _phiT_matrix(self, polynomial_part):
449448
sage: K.<T> = Frac(A)
450449
sage: phi = DrinfeldModule(A, [T, T^20])
451450
sage: phi._phiT_matrix(False)
452-
[0 0 0 0]
453-
[1 0 0 0]
454-
[0 1 0 0]
455-
[0 0 1 0]
451+
[0 0 0 0 0]
452+
[1 0 0 0 0]
453+
[0 1 0 0 0]
454+
[0 0 1 0 0]
455+
[0 0 0 1 1]
456456
sage: phi._phiT_matrix(True)
457457
(
458-
[0 0 0 0]
459-
[1 0 0 0]
460-
[0 1 0 0]
461-
[0 0 1 0], (T^15 + 1, T^10, T^5, 1)
458+
[0 0 0 0 0]
459+
[1 0 0 0 0]
460+
[0 1 0 0 0]
461+
[0 0 1 0 0]
462+
[0 0 0 1 1], (T^15 + 1, T^10, T^5, 1, 0)
462463
)
463-
464464
::
465465
466466
sage: psi = DrinfeldModule(A, [T, 1/T])
@@ -481,9 +481,7 @@ def _phiT_matrix(self, polynomial_part):
481481
gs.append(A(g.numerator().list()))
482482
else:
483483
raise ValueError("the Drinfeld module must have polynomial coefficients")
484-
s = max(ceil(gs[i].degree() / (q**i - 1)) for i in range(1, r+1)) - 1
485-
if s < 0:
486-
s = 0
484+
s = max(gs[i].degree() // (q**i - 1) for i in range(1, r+1))
487485

488486
M = matrix(Fq, s)
489487
if polynomial_part:

0 commit comments

Comments
 (0)