non-QQ base rings in modular symbols

6 views
Skip to first unread message

Robert Miller

unread,
Jun 24, 2010, 10:28:41 PM6/24/10
to sage-devel, mgre...@ucalgary.ca
Today I helped Matt Greenberg solve (I think) a bug in modular symbols.

His complaint was that the following does not work:

sage: M = ModularSymbols(389,2,1,GF(7))
sage: C = M.cuspidal_subspace()
sage: N = C.new_subspace()
sage: D = N.decomposition()
sage: D[1].q_eigenform(10, 'a')

After a while of poking around, the following patch made it work, but
the change does not agree with the documentation of the function. I'd
like advice on the proper way to fix this, and whether not this is
correct:

diff -r 342fcdf4b4d3 sage/modular/modsym/heilbronn.pyx
--- a/sage/modular/modsym/heilbronn.pyx Thu Jun 24 17:16:40 2010 -0700
+++ b/sage/modular/modsym/heilbronn.pyx Thu Jun 24 19:27:36 2010 -0700
@@ -534,6 +534,7 @@
from sage.matrix.all import matrix
from sage.rings.all import QQ
T = matrix(QQ, len(indices), len(P1), sparse=False)
+ original_base_ring = R.base_ring()
if R.base_ring() != QQ:
R = R.change_ring(QQ)

@@ -593,6 +594,8 @@
sage.misc.misc.verbose("did reduction using dense multiplication",
t, level=1,
caller_name='hecke_images_gamma0_weight2')

+ if original_base_ring != QQ:
+ ans = ans.change_ring(original_base_ring)
return ans

--
Robert L. Miller
http://www.rlmiller.org/

William Stein

unread,
Jun 25, 2010, 12:54:48 AM6/25/10
to sage-...@googlegroups.com, mgre...@ucalgary.ca
On Thu, Jun 24, 2010 at 7:28 PM, Robert Miller <r...@rlmiller.org> wrote:
> Today I helped Matt Greenberg solve (I think) a bug in modular symbols.
>
> His complaint was that the following does not work:
>
> sage: M = ModularSymbols(389,2,1,GF(7))
> sage: C = M.cuspidal_subspace()
> sage: N = C.new_subspace()
> sage: D = N.decomposition()
> sage: D[1].q_eigenform(10, 'a')
>
> After a while of poking around, the following patch made it work, but
> the change does not agree with the documentation of the function. I'd
> like advice on the proper way to fix this, and whether not this is
> correct:

I think this is a good idea. You can make the change below *and* also
change the docstring.

I wouldn't be surprised if this does perhaps break something somewhere
else, so be sure to test it well.

-- William

>
> diff -r 342fcdf4b4d3 sage/modular/modsym/heilbronn.pyx
> --- a/sage/modular/modsym/heilbronn.pyx Thu Jun 24 17:16:40 2010 -0700
> +++ b/sage/modular/modsym/heilbronn.pyx Thu Jun 24 19:27:36 2010 -0700
> @@ -534,6 +534,7 @@
>     from sage.matrix.all import matrix
>     from sage.rings.all import QQ
>     T = matrix(QQ, len(indices), len(P1), sparse=False)
> +    original_base_ring = R.base_ring()
>     if R.base_ring() != QQ:
>         R = R.change_ring(QQ)
>
> @@ -593,6 +594,8 @@
>         sage.misc.misc.verbose("did reduction using dense multiplication",
>                                t, level=1,
> caller_name='hecke_images_gamma0_weight2')
>
> +    if original_base_ring != QQ:
> +        ans = ans.change_ring(original_base_ring)
>     return ans
>
>
>
> --
> Robert L. Miller
> http://www.rlmiller.org/
>

> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to sage-devel+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>

--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

Robert Miller

unread,
Jun 29, 2010, 1:43:01 PM6/29/10
to sage-devel
The patch is up:

http://trac.sagemath.org/sage_trac/ticket/9376

I haven't tested it thoroughly yet.

Robert Miller

unread,
Jul 14, 2010, 6:41:36 AM7/14/10
to sage-...@googlegroups.com, mgre...@ucalgary.ca
Ping!

Would someone familiar with modular symbols care to review this
ticket? It should be pretty easy...

http://trac.sagemath.org/sage_trac/ticket/9376

John Cremona

unread,
Jul 14, 2010, 7:17:40 AM7/14/10
to sage-...@googlegroups.com, mgre...@ucalgary.ca
I will look at it.

John

Reply all
Reply to author
Forward
0 new messages