
// Make newform 966.2.y.a in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_966_y();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_966_2_y_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_966_y();"
function MakeCharacter_966_y()
    N := 966;
    order := 33;
    char_gens := [323, 829, 925];
    v := [33, 22, 3];
    // 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_966_y_Hecke(Kf)
    return MakeCharacter_966_y();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_966_2_y_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_966_2_y_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_966_y();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![4797851239331138250836281166905411681, 72077002629442003383814380062683157657, 612190895958807530275453458906842837621, 4678374228817304654584075129542450093440, 29083857739217596835601223268624002233990, 127438193383395379183867572841794882131303, 567747264555250915097214329864490186052145, 2520301715362887234667733643514646670139123, 7020587361218289421319353050075343518510965, 21254079471435796333260440550618130749192381, 91867591153556210945448084531862001267269920, 193183265676830201729936301108125099119595638, 399608265268168879600954551560667558415531223, 1819117300270816881871842009146765114381279391, 2631957040550626469943010279330255469497594037, 557701044085389388656853991554338090416856684, 13432458774773336170316758523892220165601024599, 15307113853688555799035672269359703464634185835, -41738065450368017810809501400204636890134450762, 66185524279079399377843130323234194044487170793, 182662078599016747632778825512044052123146680759, -302716660681991476756116150669411690400140843408, 98607413877230480658076132469268005652659066213, 548152668875094268819802917438671403439031666162, -2575401277479980059302430812967511492435518683183, 122796662806396953699609661135184090631685476663, 7495421576053521262811205731239133610838425063653, -2107941496567051206360156961369761729369081139487, -8660239799500790856721678048188125025638268462124, -5251948530248080065159263449723615119420249361704, 10136254321203711439252080030487052247229435740408, 55409478516612616692369979557067898898901176282207, -32889077028582776109717485388746095571078297428015, -104746010421216087169538685208271084127305298430884, 153118807013793939744749238667806773046733695075410, 90793670699753963373339429248929554389628999071441, -244787206741057569782094304996375130668316670800154, 52493441299041906892806756480894443968503333475802, 174135278738437937553251600118140321257700698841646, -135813904223004655394520690515954330928132535949494, -21292934475432074584816065853956290974888902104952, 47163374556827531100533088762840234791416337860555, -19019207049237951672341096960368571714482127262698, 28841882592516283716834519608030945479758918120727, -24638075007780528252492149306963758811834339455518, -5966465755786961709426278418098599696472768415432, 26263745152069901778487397948832517796398653197697, -15265537274634622653504166592813440148970318308117, -4300038042317600361524754923064695469459798722365, 8641561850131392049903693116435503321424791529429, -1033218341892824982446414631120346995954995721402, -3015664249966610381964082056237089194097051454735, 881031670579957317791759056295646672641759838799, 1163308276157946223348276765058116049487577606722, -845375095393699198240680673517333636855935570194, -233571420118640295468284714036151280037367373539, 539385920554192658562095898772935239536714975042, -172181832232484919838847541393854657838779469230, -136485202980826770420571607190577152632028841239, 127825017391634503037336237588547178019752728136, -13656616740745400181557345441077526074005120199, -37534520334546167186032710795437756685561845663, 24952675581534844371971825074415332359962489579, 185054906538916754007510150373238645161173965, -8202649669182674697429366770061429284484644057, 3640651789937544247583272553233119147352785752, 728415197603202565750852427954322569110103840, -1296931412866945422810428338990820217961964292, 517390876903771188077584194451835968947450353, 46027370104154350725490787702199499343737805, -108105701067159409056136353442964251735428504, 20896351857658777566561132412037369727561821, 19912511232520614036542248092436551544455130, -10304396143946487336684853836347148782981044, 1745978916946612755978549249648433065105420, 1146792133734279153089503796363100329422983, -554966874889217827905378410096556994414115, -84350552000591195124595864622249188678542, 200181105144703903474508864909481447094747, -21219540492552541818970239958990322255335, -14637805612733662822371410791968608529520, 10351946442132421610913134484243547997855, -2895723957908535392831200855826480138709, -1341449006137136587336036453860843426378, 936642139280637090398775422996758352341, -14503210960590455618414129196822208131, -184841545360685153027465697683157055952, 40962994952260754109943191838171919030, -6019204178613896881454369219591213535, -10770472668094794259594253097991382980, 5305745003732201718561015284474221128, 705529759626770997970842498626106199, -947971882797511298540980237490088667, 170702342958926895748499171398518834, 49607090807196371351248226565006334, -41032517357493797957063952362094401, 19522214895263114572726543132648677, 3508184407465723433262688540696150, -3131577363714581818496480937135790, 731685007945527565501546702878660, 395601672053242003897557819476801, -71518768452383880509324425560651, 39932357080765209566620278428539, 9357236552460852875741518864870, -6783788760720117730378896271155, 2436936833060185831037073811083, 1076931035758058342888369704383, -178049567802978942044987989903, 47302496922883465869043733138, 20266768249113329533831358703, -7675032060264969604157840941, 4265943476796784522524844978, 1352618211781327965311786308, -464816518096449375013705406, 37472310212773976338575251, 41401721116870155349869781, -10281830783768327653155780, 2641706766098800303522898, 868766249240816483557781, -649792565548808504546646, 28461902954941595152307, 29270308095833266057966, -8243229996630694446433, 2152341170150307868972, 634835967455062631829, -524612610570964134239, -30702767290223799433, 25019128665408295106, -2841066603819097661, 1903352000342556005, 331800218715798897, -311869055255084257, -5487605756022578, 14069225045521952, 1612750875076750, 640866223817531, 10532945944749, -81192481599056, -26314692368376, -1844774275503, 2444918594032, 375927976418, -15726870215, -30497643519, -8115639539, 1661422236, 541402288, 51437542, -14875815, -15719491, -37757, 1348378, 51413, -69004, -8790, 2105, 775, 2, -39, -2, 1]>],Snew);
    return Vf;
end function;