︠64666603-92e0-4793-abe9-168b44f519dfs︠ %typeset_mode True ︡6748d173-0ff0-480c-a58a-41ac4d94246f︡{"done":true} ︠8fb6b3bf-dcdb-4a8c-9b8d-0afd4ff1313fi︠ %md # Basic commands ︡e77a0153-fd03-46d3-84bb-e9fb449ffc43︡{"done":true,"md":"# Basic commands"} ︠f092c0e0-8db3-43bd-8198-44d5df3edb41s︠ 1 + 1 ︡4ff466c7-1157-4e76-bbfe-57e22755b29d︡{"html":"
= ZZ[[]] R ︡852088cf-24b7-4832-a409-5a5458afeb46︡{"stdout":"Power Series Ring in q over Integer Ring\n"}︡{"done":true} ︠203a84d4-979d-4cbb-b688-558712d848d1s︠ theta = 1 + 2*q + 2*q^4 + 2*q^9 + 2*q^16 + O(q^25) ︡235803d2-0d96-45ad-aa43-cfc71e6dc357︡{"done":true} ︠47797e4b-6d5e-4185-bdb5-a96b1d6ba361s︠ theta^4 ︡8f4ef24d-626b-43b8-b59d-c45f9eabad50︡{"stdout":"1 + 8*q + 24*q^2 + 32*q^3 + 24*q^4 + 48*q^5 + 96*q^6 + 64*q^7 + 24*q^8 + 104*q^9 + 144*q^10 + 96*q^11 + 96*q^12 + 112*q^13 + 192*q^14 + 192*q^15 + 24*q^16 + 144*q^17 + 312*q^18 + 160*q^19 + 144*q^20 + 256*q^21 + 288*q^22 + 192*q^23 + 96*q^24 + O(q^25)\n"}︡{"done":true} ︠7820271e-68e6-4453-ac53-b17c1763c403s︠ theta^4 == (f + 8*g).q_expansion(25) ︡af82bde4-eff4-4aa7-b9b0-de6b0c700ebc︡{"stdout":"True\n"}︡{"done":true} ︠5b5c0e52-eb96-488b-ba72-37cbf42ad258i︠ %md # Some pictures of fundamental domains (warning: not of the same type as in the lectures) ︡9622d1e7-a51d-41b5-9bb0-62dc113b62b0︡{"done":true,"md":"# Some pictures of fundamental domains\n(warning: not of the same type as in the lectures)"} ︠97997e31-165f-49aa-8d1b-122a55b495d5s︠ SL2Z.farey_symbol().fundamental_domain() ︡c3422f64-6af7-4bbd-9d0c-e4be702bbdf1︡{"file":{"filename":"/home/user/.sage/temp/project-0d171da5-84c5-42cd-b702-55b21bf8f103/376/tmp_J56KNm.svg","show":true,"text":null,"uuid":"4a294c41-6f1d-460d-aee5-8cdd7818206c"},"once":false}︡{"done":true} ︠c9f160f8-2248-4a1b-af9a-bf58179b7d4as︠ Gamma0(2).farey_symbol().fundamental_domain() ︡2c8da7bf-90ed-4a19-a238-568e96abeb10︡{"file":{"filename":"/home/user/.sage/temp/project-0d171da5-84c5-42cd-b702-55b21bf8f103/376/tmp_8MjI7w.svg","show":true,"text":null,"uuid":"d1c93137-72d5-48f0-b210-62ec5f7144ba"},"once":false}︡{"done":true} ︠dfbff229-d359-4cbd-8865-7b91a2b25ae6s︠ Gamma(3).farey_symbol().fundamental_domain() ︡a29883d6-6765-40e1-8f39-47d30c602b5f︡{"file":{"filename":"/home/user/.sage/temp/project-0d171da5-84c5-42cd-b702-55b21bf8f103/376/tmp_MCUjUZ.svg","show":true,"text":null,"uuid":"bfa7531e-f6af-4282-b60b-c639ecb05144"},"once":false}︡{"done":true} ︠132016cf-a75c-4aa8-89c9-35ed4ad4721cs︠ Gamma(3).cusps() ︡30366621-9a8f-419a-93ac-92d181b32eb6︡{"html":"[$\\displaystyle 0$, $\\displaystyle 1$, $\\displaystyle 2$, $\\displaystyle \\infty$]"}︡{"done":true} ︠08b2aa88-a895-4cd9-9c67-6e69627f0f70i︠ %md # Hecke operators ︡d62742f6-3c7b-484c-aec0-89fd5b0258c6︡{"done":true,"md":"# Hecke operators"} ︠c39ab4c0-5902-48c0-81b8-292107284cffs︠ M = ModularForms(SL2Z, 12) M ︡601c2ff5-057e-4dee-a6a8-b87604521eed︡{"stdout":"Modular Forms space of dimension 2 for Modular Group SL(2,Z) of weight 12 over Rational Field\n"}︡{"done":true} ︠f6df9c07-3532-42cd-bf35-6c391fd4b62fs︠ T2 = M.hecke_operator(2) T2 T2.matrix() ︡44f361c7-3787-4fdb-bfb8-c057cc6c2592︡{"html":"$\\displaystyle T_{2}$"}︡{"html":"$\\displaystyle \\left(\\begin{array}{rr}\n-24 & 0 \\\\\n0 & 2049\n\\end{array}\\right)$"}︡{"done":true} ︠4a535334-7a37-427f-81cf-58c08fc2774as︠ M = ModularForms(Gamma1(7), 3) M ︡a6d284eb-c4c5-4592-8e59-b37123d55ad4︡{"stdout":"Modular Forms space of dimension 7 for Congruence Subgroup Gamma1(7) of weight 3 over Rational Field\n"}︡{"done":true} ︠475c78be-0254-4e50-9ca1-a39edd980a1ds︠ d3 = M.diamond_bracket_operator(3) d3 d3.matrix() ︡f7c3b819-bb8e-4b38-93ec-5e920c61d498︡{"html":"$\\displaystyle \\langle 3 \\rangle$"}︡{"html":"$\\displaystyle \\left(\\begin{array}{rrrrrrr}\n-1 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n0 & 27 & 126 & 294 & 770 & 2142 & 3528 \\\\\n0 & \\frac{56}{3} & 85 & 200 & 530 & 1445 & 2408 \\\\\n0 & \\frac{11}{3} & 14 & 22 & 66 & 233 & 392 \\\\\n0 & -1 & -3 & -3 & -11 & -51 & -87 \\\\\n0 & -1 & -4 & -7 & -20 & -67 & -112 \\\\\n0 & -\\frac{1}{3} & -2 & -6 & -15 & -34 & -56\n\\end{array}\\right)$"}︡{"done":true} ︠f1c46997-facd-4252-83e1-27735ce7d8efs︠ d3.matrix()^6 ︡9ddcbefe-5eba-4e71-9237-42666f7ba15c︡{"html":"$\\displaystyle \\left(\\begin{array}{rrrrrrr}\n1 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n0 & 1 & 0 & 0 & 0 & 0 & 0 \\\\\n0 & 0 & 1 & 0 & 0 & 0 & 0 \\\\\n0 & 0 & 0 & 1 & 0 & 0 & 0 \\\\\n0 & 0 & 0 & 0 & 1 & 0 & 0 \\\\\n0 & 0 & 0 & 0 & 0 & 1 & 0 \\\\\n0 & 0 & 0 & 0 & 0 & 0 & 1\n\\end{array}\\right)$"}︡{"done":true} ︠23715098-4a66-4087-a3e0-dddbba1888e3s︠ T2 = M.hecke_operator(2) T2.matrix() ︡97b85476-c088-497e-b915-5a49a299a52c︡{"html":"$\\displaystyle \\left(\\begin{array}{rrrrrrr}\n-3 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n0 & 285 & 0 & 1176 & 560 & 9072 & 7056 \\\\\n0 & \\frac{556}{3} & 0 & 764 & \\frac{982}{3} & 5945 & 4543 \\\\\n0 & \\frac{136}{3} & 1 & 184 & \\frac{235}{3} & 1448 & 1162 \\\\\n0 & -12 & 0 & -48 & -15 & -384 & -300 \\\\\n0 & -12 & 0 & -47 & -19 & -376 & -301 \\\\\n0 & -\\frac{8}{3} & 0 & -12 & -\\frac{20}{3} & -88 & -63\n\\end{array}\\right)$"}︡{"done":true} ︠1912953c-8fce-4c2f-82dc-f5ac471b6c9es︠ (T2*d3) (T2*d3-d3*T2).matrix() ︡f4261f54-e2bc-4f89-8f27-3fc86269b216︡{"html":"$\\displaystyle \\left(\\begin{array}{rrrrrrr}\n3 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n0 & 23 & 294 & 2142 & 3626 & 8190 & 6552 \\\\\n0 & \\frac{56}{3} & 200 & 1441 & 2485 & 5525 & 4618 \\\\\n0 & \\frac{11}{3} & 22 & 233 & 329 & 902 & 409 \\\\\n0 & -1 & -3 & -51 & -63 & -195 & -39 \\\\\n0 & -1 & -7 & -67 & -98 & -260 & -139 \\\\\n0 & -\\frac{1}{3} & -6 & -34 & -67 & -130 & -148\n\\end{array}\\right)$"}︡{"html":"$\\displaystyle \\left(\\begin{array}{rrrrrrr}\n0 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n0 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n0 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n0 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n0 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n0 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n0 & 0 & 0 & 0 & 0 & 0 & 0\n\\end{array}\\right)$"}︡{"done":true} ︠93e7c4bc-454b-4df1-9ae0-994d14c7fad7i︠ %md # Old and new subspaces ︡4c7a1ab7-d142-44db-a107-4cb422fb672f︡{"done":true,"md":"# Old and new subspaces"} ︠6eda7fd5-d418-4d2b-b842-9c4d70de3b60s︠ %typeset_mode True # Eisenstein subspace and cuspidal subspace M = ModularForms(Gamma1(14), 4) E = M.eisenstein_submodule() S = CuspForms(Gamma1(14), 4) S == M.cuspidal_submodule() M.dimension() (E.dimension(), S.dimension()) ︡bdf72657-6b45-4c87-8ad6-fc7c281427e3︡{"html":"$\\displaystyle \\mathrm{True}$"}︡{"html":"$\\displaystyle 24$"}︡{"html":"($\\displaystyle 12$, $\\displaystyle 12$)"}︡{"done":true} ︠f4899a49-419f-4a12-a8d6-f5d42914b34bs︠ # Old and new subspaces Sold = S.old_submodule() Snew = S.new_submodule() (Sold.dimension(), Snew.dimension()) ︡ac8e9dab-c6a1-46d4-b0f6-9c0eb3ec89b5︡{"html":"($\\displaystyle 6$, $\\displaystyle 6$)"}︡{"done":true} ︠607306a7-4d14-4e1e-bff7-4e5c899fafa2s︠ # Check consistency with dimensions of spaces of lower level CuspForms(Gamma1(2), 4).dimension() CuspForms(Gamma1(7), 4).dimension() ︡66e0d6f4-27c3-453e-817d-160feab667a2︡{"html":"$\\displaystyle 0$"}︡{"html":"$\\displaystyle 3$"}︡{"done":true} ︠729e5964-b241-454d-9216-e7fed01a7016s︠ S.old_submodule(2) ︡c7fab2e2-712e-43f8-8bbd-2e0a8b154592︡{"stdout":"Modular Forms subspace of dimension 6 of Modular Forms space of dimension 24 for Congruence Subgroup Gamma1(14) of weight 4 over Rational Field\n"}︡{"done":true} ︠f8452ca6-7682-4b65-a60f-4da63146413fs︠ # An example of a non-diagonalisable Hecke operator. This shows that the # decomposition of the new subspace into simultaneous eigenspaces for the # T_m with m coprime to the level does not extend directly to all the T_m. S = CuspForms(Gamma0(16), 4) T2 = S.hecke_matrix(2) T2 T2.jordan_form() ︡129b22fb-9cd6-4e74-9d3a-7ef49a4c46a6︡{"html":"$\\displaystyle \\left(\\begin{array}{rrr}\n0 & 0 & 0 \\\\\n1 & 0 & -4 \\\\\n0 & 0 & 0\n\\end{array}\\right)$"}︡{"html":"$\\displaystyle \\left(\\begin{array}{rr|r}\n0 & 1 & 0 \\\\\n0 & 0 & 0 \\\\\n\\hline\n 0 & 0 & 0\n\\end{array}\\right)$"}︡{"done":true} ︠243d06fe-9dce-430f-9c84-cfeca000871e︠ ︡65a73dc1-86d6-401a-bb18-9936e75aa6c0︡ ︠e041d564-b8d8-49af-a2ba-1278a9281c68i︠ %md # Newforms ︡25766dee-2e50-4c3d-9e35-77b2884ce98f︡{"done":true,"md":"# Newforms"} ︠e93f12dd-1633-4f41-a12a-c2b4335889fcs︠ # We can compute the set of newforms (primitive forms) of a given level and weight. S = CuspForms(Gamma1(15), 2) NF = S.newforms() NF Newforms(Gamma1(15), 2) == NF ︡dd731d9c-0f54-4130-bae2-9db4f9886f5b︡{"html":"[$\\displaystyle q - q^{2} - q^{3} - q^{4} + q^{5} + O(q^{6})$]"}︡{"html":"$\\displaystyle \\mathrm{True}$"}︡{"done":true} ︠870e0a04-5d86-4c88-b60b-8bad84cc4ceds︠ # An example with multiple newforms Newforms(Gamma0(26), 2) ︡c6428c99-1558-496e-b9a4-9a6e93206f68︡{"html":"[$\\displaystyle q - q^{2} + q^{3} + q^{4} - 3q^{5} + O(q^{6})$, $\\displaystyle q + q^{2} - 3q^{3} + q^{4} - q^{5} + O(q^{6})$]"}︡{"done":true} ︠f77b6c48-9ad3-4a35-8c3b-4a8bc5bcd0b1s︠ # We have to be careful when the newforms don't have rational coefficients Newforms(Gamma1(26), 2) ︡2767d10a-7197-44cf-ac58-ba0c744e1cdc︡{"stderr":"Error in lines 1-1\n"}︡{"stderr":"Traceback (most recent call last):\n File \"/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py\", line 1234, in execute\n flags=compile_flags), namespace, locals)\n File \"\", line 1, in\n File \"/ext/sage/sage-8.9_1804/local/lib/python2.7/site-packages/sage/modular/modform/constructor.py\", line 467, in Newforms\n return CuspForms(group, weight, base_ring).newforms(names)\n File \"/ext/sage/sage-8.9_1804/local/lib/python2.7/site-packages/sage/modular/modform/space.py\", line 1642, in newforms\n raise ValueError(\"Please specify a name to be used when generating names for generators of Hecke eigenvalue fields corresponding to the newforms.\")\nValueError: Please specify a name to be used when generating names for generators of Hecke eigenvalue fields corresponding to the newforms.\n"}︡{"done":true} ︠be06b41f-df4f-477f-813c-d0c1cce4d087s︠ # In this case we have to specify a "names" parameter. NF = Newforms(Gamma1(26), 2, names='a') NF ︡4b916965-6b38-43db-8d95-d3d2007beae7︡{"html":" [$\\displaystyle q - q^{2} + q^{3} + q^{4} - 3q^{5} + O(q^{6})$, $\\displaystyle q + q^{2} - 3q^{3} + q^{4} - q^{5} + O(q^{6})$, $\\displaystyle q + a_{2}q^{2} + \\left(-a_{2} - 1\\right)q^{4} - q^{5} + O(q^{6})$, $\\displaystyle q + a_{3}q^{2} - q^{3} - q^{4} - 3 a_{3}q^{5} + O(q^{6})$]"}︡{"done":true} ︠36e73916-557d-455e-8d8b-fb7db9ea5effs︠ # Every newform has a character [f.character() for f in NF] ︡70b83e4c-a47d-4b28-8e30-9e4100226b2a︡{"html":"[$\\displaystyle \\hbox{Dirichlet character modulo } 26 \\hbox{ of conductor } 1 \\hbox{ mapping } 15 \\mapsto 1$, $\\displaystyle \\hbox{Dirichlet character modulo } 26 \\hbox{ of conductor } 1 \\hbox{ mapping } 15 \\mapsto 1$, $\\displaystyle \\hbox{Dirichlet character modulo } 26 \\hbox{ of conductor } 13 \\hbox{ mapping } 15 \\mapsto -a_{2} - 1$, $\\displaystyle \\hbox{Dirichlet character modulo } 26 \\hbox{ of conductor } 13 \\hbox{ mapping } 15 \\mapsto -1$]"}︡{"done":true} ︠914bcc14-3ef9-4e0e-95a3-f7a0ec50abbes︠ # Compare our list of newforms with the dimension of the new subspace: S = CuspForms(Gamma1(26), 2) Sold = S.old_submodule() Snew = S.new_submodule() (Sold.dimension(), Snew.dimension()) ︡1f2de1d9-49d6-4c80-b77a-bc5ce2a06d09︡{"html":"($\\displaystyle 4$, $\\displaystyle 6$)"}︡{"done":true} ︠a2f51d97-0ee8-43f9-8142-b1b82b4b9f6cs︠ # Sage only gives 4 newforms, but the new subspace has dimension 6. # This is explained by the fact that two of the forms have larger coefficient fields. # The following computation shows that the coefficient fields of the last two forms # are Q(\sqrt{-3}) and Q(\sqrt{-1}), respectively. [f.base_ring() for f in NF] ︡8f9fd2e1-ad04-4390-8982-b655f092958c︡{"html":"[$\\displaystyle \\Bold{Q}$, $\\displaystyle \\Bold{Q}$, $\\displaystyle \\Bold{Q}[a_{2}]/(a_{2}^{2} + a_{2} + 1)$, $\\displaystyle \\Bold{Q}[a_{3}]/(a_{3}^{2} + 1)$]"}︡{"done":true} ︠cfebb6f0-2164-46f1-9ec0-eab27410fb73i︠ %md # $L$-functions ︡55d4406d-4804-45c2-9048-22816241d367︡{"done":true,"md":"# $L$-functions"} ︠fa1b02b5-563b-41c3-973b-00eb29106840s︠ # Here is a newform of which we are going to compute the L-series. f = Newforms(Gamma1(14), 2)[0]; f ︡c0561148-7c62-41da-8c64-5c2d6396fdb0︡{"html":"$\\displaystyle q - q^{2} - 2q^{3} + q^{4} + O(q^{6})$"}︡{"done":true} ︠517898a8-0925-410c-9820-7cce3bed06dbs︠ Lf = f.lseries() Lf ︡aaa29598-47ef-460c-9d54-9785bddb1a65︡{"stdout":"L-series associated to the cusp form q - q^2 - 2*q^3 + q^4 + O(q^6)\n"}︡{"done":true} ︠7439237b-c92b-412c-a03a-d7f1af1ea960s︠ # We can evaluate L-series both inside and outside the # right half-plane where the Dirichlet series converges. Lf(3) Lf(3+2*I) Lf(-2-I) ︡b75e7e45-e8fb-42b5-8a91-4e5bd1955c50︡{"html":"$\\displaystyle 0.826125962101783$"}︡{"html":"$\\displaystyle 0.995825161298581 + 0.180645100106889i$"}︡{"html":"$\\displaystyle 1.25737321267029 - 0.432187040382323i$"}︡{"done":true} ︠ba1a6c45-2b23-41da-bca6-0081b8b0d97fs︠ # The L-function is holomorphic. Lf.poles ︡87a92086-31fc-4511-aa47-c205d770f830︡{"html":"[]"}︡{"done":true} ︠0be8d3c2-9c63-44a0-b3db-58ab5220deees︠ # Like the Riemann zeta function, it has some 'trivial' zeroes. [Lf(s) for s in [-4..-1]] ︡4dbff24d-50ee-48d7-854a-875caab8a74b︡{"html":"[$\\displaystyle 0.000000000000000$, $\\displaystyle 0.000000000000000$, $\\displaystyle 0.000000000000000$, $\\displaystyle 0.000000000000000$]"}︡{"done":true} ︠23799505-cf6d-473d-bb0a-0bdf56084617s︠ # Sign of the functional equation Lf.eps ︡33236c28-79a7-4ed3-8aa5-58b809d30637︡{"html":"$\\displaystyle 1.00000000000000$"}︡{"done":true} ︠a41e9adf-dd71-4b91-a070-c8babfc4056es︠ Lf.conductor Lf.weight ︡0f243d7a-0670-4b5e-9ed5-8fcb6ed4ecf9︡{"html":"$\\displaystyle 14$"}︡{"html":"$\\displaystyle 2$"}︡{"done":true} ︠7b404f98-c555-4e64-8584-fba25799af2as︠ # Completed L-function attached to L(s) def Lambda(L, s): return gamma(s)*L.conductor^(s/2)/(2*pi.n())^s * L(s) ︡82a9999e-0bfd-4a5a-9399-29fd18823e71︡{"done":true} ︠c91dbf5f-7d88-4ae3-82e8-66646463d675s︠ # Check numerically that the completed L-function # satisfies the expected functional equation. s = 1.43250982 + .435873*I Lambda(Lf, s) Lambda(Lf, 2 - s) ︡3e7c846b-6639-4392-9831-bab52c45d566︡{"html":"$\\displaystyle 0.196288571460192 + 0.0108503534364708i$"}︡{"html":"$\\displaystyle 0.196288571460192 + 0.0108503534364707i$"}︡{"done":true} ︠a995c8c2-405f-4f05-96f7-9ae091add5b5s︠ # There is also a quicker (but more obscure) way: Lf.check_functional_equation() # answer should be a small number ︡acddac93-3424-4f44-93de-4dc6f7c175ac︡{"html":"$\\displaystyle -1.68051336735253 \\times 10^{-18}$"}︡{"done":true} ︠b891fada-bbe0-4464-a7ed-592b196b9f6bs︠ # An example with non-rational coefficients g = Newforms(Gamma1(16), 2, names='a')[0] g g.base_ring() ︡fd75c5bf-0828-423a-905f-e0a483a37a1e︡{"html":"$\\displaystyle 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})$"}︡{"html":"$\\displaystyle \\Bold{Q}[a_{0}]/(a_{0}^{2} + 2 a_{0} + 2)$"}︡{"done":true} ︠b899ac0d-0b0a-487c-aea1-23aa1a152dabs︠ Lg = g.lseries() Lgstar = g.lseries(embedding=1) Lg(2) Lgstar(2) (Lg.eps, Lg.eps.abs()) (Lgstar.eps, Lgstar.eps.abs()) Lg.conductor ︡30059343-9a21-4e73-865f-ee2a02cce053︡{"html":"$\\displaystyle 0.668961812718835 - 0.0905917403031900i$"}︡{"html":"$\\displaystyle 0.668961812718835 + 0.0905917403031900i$"}︡{"html":"($\\displaystyle 0.923879532511287 - 0.382683432365090i$, $\\displaystyle 1.00000000000000$)"}︡{"html":"($\\displaystyle 0.923879532511287 + 0.382683432365090i$, $\\displaystyle 1.00000000000000$)"}︡{"html":"$\\displaystyle 16$"}︡{"done":true} ︠1610eade-e929-4316-bc23-2ae068d0e20ds︠ s = 0.520934 - 2.230498*I Lambda(Lg, 2 - s) Lg.eps * Lambda(Lgstar, s) Lg.check_functional_equation() ︡7a8f2ef9-ecbc-471d-9232-dfa1adaae3fc︡{"html":"$\\displaystyle 0.0875461953458519 + 0.0205215759552274i$"}︡{"html":"$\\displaystyle 0.0875461953458519 + 0.0205215759552274i$"}︡{"html":"$\\displaystyle -1.28423747330908 \\times 10^{-16} + 6.45303580536216 \\times 10^{-17}i$"}︡{"done":true} ︠40b19714-fd7f-4598-adc0-d79b59b611e7︠