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

Commit

Permalink
Trac 13158: local components bug finding minimal twist
Browse files Browse the repository at this point in the history
  • Loading branch information
loefflerd committed Jun 10, 2015
1 parent 336ae6c commit 1994692
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/sage/modular/local_comp/type_space.py
Expand Up @@ -364,6 +364,16 @@ def minimal_twist(self):
14
sage: TypeSpace(g, 7).is_minimal()
True
Test that :trac:`13158` is fixed::
sage: from sage.modular.local_comp.type_space import TypeSpace
sage: f=Newforms(256,names='a')[0]
sage: T=TypeSpace(f,2)
sage: g = T.minimal_twist(); g
q - a*q^3 + O(q^6)
sage: g.level()
64
"""
if self.is_minimal():
raise ValueError( "Form is already minimal" )
Expand All @@ -382,8 +392,9 @@ def minimal_twist(self):
V = A.submodule(VV, check=False)

D = V.decomposition()[0]
if len(D.star_eigenvalues()) == 1:
D._set_sign(D.star_eigenvalues()[0])
if len(D.star_eigenvalues()) == 2:
D = D.sign_submodule(1)
D._set_sign(D.star_eigenvalues()[0])
M = ModularForms(D.group(), D.weight())
ff = Newform(M, D, names='a')
return ff
Expand Down

0 comments on commit 1994692

Please sign in to comment.