Attachment 'minred-demo1.m'
Download 1 // minred-demo2.m
2 // Some examples to test minimisation and reduction
3 // Version 22nd July 2008
4
5 clear;
6
7 Attach("g1minimisation-2008.m");
8 Attach("g1reduction-2008.m");
9 SetVerbose("Reduction",1);
10 SetVerbose("Minimisation",2);
11 SetVerbose("QuarticReduce",0);
12
13 function AlternatingMatrix(seq)
14 n := Integers()!((Sqrt(8*#seq + 1)+1)/2);
15 r := [[i,j]: i,j in [1..n] | i lt j];
16 assert #seq eq #r;
17 R := Universe(seq);
18 mat := Matrix(R,n,n,[<r[i][1],r[i][2],seq[i]>: i in [1..#seq]]);
19 return mat - Transpose(mat);
20 end function;
21
22 function GlobalLevel(phi)
23 E := Jacobian(phi);
24 _,iso := MinimalModel(E);
25 u := IsomorphismData(iso)[4];
26 if Degree(phi) eq 5 then
27 u := 6*u;
28 end if;
29 return Integers()!(1/u);
30 end function;
31
32 models := [];
33
34 R<x,z> := PolynomialRing(Rationals(),2);
35 a := 2^10*7^50*11^50;
36 quartic := x^4 + x^3*z + a*z^4;
37 models cat:= [GenusOneModel(quartic)];
38
39 R<x,y,z> := PolynomialRing(Rationals(),3);
40 a := 2^50*3^50;
41 cubic := x*z^2 - y^3 + a*x^3;
42 models cat:= [GenusOneModel(cubic)];
43
44 R<x1,x2,x3,x4> := PolynomialRing(Rationals(),4);
45 a := 2^20*3^20;
46 quads := [x1*x4 - x2^2 + a*x1^2,x3^2-x2*x4];
47 models cat:= [GenusOneModel(quads)];
48
49 R<x1,x2,x3,x4,x5> := PolynomialRing(Rationals(),5);
50 a := 2^10*3^10;
51 entries := [x1,0,-x2,x3,-x2,a*x1 + x3,-x4,-x4,x5,0];
52 M := AlternatingMatrix(entries);
53 models cat:= [GenusOneModel(M)];
54
55 data2 := [
56 [ 127749758596, 181394754320, 96587148768, 22857575840, 2028481168 ],
57 [ 5749137, 10579896, -93054312, 121116384, -36577008 ],
58 [ 34895618201600, -5840794096000, 366026160000, -10179100000, 106000000 ],
59 [ 505398375000, 28571220000, 247424400, -4013280, 27864 ],
60 [ 160926480, 92557080, 703299465, 192713400, 747892860 ],
61 [ 73899264, 30827616, 3214992, 41988672274176, 34975379630592, 10925052794784,
62 1516706950464, 78960632751 ],
63 [ 257/31104, 3185/15552, 9731/5184, 117691/15552, 353101/31104 ],
64 [ -52558831/1152, -12403459/144, -731779/18, -5188221730201/331776,
65 -306088087027/5184, -577862222975/6912, -68183956399/1296, -1005657517/81 ]
66 ];
67 models cat:= [GenusOneModel(Rationals(),2,seq): seq in data2];
68
69 data3 := [
70 [ 497556464762880, 162041502414528, 10268388573321461760, -1173056830304256,
71 -3840760196333568, 1678607125212672, 5610123270222336, 274066565984649216,
72 460534337823707136, -20088600130363392 ],
73 [ -9824585761916163, 68126171995037016, -3282191758509248907, 31868411157793602,
74 -203319370477785681, 33722873769830364, 131765917553210556, 732975963983699751,
75 -3694046517636626718, 12988804750634916 ],
76 [ 28955038541764903819475544619138285199338819461509187873356560511,
77 39618019559632854369263685488611225741435100314745977963918043973,
78 -458968979590448249902516523731269625442832275517092482341663031375,
79 -97517846826283694830050386438559032941308482979005404999487692969,
80 -107281347898002008541742056133884965747001105450125265549056140365,
81 -101093374113833112618809893321078912676087000334135467704417166683,
82 254900425192985519258953371764709666111814872383174289519746351115,
83 -282882023880265778731678970629127749029499925406390773649330504675,
84 469606487274775848382233663870962706530732563829909885996152574775,
85 159415944809129679724917858426400754036592236718520430393526731890 ],
86 [ -8937825002/6302625, -27404770553/50421000, 13/10890936000, -12985019501/4201750,
87 43164713/75631500, -56592907283/25210500, 92373019/302526000, -1541/302526000,
88 -6479/1815156000, 63143503/75631500 ]
89 ];
90 models cat:= [GenusOneModel(Rationals(),3,seq): seq in data3];
91
92 data4 := [
93 [ 13652750, -21717600, -97146220, -6190080, 4226450, 34237425, 3369820,
94 68321886, 13942916, 698224, 11699500, 3380800, 21003560, -127360,
95 -505100, -3244950, -889960, -3796788, -3696088, -268192 ],
96 [ -819372800, 476378703360, 61815446400, -98324480, -8526746714112,
97 -5724767676672, 1700515249920, -609209301440, 203402800384, 7518225920,
98 -308276300, 179231974560, 23257310400, -36972080, -3208095605952,
99 -2153880093312, 639799384320, -229208124740, 76527879064, 2828678120 ],
100 [ 887849821, 18464937898, 17670037393, 4794279681, -3707351444, -10793249758,
101 -16549154436, -8541181439, 26591354349, -26208015021, 5137616434,
102 -32208847946, 21708873897, -4131978193, 97149092, 36193852526, 19001977684,
103 19025504874, 18905580283, -2621965935 ],
104 [ 18582, 2631, -154374, 7272, -48, -10806, -3636, 320892, -28152, -12096,
105 99386, 13813, -824402, 15096, -184, -56738, -20508, 1711316, -53736, -42048 ],
106 [ 541487201856, -14962251120, -2111263152, -3266070768, 10716360, 50593440,
107 -33821496, 2253696, 13364568, -11087280, 96967728384, -2679386496, -378077568,
108 -584876160, 1919040, 9060096, -6056640, 403584, 2393280, -1985472 ],
109 [ 1199/144, -41/48, 278/9, 1469/288, -30025/2916, 1484/81, 39095/324, 111/4,
110 -46639/432, -101807/288, 49/12, -23/4, 89/6, 271/8, -1532/243, 229/27,
111 3991/54, 14, -1799/36, -15595/72 ]
112 ];
113 models cat:= [GenusOneModel(Rationals(),4,seq): seq in data4];
114
115 data5 := [
116 [ -170/21, 31/252, -796/63, 508/441, 9/7, -121/42, 1/14, -193/42, -61/441,
117 115/252, -44/21, 11/336, -23/7, 37/147, 1/3, -109/9, 1231/2016, -5147/252,
118 -3959/588, 40/21, -2131/6, 227/32, -3341/6, 187/7, 337/6, -302, 173/48,
119 -1403/3, 1331/21, 48, -65821/12, 63059/576, -309569/36, 52225/126, 10409/12,
120 -5, 43/48, -37/3, -839/42, 5/6, -102263/72, 98039/3456, -480983/216,
121 20200/189, 4043/18, -4523/4, 331/576, -15121/9, 70835/126, 1433/8 ],
122 [ 513240, -16380000, 66003840, 1365000, -140197680, -68432, 5264168, 55526016,
123 273000, -111325032, 1820, 10738, 112476, 546, -225498, -3976336, -58058832,
124 196751952, 4436432, -420961152, 0, 0, 80640, 0, -161280, 109200, -3407040,
125 13728960,283920, -29161440, -6988800, -1485120, 20966400, 262080, -43243200,
126 -14560, 1094912,11548992, 56784, -23154768, 926016, 693056, 6370560, 23296,
127 -12741120, 820820, 12077728, -40912224, -922740, 87535608 ],
128 [ -31026, 7064, 13927040, -42403854, 256, 7134, 4536, -3162240, 9629628, -216, -18144, -17056, 8042240,
129 -24492528, 736, -2098, -5172, 950080, -2894836, 132, 1266, -711, -607200, 1849893,
130 -9, -4556, 3096, 2198400, -6696908, 24, -1012, 537, 486000, -1479841,3, 300, 0, -144000,
131 438600, 0, 150, 0, -70800, 215520, 0, -300, 0, 140800, -428520, 0 ],
132 [ -245520, -8365200, 2070450, 38730, -35400, 21808, 776080, -191840, -576, 4480, 2140920, 75947400,
133 -18793530, -281646, 358920, -1034475, -34767945, 8607810, 193488, -134760, 1166640, 39721200, -9831450,
134 -185970, 167400, 10669860, 361543500, -89487450, -1723410, 1506600, 3429450, 116491950, -28834200,
135 -561555, 486000, 9227592, 327148920, -80964450, -1326438, 1506600, -5220183, -175900845, 43545930,
136 937392, -698760, -74884905, -2561037075, 633952170, 12686031, -10662840 ],
137 [ 20804970751773973214052328899360767987786482669743,
138 2960804385605479797655220785403570886215325683214,
139 -12216986031580958950878735839083146986921090322693,
140 14177961368797597603182491309155885799413314328873,
141 4192807653786971595917989301213464318512397656127,
142 14814114129760082515285061678918270498582087454483,
143 -8375771179555200153381435662010910337691174564300,
144 701575224700354155324532164208596494224807940273,
145 4145811975639398320814698626882324927722813418638,
146 6487256138240907621718011797104964713266666920595,
147 4509458691130945524370602737075549141332901570598,
148 -4615088507671307186237991042542444054090567452827,
149 2065605662997323867241768565926529083555392632656,
150 89859007753054409985202508130458181164942905278,
151 2664633947394825401825692133492289380003688404994,
152 -5382174729615196362938875195774008861077186222199,
153 9300881399987994442552843208606949202977280129665,
154 -5866086277483045086280206974217026103307847479079,
155 2045030532096229745257091939562426517800203704336,
156 -4447105463883272112459556498851076764775769882715,
157 -14101891462352886798462971472454924517064986154288,
158 -3215699363576128109217114879974521573856211831202,
159 1333344834879838053759237185193161858694834022254,
160 213563155188284677103697078184145339343007319739,
161 5510643369179867742589631315645005450928437425640,
162 -4284559315182415992650349774603881338199968839324,
163 -1215869666385611760106163522122056696743494623579,
164 -967623892877618622391995936002742538070321843832,
165 2005894771606361353997958042298342334386050204999,
166 3324651231342955305873552737761108307553872577312,
167 -701050533830899637978040584679971082144641393454,
168 1060957161366224389741919214515702427377091120922,
169 7082711999081811769989100193772434139848686485396,
170 -9910430405256120530638847915895936462332698178885,
171 -8161507805164622264851964940049350838897623132342,
172 5765272486300670488168200812425028615426400699,
173 -1572846585136962842614781669181639712779494462886,
174 281004298675032179201977894643716440392180085945,
175 585194992210923033610671406179114373359412242540,
176 1641863229361169973984023137854823607842340732115,
177 -4147291890809074504311872699442477733701901668933,
178 7100267780583368180244721468766371046127999308445,
179 -1046949801548561370373126742069169196234518301543,
180 -2928737295202829872179514069902002382701372416033,
181 -6782896263814230675850405393034507236884929241945,
182 -1260352903605120315953691451148404656118589876451,
183 2165711586188229410935227230508068467246027763169,
184 -732907834367857348348254742523126190224360059611,
185 -352142128537386107273174824256323807821974013528,
186 -1660547460809353812751410568284763227202027370559 ]
187 ];
188 models cat:= [GenusOneModel(Rationals(),5,seq): seq in data5];
189
190 insoldata := [{},{},{},{},{},{},{},{},{3,11},{},{},{},
191 {},{},{2,7},{},{},{},{2},{3},{2,3},{},{},{7,13},{},{},{}];
192
193 finallist := [];
194
195 for ctr in [1..#models] do
196 phi := models[ctr];
197 printf "\nExample number %o \n",ctr;
198 phimin,tr,insol := Minimise2008(phi); // :Transformation:=false);
199 assert phimin eq tr*phi;
200 if Degree(phi) eq 2 then
201 assert insol subset insoldata[ctr] join {2};
202 phired,tr := Reduce2008(phimin);
203 assert phired eq tr*phimin;
204 print Eltseq(phired);
205 finallist cat:= [phired];
206 phimin,tr,insol := Minimise2008(phi:CrossTerms);
207 assert phimin eq tr*phi;
208 end if;
209 pp := Factorization(GlobalLevel(phimin));
210 assert {p[1]: p in pp} eq insol;
211 assert insol eq insoldata[ctr];
212 phired,tr := Reduce2008(phimin);
213 assert phired eq tr*phimin;
214 print Eltseq(phired);
215 finallist cat:= [phired];
216 end for;
217
218 /*
219 n := 5;
220 while true do
221 sz := Random([10..200]);
222 // phi := RandomTransformation(n:Size:=sz,Unimodular)*RandomModel(n);
223 phi := RandomTransformation(n:Size:=sz)*RandomModel(n);
224 phi1,tr1 := Minimise2008(phi);
225 assert tr1*phi eq phi1;
226 phi2,tr2 := Reduce2008(phi1);
227 assert tr2*phi1 eq phi2;
228 print Eltseq(phi2);
229 SetOutputFile("mylog");
230 print Eltseq(phi2);
231 UnsetOutputFile();
232 end while;
233 */
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.