Skip to content

Commit

Permalink
added modular polynomials for j-invariant
Browse files Browse the repository at this point in the history
  • Loading branch information
bmatschke committed Aug 29, 2021
1 parent 54868db commit ea49307
Show file tree
Hide file tree
Showing 15 changed files with 1,999 additions and 0 deletions.
@@ -0,0 +1,33 @@
import yaml
import os
from utils.utils import numbers_to_yaml
from utils.utils import real_interval_to_sage_string


path = 'data/Polynomials/Number_theory/Modular_polynomials_for_j-invariant/'

n_range = [1..12]

R.<x,y> = QQ[]

polynomials = {}

for n in n_range:

filename_n = os.path.join(path, 'phi_j_%s.txt' % (n,))
p = R(0)
with open(filename_n, 'r') as file:
for line in file.readlines():
exponents, coeff = line.split(' ')
exp_x, exp_y = exponents.strip('[]').split(',')
monomial1 = ZZ(coeff) * x^ZZ(exp_x) * y^ZZ(exp_y)
monomial2 = ZZ(coeff) * x^ZZ(exp_y) * y^ZZ(exp_x)
if monomial1 == monomial2:
p += monomial1
else:
p += monomial1 + monomial2

polynomials[str(n)] = str(p)

filename = os.path.join(path, 'polynomials.yaml')
yaml.dump(polynomials, stream = open(filename, 'w'), sort_keys = False)
@@ -0,0 +1 @@
[1,0] 1
@@ -0,0 +1,159 @@
[0,0] 296233792536035389557213880448586170063345555337953398793296490029073442466634162205114354470094732341621195769682965609554402322192109928448000000000
[1,0] 827654467737801441761158523256485804998513659066571629742167818917171049275715755476518161958724573147007287534938814114956453645811449856000000000
[1,1] -6523316151987967352990249772199720467083443114284179660851390075404607936207753857924445492498921565070029607727835899543363465113929515008000000
[2,0] 1052400806092611446856999986107551674838411537694207363060952614565025984710606528836048307584279942134725070972248818996170453521163878400000000
[2,1] -7790831230224553845619920039061874058191704974104843575635713889918310207541091386269200092033671215015256648528418717411188423721484288000000
[2,2] 48132525672551364194446453112149335044105750285901881988767297329087812391392712473356242447257671803604810557368203650854160412952231936000
[3,0] 763793342374511313548683084126276590480877067197867487762087595057578443359292576413772316156824792546895132331605931297209634835660800000000
[3,1] 869569770820404595502434799477023156248028216798583360081120653277822291736126032358110641883287178871354461215393374088924051695206400000
[3,2] -29562988978988124366982032298830067782771985788614555834682084458930747937354038723730365039001202211785509729736190183365918008016896000
[3,3] 21942588891600446229148419904150423440167387524131347574630518470322757563473397245204673966466259063385811782971369796057977508069376
[4,0] 333465316180572734592876437380997330250702055108886926488399579295412452713595878190631688256806978486509892534968727830040957419520000000
[4,1] 1171835447060344532055184048395200133268219629236898194994791361987466033052276486840595447183813867064400129251699577897599421644800000
[4,2] 4313337050456090798394637947210234420040890594551325420048945876911325036921534508045768494687185368523833037759187757614732253593600
[4,3] -4257539415507894795016889234880726005419270325916093000059228578907578193686569096747725032341650427993524111004212513640284160000
[4,4] 1253874239803132476415572633249084248710571426196933708644278178687163481733608589985256961276073376504035793024144071720960000
[5,0] 83096324073815813729499618640980212674032007733865837824599989224419802320521540547654133598412627098660933044355162408726036480000000
[5,1] -144873234429085925741483829349356900975029086453703681590916830024403059341448168846998847366413036575590255662503774698183065600000
[5,2] -95693899176646361331181394802997794862884784049415906190672961341804584776735449488747041449559444492830167107602915457079705600
[5,3] 156817153400335760966516634241062442217943193536046286184258561020045536734017532303925953030594851361448996740825656328192000
[5,4] -113328854481402929859901493887185496830892002557261172571874206420802224302360369844649524438664979465848736295394476032000
[5,5] -1696664490389689128589448807767619331680602280694637692182892489756558643655998427762105401689772687945443857995161600
[6,0] 9423433921961827366884128200734210777488332325797120635170209524669815515538674530293840287553811654764702184076491783929856000000
[6,1] -14909452552953104792430894970583748095372086537324623837203225211227441325092423342971946291264419786628422284074067154698240000
[6,2] 9884271980066773491622268768337140382962623511406172071095066387066638910999349792474537686579164040736611924853689910558720
[6,3] 2088224610951586411419130303222655292829792064410166428862148748837405665586974762835176261435467451384582483166101504000
[6,4] 8301100023185220502796521078241747521496053798552252914539222634816978553435821706403114899836689158548766581497856000
[6,5] 741222977109988137890976017704058047572897167993562771990325230425151504192193061118311181478858555703376769420800
[6,6] -194049789460567801039368948785859037288988112868916425435520923376758269531386816638269341157104000263173323775
[7,0] -58445632226624190723065966457582291299064189948895265969589342089454439934222817554542972354280176611295000440864768000000
[7,1] 42477547756236754968299057998722397556126001794563837782668750398043172507504111729677436980116821522150357122615869440000
[7,2] 36184043804696372105494307530969135679822854737401558445049616363997553768185223516946976283442484572372184269995376640
[7,3] -135168308854103290354620428879652221342842298654033175158840483658351964938739953968904274172813061336052120367923200
[7,4] -230553799746049249143912843224869154425110713210044686757776198509023237787102438635427667597572003039005938892800
[7,5] 33256772668931843624672314246079698572432505508931866340941199164936108159140272626590902209750425437529755360
[7,6] 24225190870512999024274428353079104645474633182620942468590902344251646151773240641907549258673423835056320
[7,7] 487190198926244553338927046244935136647300581626248752224434962437635466620262020724338316030151236644
[8,0] 43203951842476649188512658985848422501925688782487178145438561912987269270445531160316431283824187759814545034444800000
[8,1] 4282987326035162311763492912109406526514555078030019399888858366519670466454555668013180408530101854507880555741184000
[8,2] 8964610581296910646120370959085209745826105678425322549553032541489373019551394357545790924859939370081506440511488
[8,3] -7095583361970188585504634194170795825992181003536489463138754035383861992504462522274227251366009481119334400000
[8,4] -472471324977936820767501559681931326913359319379232461933529404179983338737373151243854108643971961791840000
[8,5] 321322768840680116988036704527076266022288799959563038607769723067374460329530720044773094718065892256250
[8,6] 234205516905507263471350415403901215662977798331992064271239302597292432380196868250729334705315784000
[8,7] 42339346496367308717689368315200030847115880781001777268531097808223344041986584748251291641852000
[8,8] 7821778345339807499177998717387387398334850640617611055530870045348403389861230866983071590625
[9,0] -1333994695887123494025623210403394451657954688875341161411305026159753148321740825256927211339150822211584000000
[9,1] -171067684408633123745141142128792140353700409175842608856864287645319110529812567914230582635182226881380352000
[9,2] 4859826565743883435626085758975016186317127931678190036098139345739974202093988277257906773147005043605504000
[9,3] 6467565353037487978766361926800309318122293211517663740697661255186386310865924616088451308977998028800000
[9,4] -13895323261561762585705960803892956584158779865855986238634765448654903628827894253073365749015892860000
[9,5] 3934450849761610271550154118572811067421784739644687434958108799246662816093352577010614810587060000
[9,6] -1724205144189213195944886442386649650759606626142941552369372727571340608117793196746521558940250
[9,7] 1443964831631648390518307817663811269179350735892488598809432192940905251423302661482652048000
[9,8] -275904980346709678373073519964994577592477324658956765464081815926418464787198030695860000
[9,9] 7029941249135179035234596261819832870672120178974822060026528298842053368028107619600
[10,0] 66038371389636004231369587520083148364539740101165644077777572243459301021108293222900690955770643087360000
[10,1] -8351957741908370905607982711695533848961184460442580992450108260566720476011917065780835418665845260288000
[10,2] 75870230202188480728585881084105945223482951153910599779977329005540370220411222837645536364827156480000
[10,3] -216566638208590720054279749498911209080041138776351468134348907102269970980393052180343542618593792000
[10,4] 280769501610506375838999289853938810843739383155143170592114154197483013478393874410639627336028175
[10,5] -184595737018145129996972053262806721914020041913287596838300817936939553456484878171085132412000
[10,6] 65994164559029697470590065687305939200653205160407876521572709520708559986971226330552821120
[10,7] -15200164747398377785292448875904288049679451311437685145323669746036692092780761938964140
[10,8] 3652982577037250989084769005220627989900036029813789860148379834572716310292054980000
[10,9] -612429472662527731939346050518507342307529762266380859280327154076706482821862500
[10,10] -17700023055680554789123122163568574691582257412274068758565895141760471705375
[11,0] -2481533882305278592261870540419792844750849925519481360968977524773931385961818606395476913684480000
[11,1] 406236880250779069980565732024565018642695060155064544557173157684077248391442925491303468121456640
[11,2] -12402545306295341131717445085711254542695021248252748370804411062000523962681915511599164560097280
[11,3] 98509296052176431249057524137677209561382950914148552842202120442304771218718349955769693816000
[11,4] -298633094716116586463537389109221550902770871997298291915595188688243964413051926413297942400
[11,5] 438471630145559262380013002759627797475180665709577990893940201908134440431232281128611000
[11,6] -339730450034897358529283185180959818765000424289897514646346079021884862144855451989760
[11,7] 138046326335527497755110602870392269871211886168339002974941769900157935506818255720
[11,8] -26373218550398865150040410231963283281380050165993453545723362938320018418579500
[11,9] 1677960708086398976147013183083867409303800881623350197428733723243859059920
[11,10] -17316625533757663671277005051984860654427730591709403009461949354720000
[11,11] 15209440481529315208420168777550681506763631006195448116134445684
[12,0] 33663111899188794323808226024923504062210783322377352188346609279862470033599251565267386368000
[12,1] -33718729945150631239335631584156855570035826752004057610032375636449847674679618635973918720
[12,2] -119288262167531604234270279031893819791347931435554070404847726173059578900959416470069760
[12,3] 966355124525322001278887821679250762994474515068408101919925756703605386763382407941100
[12,4] -506973491949154113806195135138434127080573988026597196865293192367796410340614779040
[12,5] -2498396837415289453095080431020154155100768671768470084777144141215608325308723900
[12,6] 2280437134592924924326844748497801001647083918470880722210912562252190980860129
[12,7] 107875210743093667110928764618130496042799034104625034637148980069135940512
[12,8] -307210283991348349604262707444088944734632342043075991822391436960695000
[12,9] -24817327073300363870753414555518428460101593435248546329627985441890
[12,10] -313368809484970693510950049341928831693600169169974585066227800
[12,11] -532659773119264456759075930082617004621635192114116631428
[12,12] -68685598499577281155933518768416776753663215889999
[13,0] -1338723343802070835313972860039462690216549639011113949310089805622030846415999074304000
[13,1] 38846788744751007259216078345273249726225855460030243116789173826448786579068342591488
[13,2] -55370203442016424740755430036423339983444979910826261199876752284195178351742749376
[13,3] 20880250527757348682621354799064609895049336580774513170922911076305521081268000
[13,4] -2505117699477248238289877548288716482530561519415027410649174579753355740250
[13,5] 755979636276443547184200610629883674505758841848198200706114525563407200
[13,6] -351885971849659752901164348827318003093164924432536305078352241350000
[13,7] 95714921161068906689094593361479839207396754346174239173060125000
[13,8] -14025430077547643295347566695000869660320236785970161761730500
[13,9] 975447990984434415337406712968972089762835789580073464000
[13,10] -25680305305369097038431432515576958347031888883534350
[13,11] 178322403928401461180800176356940043923458375500
[13,12] -186109465432330259706022456040780396007375
[13,13] 10937508936835874563375641113120400
[14,0] 17759171349905941686176334035603125551349816994432727153155912033565332137574400
[14,1] 671075703103583835283293596089490934868903745013754334201004559046029815360000
[14,2] 1271614565647469344591256120046634068708272131773427519036401836370576399375
[14,3] 402451593701201122949468329412881746911175306947552248338694925994372000
[14,4] 25988008762272337440682361101279266524316753620531860763489804979000
[14,5] 315350904624495238674279650211441251455371520733719827140837550
[14,6] 532915469918365135294624986592078889740960737995014860000
[14,7] 68443471939033850441503643806370197047508077477500
[14,8] 169118231595772286504269796475353207833859175
[14,9] 91600520204007856111921738145835154680225
[14,10] -41362479010260922869911302498383263840
[14,11] -10784343562362149498980609571154000
[14,12] -409494966293915703519368136000
[14,13] -1892149142804088319218200
[14,14] -225673932971390400
[15,0] -78537118839697640686360635295247094568599407646025705619876347020902400
[15,1] 107872423480820496442526357004008446940661730234290623040333338172000
[15,2] -52101963323896813441689147591872735048654423648543576293194312000
[15,3] 10631771703116407008868434019553458723000640829070571828796900
[15,4] -881569761105032752723255726263025074065948002372395007200
[15,5] 25018674231939771006149083965288673104787612039448760
[15,6] -177630178316972726315006278992523111322663662500
[15,7] 186068777296853217534726747985316666088750
[15,8] -10937504715008333446103756071908000
[15,9] 1892143014699318476144000
[15,10] -376253833506803100
[15,11] 297083661955650
[15,12] -159141482400
[15,13] 55168020
[15,14] -11160
[15,15] 1
[16,0] 550179703220539436649263620993525244825157515520
[16,1] 469302962647359894587893032938594191194200480250
[16,2] 16275274701180455873755040858721795562905276000
[16,3] 102106552612577225060440889525267958354567300
[16,4] 170545138276656047178245215593633388173975
[16,5] 85320591499518960916296053384292087295
[16,6] 12325242530586312022749479312508000
[16,7] 416535857042772589393399872000
[16,8] 1892988649834879674696440
[16,9] 225673933001834880
[16,10] 12648
[17,0] -1284733088879405339432160
[17,1] 1225667011364362067493600
[17,2] -68051488066250903929350
[17,3] 1018904531858621598720
[17,4] -6374905736966075360
[17,5] 20302880596711488
[17,6] -36296842633500
[17,7] 37916096000
[17,8] -22940280
[17,9] 7440
[17,10] -1
[18,0] 1

0 comments on commit ea49307

Please sign in to comment.