Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[with patch, with 2 positive reviews] bug in modular symbols over GF(2) #1232

Closed
aghitza opened this issue Nov 21, 2007 · 5 comments
Closed

Comments

@aghitza
Copy link

aghitza commented Nov 21, 2007

Running

ModularSymbols(1,6,0,GF(2)).simple_factors()

results in

---------------------------------------------------------------------------
<type 'exceptions.AssertionError'>        Traceback (most recent call last)

/home/ghitza/sage/<ipython console> in <module>()

/opt/sage/local/lib/python2.5/site-packages/sage/modular/modsym/space.py in simple_factors(self)
    996         ASSUMPTION: self is a module over the anemic Hecke algebra.
    997         """
--> 998         return [S for S,_ in self.factorization()]
    999 
   1000     def star_eigenvalues(self):

/opt/sage/local/lib/python2.5/site-packages/sage/modular/modsym/ambient.py in factorization(self)
   1064         D = sage.structure.all.Factorization(D, cr=True)
   1065         assert r == s, "bug in factorization --  self has dimension %s, but sum of dimensions of factors is %s\n%s"%(
-> 1066             r, s, D)
   1067         self._factorization = D
   1068         return self._factorization

<type 'exceptions.AssertionError'>: bug in factorization --  self has dimension 2, but sum of dimensions of factors is 3
(Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 2 for Gamma_0(1) of weight 6 with sign 0 over Finite Field of size 2) * 
(Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 2 for Gamma_0(1) of weight 6 with sign 0 over Finite Field of size 2) * 
(Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 2 for Gamma_0(1) of weight 6 with sign 0 over Finite Field of size 2)

Outcome is similar for higher weights, e.g. for weight 100 I get "self has dimension 33, but sum of dimensions of factors is 65".

Component: modular forms

Issue created by migration from https://trac.sagemath.org/ticket/1232

@craigcitro
Copy link
Member

comment:2

So the problem here is straightforward to find -- M.factorization() breaks up the cuspidal parts into +1 and -1 eigenspaces; since 1 == -1 mod 2, they all get counted twice (so that the dimension will always be 2*cuspidal part + eisenstein part). The fix is also easy -- if 2 == 0, don't add the minus part in. However, the question is whether the space is still simple in this case, because otherwise we're now producing wrong answers.

@craigcitro
Copy link
Member

Attachment: trac_1232.patch.gz

@craigcitro
Copy link
Member

comment:3

Added a fix for this. The issue was what I mentioned above, namely the fact that +1 == -1 in characteristic 2. Alex Ghitza offered the following explanation of why this is a mathematically valid fix:

Here's my line of thought:
-- in Sage, "simple" means "simple as a module over the anemic Hecke
algebra adjoined the star involution *"
-- in characteristic 2, the star involution is actually not an
involution, but rather the identity map, and so "simple" should just
mean "simple as a module over the anemic Hecke algebra", so synonymous
to "splittable_anemic" in Sage terminology
-- the factorization() aka simple_factors() function for modular
symbols uses the HeckeModule_free_module.decomposition() function,
which implements an algorithm that breaks up the module as much as
possible using the anemic Hecke algebra; therefore the resulting
factors are "splittable_anemic", and so "simple" (for char 2).

The attached patch fixes the problem, and adds a doctest or two.

@williamstein
Copy link
Contributor

comment:6

This is good (ok and better than before). Note however that in a lot of cases simple_factors still won't work (due to the algorithm not really being meant for GF(p) -- instead one should use decomposition):

sage: n = ModularSymbols(54,weight=2,base_ring=GF(2)); n
Modular Symbols space of dimension 19 for Gamma_0(54) of weight 2 with sign 0 over Finite Field of size 2
sage: m =n.new_subspace()
sage: n.simple_factors()
Traceback (most recent call last):
...
AssertionError: bug in factorization --  self has dimension 19, but sum of dimensions of factors is 11
(Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 1 for Gamma_0(2) of weight 2 with sign 0 over Finite Field of size 2)^7 * 
(Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 7 for Gamma_0(27) of weight 2 with sign 0 over Finite Field of size 2)^2 * 
(Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 19 for Gamma_0(54) of weight 2 with sign 0 over Finite Field of size 2)
sage: m.simple_factors()
[Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 19 for Gamma_0(54) of weight 2 with sign 0 over Finite Field of size 2, Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 19 for Gamma_0(54) of weight 2 with sign 0 over Finite Field of size 2]
sage: f = n.decomposition(5)
sage: f
[
Modular Symbols subspace of dimension 4 of Modular Symbols space of dimension 19 for Gamma_0(54) of weight 2 with sign 0 over Finite Field of size 2,
Modular Symbols subspace of dimension 15 of Modular Symbols space of dimension 19 for Gamma_0(54) of weight 2 with sign 0 over Finite Field of size 2
]

@williamstein williamstein changed the title bug in modular symbols over GF(2) [with patch, with 2 positive reviews] bug in modular symbols over GF(2) Dec 15, 2007
@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Dec 15, 2007

comment:8

Merged in 2.9.rc0.

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Dec 15, 2007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants