Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 906d5b2

Browse files
roed314David Roe
authored andcommitted
Fix base rings for many other parents in sage/modular/moform_hecketriangle
1 parent 5fbc34c commit 906d5b2

File tree

3 files changed

+71
-35
lines changed

3 files changed

+71
-35
lines changed

src/sage/modular/modform_hecketriangle/graded_ring.py

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,16 @@ def __init__(self, group, base_ring, red_hom, n):
109109
sage: MR.analytic_type()
110110
quasi meromorphic modular
111111
sage: MR.category()
112-
Category of commutative algebras over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
112+
Category of commutative algebras over Integer Ring
113+
sage: MR in MR.category()
114+
True
113115
114116
sage: QuasiMeromorphicModularFormsRing(n=infinity)
115117
QuasiMeromorphicModularFormsRing(n=+Infinity) over Integer Ring
116118
"""
117119

118120
FormsRing_abstract.__init__(self, group=group, base_ring=base_ring, red_hom=red_hom, n=n)
119-
CommutativeAlgebra.__init__(self, base_ring=self.coeff_ring(), category=CommutativeAlgebras(self.coeff_ring()))
121+
CommutativeAlgebra.__init__(self, base_ring=base_ring, category=CommutativeAlgebras(base_ring))
120122
self._analytic_type = self.AT(["quasi", "mero"])
121123

122124
class QuasiWeakModularFormsRing(FormsRing_abstract, CommutativeAlgebra, UniqueRepresentation):
@@ -170,11 +172,13 @@ def __init__(self, group, base_ring, red_hom, n):
170172
sage: MR.analytic_type()
171173
quasi weakly holomorphic modular
172174
sage: MR.category()
173-
Category of commutative algebras over Fraction Field of Univariate Polynomial Ring in d over Complex Field with 53 bits of precision
175+
Category of commutative algebras over Complex Field with 53 bits of precision
176+
sage: MR in MR.category()
177+
True
174178
"""
175179

176180
FormsRing_abstract.__init__(self, group=group, base_ring=base_ring, red_hom=red_hom, n=n)
177-
CommutativeAlgebra.__init__(self, base_ring=self.coeff_ring(), category=CommutativeAlgebras(self.coeff_ring()))
181+
CommutativeAlgebra.__init__(self, base_ring=base_ring, category=CommutativeAlgebras(base_ring))
178182
self._analytic_type = self.AT(["quasi", "weak"])
179183

180184
class QuasiModularFormsRing(FormsRing_abstract, CommutativeAlgebra, UniqueRepresentation):
@@ -228,11 +232,13 @@ def __init__(self, group, base_ring, red_hom, n):
228232
sage: MR.analytic_type()
229233
quasi modular
230234
sage: MR.category()
231-
Category of commutative algebras over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
235+
Category of commutative algebras over Integer Ring
236+
sage: MR in MR.category()
237+
True
232238
"""
233239

234240
FormsRing_abstract.__init__(self, group=group, base_ring=base_ring, red_hom=red_hom, n=n)
235-
CommutativeAlgebra.__init__(self, base_ring=self.coeff_ring(), category=CommutativeAlgebras(self.coeff_ring()))
241+
CommutativeAlgebra.__init__(self, base_ring=base_ring, category=CommutativeAlgebras(base_ring))
236242
self._analytic_type = self.AT(["quasi", "holo"])
237243

238244
class QuasiCuspFormsRing(FormsRing_abstract, CommutativeAlgebra, UniqueRepresentation):
@@ -286,11 +292,13 @@ def __init__(self, group, base_ring, red_hom, n):
286292
sage: MR.analytic_type()
287293
quasi cuspidal
288294
sage: MR.category()
289-
Category of commutative algebras over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
295+
Category of commutative algebras over Integer Ring
296+
sage: MR in MR.category()
297+
True
290298
"""
291299

292300
FormsRing_abstract.__init__(self, group=group, base_ring=base_ring, red_hom=red_hom, n=n)
293-
CommutativeAlgebra.__init__(self, base_ring=self.coeff_ring(), category=CommutativeAlgebras(self.coeff_ring()))
301+
CommutativeAlgebra.__init__(self, base_ring=base_ring, category=CommutativeAlgebras(base_ring))
294302
self._analytic_type = self.AT(["quasi", "cusp"])
295303

296304
class MeromorphicModularFormsRing(FormsRing_abstract, CommutativeAlgebra, UniqueRepresentation):
@@ -344,11 +352,13 @@ def __init__(self, group, base_ring, red_hom, n):
344352
sage: MR.analytic_type()
345353
meromorphic modular
346354
sage: MR.category()
347-
Category of commutative algebras over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
355+
Category of commutative algebras over Integer Ring
356+
sage: MR in MR.category()
357+
True
348358
"""
349359

350360
FormsRing_abstract.__init__(self, group=group, base_ring=base_ring, red_hom=red_hom, n=n)
351-
CommutativeAlgebra.__init__(self, base_ring=self.coeff_ring(), category=CommutativeAlgebras(self.coeff_ring()))
361+
CommutativeAlgebra.__init__(self, base_ring=base_ring, category=CommutativeAlgebras(base_ring))
352362
self._analytic_type = self.AT(["mero"])
353363

354364
class WeakModularFormsRing(FormsRing_abstract, CommutativeAlgebra, UniqueRepresentation):
@@ -402,11 +412,13 @@ def __init__(self, group, base_ring, red_hom, n):
402412
sage: MR.analytic_type()
403413
weakly holomorphic modular
404414
sage: MR.category()
405-
Category of commutative algebras over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
415+
Category of commutative algebras over Integer Ring
416+
sage: MR in MR.category()
417+
True
406418
"""
407419

408420
FormsRing_abstract.__init__(self, group=group, base_ring=base_ring, red_hom=red_hom, n=n)
409-
CommutativeAlgebra.__init__(self, base_ring=self.coeff_ring(), category=CommutativeAlgebras(self.coeff_ring()))
421+
CommutativeAlgebra.__init__(self, base_ring=base_ring, category=CommutativeAlgebras(base_ring))
410422
self._analytic_type = self.AT(["weak"])
411423

412424
class ModularFormsRing(FormsRing_abstract, CommutativeAlgebra, UniqueRepresentation):
@@ -459,11 +471,13 @@ def __init__(self, group, base_ring, red_hom, n):
459471
sage: MR.analytic_type()
460472
modular
461473
sage: MR.category()
462-
Category of commutative algebras over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
474+
Category of commutative algebras over Integer Ring
475+
sage: MR in MR.category()
476+
True
463477
"""
464478

465479
FormsRing_abstract.__init__(self, group=group, base_ring=base_ring, red_hom=red_hom, n=n)
466-
CommutativeAlgebra.__init__(self, base_ring=self.coeff_ring(), category=CommutativeAlgebras(self.coeff_ring()))
480+
CommutativeAlgebra.__init__(self, base_ring=base_ring, category=CommutativeAlgebras(base_ring))
467481
self._analytic_type = self.AT(["holo"])
468482

469483
class CuspFormsRing(FormsRing_abstract, CommutativeAlgebra, UniqueRepresentation):

src/sage/modular/modform_hecketriangle/space.py

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,15 @@ def __init__(self, group, base_ring, k, ep, n):
114114
sage: MF.analytic_type()
115115
quasi meromorphic modular
116116
sage: MF.category()
117-
Category of vector spaces over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
117+
Category of modules over Integer Ring
118+
sage: MF in MF.category()
119+
True
118120
sage: MF.ambient_space() == MF
119121
True
120122
"""
121123

122124
FormsSpace_abstract.__init__(self, group=group, base_ring=base_ring, k=k, ep=ep, n=n)
123-
Module.__init__(self, base=self.coeff_ring())
125+
Module.__init__(self, base=base_ring)
124126
self._analytic_type=self.AT(["quasi", "mero"])
125127

126128
class QuasiWeakModularForms(FormsSpace_abstract, Module, UniqueRepresentation):
@@ -159,13 +161,15 @@ def __init__(self, group, base_ring, k, ep, n):
159161
sage: MF.analytic_type()
160162
quasi weakly holomorphic modular
161163
sage: MF.category()
162-
Category of vector spaces over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
164+
Category of modules over Integer Ring
165+
sage: MF in MF.category()
166+
True
163167
sage: MF.is_ambient()
164168
True
165169
"""
166170

167171
FormsSpace_abstract.__init__(self, group=group, base_ring=base_ring, k=k, ep=ep, n=n)
168-
Module.__init__(self, base=self.coeff_ring())
172+
Module.__init__(self, base=base_ring)
169173
self._analytic_type=self.AT(["quasi", "weak"])
170174

171175
class QuasiModularForms(FormsSpace_abstract, Module, UniqueRepresentation):
@@ -204,13 +208,15 @@ def __init__(self, group, base_ring, k, ep, n):
204208
sage: MF.analytic_type()
205209
quasi modular
206210
sage: MF.category()
207-
Category of vector spaces over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
211+
Category of modules over Integer Ring
212+
sage: MF in MF.category()
213+
True
208214
sage: MF.is_ambient()
209215
True
210216
"""
211217

212218
FormsSpace_abstract.__init__(self, group=group, base_ring=base_ring, k=k, ep=ep, n=n)
213-
Module.__init__(self, base=self.coeff_ring())
219+
Module.__init__(self, base=base_ring)
214220
self._analytic_type=self.AT(["quasi", "holo"])
215221
self._module = FreeModule(self.coeff_ring(), self.dimension())
216222

@@ -364,7 +370,9 @@ def __init__(self, group, base_ring, k, ep, n):
364370
sage: MF.analytic_type()
365371
quasi cuspidal
366372
sage: MF.category()
367-
Category of vector spaces over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
373+
Category of modules over Integer Ring
374+
sage: MF in MF.category()
375+
True
368376
sage: MF.is_ambient()
369377
True
370378
@@ -373,7 +381,7 @@ def __init__(self, group, base_ring, k, ep, n):
373381
"""
374382

375383
FormsSpace_abstract.__init__(self, group=group, base_ring=base_ring, k=k, ep=ep, n=n)
376-
Module.__init__(self, base=self.coeff_ring())
384+
Module.__init__(self, base=base_ring)
377385
self._analytic_type=self.AT(["quasi", "cusp"])
378386
self._module = FreeModule(self.coeff_ring(), self.dimension())
379387

@@ -534,13 +542,15 @@ def __init__(self, group, base_ring, k, ep, n):
534542
sage: MF.analytic_type()
535543
meromorphic modular
536544
sage: MF.category()
537-
Category of vector spaces over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
545+
Category of modules over Integer Ring
546+
sage: MF in MF.category()
547+
True
538548
sage: MF.is_ambient()
539549
True
540550
"""
541551

542552
FormsSpace_abstract.__init__(self, group=group, base_ring=base_ring, k=k, ep=ep, n=n)
543-
Module.__init__(self, base=self.coeff_ring())
553+
Module.__init__(self, base=base_ring)
544554
self._analytic_type=self.AT(["mero"])
545555

546556
class WeakModularForms(FormsSpace_abstract, Module, UniqueRepresentation):
@@ -579,11 +589,13 @@ def __init__(self, group, base_ring, k, ep, n):
579589
sage: MF.analytic_type()
580590
weakly holomorphic modular
581591
sage: MF.category()
582-
Category of vector spaces over Fraction Field of Univariate Polynomial Ring in d over Complex Field with 53 bits of precision
592+
Category of vector spaces over Complex Field with 53 bits of precision
593+
sage: MF in MF.category()
594+
True
583595
"""
584596

585597
FormsSpace_abstract.__init__(self, group=group, base_ring=base_ring, k=k, ep=ep, n=n)
586-
Module.__init__(self, base=self.coeff_ring())
598+
Module.__init__(self, base=base_ring)
587599
self._analytic_type=self.AT(["weak"])
588600

589601
class ModularForms(FormsSpace_abstract, Module, UniqueRepresentation):
@@ -622,7 +634,9 @@ def __init__(self, group, base_ring, k, ep, n):
622634
sage: MF.analytic_type()
623635
modular
624636
sage: MF.category()
625-
Category of vector spaces over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
637+
Category of modules over Integer Ring
638+
sage: MF in MF.category()
639+
True
626640
sage: MF.module()
627641
Vector space of dimension 1 over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
628642
sage: MF.ambient_module() == MF.module()
@@ -636,11 +650,13 @@ def __init__(self, group, base_ring, k, ep, n):
636650
sage: MF.analytic_type()
637651
modular
638652
sage: MF.category()
639-
Category of vector spaces over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
653+
Category of modules over Integer Ring
654+
sage: MF in MF.category()
655+
True
640656
"""
641657

642658
FormsSpace_abstract.__init__(self, group=group, base_ring=base_ring, k=k, ep=ep, n=n)
643-
Module.__init__(self, base=self.coeff_ring())
659+
Module.__init__(self, base=base_ring)
644660
self._analytic_type = self.AT(["holo"])
645661
self._module = FreeModule(self.coeff_ring(), self.dimension())
646662

@@ -771,7 +787,9 @@ def __init__(self, group, base_ring, k, ep, n):
771787
sage: MF.analytic_type()
772788
cuspidal
773789
sage: MF.category()
774-
Category of vector spaces over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
790+
Category of modules over Integer Ring
791+
sage: MF in MF.category()
792+
True
775793
sage: MF.module()
776794
Vector space of dimension 1 over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
777795
sage: MF.ambient_module() == MF.module()
@@ -781,7 +799,7 @@ def __init__(self, group, base_ring, k, ep, n):
781799
"""
782800

783801
FormsSpace_abstract.__init__(self, group=group, base_ring=base_ring, k=k, ep=ep, n=n)
784-
Module.__init__(self, base=self.coeff_ring())
802+
Module.__init__(self, base=base_ring)
785803
self._analytic_type=self.AT(["cusp"])
786804
self._module = FreeModule(self.coeff_ring(), self.dimension())
787805

@@ -924,7 +942,9 @@ def __init__(self, group, base_ring, k, ep, n):
924942
sage: MF.analytic_type()
925943
zero
926944
sage: MF.category()
927-
Category of vector spaces over Fraction Field of Univariate Polynomial Ring in d over Complex Field with 53 bits of precision
945+
Category of vector spaces over Complex Field with 53 bits of precision
946+
sage: MF in MF.category()
947+
True
928948
sage: MF.module()
929949
Vector space of dimension 0 over Fraction Field of Univariate Polynomial Ring in d over Complex Field with 53 bits of precision
930950
sage: MF.ambient_module() == MF.module()
@@ -934,7 +954,7 @@ def __init__(self, group, base_ring, k, ep, n):
934954
"""
935955

936956
FormsSpace_abstract.__init__(self, group=group, base_ring=base_ring, k=k, ep=ep, n=n)
937-
Module.__init__(self, base=self.coeff_ring())
957+
Module.__init__(self, base=base_ring)
938958
self._analytic_type=self.AT([])
939959
self._module = FreeModule(self.coeff_ring(), self.dimension())
940960

src/sage/modular/modform_hecketriangle/subspace.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ def __init__(self, ambient_space, basis, check):
175175
sage: subspace.analytic_type()
176176
modular
177177
sage: subspace.category()
178-
Category of vector spaces over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
178+
Category of modules over Integer Ring
179+
sage: subspace in subspace.category()
180+
True
179181
sage: subspace.module()
180182
Vector space of degree 4 and dimension 2 over Fraction Field of Univariate Polynomial Ring in d over Integer Ring
181183
Basis matrix:
@@ -210,7 +212,7 @@ def __init__(self, ambient_space, basis, check):
210212
"""
211213

212214
FormsSpace_abstract.__init__(self, group=ambient_space.group(), base_ring=ambient_space.base_ring(), k=ambient_space.weight(), ep=ambient_space.ep(), n=ambient_space.hecke_n())
213-
Module.__init__(self, base=self.coeff_ring())
215+
Module.__init__(self, base=ambient_space.base_ring())
214216

215217
self._ambient_space = ambient_space
216218
self._basis = [v for v in basis]

0 commit comments

Comments
 (0)