Attachment 'test.sage'
Download 1 def Gamma(E,r):
2 alpha = r.numerator()
3 beta = r.denominator()
4 N = E.conductor()
5
6 if gcd(beta,N) == 1:
7 [c,d] = xgcd(N*alpha,beta)[1:3] #this is [xgcd(4,5) is a list of numbers #where we first give gcd, then A, B such that 5A+5B = gcd (euclid) then [1:3] is #saying give me the last two. that is give me A and B (python starts count at zero)
8 c=-c
9 d=-d
10 dummy=c*N
11 Gamma = matrix(ZZ,[[-beta,alpha],[dummy,d]])
12 return [Gamma,0]
13
14 else:
15 [c,d] = xgcd(N*alpha,beta)[1:3]
16 [a,b] = xgcd(d,-c*N)[1:3]
17 newcusp = (a*(alpha/beta) + b)/(c*N*(alpha/beta) + d)
18 dummy=c*N
19 Gamma = matrix(ZZ,[[a,b],[dummy,d]])
20 return [Gamma,newcusp]
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.