Skip to content

Commit 3b2314b

Browse files
committed
small changes
1 parent d954bc3 commit 3b2314b

File tree

4 files changed

+118
-141
lines changed

4 files changed

+118
-141
lines changed

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

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ class DrinfeldModule(Parent, UniqueRepresentation):
4747
polynomials with coefficients in `K`, whose multiplication is given
4848
by the rule `\tau \lambda = \lambda^q \tau` for any `\lambda \in K`.
4949
50-
A Drinfeld `\mathbb{F}_q[T]`-module over the `base
51-
\mathbb{F}_q[T]`-field `K` is an `\mathbb{F}_q`-algebra morphism
50+
A Drinfeld `\mathbb{F}_q[T]`-module over the base
51+
`\mathbb{F}_q[T]`-field `K` is an `\mathbb{F}_q`-algebra morphism
5252
`\phi: \mathbb{F}_q[T] \to K\{\tau\}` such that `\Im(\phi) \not\subset K`
5353
and `\phi` agrees with `\gamma` on `\mathbb{F}_q`.
5454
5555
For `a` in `\mathbb{F}_q[T]`, `\phi(a)` is denoted `\phi_a`.
5656
5757
The Drinfeld `\mathbb{F}_q[T]`-module `\phi` is uniquely determined
58-
by the image `\phi_T` of `T` this serves as input of the class.
58+
by the image `\phi_T` of `T`; this serves as input of the class.
5959
6060
.. NOTE::
6161
@@ -84,8 +84,8 @@ class DrinfeldModule(Parent, UniqueRepresentation):
8484
8585
sage: Fq = GF(49)
8686
sage: A.<T> = Fq[]
87-
sage: K.<z> = Frac(A)
88-
sage: psi = DrinfeldModule(A, [z, T+1])
87+
sage: K = Frac(A)
88+
sage: psi = DrinfeldModule(A, [K(T), T+1])
8989
sage: psi
9090
Drinfeld module defined by T |--> (T + 1)*t + T
9191
@@ -111,8 +111,10 @@ class DrinfeldModule(Parent, UniqueRepresentation):
111111
112112
- ``function_ring`` -- a univariate polynomial ring whose base field
113113
is a finite field
114+
114115
- ``gen`` -- the generator of the Drinfeld module; as a list of
115116
coefficients or an Ore polynomial
117+
116118
- ``name`` (default: ``'t'``) -- the name of the Ore polynomial ring
117119
generator
118120
@@ -131,7 +133,7 @@ class DrinfeldModule(Parent, UniqueRepresentation):
131133
.. NOTE::
132134
133135
Note that the definition of the base field is implicit; it is
134-
automatically defined as the compositum of all the parents of
136+
automatically defined as the compositum of all the parents of
135137
the coefficients.
136138
137139
The above Drinfeld module is finite; it can also be infinite::
@@ -337,7 +339,7 @@ class DrinfeldModule(Parent, UniqueRepresentation):
337339
sage: identity_morphism.ore_polynomial()
338340
1
339341
340-
It is easy to check if a morphism is an isogeny, endomorphism or
342+
One checks if a morphism is an isogeny, endomorphism or
341343
isomorphism::
342344
343345
sage: frobenius_endomorphism.is_isogeny()
@@ -355,17 +357,17 @@ class DrinfeldModule(Parent, UniqueRepresentation):
355357
356358
.. RUBRIC:: The Vélu formula
357359
358-
Let ``ore_pol`` be a nonzero Ore polynomial. We can decide if there
359-
exists a Drinfeld module ``psi`` such that ``ore_pol`` is an isogeny
360-
from ``self`` to ``psi``. If so, we find ``psi``::
360+
Let ``P`` be a nonzero Ore polynomial. We can decide if ``P``
361+
defines an isogeny with a given domain and, if it does, find
362+
the codomain::
361363
362-
sage: ore_pol = (2*z^6 + z^3 + 2*z^2 + z + 2)*t + z^11 + 2*z^10 + 2*z^9 + 2*z^8 + z^7 + 2*z^6 + z^5 + z^3 + z^2 + z
363-
sage: psi = phi.velu(ore_pol)
364+
sage: P = (2*z^6 + z^3 + 2*z^2 + z + 2)*t + z^11 + 2*z^10 + 2*z^9 + 2*z^8 + z^7 + 2*z^6 + z^5 + z^3 + z^2 + z
365+
sage: psi = phi.velu(P)
364366
sage: psi
365367
Drinfeld module defined by T |--> (2*z^11 + 2*z^9 + z^6 + 2*z^5 + 2*z^4 + 2*z^2 + 1)*t^2 + (2*z^11 + 2*z^10 + 2*z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z)*t + z
366-
sage: ore_pol in Hom(phi, psi)
368+
sage: P in Hom(phi, psi)
367369
True
368-
sage: ore_pol * phi(T) == psi(T) * ore_pol
370+
sage: P * phi(T) == psi(T) * P
369371
True
370372
371373
If the input does not define an isogeny, an exception is raised:
@@ -519,14 +521,19 @@ def __classcall_private__(cls, function_ring, gen, name='t', latexname=None):
519521
520522
- ``function_ring`` -- a univariate polynomial ring whose base
521523
is a finite field
524+
522525
- ``gen`` -- the generator of the Drinfeld module; as a list of
523526
coefficients or an Ore polynomial
527+
524528
- ``name`` (default: ``'t'``) -- the name of the Ore polynomial
525529
ring gen
530+
526531
- ``latexname`` (default: ``None``) -- the LaTeX name of the Drinfeld
527532
module
528533
529-
OUTPUT: a DrinfeldModule or FiniteDrinfeldModule
534+
OUTPUT:
535+
536+
A DrinfeldModule or FiniteDrinfeldModule.
530537
531538
TESTS::
532539
@@ -618,17 +625,20 @@ def __init__(self, gen, category, latexname=None):
618625
"""
619626
Initialize ``self``.
620627
621-
Validity of the input is checked in ``__classcall_private__``.
622-
The ``__init__`` just saves attributes.
628+
Validity of the input is checked in meth:`__classcall_private__`.
629+
The meth:`__init__` just saves attributes.
623630
624631
INPUT:
625632
626633
- ``function_ring`` -- a univariate polynomial ring whose base
627634
is a finite field
635+
628636
- ``gen`` -- the generator of the Drinfeld module; as a list of
629637
coefficients or an Ore polynomial
638+
630639
- ``name`` (default: ``'t'``) -- the name of the Ore polynomial
631640
ring gen
641+
632642
- ``latexname`` (default: ``None``) -- the LaTeX name of the Drinfeld
633643
module
634644
@@ -718,11 +728,10 @@ def _Hom_(self, other, category):
718728
INPUT:
719729
720730
- ``other`` -- the codomain of the homset
731+
721732
- ``category`` -- the category in which we consider the
722733
morphisms, usually ``self.category()``
723734
724-
OUTPUT: an homset
725-
726735
EXAMPLES::
727736
728737
sage: Fq = GF(25)
@@ -768,10 +777,8 @@ def _latex_(self):
768777
r"""
769778
Return a LaTeX representation of the Drinfeld module.
770779
771-
If a LaTeX name was given at init. using `latexname`, use the LaTeX
772-
name. Otherwise, create a representation.
773-
774-
OUTPUT: a string
780+
If a LaTeX name was given at initialization, we use it.
781+
Otherwise, we create a representation.
775782
776783
EXAMPLES::
777784
@@ -807,9 +814,7 @@ def _latex_(self):
807814

808815
def _repr_(self):
809816
r"""
810-
Return a string representation of the Drinfeld module.
811-
812-
OUTPUT: a string
817+
Return a string representation of this Drinfeld module.
813818
814819
EXAMPLES::
815820
@@ -844,7 +849,7 @@ def action(self):
844849
sage: action
845850
Action on Finite Field in z12 of size 5^12 over its base induced by Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 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
846851
847-
The action on elements is computed as follows::
852+
The action on elements is computed as follows::
848853
849854
sage: P = T^2 + T + 1
850855
sage: a = z12 + 1
@@ -905,8 +910,6 @@ def coefficients(self, sparse=True):
905910
906911
- ``sparse`` -- a boolean
907912
908-
OUTPUT: a list of elements in the base codomain
909-
910913
EXAMPLES::
911914
912915
sage: Fq = GF(25)
@@ -939,8 +942,6 @@ def gen(self):
939942
r"""
940943
Return the generator of the Drinfeld module.
941944
942-
OUTPUT: an Ore polynomial
943-
944945
EXAMPLES::
945946
946947
sage: Fq = GF(25)
@@ -973,8 +974,6 @@ def height(self):
973974
A rank two Drinfeld module is supersingular if and only if its
974975
height equals its rank.
975976
976-
OUTPUT: an integer
977-
978977
EXAMPLES::
979978
980979
sage: Fq = GF(25)
@@ -1015,15 +1014,14 @@ def height(self):
10151014
'function field characteristic')
10161015
else:
10171016
p = self.characteristic()
1018-
return Integer((self(p).valuation()) // (p.degree()))
1017+
return Integer(self(p).valuation() // p.degree())
10191018
except NotImplementedError:
10201019
raise NotImplementedError('height not implemented in this case')
10211020

10221021
def is_finite(self):
10231022
r"""
1024-
Return ``True`` whether the Drinfeld module is finite.
1025-
1026-
OUTPUT: a boolean
1023+
Return ``True`` if this Drinfeld module is finite,
1024+
``False`` otherwise.
10271025
10281026
EXAMPLES::
10291027

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

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class FiniteDrinfeldModule(DrinfeldModule):
9191
sage: chi(frob_pol, phi(T))
9292
0
9393
94-
This makes it possible to compute the Frobenius trace and norm::
94+
as well as its trace and norm::
9595
9696
sage: phi.frobenius_trace()
9797
6*T + 5*z3^2 + 5*z3 + 6
@@ -100,7 +100,7 @@ class FiniteDrinfeldModule(DrinfeldModule):
100100
sage: phi.frobenius_norm()
101101
2*T^2 + (z3^2 + z3 + 4)*T + 2*z3
102102
103-
And to decide if a Drinfeld module is ordinary or supersingular::
103+
We can decide if a Drinfeld module is ordinary or supersingular::
104104
105105
sage: phi.is_ordinary()
106106
True
@@ -129,10 +129,13 @@ def __init__(self, gen, category, latexname=None):
129129
130130
- ``function_ring`` -- a univariate polynomial ring whose base
131131
is a finite field
132+
132133
- ``gen`` -- the generator of the Drinfeld module as a list of
133134
coefficients or an Ore polynomial
135+
134136
- ``name`` (default: `'t'`) -- the name of the Ore polynomial
135137
ring gen
138+
136139
- ``latexname`` (default: ``None``) -- the LaTeX name of the Drinfeld
137140
module
138141
@@ -148,11 +151,9 @@ def __init__(self, gen, category, latexname=None):
148151
sage: phi._gen == ore_polring(gen)
149152
True
150153
"""
151-
152154
# NOTE: There used to be no __init__ here (which was fine). I
153155
# added one to ensure that FiniteDrinfeldModule would always
154156
# have _frobenius_norm and _frobenius_trace attributes.
155-
156157
super().__init__(gen, category, latexname)
157158
self._frobenius_norm = None
158159
self._frobenius_trace = None
@@ -166,8 +167,6 @@ def frobenius_endomorphism(self):
166167
*Frobenius endomorphism* is defined as the endomorphism whose
167168
defining Ore polynomial is `t^q`.
168169
169-
OUTPUT: a Drinfeld module morphism
170-
171170
EXAMPLES::
172171
173172
sage: Fq = GF(343)
@@ -179,6 +178,9 @@ def frobenius_endomorphism(self):
179178
From (gen): z6*t^2 + 1
180179
To (gen): z6*t^2 + 1
181180
Defn: t^2
181+
182+
TESTS::
183+
182184
sage: from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism
183185
sage: isinstance(phi.frobenius_endomorphism(), DrinfeldModuleMorphism)
184186
True
@@ -214,10 +216,9 @@ def frobenius_charpoly(self, var='X'):
214216
Note that the *Frobenius trace* is defined as `A(T)` and the
215217
*Frobenius norm* is defined as `B(T)`.
216218
217-
INPUT: (default: ``'T'``) the name of the second variable
219+
INPUT:
218220
219-
OUTPUT: an univariate polynomial with coefficients in the
220-
function ring
221+
- ``var`` (default: ``'X'``) -- the name of the second variable
221222
222223
EXAMPLES::
223224
@@ -283,8 +284,6 @@ def frobenius_norm(self):
283284
Let `n` be the degree of the base field over `\mathbb{F}_q` Then the
284285
Frobenius norm has degree `n`.
285286
286-
OUTPUT: an element in the function ring
287-
288287
EXAMPLES::
289288
290289
sage: Fq = GF(343)
@@ -331,26 +330,11 @@ def frobenius_trace(self):
331330
332331
Let `\mathbb{F}_q[T]` be the function ring, write `\chi = T^2 -
333332
A(X)T + B(X) \in \mathbb{F}_q[T][X]` for the characteristic
334-
polynomial of the Frobenius endomorphism. The *Frobenius norm*
335-
is defined as the polynomial `B(T) \in \mathbb{F}_q[T]`.
333+
polynomial of the Frobenius endomorphism. The *Frobenius trace*
334+
is defined as the polynomial `A(T) \in \mathbb{F}_q[T]`.
336335
337336
Let `n` be the degree over `\mathbb{F}_q` of the base codomain.
338-
Then the Frobenius trace has degree `\leq \frac{n}{2}`.
339-
340-
OUTPUT: an element in the function ring
341-
342-
ALGORITHM:
343-
344-
Let `A(T)` denote the Frobenius trace and `B(T)` denote the
345-
Frobenius norm. We begin by computing `B(T)`, see docstring
346-
of method :meth:`frobenius_norm` for details. The
347-
characteristic polynomial of the Frobenius yields `t^{2n} -
348-
\phi_A t^n + \phi_B = 0`, where `t^n` is the Frobenius
349-
endomorphism. As `\phi_B` is now known, we can compute
350-
`\phi_A = (t^{2n} + \phi_B) / t^n`. We get `A(T)` by
351-
inverting this quantity, using the method
352-
:meth:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule.invert`,
353-
see its docstring for details.
337+
Then the Frobenius trace has degree at most `\frac{n}{2}`.
354338
355339
EXAMPLES::
356340
@@ -372,6 +356,19 @@ def frobenius_trace(self):
372356
373357
sage: A == -phi.frobenius_charpoly()[1]
374358
True
359+
360+
ALGORITHM:
361+
362+
Let `A(T)` denote the Frobenius trace and `B(T)` denote the
363+
Frobenius norm. We begin by computing `B(T)`, see docstring
364+
of method :meth:`frobenius_norm` for details. The
365+
characteristic polynomial of the Frobenius yields `t^{2n} -
366+
\phi_A t^n + \phi_B = 0`, where `t^n` is the Frobenius
367+
endomorphism. As `\phi_B` is now known, we can compute
368+
`\phi_A = (t^{2n} + \phi_B) / t^n`. We get `A(T)` by
369+
inverting this quantity, using the method
370+
:meth:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule.invert`,
371+
see its docstring for details.
375372
"""
376373
self._check_rank_two()
377374
# Notations from Schost-Musleh:
@@ -392,8 +389,6 @@ def invert(self, ore_pol):
392389
- ``ore_pol`` -- the Ore polynomial whose preimage we want to
393390
compute
394391
395-
OUTPUT: a function ring element
396-
397392
EXAMPLES::
398393
399394
sage: Fq = GF(25)
@@ -417,6 +412,7 @@ def invert(self, ore_pol):
417412
Traceback (most recent call last):
418413
...
419414
ValueError: input must be in the image of the Drinfeld module
415+
420416
sage: phi.invert(t^3 + t^2 + 1)
421417
Traceback (most recent call last):
422418
...
@@ -494,8 +490,6 @@ def is_ordinary(self):
494490
A rank two Drinfeld module is *ordinary* if and only if it is
495491
not supersingular; see :meth:`is_supersingular`.
496492
497-
OUTPUT: a boolean
498-
499493
EXAMPLES::
500494
501495
sage: Fq = GF(343)
@@ -530,8 +524,6 @@ def is_supersingular(self):
530524
trace. An *ordinary* rank two finite Drinfeld module is a
531525
Drinfeld module that is not supersingular.
532526
533-
OUTPUT: a boolean
534-
535527
EXAMPLES::
536528
537529
sage: Fq = GF(343)

0 commit comments

Comments
 (0)