Skip to content

Commit

Permalink
Trac #20823: parse_label() in sage/modular/modform/constructor.py fai…
Browse files Browse the repository at this point in the history
…ls in GammaH case

Currently, it does not return index in the GammaH case though the Gamma0
and Gamma1 case does.

In Newform(), both the group and the index is expected L485 in
sage/modular/modform/constructor.py

URL: http://trac.sagemath.org/20823
Reported by: klui
Ticket author(s): Kevin Lui
Reviewer(s): William Stein, Frédéric Chapoton
  • Loading branch information
Release Manager authored and vbraun committed Jun 15, 2016
2 parents 3383beb + b00abe1 commit b5f032d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/sage/modular/modform/constructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,11 @@ def parse_label(s):
(Congruence Subgroup Gamma1(11), 0)
sage: sage.modular.modform.constructor.parse_label('11wG1')
(Congruence Subgroup Gamma1(11), 22)
GammaH labels should also return the group and index (:trac:`20823`)::
sage: sage.modular.modform.constructor.parse_label('389cGH[16]')
(Congruence Subgroup Gamma_H(389) with H generated by [16], 2)
"""
m = re.match(r'(\d+)([a-z]+)((?:G.*)?)$', s)
if not m:
Expand All @@ -522,9 +527,7 @@ def parse_label(s):
if G[2] != '[' or G[-1] != ']':
raise ValueError("Invalid congruence subgroup label: %s" % G)
gens = [int(g.strip()) for g in G[3:-1].split(',')]
return arithgroup.GammaH(N, gens)
return arithgroup.GammaH(N, gens), index
else:
raise ValueError("Invalid congruence subgroup label: %s" % G)
return G, index


0 comments on commit b5f032d

Please sign in to comment.