
// Make newform 1380.2.r.c in Magma, downloaded from the LMFDB on 16 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1380_r();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1380_2_r_c();".
// 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_1380_r();"
function MakeCharacter_1380_r()
    N := 1380;
    order := 4;
    char_gens := [691, 461, 277, 1201];
    v := [4, 2, 1, 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_1380_r_Hecke(Kf)
    return MakeCharacter_1380_r();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1380_2_r_c();".
// 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_1380_2_r_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1380_r();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<7,R![136048896, -3386105856, 42138206208, -105410460672, 78849339840, 480708836352, 4449737410560, -2283198800256, 293682355920, -2659852019520, 14597439704064, -13130926266720, 6250082676720, -3010140157248, 7633498070816, -7514326340560, 3931236498712, -841916345792, 523355549280, -519513817848, 303672701728, -52138093536, 10181196584, -10117013092, 7619403577, -979986500, 74321528, -72439852, 82449308, -7124348, 214872, -201084, 435334, -20844, 200, -172, 1084, -20, 0, 0, 1]>],Snew);
    return Vf;
end function;