Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 8913be6
  • /
  • modular_symbols.m
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:9c163a942e5277f89a780f4250a3506600d062d6
directory badge
swh:1:dir:8913be665d4e69a1393b8ee658436bb321e616f1

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
modular_symbols.m
QQ := Rationals();

intrinsic MDCongruenceSubgroup(M :: ModSym) -> GrpPSL2
{
  Return the congruence subgroup that was used to define the ambient space of this modular
  symbols space.
} 
  M := AmbientSpace(M);
  if IsTrivial(DirichletCharacter(M)) then
    return Gamma0(Level(M));
  elif IsMultiChar(M) then
    if assigned M`isgamma1 and M`isgamma1 then
      return Gamma1(Level(M));
    elif assigned M`isgamma and M`isgamma then
      return CongruenceSubgroup(Integers()!Sqrt(Level(M)));
    end if;
  end if;
  require false : "Only implemented for Gamma0(N), Gamma1(N) and Gamma(N)";
end intrinsic;




intrinsic MDDiagonalALBasis(decomposition :: SeqEnum[ModSym]) -> SeqEnum[SeqEnum[ModFrmElt]], SeqEnum[SeqEnum[SeqEnum[FldRatElt]]]
{
  Given a decomposition of the modular symbols of weight k for some group Gamma0(N) it gives a corresponding basis
  of the modular in S_k(Gamma0(N)) respecting this decomposition such that further more the Atkin-Lehner operators 
  act diagonally. The second return value are the Atkin-Lehner eigenvalues on this basis
}
  if #decomposition eq 0 then
    return [],[];
  end if;
  G := MDCongruenceSubgroup(decomposition[1]);
  N := Level(G);
  require G eq Gamma0(N) : "Only implemented for Gamma0(N)";
  g :=  Genus(G);
  prec := 2*g;
  k := Weight(decomposition[1]);

  M := ModularForms(G,k);
  S := CuspidalSubspace(M);
  V, VtoS, StoV := RSpace(S);

  al_divisors := [pe[1]^pe[2] : pe in Factorisation(N)];
  al := [AtkinLehnerOperator(S,d) : d in al_divisors];
  q_basis := [qIntegralBasis(Si, prec) : Si in decomposition];

  V_basis := [[StoV(S ! f) : f in B] : B in q_basis];
  V_dec := [ChangeRing(sub< V | B>, QQ) : B in V_basis];

  V_basis_diag := [];
  al_diag := [[] : w_p in al];

  for Vi in V_dec do
    al_res :=  [MDRestriction(w_p, Vi) : w_p in al];
    diag, t :=  Diagonalisation(al_res);
    basis := [ClearDenominator(v) : v in Rows(t*BasisMatrix(Vi))];
    Append(~V_basis_diag, basis);
    for i in [1..#diag] do
      Append(~al_diag[i],Diagonal(diag[i]));
    end for;
  end for;


  q_basis_diag := [[VtoS(f) : f in B] : B in V_basis_diag];

  return q_basis_diag,al_diag;

end intrinsic;

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API