Skip to content

Commit

Permalink
Trac #32349: Remove base ring attribute for the class ModularFormsRing
Browse files Browse the repository at this point in the history
After the implementation of the parent/element framework for the class
{{{ModularFormsRing}}} in #31559, the {{{__base_ring}}} attribute was
not removed in the code. This ticket aims to remove this attribute and
associated method so that the class use the inherited parent base ring
method instead.

This ticket is part of #31560.

URL: https://trac.sagemath.org/32349
Reported by: gh-DavidAyotte
Ticket author(s): David Ayotte
Reviewer(s): Vincent Delecroix
  • Loading branch information
Release Manager committed Sep 5, 2021
2 parents 9c49c5e + 1960959 commit 815f504
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
13 changes: 0 additions & 13 deletions src/sage/modular/modform/element.py
Expand Up @@ -418,19 +418,6 @@ def _latex_(self):
"""
return self.q_expansion()._latex_()

def base_ring(self):
"""
Return the base_ring of self.
EXAMPLES::
sage: (ModularForms(117, 2).13).base_ring()
Rational Field
sage: (ModularForms(119, 2, base_ring=GF(7)).12).base_ring()
Finite Field of size 7
"""
return self.parent().base_ring()

def character(self, compute=True):
"""
Return the character of self. If ``compute=False``, then this will
Expand Down
14 changes: 0 additions & 14 deletions src/sage/modular/modform/ring.py
Expand Up @@ -236,7 +236,6 @@ def __init__(self, group, base_ring=QQ):
raise ValueError("Base ring (=%s) should be QQ, ZZ or a finite prime field" % base_ring)

self.__group = group
self.__base_ring = base_ring
self.__cached_maxweight = ZZ(-1)
self.__cached_gens = []
self.__cached_cusp_maxweight = ZZ(-1)
Expand Down Expand Up @@ -267,19 +266,6 @@ def group(self):
"""
return self.__group

def base_ring(self):
r"""
Return the coefficient ring of this modular forms ring.
EXAMPLES::
sage: ModularFormsRing(Gamma1(13)).base_ring()
Rational Field
sage: ModularFormsRing(Gamma1(13), base_ring = ZZ).base_ring()
Integer Ring
"""
return self.__base_ring

def gen(self, i):
r"""
Return the `i`-th generator of ``self``.
Expand Down

0 comments on commit 815f504

Please sign in to comment.