Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 1501

Modular Symbols

E = EllipticCurve('11a') show(E)
y2+y=x3x210x20\displaystyle y^2 + y = x^{3} - x^{2} - 10 x - 20
plot(E)
E.period_lattice().basis()
(1.26920930427955, 0.634604652139777 + 1.45881661693850*I)
s = E.modular_symbol(); s
Modular symbol with sign 1 over Rational Field attached to Elliptic Curve defined by y^2 + y = x^3 - x^2 - 10*x - 20 over Rational Field
s(17/13)
-4/5
s(5077/2015)
-4/5
[s(n/13) for n in [-13..13]]
[1/5, -4/5, 17/10, 17/10, -4/5, -4/5, -4/5, -4/5, -4/5, -4/5, 17/10, 17/10, -4/5, 1/5, -4/5, 17/10, 17/10, -4/5, -4/5, -4/5, -4/5, -4/5, -4/5, 17/10, 17/10, -4/5, 1/5]
︠38915aeb-9620-4f60-9c20-ad1ae6ab91deis︠ %md # Distribution of values Faster Cython code...

Distribution of values

Faster Cython code...

%load modular_symbol_map.pyx def ms(E, sign=1): g = E.modular_symbol(sign=sign) h = ModularSymbolMap(g) d = float(h.denom) # otherwise get int division! return lambda a,b: h._eval1(a,b)[0]/d s = ms(EllipticCurve('11a')) M = 1000000 %time stats.TimeSeries([s(a, M) for a in range(M)]).plot_histogram()
CPU time: 3.32 s, Wall time: 3.42 s
M = 2000000 # one million %time v = stats.TimeSeries([s(a, M) for a in range(M)])
CPU time: 6.02 s, Wall time: 6.02 s
len(set(v))
41
v.plot_histogram(bins=len(set(v)))
︠f71ff44d-d18a-4c65-8c72-039e41a553a3is︠ %md # (Not so) Random Walks from Modular Symbols

(Not so) Random Walks from Modular Symbols

s = EllipticCurve('11a').modular_symbol() M = 20 v = [s(a/M) for a in range(M)] w = stats.TimeSeries(v).sums() w.plot() + points(enumerate(w), pointsize=30, color='black')
s = EllipticCurve('11a').modular_symbol() M = next_prime(10000) v = [s(a/M) for a in range(M)] w = stats.TimeSeries(v).sums() w.plot() + points(enumerate(w), pointsize=7, color='grey')
︠94ac54d3-ea39-40e1-9fe5-3203464804afis︠ %md ## Modular symbols random walk versus conjecture $$ \frac{1}{2\pi \omega^+} \cdot \sum_{n=1}^{\infty} \frac{a_n \sin(2\pi n x)}{n^2}.$$

Modular symbols random walk versus conjecture

12πω+n=1ansin(2πnx)n2.\frac{1}{2\pi \omega^+} \cdot \sum_{n=1}^{\infty} \frac{a_n \sin(2\pi n x)}{n^2}.
def f(ms, m): m = int(m) return stats.TimeSeries([ms(a,m) for a in range(1,m+1)]).scale(1.0/m) def norm_plot(t, **kwds): s = float(len(t)) return line([(i/s, y) for i,y in enumerate(t.list())], **kwds) def plot_ms_sum(E, M, sign=1): g = ms(E, sign=sign) return norm_plot(f(g,M).sums())
%cython cdef extern from "math.h": float sin(float) from sage.stats.intlist cimport IntList # tricks to get 100x speedup... cdef float PI = 3.1415926535897932384626433833 def conj(E, int terms): cdef IntList v = IntList(E.anlist(terms)) cdef float D = float( 1 / (2*PI*E.period_lattice().omega()) ) if E.discriminant()>0: D *= 2 def f(float x): cdef float s = 0 cdef long an, n = 1 for n in range(1, terms): s += v._values[n] * sin(2*PI*n*x) / (n*n) return D * s return f
E = EllipticCurve('11a') M = 100 g = conj(E, 10000) plot_ms_sum(E, M) + plot(g, 0, 1, color='red')
E = EllipticCurve('11a') M = 1000 g = conj(E, 10000) plot_ms_sum(E, M) + plot(g, 0, 1, color='red')
E = EllipticCurve('11a') M = 10000 g = conj(E, 10000) plot_ms_sum(E, M) + plot(g, 0, 1, color='red')
E = EllipticCurve('11a') M = 100000 g = conj(E, 10000) plot_ms_sum(E, M) + plot(g, 0, 1, color='red')
E = EllipticCurve('11a') M = 1000000 g = conj(E, 10000) plot_ms_sum(E, M) + plot(g, 0, 1, color='red')
E = EllipticCurve('37a') M = 1000000 g = conj(E, 10000) plot_ms_sum(E, M) + plot(g, 0, 1, color='red') ︠af1cf606-baef-414d-bec7-bea5fa0d74b8s︠ E = EllipticCurve('389a') M = 1000000 g = conj(E, 10000) plot_ms_sum(E, M) + plot(g, 0, 1, color='red') ︠324a764a-0d02-4323-81a0-8de1cc0acdbe︠