Victor, eclib provides some (at least) of what you need, and is partly
wrapped in Sage.  Chris Wuthrich and I have been working on this
recently.  For example, eclib contains a program which does the
following (this is just a simple interface to underlying
functionality):

Enter curve: [0,-1,1,0,0]
>>> Level = conductor = 11 <<<
Minimal curve = [0,-1,1,0,0]

Enter sign (1,-1,0 for both):0
Newform information:

1 newform(s) at level 11:
p0=2
#ap=    25
1:      aplist = [ -2 -1 1 -2 1 4 -2 0 -1 0 7 3 -8 -6 8 -6 5 12 -7 -3 ...]
aq = [ -1 ]
ap0 = -2, dp0 = 2, np0 = 5, pdot = 10
SFE = 1,        L/P = 2/5
lplus = 1, mplus = 1
lminus = 3, mminus = 2
[(4,1;1,3),1,1;1]

Modular symbol map:
(0:1) = {0,oo} -> (2/5,0)
(1:1) = {0,1} -> (0,0)
(2:1) = {0,1/2} -> (2,0)
(3:1) = {0,1/3} -> (1,1)
(4:1) = {0,1/4} -> (-1,1)
(5:1) = {0,1/5} -> (-2,0)
(6:1) = {0,1/6} -> (-2,0)
(7:1) = {0,1/7} -> (-1,-1)
(8:1) = {0,1/8} -> (1,-1)
(9:1) = {0,1/9} -> (2,0)
(10:1) = {0,1/10} -> (0,0)
(1:0) = {oo,0} -> (-2/5,0)

Here the symbols on the left are M-symbols (c:d) giving coset reps for
Gamma0(N).

Feel free to write to me off list about this (but I do not promise to
answer until after the holiday!)

John Cremona

On Dec 21, 11:42 pm, victor <[email protected]> wrote:
> I wrote the following function, which does the job. Function below
> takes as input a positive integer N and outputs two objects: the first
> output is a list [g_i] of hyperbolic elements in Gamma0(N) which
> generate the abelianized (Gamma0(N)_hyp)_ab of the quotient
> Gamma0(N)_hyp of Gamma0(N) by the subgroup generated by parabolic and
> elliptic elements. Group (Gamma0(N)_hyp)_ab is naturally isomorphic to
> H_1(X_0(N), ZZ) and is therefore free of rank 2g over ZZ, where g
> stands for the genus of the curve. It can also be regarded as the
> cuspidal subspace of the module of modular symbols of level N and
> weight 2. The second output is the matrix of the coordinates of each
> of the modular symbols {oo, g_i(oo)}, expressed in the basis given by
> Sage of the space of modular symbols of level N and weight 2.
>
> Since I don't have much experience in programming,  the algorithm
> below is most probably not the most efficient one, I'll be happy if
> anybody suggests an improved version of it. In any case, I computed
> the elements g_i in such a way that the entry c in the lower-left
> corner is N or -N. This is something I needed in order to make my
> subsequent computations faster.
>
> def hypgens(N):
>     a=1;
>     G=Gamma0(N);
>     M=ModularSymbols(G);
>     d=M.cuspidal_subspace().dimension();
>     Gens=[];
>     GensM=[];
>     Mat=[];
>     MatAux=[];
>     rnext=matrix(Mat).rank();
>     while rnext<d:
>         a=a+1;
>         rant=rnext;
>         g=G.are_equivalent_cusps(Cusp(Infinity),Cusp(a/N),trans=True);
>         if g:
>             if (g.a()+g.d()).abs()>2:
>                 m=M.modular_symbol([Infinity,g.a()/g.c()]);
>                 c=m.list();
>                 MatAux.append(c);
>                 rnext=matrix(MatAux).rank();
>                 if rnext>rant:
>                     if rnext <= d:
>                         Mat.append(c);
>                         Gens.append(g);
>                         GensM.append(m);
>     return Gens,Matrix(Mat)
> -------------
>
> Example:
>
> sage: Gens11,Mat11=hypgens(11); Gens11;Mat11
>
> [[ 2 -1][11 -5], [ 3  1][11  4]]
>
> [ 0  0  1]
> [ 0 -1  1]
>
> Given a cuspidal modular symbol m in ModularSymbols(11), if one now
> wishes to find an element g in Gamma0(11) such that {oo, g(oo)} = m,
> one can do the following:
>
> sage: M=ModularSymbols(11);
> m = M.modular_symbol([8/177,-61/571]);
> X = Mat11.transpose().solve_right(vector(m.list()));X
> g=prod(Gens11[i]^(X[i]) for i in [0..len(X)-1]);g
>
> [-1453   377]
> [-3091   802]
>
> And one also has the factoization of this matrix as a product of the
> generating matrices g_i with c_i= 11 or -11.
>
> ----
>
> On 21 dic, 18:37, victor <[email protected]> wrote:
>
>
>
>
>
>
>
> > Let m be a modular symbol for the congruence subgroup G=Gamma0(N) for
> > some N.
>
> > If one assumes m is cuspidal, there exist elements g in G such that m
> > is equivalent to the symbol {0,g(0)}.
>
> > How can I compute one such g with sage? If possible, I'd like to find
> > g with as small coefficients as possible. I'd particularly interested
> > in finding g=[[a,b],[c,d]] with c small.
>
> > If m={c1,c2} then we can just type
> > G.are_equivalent_cusps(c1,c2,trans=True) and the answer is True,
> > because cuspidality means that c1 and c2 are equivalent cusps under G.
>
> > How can we compute g when, say, m={c1,c2}+{c3,c4} is cuspidal but c1
> > is not equivalent to c2, and c3 is not equivalent to c4? Is there an
> > optimal way of computing it?

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to