CoCalc Shared Filescode / test_modsym.sagewsOpen in CoCalc with one click!
Author: Maarten Derickx
load("compute_lambda.sage") E = EllipticCurve("11a1") M = E.modular_symbol_space(sign=1) f = ModularSymbolMap(M) gn = E.modular_symbol_numerical() g = E.modular_symbol() N=11
def theta(f,m,d,i): i = i%d assert d%2 == 1 assert euler_phi(m)%d == 0 R = Integers(m) gen = R(primitive_root(m)) n = euler_phi(m)//d b = gen h = gen^d alphas = [] s = 0 for j in range(n): period = f((b^i * h^j).lift()/ m) s += period return s
d = 19 m_min = 20000 m_max = 24000 ms = [m for m in prime_range(m_min,m_max+1) if gcd(m, N) == 1 and euler_phi(m) % d == 0] print 'There are %s primes to use up to %s'%(len(ms), m_max) for m in ms: R = Integers(m) gen = R(primitive_root(m)) n = euler_phi(m)//d b = gen h = gen^d thetas = [theta(g,m,d,i)*5 for i in range(d)] x = [i for i in range(1,d) if thetas[i]==thetas[0] ] print x, R(b^x[0]*N)^n, len([i for i in thetas if i>0])
There are 26 primes to use up to 24000 [14] 1 10 [9] 1 10 [18] 1 12 [18] 1 8 [3] 1 7 [13] 1 9 [8] 1 11 [10] 1 10 [6] 1 8 [5] 1 10 [5] 1 10 [10] 1 8 [14] 1 9 [10] 1 10 [3] 1 8 [1, 6, 14] 1 9 [2] 1 9 [5] 1 10 [8] 1 12 [16] 1 10 [7] 1 7 [18] 1 5 [5] 1 10 [4] 1 8 [2, 8, 13] 1 11 [16] 1 10
m = ms[0] R = Integers(m) gen = R(primitive_root(m)) n = euler_phi(m)//d b = gen h = gen^d for i in srange(1,m): print g(i/m),g((i*N)^(-1)%m/m)
7/10 7/10 7/10 7/10 -9/5 -9/5 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 -9/5 -9/5 7/10 7/10 7/10 7/10 16/5 16/5 7/10 7/10 7/10 7/10 7/10 7/10 -9/5 -9/5 7/10 7/10 7/10 7/10 -9/5 -9/5 7/10 7/10 -9/5 -9/5 7/10 7/10 -9/5 -9/5 -9/5 -9/5 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 -9/5 -9/5 7/10 7/10 16/5 16/5 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 16/5 16/5 7/10 7/10 7/10 7/10 7/10 7/10 16/5 16/5 16/5 16/5 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 -9/5 -9/5 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 16/5 16/5 7/10 7/10 7/10 7/10 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 7/10 7/10 -9/5 -9/5 7/10 7/10 7/10 7/10 7/10 7/10 -9/5 -9/5 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 -9/5 -9/5 7/10 7/10 7/10 7/10 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 7/10 7/10 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 7/10 7/10 -9/5 -9/5 -9/5 -9/5 7/10 7/10 -9/5 -9/5 -9/5 -9/5 7/10 7/10 -9/5 -9/5 -9/5 -9/5 7/10 7/10 -9/5 -9/5 -9/5 -9/5 7/10 7/10 -9/5 -9/5 -9/5 -9/5 7/10 7/10 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 7/10 7/10 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 7/10 7/10 7/10 7/10 -9/5 -9/5 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 -9/5 -9/5 7/10 7/10 7/10 7/10 7/10 7/10 -9/5 -9/5 7/10 7/10 -9/5 -9/5 -9/5 -9/5 -9/5 -9/5 7/10 7/10 7/10 7/10 16/5 16/5 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 -9/5 -9/5 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 16/5 16/5 16/5 16/5 7/10 7/10 7/10 7/10 7/10 7/10 16/5 16/5 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 16/5 16/5 7/10 7/10 -9/5 -9/5 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 -9/5 -9/5 -9/5 -9/5 7/10 7/10 -9/5 -9/5 7/10 7/10 -9/5 -9/5 7/10 7/10 7/10 7/10 -9/5 -9/5 7/10 7/10 7/10 7/10 7/10 7/10 16/5 16/5 7/10 7/10 7/10 7/10 -9/5 -9/5 7/10 7/10 7/10 7/10 7/10 7/10 7/10 7/10 -9/5 -9/5 7/10 7/10 7/10 7/10