CoCalc Public FilesSageMath demo, part 2.ipynbOpen with one click!
Author: Peter Bruin
Views : 54

SageMath/CoCalc demo, part 2

In [1]:
%display latex

Newforms

In [2]:
S = CuspForms(Gamma1(15), 2); S
Cuspidalxsubspacexofxdimensionx1xofxModularxFormsxspacexofxdimensionx16xforxCongruencexSubgroupxGamma1(15)xofxweightx2xoverxRationalxField\verb|Cuspidal|\phantom{\verb!x!}\verb|subspace|\phantom{\verb!x!}\verb|of|\phantom{\verb!x!}\verb|dimension|\phantom{\verb!x!}\verb|1|\phantom{\verb!x!}\verb|of|\phantom{\verb!x!}\verb|Modular|\phantom{\verb!x!}\verb|Forms|\phantom{\verb!x!}\verb|space|\phantom{\verb!x!}\verb|of|\phantom{\verb!x!}\verb|dimension|\phantom{\verb!x!}\verb|16|\phantom{\verb!x!}\verb|for|\phantom{\verb!x!}\verb|Congruence|\phantom{\verb!x!}\verb|Subgroup|\phantom{\verb!x!}\verb|Gamma1(15)|\phantom{\verb!x!}\verb|of|\phantom{\verb!x!}\verb|weight|\phantom{\verb!x!}\verb|2|\phantom{\verb!x!}\verb|over|\phantom{\verb!x!}\verb|Rational|\phantom{\verb!x!}\verb|Field|
In [3]:
NF = S.newforms(); NF
[qq2q3q4+q5+O(q6)]\left[q - q^{2} - q^{3} - q^{4} + q^{5} + O(q^{6})\right]
In [4]:
Newforms(Gamma1(15), 2) == NF
True\mathrm{True}
In [5]:
Newforms(Gamma0(26), 2)
[qq2+q3+q43q5+O(q6),q+q23q3+q4q5+O(q6)]\left[q - q^{2} + q^{3} + q^{4} - 3q^{5} + O(q^{6}), q + q^{2} - 3q^{3} + q^{4} - q^{5} + O(q^{6})\right]
In [8]:
NF = Newforms(Gamma1(26), 2, names='a')
In [9]:
[f.character() for f in NF]
In [10]:
S = CuspForms(Gamma1(26), 2)
In [11]:
Sold = S.old_submodule(); Sold
ModularxFormsxsubspacexofxdimensionx4xofxModularxFormsxspacexofxdimensionx33xforxCongruencexSubgroupxGamma1(26)xofxweightx2xoverxRationalxField\verb|Modular|\phantom{\verb!x!}\verb|Forms|\phantom{\verb!x!}\verb|subspace|\phantom{\verb!x!}\verb|of|\phantom{\verb!x!}\verb|dimension|\phantom{\verb!x!}\verb|4|\phantom{\verb!x!}\verb|of|\phantom{\verb!x!}\verb|Modular|\phantom{\verb!x!}\verb|Forms|\phantom{\verb!x!}\verb|space|\phantom{\verb!x!}\verb|of|\phantom{\verb!x!}\verb|dimension|\phantom{\verb!x!}\verb|33|\phantom{\verb!x!}\verb|for|\phantom{\verb!x!}\verb|Congruence|\phantom{\verb!x!}\verb|Subgroup|\phantom{\verb!x!}\verb|Gamma1(26)|\phantom{\verb!x!}\verb|of|\phantom{\verb!x!}\verb|weight|\phantom{\verb!x!}\verb|2|\phantom{\verb!x!}\verb|over|\phantom{\verb!x!}\verb|Rational|\phantom{\verb!x!}\verb|Field|
In [12]:
Snew = S.new_submodule(); Snew
ModularxFormsxsubspacexofxdimensionx6xofxModularxFormsxspacexofxdimensionx33xforxCongruencexSubgroupxGamma1(26)xofxweightx2xoverxRationalxField\verb|Modular|\phantom{\verb!x!}\verb|Forms|\phantom{\verb!x!}\verb|subspace|\phantom{\verb!x!}\verb|of|\phantom{\verb!x!}\verb|dimension|\phantom{\verb!x!}\verb|6|\phantom{\verb!x!}\verb|of|\phantom{\verb!x!}\verb|Modular|\phantom{\verb!x!}\verb|Forms|\phantom{\verb!x!}\verb|space|\phantom{\verb!x!}\verb|of|\phantom{\verb!x!}\verb|dimension|\phantom{\verb!x!}\verb|33|\phantom{\verb!x!}\verb|for|\phantom{\verb!x!}\verb|Congruence|\phantom{\verb!x!}\verb|Subgroup|\phantom{\verb!x!}\verb|Gamma1(26)|\phantom{\verb!x!}\verb|of|\phantom{\verb!x!}\verb|weight|\phantom{\verb!x!}\verb|2|\phantom{\verb!x!}\verb|over|\phantom{\verb!x!}\verb|Rational|\phantom{\verb!x!}\verb|Field|
In [13]:
NF
[qq2+q3+q43q5+O(q6),q+q23q3+q4q5+O(q6),q+a2q2+(a21)q4q5+O(q6),q+a3q2q3q43a3q5+O(q6)]\left[q - q^{2} + q^{3} + q^{4} - 3q^{5} + O(q^{6}), q + q^{2} - 3q^{3} + q^{4} - q^{5} + O(q^{6}), q + a_{2}q^{2} + \left(-a_{2} - 1\right)q^{4} - q^{5} + O(q^{6}), q + a_{3}q^{2} - q^{3} - q^{4} - 3 a_{3}q^{5} + O(q^{6})\right]
In [14]:
[f.base_ring() for f in NF]
[Q,Q,Q[a2]/(a22+a2+1),Q[a3]/(a32+1)]\left[\Bold{Q}, \Bold{Q}, \Bold{Q}[a_{2}]/(a_{2}^{2} + a_{2} + 1), \Bold{Q}[a_{3}]/(a_{3}^{2} + 1)\right]

LL-functions

In [15]:
f = Newforms(Gamma1(14), 2)[0]; f
qq22q3+q4+O(q6)q - q^{2} - 2q^{3} + q^{4} + O(q^{6})
In [16]:
Lf = f.lseries(); Lf
L-seriesxassociatedxtoxthexcuspxformxqx-xq^2x-x2*q^3x+xq^4x+xO(q^6)\verb|L-series|\phantom{\verb!x!}\verb|associated|\phantom{\verb!x!}\verb|to|\phantom{\verb!x!}\verb|the|\phantom{\verb!x!}\verb|cusp|\phantom{\verb!x!}\verb|form|\phantom{\verb!x!}\verb|q|\phantom{\verb!x!}\verb|-|\phantom{\verb!x!}\verb|q^2|\phantom{\verb!x!}\verb|-|\phantom{\verb!x!}\verb|2*q^3|\phantom{\verb!x!}\verb|+|\phantom{\verb!x!}\verb|q^4|\phantom{\verb!x!}\verb|+|\phantom{\verb!x!}\verb|O(q^6)|
In [17]:
Lf(3)
0.8261259621017830.826125962101783
In [18]:
Lf(3+2*I)
0.995825161298581+0.180645100106889i0.995825161298581 + 0.180645100106889i
In [19]:
Lf(-2-I)
1.257373212670290.432187040382323i1.25737321267029 - 0.432187040382323i
In [20]:
Lf.poles
[]\left[\right]
In [21]:
[Lf(s) for s in [-4..-1]]
[0.000000000000000,0.000000000000000,0.000000000000000,0.000000000000000]\left[0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000\right]
In [23]:
[Lf.eps, Lf.conductor, Lf.weight]
[1.00000000000000,14,2]\left[1.00000000000000, 14, 2\right]
In [24]:
def Lambda(L, s): return gamma(s)*L.conductor^(s/2)/(2*pi.n())^s * L(s)
In [25]:
s = 1.345093824 + 0.23492834*I [Lambda(Lf, s), Lambda(Lf, 2-s)]
[0.198445970814429+0.00471005116198735i,0.198445970814429+0.00471005116198735i]\left[0.198445970814429 + 0.00471005116198735i, 0.198445970814429 + 0.00471005116198735i\right]
In [26]:
Lf.check_functional_equation()
1.68051336735253×1018-1.68051336735253 \times 10^{-18}
In [27]:
g = Newforms(Gamma1(16), 2, names='a')[0] g
q+a0q2+(a02)q3+(2a02)q4+a0q5+O(q6)q + a_{0}q^{2} + \left(-a_{0} - 2\right)q^{3} + \left(-2 a_{0} - 2\right)q^{4} + a_{0}q^{5} + O(q^{6})
In [28]:
g.base_ring()
Q[a0]/(a02+2a0+2)\Bold{Q}[a_{0}]/(a_{0}^{2} + 2 a_{0} + 2)
In [29]:
g.base_ring().discriminant()
4-4
In [30]:
Lg = g.lseries()
In [31]:
Lgstar = g.lseries(embedding=1)
In [32]:
(Lg.eps, Lgstar.eps)
(0.9238795325112870.382683432365090i,0.923879532511287+0.382683432365090i)\left(0.923879532511287 - 0.382683432365090i, 0.923879532511287 + 0.382683432365090i\right)
In [33]:
Lg.conductor
1616
In [34]:
Lgstar.conductor
1616
In [35]:
s = 0.4203498 + 0.2340982*I Lambda(Lg, 2 - s), Lg.eps * Lambda(Lgstar, s)
(0.2424838425630460.0499149402198870i,0.2424838425630460.0499149402198868i)\left(0.242483842563046 - 0.0499149402198870i, 0.242483842563046 - 0.0499149402198868i\right)
In [36]:
Lg.check_functional_equation()
1.28423747330908×1016+6.45303580536216×1017i-1.28423747330908 \times 10^{-16} + 6.45303580536216 \times 10^{-17}i

Elliptic curves

In [37]:
EllipticCurve([0,0,0,12,294])
y2=x3+12x+294y^2 = x^{3} + 12 x + 294
In [38]:
E = EllipticCurve('37a1'); E
y2+y=x3xy^2 + y = x^{3} - x
In [39]:
f = E.newform(); f
q2q23q3+2q42q5+O(q6)q - 2q^{2} - 3q^{3} + 2q^{4} - 2q^{5} + O(q^{6})
In [40]:
LE = E.lseries(); LE
ComplexxL-seriesxofxthexEllipticxCurvexdefinedxbyxy^2x+xyx=xx^3x-xxxoverxRationalxField\verb|Complex|\phantom{\verb!x!}\verb|L-series|\phantom{\verb!x!}\verb|of|\phantom{\verb!x!}\verb|the|\phantom{\verb!x!}\verb|Elliptic|\phantom{\verb!x!}\verb|Curve|\phantom{\verb!x!}\verb|defined|\phantom{\verb!x!}\verb|by|\phantom{\verb!x!}\verb|y^2|\phantom{\verb!x!}\verb|+|\phantom{\verb!x!}\verb|y|\phantom{\verb!x!}\verb|=|\phantom{\verb!x!}\verb|x^3|\phantom{\verb!x!}\verb|-|\phantom{\verb!x!}\verb|x|\phantom{\verb!x!}\verb|over|\phantom{\verb!x!}\verb|Rational|\phantom{\verb!x!}\verb|Field|
In [41]:
f.lseries()
L-seriesxassociatedxtoxthexcuspxformxqx-x2*q^2x-x3*q^3x+x2*q^4x-x2*q^5x+xO(q^6)\verb|L-series|\phantom{\verb!x!}\verb|associated|\phantom{\verb!x!}\verb|to|\phantom{\verb!x!}\verb|the|\phantom{\verb!x!}\verb|cusp|\phantom{\verb!x!}\verb|form|\phantom{\verb!x!}\verb|q|\phantom{\verb!x!}\verb|-|\phantom{\verb!x!}\verb|2*q^2|\phantom{\verb!x!}\verb|-|\phantom{\verb!x!}\verb|3*q^3|\phantom{\verb!x!}\verb|+|\phantom{\verb!x!}\verb|2*q^4|\phantom{\verb!x!}\verb|-|\phantom{\verb!x!}\verb|2*q^5|\phantom{\verb!x!}\verb|+|\phantom{\verb!x!}\verb|O(q^6)|
In [42]:
s = 1.293847 + 3.234098*I
In [ ]:
In [44]:
[LE(s), f.lseries()(s)]
[2.83506617044792+0.872802121461768i,2.83506617044792+0.872802121461768i]\left[2.83506617044792 + 0.872802121461768i, 2.83506617044792 + 0.872802121461768i\right]
In [45]:
E.rank()
11
In [46]:
E.torsion_subgroup()
00
In [47]:
LE(1)
0.0000000000000000.000000000000000
In [48]:
LE.at1()
(0.0000000,0.000000)\left(0.0000000, 0.000000\right)
In [49]:
LE.deriv_at1()
(0.3059866,0.000801045)\left(0.3059866, 0.000801045\right)
In [50]:
E.analytic_rank()
11
In [ ]: