Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 1501
E = EllipticCurve('11a')
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(0)
1/5
S = E.modular_symbol_space(sign=1)
phi = S.integral_period_mapping() phi([oo, 0]) phi([oo, 17/13])
(2/5) (-8/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]
E = EllipticCurve('11a') s = E.modular_symbol() M = 13 print [s(a/M) for a in range(M)] pl = stats.TimeSeries([s(a/M) for a in range(M)]).plot_histogram() pl pl.save('plots/11a-Z%s.pdf'%M)
[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]
E = EllipticCurve('11a') s = E.modular_symbol() M = 100 v = [s(a/M) for a in range(M)]; print(v) pl = stats.TimeSeries(v).plot_histogram() pl pl.save('plots/11a-Z%s.pdf'%M)
[1/5, 1/5, 6/5, 1/5, -3/10, -4/5, 6/5, 1/5, -3/10, 1/5, 1/5, 1/5, -3/10, 1/5, 6/5, 17/10, 11/5, 27/10, 6/5, 1/5, 6/5, 27/10, 6/5, 27/10, -3/10, 7/10, 6/5, 1/5, -3/10, 27/10, 1/5, -23/10, -3/10, 1/5, -13/10, -4/5, -3/10, -23/10, 6/5, -23/10, -13/10, -23/10, -19/5, -23/10, -3/10, -4/5, -13/10, -23/10, -3/10, -23/10, -4/5, -23/10, -3/10, -23/10, -13/10, -4/5, -3/10, -23/10, -19/5, -23/10, -13/10, -23/10, 6/5, -23/10, -3/10, -4/5, -13/10, 1/5, -3/10, -23/10, 1/5, 27/10, -3/10, 1/5, 6/5, 7/10, -3/10, 27/10, 6/5, 27/10, 6/5, 1/5, 6/5, 27/10, 11/5, 17/10, 6/5, 1/5, -3/10, 1/5, 1/5, 1/5, -3/10, 1/5, 6/5, -4/5, -3/10, 1/5, 6/5, 1/5]
E = EllipticCurve('11a') s = E.modular_symbol() M = 1000 pl = stats.TimeSeries([s(a/M) for a in range(M)]).plot_histogram() pl pl.save('plots/11a-Z%s.pdf'%M)
stats.TimeSeries([s(a/M) for a in range(M)]).plot_histogram().save('plots/11a-Z1000.pdf')
M = 10000 stats.TimeSeries([s(a/M) for a in range(M)]).plot_histogram().save('11a-Z10000.pdf')
%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
Compiling ./modular_symbol_map.pyx...
s = ms(EllipticCurve('11a'))
%time M = 100000 i = 7 g = stats.TimeSeries([s(a, M) for a in range(M)]).plot_histogram() g g.save('plots/11a-Z%s.pdf'%M)
CPU time: 1.15 s, Wall time: 1.20 s
M = 1000000 ell = 7 for i in range(7): w = stats.TimeSeries([s(a, M) for a in range(M) if a%ell==i]) w.plot_histogram() ︠9b0204be-c869-4ce6-b29c-9e5c4f30415f︠ %time M = 1000000 v = stats.TimeSeries([s(a, M) for a in range(M)]) len(set(v)) stats.TimeSeries(v).plot_histogram().save('plots/11a-Z%s.pdf'%M)
38 CPU time: 3.55 s, Wall time: 3.55 s
M = 1500000 v = stats.TimeSeries([s(a, M) for a in range(M)]) len(set(v))
40
v
[0.2000, 0.7000, -0.8000, 1.2000, 0.2000 ... -0.3000, 0.2000, 1.2000, -0.8000, 0.7000]
stats.TimeSeries(v).plot_histogram()
E = EllipticCurve('11a') s = E.modular_symbol() M = 13 v = [s(a/M) for a in range(M)]; print(v) w = stats.TimeSeries(v).sums() pl = w.plot() + points(enumerate(w), pointsize=60, color='black') pl pl.save('plots/walk-11a-Z%s.pdf'%M)
[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]
stats.TimeSeries(v).sums().plot().save('plots/walk-11a-Z13.pdf')
%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 = EllipticCurve('11a').modular_symbol() M = 20; v = [s(a/M) for a in range(M)]; print(v) w = stats.TimeSeries(v).sums() pl = w.plot() + points(enumerate(w), pointsize=60, color='black') pl pl.save('plots/walk-11a-Z%s.pdf'%M)
[1/5, -4/5, 1/5, 17/10, 6/5, 7/10, 1/5, -4/5, -13/10, -4/5, -4/5, -4/5, -13/10, -4/5, 1/5, 7/10, 6/5, 17/10, 1/5, -4/5]
s = EllipticCurve('11a').modular_symbol() M = 50; v = [s(a/M) for a in range(M)]; print(v) w = stats.TimeSeries(v).sums() pl = w.plot() + points(enumerate(w), pointsize=20, color='black') pl pl.save('plots/walk-11a-Z%s.pdf'%M)
[1/5, 6/5, -3/10, 6/5, -3/10, 1/5, -3/10, 6/5, 11/5, 6/5, 6/5, 6/5, -3/10, 6/5, -3/10, 1/5, -3/10, -13/10, -3/10, 6/5, -13/10, -19/5, -3/10, -13/10, -3/10, -4/5, -3/10, -13/10, -3/10, -19/5, -13/10, 6/5, -3/10, -13/10, -3/10, 1/5, -3/10, 6/5, -3/10, 6/5, 6/5, 6/5, 11/5, 6/5, -3/10, 1/5, -3/10, 6/5, -3/10, 6/5]
s = EllipticCurve('11a').modular_symbol() M = 100; v = [s(a/M) for a in range(M)]; print(v) w = stats.TimeSeries(v).sums() pl = w.plot() + points(enumerate(w), pointsize=10, color='grey') pl pl.save('plots/walk-11a-Z%s.pdf'%M)
[1/5, 1/5, 6/5, 1/5, -3/10, -4/5, 6/5, 1/5, -3/10, 1/5, 1/5, 1/5, -3/10, 1/5, 6/5, 17/10, 11/5, 27/10, 6/5, 1/5, 6/5, 27/10, 6/5, 27/10, -3/10, 7/10, 6/5, 1/5, -3/10, 27/10, 1/5, -23/10, -3/10, 1/5, -13/10, -4/5, -3/10, -23/10, 6/5, -23/10, -13/10, -23/10, -19/5, -23/10, -3/10, -4/5, -13/10, -23/10, -3/10, -23/10, -4/5, -23/10, -3/10, -23/10, -13/10, -4/5, -3/10, -23/10, -19/5, -23/10, -13/10, -23/10, 6/5, -23/10, -3/10, -4/5, -13/10, 1/5, -3/10, -23/10, 1/5, 27/10, -3/10, 1/5, 6/5, 7/10, -3/10, 27/10, 6/5, 27/10, 6/5, 1/5, 6/5, 27/10, 11/5, 17/10, 6/5, 1/5, -3/10, 1/5, 1/5, 1/5, -3/10, 1/5, 6/5, -4/5, -3/10, 1/5, 6/5, 1/5]
s = ms(EllipticCurve('11a')) M = 1000 v = [s(a, M) for a in range(M)] stats.TimeSeries(v).sums().plot().save('plots/walk-11a-Z%s.pdf'%M)
s = ms(EllipticCurve('11a')) M = 10000 v = [s(a, M) for a in range(M)] stats.TimeSeries(v).sums().plot().save('plots/walk-11a-Z%s.pdf'%M)
s = ms(EllipticCurve('11a')) M = 100000 v = [s(a, M) for a in range(M)] stats.TimeSeries(v).sums().plot().save('plots/walk-11a-Z%s.pdf'%M)
s = ms(EllipticCurve('11a')) M = next_prime(100000); M v = [s(a, M) for a in range(M)] stats.TimeSeries(v).sums().plot().save('plots/walk-11a-Z%s.pdf'%M)
100003
M = 1000000 for lbl in ['11a', '37a', '389a']: name = 'plots/walk-%s-Z%s.pdf'%(lbl,M) if os.path.exists(name): continue print name s = ms(EllipticCurve(lbl)) v = [s(a, M) for a in range(M)] stats.TimeSeries(v).sums().plot().save(name)

Modular symbols sum versus the theoretical conjecture

%load modular_symbol_map.pyx def ms(E, sign=1): g = E.modular_symbol(sign=sign) h = ModularSymbolMap(g) d = float(h.denom) # this is *critical*; otherwise get int division below! return lambda a,b: h._eval1(a,b)[0]/d def f(ms, m): m = int(m) return stats.TimeSeries([ms(a,m) for a in range(1,m+1)]).scale(1/float(m)) def norm_plot(t, **kwds): "Normalized plot of a time series, normalized so the x-axis goes from 0 to 1." 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) def conj(float x, list a): cdef float PI = 3.1415926535897932384626433833 cdef float s = 0 cdef long an, n = 1 for an in a: s += an * sin(2*PI*n*x) / (n*n) n += 1 return s
/projects/c6b42aa2-a189-445d-8bb7-880848c5b633/.sagemathcloud/sage_server.py:920: DeprecationWarning: Importing tmp_dir from here is deprecated. If you need to use it, please import it directly from sage.misc.temporary_file See http://trac.sagemath.org/17460 for details. code = code_decorator(code)
f(x)=?12πΩ+n=1ansin(2πnx)n2.f(x) =_? \frac{1}{2\pi \Omega^+} \cdot \sum_{n=1}^{\infty} \frac{a_n \sin(2\pi n x)}{n^2}.
E = EllipticCurve('11a') D = float( 1 / (2*pi*E.period_lattice().omega()) ) anlist = E.anlist(10^4, python_ints=True)[1:] %time f_conj = plot(lambda x : conj(x, anlist)*D, (0,1), color='red') for M in [13, 50, 1000, 10^4, 10^5, 10^6]: print M g = plot_ms_sum(E, M) + f_conj show(g) g.save('plots/fM-11a-%s.pdf'%M)
CPU time: 1.54 s, Wall time: 1.54 s 13
50
1000
10000
100000
1000000
E = EllipticCurve('11a') D = float( 1 / (2*pi*E.period_lattice().omega()) ) anlist = E.anlist(10^4, python_ints=True)[1:] modsym = ms(E)
for M in [50, 100, 1000, 10000]: print M tm = walltime() z = f(modsym, M) dist = [conj(i/M, anlist)*D - z[i] for i in range(M)] v = stats.TimeSeries(dist) pl = v.plot_histogram(bins=len(v)/10) show(pl) pl.save('plots/dist-11a-%s.pdf'%M) print walltime(tm)
50
0.851037025452 100
0.808167934418 1000
1.7163040638 10000
9.56828713417