Skip to content

Commit a640a55

Browse files
committed
add nonzero parameter to basic_j_invariant
1 parent 4308b63 commit a640a55

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

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

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,13 +1052,27 @@ def basic_j_invariant_parameters(self, coeff_indices=None, nonzero=False):
10521052
return [(tuple(coeff_indices), tuple(p)) for p in integral_points
10531053
if gcd(p) == 1]
10541054

1055-
def basic_j_invariants(self):
1055+
def basic_j_invariants(self, nonzero=False):
10561056
r"""
10571057
Return a dictionary whose keys are all the basic `j`-invariants
10581058
parameters and values are the corresponding `j`-invariant.
10591059
10601060
See the method :meth:`j_invariant` for definitions.
10611061
1062+
INPUT:
1063+
1064+
- ``nonzero`` (boolean, default: ``False``) -- if this flag
1065+
is set to ``True``, then only the parameters for which the
1066+
corresponding basic `j`-invariant is nonzero are returned.
1067+
1068+
.. WARNING::
1069+
1070+
The usage of this method can be computationally
1071+
expensive e.g. if the rank is greater than four,
1072+
or if `q` is large. Setting the ``nonzero`` flag to ``True``
1073+
can speed up the computation considerably if the Drinfeld
1074+
module generator possesses multiple zero coefficients.
1075+
10621076
EXAMPLES::
10631077
10641078
sage: Fq = GF(25)
@@ -1069,6 +1083,12 @@ def basic_j_invariants(self):
10691083
sage: phi.basic_j_invariants()
10701084
{((1,), (26, 1)): z12^10 + 4*z12^9 + 3*z12^8 + 2*z12^7 + 3*z12^6 + z12^5 + z12^3 + 4*z12^2 + z12 + 2}
10711085
1086+
::
1087+
1088+
sage: phi = DrinfeldModule(A, [p_root, 0, 1, z12])
1089+
sage: phi.basic_j_invariants(nonzero=True)
1090+
{((2,), (651, 26)): z12^11 + 3*z12^10 + 4*z12^9 + 3*z12^8 + z12^7 + 2*z12^6 + 3*z12^4 + 2*z12^3 + z12^2 + 4*z12}
1091+
10721092
::
10731093
10741094
sage: A = GF(5)['T']
@@ -1087,7 +1107,7 @@ def basic_j_invariants(self):
10871107
T^11 + 3*T^10 + T^9 + 4*T^8 + T^7 + 2*T^6 + 2*T^4 + 3*T^3 + 2*T^2 + 3
10881108
"""
10891109
return {parameter: self.j_invariant(parameter, check=False)
1090-
for parameter in self.basic_j_invariant_parameters()}
1110+
for parameter in self.basic_j_invariant_parameters(nonzero=nonzero)}
10911111

10921112
def coefficient(self, n):
10931113
r"""

0 commit comments

Comments
 (0)