Some introductory material on Sage computations for modular forms and modular symbols _Surya Teja Gavva
To get started: Type > sage -n jupyter on terminal. (On a computer with sage installed)
Upload the file Modular_Forms_Sage.ipynb to jupyter notebook and run it
G = SL(2,ZZ)
G
Generators
G.gens()
G= Gamma0(10)
G
G.generators()
Gamma(2).generators(algorithm="todd-coxeter")
[Gamma0(n).index() for n in [1..20]]
Gamma1(3).image_mod_n()
Gamma0(20).is_even()
Gamma(3).is_normal()
Gamma1(3).is_normal()
Coset Representative in SL_2(Z)
list(G.coset_reps())
Dimension of New Cusp Forms
Gamma0(110).dimension_new_cusp_forms()
Gamma1(31).dimension_cusp_forms(2)
26
Gamma1(31).dimension_modular_forms(2)
55
Gamma(13).dimension_modular_forms(1)
G.is_subgroup(Gamma0(10))
G.is_subgroup(Gamma1(20))
Farey Symbol
f=Gamma1(4).farey_symbol()
f.generators()
FareySymbol(Gamma0(11)).fundamental_domain()
Number of Cusps
[Gamma0(n).ncusps() for n in [1..20]]
[Gamma0(n).ncusps() for n in prime_range(2,100)]
Gamma0(42).cusps()
G = Gamma1(5).as_permutation_group()
G.cusp_widths()
Gamma0(7).are_equivalent(Cusp(1/3), Cusp(1/7))
[Gamma0(100).cusp_width(c) for c in Gamma0(100).cusps()]
Gamma1(4).is_regular_cusp(Cusps(1/2))
Gamma0(24).reduce_cusp(Cusps(-1/4))
Gamma0(1).reduce_cusp(Cusps(-1/4))
Elliptic Points
Gamma0(7).nu3()
Gamma0(1105).nu2()
M= ModularForms(Gamma0(4), 4)
M
M.base_ring()
M1= ModularForms(Gamma1(4), 10, prec=12)
M1
M1.basis()
M1.gens()
M1.cuspidal_subspace().basis()
M1.eisenstein_subspace()
M1.modular_symbols()
M1.new_subspace()
ModularForms(Gamma0(11),2).character()
[ModularForms(Gamma1(7),k).dimension() for k in [2,3,4,5,6]]
chi = DirichletGroup(109, CyclotomicField(3)).0
ModularForms(chi, 2, base_ring = CyclotomicField(15))
M2=ModularForms(11,2,base_ring=GF(13))
M2.basis()
ModularForms(11,2).basis()
M2.cuspidal_submodule()
chi = DirichletGroup(25,QQ).0
n = ModularForms(chi,2)
n.basis()
n.set_precision(20)
n.basis()
e = DirichletGroup(27,CyclotomicField(3)).0**2
M = ModularForms(e,2,prec=10).eisenstein_subspace()
M.eisenstein_series()
M.eisenstein_subspace().T(2).matrix().fcp()
S= CuspForms(Gamma0(4), 6)
S
ModularForms(Gamma0(27),2).eisenstein_series()
ModularForms(Gamma1(5),3).eisenstein_series()
M=ModularForms(Gamma0(12), 6, prec=12)
M
M.cuspidal_subspace().echelon_basis()
M.integral_basis()
S = ModularForms(11,2).cuspidal_submodule()
S.q_expansion_basis(12)
E1 = EisensteinForms(25, 4)
E.new_eisenstein_series()
from sage.modular.modform.eis_series_cython import Ek_ZZ
Ek_ZZ(4,15)
Newforms(Gamma0(11), 2)
ModularForms(17,4).basis()
ModularForms(17,4).hecke_polynomial(2)
E = ModularForms(e,2,prec=10).eisenstein_subspace()
E.eisenstein_subspace().T(2).matrix().fcp()
hecke_operator_on_basis(ModularForms(1,12).q_expansion_basis(30), 3, 12)
M = ModularForms(1,12);
hecke_operator_on_qexp(M.basis()[0], 3, 12)
M=ModularFormsRing(Gamma0(12))
M.generators()
M2 = ModularFormsRing(1)
E4 = M2.0; E6=M2.1
E4
E6
E = EllipticCurve('11a')
E
f2 = E.modular_form()
f2
f2.has_cm()
E = EllipticCurve([-1, 0])
E
f2 = E.modular_form()
f2
f2.has_cm()
set_modsym_print_mode ('modular');
M = ModularSymbols(11, 2)
M.basis()
[ModularSymbols(Gamma1(7),k).dimension() for k in [2,3,4,5]]
M = ModularSymbols(23,2,base_ring=QQ)
M.T(2)
M.T(2).matrix()
M.T(2).charpoly('x').factor()
M1 = ModularSymbols(11, 4)
M1.basis()
M.T(5).matrix()
M1.cuspidal_subspace()
ModularForms(11, 4).basis()
m = ModularSymbols(Gamma1(3),12); m.dimension()
m.cuspidal_subspace().dimension()
m.cuspidal_subspace().new_subspace().dimension()
CuspForms(Gamma1(3), 12, prec=10).basis()
[m.cuspidal_subspace().T(n).matrix() for n in [2..10]]
ModularSymbols(2, 8)[1].q_eigenform(5, 'a')
M = ModularSymbols(1, 24).cuspidal_submodule()
M.q_expansion_module(9, QQ)
M.q_expansion_basis(8, algorithm='eigen')
CuspForms(1, 24).basis()
M = ModularSymbols(11,4,base_ring=GF(2)); M.basis()
M = ModularSymbols(11, 2)
M
M.basis()
M.cuspidal_submodule().basis()
M.modular_symbol([2/11, oo])
M.modular_symbol([0, -2/5, 0])
M = ModularSymbols(8, 4)
M.basis()
M.cuspidal_submodule().basis()
M.modular_symbol([0, -2/5, 0])
M.modular_symbol([2, -2/5, 0])
set_modsym_print_mode('manin')
M.modular_symbol([2, -2/5, 0])
M.modular_symbol([0, -2/5, 0])
set_modsym_print_mode('modular')
M.modular_symbol([2, -2/5, 0])
from sage.modular.modsym.manin_symbol import ManinSymbol;
from sage.modular.modsym.manin_symbol_list import ManinSymbolList_gamma0
A=ModularSymbols(11,2).manin_symbols()
A
len(A)
ModularSymbols(11,2).manin_symbols_basis()
ModularSymbols(11,6).manin_symbols()
ModularSymbols(11,6).manin_symbols_basis()