
// Make newform 315.3.ca.b in Magma, downloaded from the LMFDB on 16 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_315_ca();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_315_3_ca_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
// To make the character of type GrpDrchElt, type "MakeCharacter_315_ca();"
function MakeCharacter_315_ca()
    N := 315;
    order := 12;
    char_gens := [281, 127, 136];
    v := [12, 3, 4];
    // chi(gens[i]) = zeta^v[i]
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    F := CyclotomicField(order);
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),[F|F.1^e:e in v]);
    return MinimalBaseRingCharacter(chi);
end function;

function MakeCharacter_315_ca_Hecke(Kf)
    return MakeCharacter_315_ca();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_315_3_ca_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function MakeNewformModSym_315_3_ca_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_315_ca();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<2,R![169835630410000, 287544424672000, 243417108531200, 8565514737693440, -15158834510256976, -92604014488743584, 80938098350408192, -490605417677999008, 2650749743940737312, -1361116727697486624, 1623756378555478816, -7521783106223565184, -14905755341532417200, 18339255027520807600, 5493807155424964352, 12622252083466350112, 66545992550201320092, 17999224633277894624, 5316363383696411392, 22959234602005877152, -19746200358867702008, -13220141252573817528, 895428732551053568, -4296629057611841232, 5348566288821421540, 779895094859947008, -46022847914133888, 231573008720739792, -436691190406222736, -25668825358963832, 2261235498668160, -9144508318816000, 24098463419726317, -347218170096, -16722445362112, 156778152273408, -785181070318252, 20218133346264, -182196763136, -2079952456496, 18361772815222, -640860497312, 15142972544, 3697240624, -285146799392, 11117676040, -216022272, 103976128, 3254409735, -118059136, 2261504, -2504576, -25025848, 831848, -9856, 12304, 139526, -3248, 32, -48, -468, 8, 0, 0, 1]>],Snew);
    return Vf;
end function;