Skip to content

Commit 4123efd

Browse files
author
Xavier Caruso
committed
Merge branch 'ore_not_extension' into useless_limitations
2 parents 227e9f5 + 58c4b14 commit 4123efd

File tree

5 files changed

+86
-131
lines changed

5 files changed

+86
-131
lines changed

src/sage/categories/drinfeld_modules.py

Lines changed: 30 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class DrinfeldModules(Category_over_base_ring):
7070
sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1])
7171
sage: C = phi.category()
7272
sage: C
73-
Category of Drinfeld modules over Finite Field in z of size 11^4 over its base
73+
Category of Drinfeld modules over Finite Field in z of size 11^4
7474
7575
The output tells the user that the category is only defined by its
7676
base.
@@ -88,7 +88,7 @@ class DrinfeldModules(Category_over_base_ring):
8888
sage: C.base_morphism()
8989
Ring morphism:
9090
From: Univariate Polynomial Ring in T over Finite Field of size 11
91-
To: Finite Field in z of size 11^4 over its base
91+
To: Finite Field in z of size 11^4
9292
Defn: T |--> z^3 + 7*z^2 + 6*z + 10
9393
9494
The so-called constant coefficient --- which is the same for all
@@ -123,7 +123,7 @@ class DrinfeldModules(Category_over_base_ring):
123123
True
124124
125125
sage: C.ore_polring()
126-
Ore Polynomial Ring in t over Finite Field in z of size 11^4 over its base twisted by Frob
126+
Ore Polynomial Ring in t over Finite Field in z of size 11^4 twisted by z |--> z^11
127127
sage: C.ore_polring() is phi.ore_polring()
128128
True
129129
@@ -165,20 +165,24 @@ class DrinfeldModules(Category_over_base_ring):
165165
sage: K.<z> = Fq.extension(4)
166166
sage: from sage.categories.drinfeld_modules import DrinfeldModules
167167
sage: base = Hom(A, K)(0)
168-
sage: C = DrinfeldModules(base)
168+
sage: C = DrinfeldModules(base) # known bug (blankline)
169+
<BLANKLINE>
169170
Traceback (most recent call last):
170171
...
171172
TypeError: base field must be a ring extension
172173
173-
::
174+
Note that `C.base_morphism()` has codomain `K` while
175+
the defining morphism of `C.base()` has codomain `K` viewed
176+
as an `A`-field. Thus, they differ::
174177
175178
sage: C.base().defining_morphism() == C.base_morphism()
176-
True
179+
False
177180
178181
::
179182
180183
sage: base = Hom(A, A)(1)
181-
sage: C = DrinfeldModules(base)
184+
sage: C = DrinfeldModules(base) # known bug (blankline)
185+
<BLANKLINE>
182186
Traceback (most recent call last):
183187
...
184188
TypeError: base field must be a ring extension
@@ -203,7 +207,7 @@ class DrinfeldModules(Category_over_base_ring):
203207
TypeError: function ring base must be a finite field
204208
"""
205209

206-
def __init__(self, base_field, name='t'):
210+
def __init__(self, base_morphism, name='t'):
207211
r"""
208212
Initialize ``self``.
209213
@@ -223,34 +227,23 @@ def __init__(self, base_field, name='t'):
223227
sage: p_root = z^3 + 7*z^2 + 6*z + 10
224228
sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1])
225229
sage: C = phi.category()
226-
sage: ore_polring.<t> = OrePolynomialRing(phi.base(), phi.base().frobenius_endomorphism())
230+
sage: ore_polring.<t> = OrePolynomialRing(K, K.frobenius_endomorphism())
227231
sage: C._ore_polring is ore_polring
228232
True
229-
sage: i = phi.base().coerce_map_from(K)
230-
sage: base_morphism = Hom(A, K)(p_root)
231-
sage: C.base() == K.over(base_morphism)
232-
True
233-
sage: C._base_morphism == i * base_morphism
234-
True
235233
sage: C._function_ring is A
236234
True
237-
sage: C._constant_coefficient == base_morphism(T)
235+
sage: C._constant_coefficient == C._base_morphism(T)
238236
True
239237
sage: C._characteristic(C._constant_coefficient)
240238
0
241239
"""
242-
# Check input is a ring extension
243-
if not isinstance(base_field, RingExtension_generic):
244-
raise TypeError('base field must be a ring extension')
245-
base_morphism = base_field.defining_morphism()
246240
self._base_morphism = base_morphism
241+
function_ring = self._function_ring = base_morphism.domain()
242+
base_field = self._base_field = base_morphism.codomain()
247243
# Check input is a field
248244
if not base_field.is_field():
249245
raise TypeError('input must be a field')
250-
self._base_field = base_field
251-
self._function_ring = base_morphism.domain()
252246
# Check domain of base morphism is Fq[T]
253-
function_ring = self._function_ring
254247
if not isinstance(function_ring, PolynomialRing_generic):
255248
raise NotImplementedError('function ring must be a polynomial '
256249
'ring')
@@ -262,7 +255,7 @@ def __init__(self, base_field, name='t'):
262255
Fq = function_ring_base
263256
A = function_ring
264257
T = A.gen()
265-
K = base_field # A ring extension
258+
K = base_field
266259
# Build K{t}
267260
d = log(Fq.cardinality(), Fq.characteristic())
268261
tau = K.frobenius_endomorphism(d)
@@ -284,7 +277,7 @@ def __init__(self, base_field, name='t'):
284277
i = A.coerce_map_from(Fq)
285278
Fq_to_K = self._base_morphism * i
286279
self._base_over_constants_field = base_field.over(Fq_to_K)
287-
super().__init__(base=base_field)
280+
super().__init__(base=base_field.over(base_morphism))
288281

289282
def _latex_(self):
290283
r"""
@@ -321,7 +314,7 @@ def _repr_(self):
321314
sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1])
322315
sage: C = phi.category()
323316
sage: C
324-
Category of Drinfeld modules over Finite Field in z of size 11^4 over its base
317+
Category of Drinfeld modules over Finite Field in z of size 11^4
325318
"""
326319
return f'Category of Drinfeld modules over {self._base_field}'
327320

@@ -378,7 +371,7 @@ def base_morphism(self):
378371
sage: C.base_morphism()
379372
Ring morphism:
380373
From: Univariate Polynomial Ring in T over Finite Field of size 11
381-
To: Finite Field in z of size 11^4 over its base
374+
To: Finite Field in z of size 11^4
382375
Defn: T |--> z^3 + 7*z^2 + 6*z + 10
383376
384377
sage: C.constant_coefficient() == C.base_morphism()(T)
@@ -421,7 +414,7 @@ def characteristic(self):
421414
422415
::
423416
424-
sage: psi = DrinfeldModule(A, [Frac(A).gen(), 1])
417+
sage: psi = DrinfeldModule(A, [T, 1])
425418
sage: C = psi.category()
426419
sage: C.characteristic()
427420
0
@@ -517,7 +510,7 @@ def ore_polring(self):
517510
sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1])
518511
sage: C = phi.category()
519512
sage: C.ore_polring()
520-
Ore Polynomial Ring in t over Finite Field in z of size 11^4 over its base twisted by Frob
513+
Ore Polynomial Ring in t over Finite Field in z of size 11^4 twisted by z |--> z^11
521514
"""
522515
return self._ore_polring
523516

@@ -595,7 +588,7 @@ def base(self):
595588
596589
The base can be infinite::
597590
598-
sage: sigma = DrinfeldModule(A, [Frac(A).gen(), 1])
591+
sage: sigma = DrinfeldModule(A, [T, 1])
599592
sage: sigma.base()
600593
Fraction Field of Univariate Polynomial Ring in T over Finite Field in z2 of size 5^2 over its base
601594
"""
@@ -615,17 +608,16 @@ def base_morphism(self):
615608
sage: phi.base_morphism()
616609
Ring morphism:
617610
From: Univariate Polynomial Ring in T over Finite Field in z2 of size 5^2
618-
To: Finite Field in z12 of size 5^12 over its base
611+
To: Finite Field in z12 of size 5^12
619612
Defn: 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
620613
621614
The base field can be infinite::
622615
623-
sage: sigma = DrinfeldModule(A, [Frac(A).gen(), 1])
616+
sage: sigma = DrinfeldModule(A, [T, 1])
624617
sage: sigma.base_morphism()
625-
Ring morphism:
618+
Coercion map:
626619
From: Univariate Polynomial Ring in T over Finite Field in z2 of size 5^2
627-
To: Fraction Field of Univariate Polynomial Ring in T over Finite Field in z2 of size 5^2 over its base
628-
Defn: T |--> T
620+
To: Fraction Field of Univariate Polynomial Ring in T over Finite Field in z2 of size 5^2
629621
"""
630622
return self.category().base_morphism()
631623

@@ -668,8 +660,7 @@ def characteristic(self):
668660
::
669661
670662
sage: B.<Y> = Fq[]
671-
sage: L = Frac(B)
672-
sage: psi = DrinfeldModule(A, [L(1), 0, 0, L(1)])
663+
sage: psi = DrinfeldModule(A, [B(1), 0, 0, 1])
673664
sage: psi.characteristic()
674665
Traceback (most recent call last):
675666
...
@@ -753,7 +744,7 @@ def ore_polring(self):
753744
sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5])
754745
sage: S = phi.ore_polring()
755746
sage: S
756-
Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 over its base twisted by Frob^2
747+
Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 twisted by z12 |--> z12^(5^2)
757748
758749
The Ore polynomial ring can also be retrieved from the category
759750
of the Drinfeld module::
@@ -782,7 +773,7 @@ def ore_variable(self):
782773
sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5])
783774
784775
sage: phi.ore_polring()
785-
Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 over its base twisted by Frob^2
776+
Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 twisted by z12 |--> z12^(5^2)
786777
sage: phi.ore_variable()
787778
t
788779
"""

0 commit comments

Comments
 (0)