
// Make newform 570.2.bb.a in Magma, downloaded from the LMFDB on 12 May 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_570_bb();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_570_2_bb_a();".
// 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_570_bb();"
function MakeCharacter_570_bb()
    N := 570;
    order := 18;
    char_gens := [191, 457, 211];
    v := [9, 18, 13];
    // 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_570_bb_Hecke(Kf)
    return MakeCharacter_570_bb();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_570_2_bb_a();".
// 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_570_2_bb_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_570_bb();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<11,R![1278465975816179905062093891249, -13685540913775502852596189875702, 47793503211437250636708816122283, 11127577839465316230562490401302, -417932248110133908170592401282721, 346736701107970790504555136566070, 3031506019796953465503491659424604, -7284459911175834934290870830898798, -3401411454509529722612671712535327, 28907768391968726479822019812572744, -11954379845660984215922270777902830, -77211915174237628619878589393937768, 97157790655135179831518228600475187, 86316151079802074911036211188527552, -231014174355484815697864855679674338, -9099753888652828734172496976301032, 357936661525729363456519200454170045, -201772819414075779069428302089253686, -294481653854529558456854151323782771, 339960183841540841625784854151962210, 122260019266498109141679891144082428, -331954316533714235653735420993100172, 37639062099218871505746994220943909, 207480810916461297671286859939432176, -88829332822594772926902880282719915, -88997754920533406774178916935918348, 69315379462807911560010663860799315, 24096195207188217591061943204552880, -35257911250918837154991029524432572, -2089025607622819865347953466138080, 13353351971059704648894298090846377, -1709332257922503461104490942419836, -3934979081429944901214054592014714, 1112513122155822448200093931356000, 919756028329872596859246158003451, -407315123156075873026708530218556, -169678764757855590505356124534190, 110562226529559049055316811686408, 23798803772452024525024642777881, -24059927720475675162076723591860, -2177586404174764983676553960499, 4344419437996339357485993818586, 10375336524061908705111322916, -663720785139617321907392379882, 43714544392008309872594830902, 86816917258607425140132837696, -10641613176764813479877418102, -9800841009086114973251053680, 1691935975666876641639458653, 959859311253291570372575220, -210420314465036104804903866, -81830833742657226119925528, 21664866193321958258026377, 6083455553779262329256886, -1893777435505711050467641, -394585647249773948884182, 142415925365048534100327, 22311297459572985033102, -9280637938718646487884, -1097592436499432128218, 526090256396027719357, 46813504625707725252, -25978515141951482280, -1722597030407761992, 1117061578759996914, 54298766709849978, -41733954282616689, -1452385164023478, 1349408755572438, 32513609699496, -37523391101979, -597641381640, 889283145525, 8747064036, -17721561573, -97206804, 291243165, 742986, -3827326, -3150, 38286, 0, -264, 0, 1]>],Snew);
    return Vf;
end function;