︠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":"
$\\displaystyle 2$
"}︡{"done":true} ︠94efb91c-ee46-48f3-93c3-f41426fe6f38s︠ print("hello world") ︡05583fba-10e2-4f69-9ecb-2846e1374d74︡{"stdout":"hello world\n"}︡{"done":true} ︠68d9406f-0ff0-4c83-a867-f38aa03884a8i︠ %md # Programming ︡47296177-69ea-44ff-92ce-3b140c67e820︡{"done":true,"md":"# Programming"} ︠d7bfdd47-04b9-4a1f-a4ff-bb43327869afs︠ if 57.is_prime(): print("57 is a prime number") else: print("57 is composite") ︡a603d1b9-89c9-443e-b818-50e2260c7b95︡{"stdout":"57 is composite\n"}︡{"done":true} ︠3c7b67b1-90a1-4c24-bd76-bddd9077d25es︠ for p in primes(25): print([p, p^2 - 1]) ︡78980b36-a483-4d5d-af49-8c8e1bb5a101︡{"stdout":"[2, 3]\n[3, 8]\n[5, 24]\n[7, 48]\n[11, 120]\n[13, 168]\n[17, 288]\n[19, 360]\n[23, 528]\n"}︡{"done":true} ︠a38ad3b6-8d35-406f-af85-cc5393ff9002i︠ %md # Mathematical objects ︡61b77cb0-2986-4cce-8ba9-f8962a1fbc0d︡{"done":true,"md":"# Mathematical objects"} ︠18a0ccc5-4bbe-4abf-afb0-e00d551faa49s︠ Integers(), str(Integers()) ︡50a0697b-3938-41a0-a21b-b4c97fdc05a4︡{"html":"
($\\displaystyle \\Bold{Z}$, Integer Ring)
"}︡{"done":true} ︠242d2c5f-f4f2-41f7-ae9b-9d5322e1b135s︠ ZZ ︡daf8ea96-57c4-4570-95ae-02b862d3f324︡{"html":"
$\\displaystyle \\Bold{Z}$
"}︡{"done":true} ︠47a9f4a9-a951-4cae-86f1-455c5d8c32e0s︠ Rationals(), str(Rationals()) ︡4bae43ec-5774-4da9-acde-486514173b16︡{"html":"
($\\displaystyle \\Bold{Q}$, Rational Field)
"}︡{"done":true} ︠ac08476f-691d-422c-9d13-5021bc2de614s︠ ComplexField(200), str(ComplexField(200)) ︡6ff40860-321b-4e98-a302-90152bf12a15︡{"html":"
($\\displaystyle \\Bold{C}$, Complex Field with 200 bits of precision)
"}︡{"done":true} ︠fa4371fd-90a7-4382-bd7d-0cc1c73d29b1s︠ Zmod(16) ︡a7e66f97-d333-49d2-8e4f-09abe7b2ce2d︡{"html":"
$\\displaystyle \\ZZ/16\\ZZ$
"}︡{"done":true} ︠a7ef4fa2-6e67-4123-a41c-8f8f9ecf830bs︠ F = FiniteField(3^4, 'g') F, str(F) ︡5a2bae10-3122-4f57-b323-f88b88cdf203︡{"html":"
($\\displaystyle \\Bold{F}_{3^{4}}$, Finite Field in g of size 3^4)
"}︡{"done":true} ︠4f827ffa-ac77-4d70-bb4a-7beaaf47189bs︠ F.polynomial() ︡0e39e8af-0f5d-4c10-a322-3aec465d852f︡{"html":"
$\\displaystyle g^{4} + 2 g^{3} + 2$
"}︡{"done":true} ︠06d0d7ef-9808-463a-bc59-061118178555s︠ R = PolynomialRing(Integers(), 'x') R R.gen() ︡eabfecc1-583e-4a2c-bfda-520154ba9670︡{"html":"
$\\displaystyle \\Bold{Z}[x]$
"}︡{"html":"
$\\displaystyle x$
"}︡{"done":true} ︠4f1744d4-15ed-4548-b01f-488c8c8794e5s︠ ︡c2570b91-be91-4820-87a3-12c835904a11︡{"done":true} ︠bae39d6b-3fe6-49f5-b7a4-5dd7b5066406s︠ ZZ['x'] ︡0216df43-c3a5-4463-a384-2cc8f0be7c5e︡{"html":"
$\\displaystyle \\Bold{Z}[x]$
"}︡{"done":true} ︠f7140880-af41-47c9-b73f-3d919798e7f0s︠ FunctionField(QQ, 'x') ︡347c4a20-ca4b-4b55-821e-add5828af99b︡{"stdout":"Rational function field in x over Rational Field\n"}︡{"done":true} ︠827caaf6-ed24-41ee-9454-64b4c417fddci︠ %md # Modular forms ︡84817832-5b3e-42e8-94fd-bab2954bc359︡{"done":true,"md":"# Modular forms"} ︠fd14250a-4248-459d-8504-9c79f51f86ees︠ str(SL2Z) ︡9ca60a3e-8548-4f04-b6c5-24945323397d︡{"stdout":"'Modular Group SL(2,Z)'"}︡{"stdout":"\n"}︡{"done":true}︡ ︠ea38d0db-8e0e-4e10-b297-7e629e59e3cbs︠ SL2Z.gens() ︡241ae032-8bd7-4725-b3b8-83da69c1d639︡{"stdout":"([ 0 -1]\n[ 1 0], [1 1]\n[0 1])\n"}︡{"done":true} ︠14aa7212-d2e6-419f-8cf1-f0e7c6798eafs︠ M4 = ModularForms(SL2Z, 4) M4 ︡1f0c1b69-54c9-43d3-ba3a-36cf6ddae6aa︡{"stdout":"Modular Forms space of dimension 1 for Modular Group SL(2,Z) of weight 4 over Rational Field\n"}︡{"done":true} ︠9b641c7e-9bee-4639-9820-1dec56f86069s︠ M4.dimension() ︡dddb37d7-1f63-47e0-9310-c77452a4604c︡{"stdout":"1\n"}︡{"done":true} ︠910cb0c6-ca19-4469-9618-309da9ff2384s︠ M4.q_expansion_basis() ︡68ffc48d-7ecb-47c8-a360-c1650d8dceef︡{"stdout":"[\n1 + 240*q + 2160*q^2 + 6720*q^3 + 17520*q^4 + 30240*q^5 + O(q^6)\n]\n"}︡{"done":true} ︠4122e05a-2e4a-4269-81f7-622b9a2eb037s︠ f = M4.q_expansion_basis()[0]/240 f ︡fabc0d13-dfdb-4ff4-85bb-8d3d9257fd16︡{"stdout":"1/240 + q + 9*q^2 + 28*q^3 + 73*q^4 + 126*q^5 + O(q^6)\n"}︡{"done":true} ︠fc593613-2f44-48e7-9bfa-98b7afa2b0d2s︠ sum(d^3 for d in 5.divisors()) ︡873a388f-4caa-4331-8815-77f464a882fa︡{"stdout":"126\n"}︡{"done":true} ︠b13e0b55-4792-45ca-b37e-ab8ff9664942s︠ S12 = CuspForms(SL2Z, 12) S12 ︡be72d89b-fcd9-4817-8727-e98d10ae63c0︡{"stdout":"Cuspidal subspace of dimension 1 of Modular Forms space of dimension 2 for Modular Group SL(2,Z) of weight 12 over Rational Field\n"}︡{"done":true} ︠70a65adc-b82b-4a91-8aa7-47483b50d66bs︠ S12.q_expansion_basis(prec=20) ︡0339dddc-0daa-4688-9b4a-4f7b2ed19473︡{"stdout":"[\nq - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 - 6048*q^6 - 16744*q^7 + 84480*q^8 - 113643*q^9 - 115920*q^10 + 534612*q^11 - 370944*q^12 - 577738*q^13 + 401856*q^14 + 1217160*q^15 + 987136*q^16 - 6905934*q^17 + 2727432*q^18 + 10661420*q^19 + O(q^20)\n]\n"}︡{"done":true} ︠1c3bc463-3455-4429-bc0f-74aa8586a224s︠ EisensteinForms(SL2Z,16).q_expansion_basis() ︡69cb235e-4cd1-45b9-b3cb-4a89cf0823db︡{"stdout":"[\n1 + 16320/3617*q + 534790080/3617*q^2 + 234174178560/3617*q^3 + 17524001357760/3617*q^4 + 498046875016320/3617*q^5 + O(q^6)\n]\n"}︡{"done":true} ︠9ccf1209-af9d-47af-b69a-30a0def4ae57s︠ f, g = ModularForms(Gamma1(4), 2).basis() f, g type(f) f.parent() ︡774de20e-4de2-4027-b245-0c9972345b5e︡{"stdout":"(1 + 24*q^2 + 24*q^4 + O(q^6), q + 4*q^3 + 6*q^5 + O(q^6))\n"}︡{"stdout":"\n"}︡{"stdout":"Modular Forms space of dimension 2 for Congruence Subgroup Gamma1(4) of weight 2 over Rational Field\n"}︡{"done":true} ︠d3b11686-f7e4-40a9-ad3d-8e14fbd92623s︠ f.q_expansion(20) ︡9e021a1a-73fe-4c97-84b4-7c784b2fc26c︡{"stdout":"1 + 24*q^2 + 24*q^4 + 96*q^6 + 24*q^8 + 144*q^10 + 96*q^12 + 192*q^14 + 24*q^16 + 312*q^18 + O(q^20)\n"}︡{"done":true} ︠1c23615c-22f6-42e7-a202-c638dd0f7c98s︠ # Create a power series ring R. = 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︠