Skip to content

Commit

Permalink
sagemathgh-38199: Delete _check_rank_two method for Drinfeld modules
Browse files Browse the repository at this point in the history
    
This method does nothing if the Drinfeld module has rank two, and raises
an exception otherwise. It was introduced in the first version of the
implementation, when some methods were only available for the rank two
case (e.g. `frobenius_trace`, `frobenius_norm`, etc). A `grep` reveals
that the method is never called, which makes it useless. Therefore, I
propose to remove it.
    
URL: sagemath#38199
Reported by: Antoine Leudière
Reviewer(s): David Ayotte
  • Loading branch information
Release Manager committed Jul 20, 2024
2 parents 2fa55f3 + 7de3be5 commit 1b436ab
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,27 +759,6 @@ def _Hom_(self, other, category):
from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset
return DrinfeldModuleHomset(self, other, category)

def _check_rank_two(self):
r"""
Raise ``NotImplementedError`` if the rank is not two.
TESTS::
sage: Fq = GF(25)
sage: A.<T> = Fq[]
sage: K.<z12> = Fq.extension(6)
sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12
sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5])
sage: phi._check_rank_two()
sage: phi = DrinfeldModule(A, [p_root, 1])
sage: phi._check_rank_two()
Traceback (most recent call last):
...
NotImplementedError: rank must be 2
"""
if self.rank() != 2:
raise NotImplementedError('rank must be 2')

def _latex_(self):
r"""
Return a LaTeX representation of the Drinfeld module.
Expand Down

0 comments on commit 1b436ab

Please sign in to comment.