class_group 0.6.0

Rust library for building IQC: cryptography based on class groups (Cl) of imaginary quadratic orders
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
  ***   Warning: new stack size = 60000000 (57.220 Mbytes).
[85997496, [42998748, 2], [[408188227, 99620635; 0, 1], [2, 1; 0, 1]]]
12.340047278667903334059769086970462209
4.1894250945222025884896456921310573069
  *** bnfinit: Warning: non-monic polynomial in bnfinit, using polredbest.
[1, [], []]
  *** bnfinit: Warning: non-monic polynomial in bnfinit, using polredbest.
[1, [], []]
[2, -1]
20915648110955829231381594293324156411897455346679838307589120000
571459344155975480004612560667633185714077696
[54898, [54898], [[17, 15; 0, 1]]]
[26, [26], [[19, 15, 18, 5; 0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1]]]
[1, [], []]
[3, 3]
20/3
-5
13
0
5/2
-1
1024/243
-1
31
-11
1/32
15853839
1736217747
Mod(4/3, y^5 - 4*y^3 + 2*y + 11)
Mod(-1, y^5 - 4*y^3 + 2*y + 11)
Mod(y^2 + y + 1, y^5 - 4*y^3 + 2*y + 11)
Mod(y, y^5 - 4*y^3 + 2*y + 11)
Mod(1/2, y^5 - 4*y^3 + 2*y + 11)
Mod(5*y^4 + 4*y^3 - 12*y^2 - y - 5, y^5 - 4*y^3 + 2*y + 11)
[4/3, 0, 0, 0, 0]~
[-1, 0, 0, 0, 0]~
[3, 1, 1, 0, 0]~
[0, 1, 0, 0, 0]~
[1/2, 0, 0, 0, 0]~
[1, 2, 3, 4, 5]~
(f)->for(i=1,#v,for(j=1,#v,print(f(nf,v[i],v[j]))))
8/3
1/3
[13/3, 1, 1, 0, 0]~
[4/3, 1, 0, 0, 0]~
11/6
[7/3, 2, 3, 4, 5]~
1/3
-2
[2, 1, 1, 0, 0]~
[-1, 1, 0, 0, 0]~
-1/2
[0, 2, 3, 4, 5]~
[13/3, 1, 1, 0, 0]~
[2, 1, 1, 0, 0]~
[6, 2, 2, 0, 0]~
[3, 2, 1, 0, 0]~
[7/2, 1, 1, 0, 0]~
[4, 3, 4, 4, 5]~
[4/3, 1, 0, 0, 0]~
[-1, 1, 0, 0, 0]~
[3, 2, 1, 0, 0]~
[0, 2, 0, 0, 0]~
[1/2, 1, 0, 0, 0]~
[1, 3, 3, 4, 5]~
11/6
-1/2
[7/2, 1, 1, 0, 0]~
[1/2, 1, 0, 0, 0]~
1
[3/2, 2, 3, 4, 5]~
[7/3, 2, 3, 4, 5]~
[0, 2, 3, 4, 5]~
[4, 3, 4, 4, 5]~
[1, 3, 3, 4, 5]~
[3/2, 2, 3, 4, 5]~
[2, 4, 6, 8, 10]~
1
-4/3
[-64/93, 16/31, 16/93, -8/31, 4/93]~
[0, 4/33, 4/33, 0, -4/33]~
8/3
[1587988/47561517, -165136/5284613, 41300/5284613, -212540/47561517, -78712/
47561517]~
-3/4
1
[16/31, -12/31, -4/31, 6/31, -1/31]~
[0, -1/11, -1/11, 0, 1/11]~
-2
[-396997/15853839, 123852/5284613, -30975/5284613, 53135/15853839, 19678/158
53839]~
[9/4, 3/4, 3/4, 0, 0]~
[-3, -1, -1, 0, 0]~
[1, 0, 0, 0, 0]~
[1, 12/11, 1/11, 0, -1/11]~
[6, 2, 2, 0, 0]~
[1249690/15853839, -222317/5284613, 39600/5284613, -477392/15853839, 434/158
53839]~
[0, 3/4, 0, 0, 0]~
[0, -1, 0, 0, 0]~
[3/31, -10/31, 7/31, 5/31, -6/31]~
[1, 0, 0, 0, 0]~
[0, 2, 0, 0, 0]~
[-672280/15853839, 150044/5284613, -148123/5284613, 73247/15853839, -53135/1
5853839]~
3/8
-1/2
[-8/31, 6/31, 2/31, -3/31, 1/62]~
[0, 1/22, 1/22, 0, -1/22]~
1
[396997/31707678, -61926/5284613, 30975/10569226, -53135/31707678, -9839/158
53839]~
[3/4, 3/2, 9/4, 3, 15/4]~
[-1, -2, -3, -4, -5]~
[-314/31, -59/31,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3, -1, -1, 0, 0]~
[0, -1, 0, 0, 0]~
-1/2
[-1, -2, -3, -4, -5]~
[4, 4/3, 4/3, 0, 0]~
[-3, -1, -1, 0, 0]~
[13, 5, 6, 2, 1]~
[2, 3, 1, 1, 0]~
[3/2, 1/2, 1/2, 0, 0]~
[-58, -42, 23, 27, 17]~
[0, 4/3, 0, 0, 0]~
[0, -1, 0, 0, 0]~
[2, 3, 1, 1, 0]~
[2, 0, 1, 0, 0]~
[0, 1/2, 0, 0, 0]~
[-33, -3, 11, 8, 4]~
2/3
-1/2
[3/2, 1/2, 1/2, 0, 0]~
[0, 1/2, 0, 0, 0]~
1/4
[1/2, 1, 3/2, 2, 5/2]~
[4/3, 8/3, 4, 16/3, 20/3]~
[-1, -2, -3, -4, -5]~
[-58, -42, 23, 27, 17]~
[-33, -3, 11, 8, 4]~
[1/2, 1, 3/2, 2, 5/2]~
[-1071, -384, -251, -155, 20]~
[1]
[1, 1/2*x - 1/2]
[2, Mod(0, 2)]~
[x^2 + x + 1, [0, 1], -3, 1, [Mat([1, -0.50000000000000000000000000000000000
000 + 0.86602540378443864676372317075293618347*I]), [1, 0.366025403784438646
76372317075293618347; 1, -1.3660254037844386467637231707529361835], [1, 0; 1
, -1], [2, -1; -1, -1], [3, 2; 0, 1], [1, -1; -1, -2], [3, [2, -1; 1, 1]], [
3]~], [-0.50000000000000000000000000000000000000 + 0.86602540378443864676372
317075293618347*I], [1, x], [1, 0; 0, 1], [1, 0, 0, -1; 0, 1, 1, -1]]
2
[0, Mod(0, 2), 1, 0, 0, 0, 0]~
[0, Mod(1, 2), 1, 0, 1, 0, 0]~
[]~
[]~
388

[2 0]

[0 1]

  *** bnfisprincipal: Warning: precision too low for generators, not given.
[[]~, [-16275043782306513717209797591668600538906793729160424387141562023303
069241961, -3992515767463859376807521115314587378342597458337773390379448027
181914746015, 40263088752008514039400780199135662260965092541683607359784818
2049497266399, 3875196415920480829978279850511752676499384722019721458357455
29259111353576, 524613164482816169908873750526849574668376660999341089640759
880949016596504]~]
[[[[[1, 0, 0, 0, 0; 0, 1, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 1, 0; 0, 0, 0, 0,
 1], Vecsmall([1])], [2, [2]], [matrix(0,2), matrix(0,2)], [[], [[2], Vecsma
ll([1]), Mat(1), 20.85619222793697806338436677312547069840936189148609965738
5606105759553686957605190193844727221233577865144297166021560180960373224372
600900514567409428535493879667818173119, [1; 0; 0; 0; 0]]], [Mat(1)]]], [[[[
2, 0, 0, 0, 0; 0, 1, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 1, 0; 0, 0, 0, 0, 1], 
Vecsmall([1])], [2, [2]], [Mat([[2, [0, 0, 1, -1, 0]~, 3, 1, [0, -80, 60, -1
0, -60; 0, 0, -100, 0, -20; 0, 0, 0, -10, -100; 0, 2, -2, 0, 2; 1, 0, 0, -10
, 0]], 1]), matrix(0,2)], [[], [[2], Vecsmall([1]), Mat(1/2), 21.35619222793
6978063384366773125470698409361891486099657385606105759553686957605190193844
7272212335778651442971660215601809603732243726009005145674094285354938796678
18173119, [2; 0; 0; 0; 0]]], [Mat(1)]]], [], [[[[2, 0, 0, 0, 0; 0, 1, 0, 0, 
0; 0, 0, 1, 0, 0; 0, 0, 0, 2, 0; 0, 0, 0, 0, 1], Vecsmall([1])], [4, [2, 2]]
, [Mat([[2, [0, 0, 1, -1, 0]~, 3, 1, [0, -80, 60, -10, -60; 0, 0, -100, 0, -
20; 0, 0, 0, -10, -100; 0, 2, -2, 0, 2; 1, 0, 0, -10, 0]], 2]), Mat([[2, [0,
 0, 1, -1, 0]~, 3, 1, [0, -80, 60, -10, -60; 0, 0, -100, 0, -20; 0, 0, 0, -1
0, -100; 0, 2, -2, 0, 2; 1, 0, 0, -10, 0]], 2])], [[[[2], [[-1, 0, 0, -1, 0]
~], [2, 0, 0, 0, 0; 0, 1, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 2, 0; 0, 0, 0, 0,
 1], [[[1, 0, -1, 0, 0]~, [1, 0, 0, 0, 0], [2, [0, 0, 1, -1, 0]~, 3, 1, [0, 
-80, 60, -10, -60; 0, 0, -100, 0, -20; 0, 0, 0, -10, -100; 0, 2, -2, 0, 2; 1
, 0, 0, -10, 0]]]~, 1, [1, matrix(0,2)]], [1, 1, [[[2], [[1, 0, 0, 1, 0]~], 
Mat([0, 0, 0, 2, 0]), 2]]], [[0]~, Mat(1)]]], [[2], Vecsmall([1]), Mat(1/2),
 41.368578564704732409417461169787335389425015098066066992052113922491767356
2518479971386990773198806459616749645245612672289886701908980504482902220220
62722979243788174152853, [2; 0; 0; 0; 0]]], [[1; 0], [0; 1]]], [[[2, 0, 1, 0
, 0; 0, 2, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 1, 0; 0, 0, 0, 0, 1], Vecsmall([
1])], [6, [6]], [Mat([[2, [1, 2, 1, 0, 0]~, 1, 2, [0, -80, -20, 0, 0; 0, -1,
 -100, -10, -120; 1, 0, -1, -20, -100; 0, 2, 0, 0, 0; 1, 1, -1, -10, 0]], 1]
), Mat([[2, [1, 2, 1, 0, 0]~, 1, 2, [0, -80, -20, 0, 0; 0, -1, -100, -10, -1
20; 1, 0, -1, -20, -100; 0, 2, 0, 0, 0; 1, 1, -1, -10, 0]], 1])], [[[[3], [[
1, 1, 0, 0, 0]~], [2, 0, 1, 0, 0; 0, 2, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 1, 
0; 0, 0, 0, 0, 1], [[[0, 0, -1, 0, -1]~, [1, 0, 1, 0, 0; 0, 1, 0, 0, 0], [2,
 [1, 2, 1, 0, 0]~, 1, 2, [0, -80, -20, 0, 0; 0, -1, -100, -10, -120; 1, 0, -
1, -20, -100; 0, 2, 0, 0, 0; 1, 1, -1, -10, 0]], x^2 + x + 1, [1, 0; 0, 1; 0
, 0; 0, 0; 0, 0]]~, x + 1, [3, Mat([3, 1])]]]], [[2], Vecsmall([1]), Mat(1/2
), 21.9561427071251651311029092693376679934648273587965202418363934409277005
5508085947230952445471265103162532611846023078065155339896128119468225362650
5116814177943190107524899, [2; 0; 0; 0; 0]]], [Mat(-2), Mat(-3)]]]]
[[[[[[1, 0, 0, 0, 0; 0, 1, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 1, 0; 0, 0, 0, 0
, 1], Vecsmall([1])], [2, [2], [[-21, 0, 0, 0, 0]~]], [matrix(0,2), matrix(0
,2)], [[], [[2], Vecsmall([1]), Mat(1), 20.856192227936978063384366773125470
6984093618914860996573856061057595536869576051901938447272212335778651442971
66021560180960373224372600900514567409428535493879667818173119, [1; 0; 0; 0;
 0]]], [Mat(1)]], [Mat([1, 1, 1])]]], [[[[[2, 0, 0, 0, 0; 0, 1, 0, 0, 0; 0, 
0, 1, 0, 0; 0, 0, 0, 1, 0; 0, 0, 0, 0, 1], Vecsmall([1])], [2, [2], [[-21, 0
, 0, 0, 0]~]], [Mat([[2, [0, 0, 1, -1, 0]~, 3, 1, [0, -80, 60, -10, -60; 0, 
0, -100, 0, -20; 0, 0, 0, -10, -100; 0, 2, -2, 0, 2; 1, 0, 0, -10, 0]], 1]),
 matrix(0,2)], [[], [[2], Vecsmall([1]), Mat(1/2), 21.3561922279369780633843
6677312547069840936189148609965738560610575955368695760519019384472722123357
7865144297166021560180960373224372600900514567409428535493879667818173119, [
2; 0; 0; 0; 0]]], [Mat(1)]], [[], Mat([1, 1, 1])]]], [], [[[[[2, 0, 0, 0, 0;
 0, 1, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 2, 0; 0, 0, 0, 0, 1], Vecsmall([1])]
, [4, [2, 2], [[81, 0, 0, -1, 0]~, [-41, 0, 0, 0, 0]~]], [Mat([[2, [0, 0, 1,
 -1, 0]~, 3, 1, [0, -80, 60, -10, -60; 0, 0, -100, 0, -20; 0, 0, 0, -10, -10
0; 0, 2, -2, 0, 2; 1, 0, 0, -10, 0]], 2]), Mat([[2, [0, 0, 1, -1, 0]~, 3, 1,
 [0, -80, 60, -10, -60; 0, 0, -100, 0, -20; 0, 0, 0, -10, -100; 0, 2, -2, 0,
 2; 1, 0, 0, -10, 0]], 2])], [[[[2], [[-1, 0, 0, -1, 0]~], [2, 0, 0, 0, 0; 0
, 1, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 2, 0; 0, 0, 0, 0, 1], [[[1, 0, -1, 0, 
0]~, [1, 0, 0, 0, 0], [2, [0, 0, 1, -1, 0]~, 3, 1, [0, -80, 60, -10, -60; 0,
 0, -100, 0, -20; 0, 0, 0, -10, -100; 0, 2, -2, 0, 2; 1, 0, 0, -10, 0]]]~, 1
, [1, matrix(0,2)]], [1, 1, [[[2], [[1, 0, 0, 1, 0]~], Mat([0, 0, 0, 2, 0]),
 2]]], [[0]~, Mat(1)]]], [[2], Vecsmall([1]), Mat(1/2), 41.36857856470473240
9417461169787335389425015098066066992052113922491767356251847997138699077319
8806459616749645245612672289886701908980504482902220220627229792437881741528
53, [2; 0; 0; 0; 0]]], [[1; 0], [0; 1]]], [Mat([0, 0, 0]), Mat([1, 1, 1])]],
 [[[[2, 0, 1, 0, 0; 0, 2, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 1, 0; 0, 0, 0, 0,
 1], Vecsmall([1])], [6, [6], [[-21, 1, 0, 0, 0]~]], [Mat([[2, [1, 2, 1, 0, 
0]~, 1, 2, [0, -80, -20, 0, 0; 0, -1, -100, -10, -120; 1, 0, -1, -20, -100; 
0, 2, 0, 0, 0; 1, 1, -1, -10, 0]], 1]), Mat([[2, [1, 2, 1, 0, 0]~, 1, 2, [0,
 -80, -20, 0, 0; 0, -1, -100, -10, -120; 1, 0, -1, -20, -100; 0, 2, 0, 0, 0;
 1, 1, -1, -10, 0]], 1])], [[[[3], [[1, 1, 0, 0, 0]~], [2, 0, 1, 0, 0; 0, 2,
 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 1, 0; 0, 0, 0, 0, 1], [[[0, 0, -1, 0, -1]~
, [1, 0, 1, 0, 0; 0, 1, 0, 0, 0], [2, [1, 2, 1, 0, 0]~, 1, 2, [0, -80, -20, 
0, 0; 0, -1, -100, -10, -120; 1, 0, -1, -20, -100; 0, 2, 0, 0, 0; 1, 1, -1, 
-10, 0]], x^2 + x + 1, [1, 0; 0, 1; 0, 0; 0, 0; 0, 0]]~, x + 1, [3, Mat([3, 
1])]]]], [[2], Vecsmall([1]), Mat(1/2), 21.956142707125165131102909269337667
9934648273587965202418363934409277005550808594723095244547126510316253261184
60230780651553398961281194682253626505116814177943190107524899, [2; 0; 0; 0;
 0]]], [Mat(-2), Mat(-3)]], [Mat([0, 1, 0]), Mat([1, 1, 1])]]]]
[[[5, 1, [2, 2; 5, 2; 39821, 1; 161141, 1]]], [[]], [], [[10, 2, [2, 6; 5, 4
; 39821, 2; 161141, 2]], []]]
[[[0, 0, 0]], [[10, 0, [-1, 1; 2, 5; 5, 4; 39821, 2; 161141, 2]]], [], [[], 
[]]]
[[[[Vecsmall([]), Vecsmall([])], 0, 0, 0]], [[[Vecsmall([50]), Vecsmall([1])
], 0, 0, 0]], [], [[[Vecsmall([50]), Vecsmall([2])], 0, 0, 0], [[Vecsmall([5
6]), Vecsmall([1])], 0, 0, 0]]]
2
[6416795761]
[x^7 - x^6 + x^5 - x^4 - x^3 - x^2, x^9 + x^8 + x^7 + x^6 + 2*x^4 + 2*x^3 + 
x^2 + x + 1, x^10 + x^9 - x^8 - x^3 - x^2 - x, x^10 + x^9 + 2*x^7 + x^6 + x^
5 + x^4 + 2*x^2 + x + 1, -x^11 - 2*x^10 - x^8 - 2*x^7 - x^6 - x^5 - 2*x^4 - 
x^3 - 2*x^2 - x - 1, -x^11 - x^10 - 2*x^9 - x^8 - 2*x^7 - x^6 - 2*x^5 - x^4 
- x^2 - 2*x - 1, -x^11 - x^10 - x^9 + x^8 - x^7 + x^6, -x^11 - x^9 - x^6 + x
^4 - x^3 + x, x^11 - x^10 + x^6 - x^5 - x^2 - x, x^11 - x^8 - x^7 + x^5 - x^
4 - x, x^11 + x^10 + 2*x^8 + x^7 + x^4 + x^3 + 2*x^2 + x + 1, x^11 + 2*x^10 
+ x^9 + x^7 + x^5 + x^3 + x^2 + 2*x + 1]
[-x^2, x^2]
[-x^2, x^2]
[-x^2, x^2]
0
[35952239140236636613554193911666/20990466712995598590763903143048989*x^20 +
 219201047314343953199542006623468/20990466712995598590763903143048989*x^19 
- 544094474369607287844071682948984/20990466712995598590763903143048989*x^18
 - 1301738076793130194798253391725406/20990466712995598590763903143048989*x^
17 + 4323784229146831865769550863399188/20990466712995598590763903143048989*
x^16 + 1180785226777964111519743237847228/2099046671299559859076390314304898
9*x^15 - 16009478553791306868545675624906176/2099046671299559859076390314304
8989*x^14 + 11661369832298820433335186698644800/2099046671299559859076390314
3048989*x^13 + 24577904562406269454374516161861844/2099046671299559859076390
3143048989*x^12 - 2841411922644145137800873408789776/12347333360585646229861
11949591117*x^11 + 40513760532585028733891495151094508/209904667129955985907
63903143048989*x^10 + 77137274588135205291798303592401638/209904667129955985
90763903143048989*x^9 - 9612104031689093945033225402487055/12347333360585646
22986111949591117*x^8 + 844775560812208284237807638227260/209904667129955985
90763903143048989*x^7 - 153457335161602039094310022600574514/209904667129955
98590763903143048989*x^6 + 454725983158981264651921915989314030/209904667129
95598590763903143048989*x^5 - 247595736314170743760908290075787460/209904667
12995598590763903143048989*x^4 + 246411488365177430998635983532374564/209904
66712995598590763903143048989*x^3 - 300616800198203967230858561992730353/209
90466712995598590763903143048989*x^2 + 62128367926034523995700779963870389/2
0990466712995598590763903143048989*x + 73920020404088609656492594951950857/2
0990466712995598590763903143048989]
0
[-z^2, z^2]
0
[-1/2*x, 1/2*x]
[-2*x, 2*x]
[-z, z]
x^2 + 1
1
[x^10 + Mod(-5/2*y + 5/2, y^2 - 5)*x^9 + Mod(-5*y + 20, y^2 - 5)*x^8 + Mod(-
20*y + 30, y^2 - 5)*x^7 + Mod(-45/2*y + 145/2, y^2 - 5)*x^6 + Mod(-71/2*y + 
121/2, y^2 - 5)*x^5 + Mod(-20*y + 60, y^2 - 5)*x^4 + Mod(-25*y + 5, y^2 - 5)
*x^3 + 45*x^2 + Mod(-5*y + 15, y^2 - 5)*x + Mod(-2*y + 6, y^2 - 5), x^10 + M
od(5/2*y + 5/2, y^2 - 5)*x^9 + Mod(5*y + 20, y^2 - 5)*x^8 + Mod(20*y + 30, y
^2 - 5)*x^7 + Mod(45/2*y + 145/2, y^2 - 5)*x^6 + Mod(79/2*y + 121/2, y^2 - 5
)*x^5 + Mod(25*y + 85, y^2 - 5)*x^4 + Mod(15*y + 55, y^2 - 5)*x^3 + Mod(10*y
 - 5, y^2 - 5)*x^2 - 10*x + Mod(-2*y + 6, y^2 - 5)]
[x^10 + Mod(-5/2*y + 5/2, y^2 - 5)*x^9 + Mod(-5*y + 20, y^2 - 5)*x^8 + Mod(-
20*y + 30, y^2 - 5)*x^7 + Mod(-45/2*y + 145/2, y^2 - 5)*x^6 + Mod(-71/2*y + 
121/2, y^2 - 5)*x^5 + Mod(-20*y + 60, y^2 - 5)*x^4 + Mod(-25*y + 5, y^2 - 5)
*x^3 + 45*x^2 + Mod(-5*y + 15, y^2 - 5)*x + Mod(-2*y + 6, y^2 - 5), Mod(Mod(
26/2945*y - 653/5890, y^2 - 5)*x^9 + Mod(1633/5890*y - 869/2945, y^2 - 5)*x^
8 + Mod(2951/5890*y - 5939/2945, y^2 - 5)*x^7 + Mod(21757/11780*y - 29451/11
780, y^2 - 5)*x^6 + Mod(18733/11780*y - 69587/11780, y^2 - 5)*x^5 + Mod(1445
/589*y - 9436/2945, y^2 - 5)*x^4 + Mod(7893/11780*y - 34679/11780, y^2 - 5)*
x^3 + Mod(9461/5890*y + 3919/2945, y^2 - 5)*x^2 + Mod(-8383/11780*y - 54699/
11780, y^2 - 5)*x + Mod(261/589*y - 2467/2945, y^2 - 5), x^10 + Mod(-5/2*y +
 5/2, y^2 - 5)*x^9 + Mod(-5*y + 20, y^2 - 5)*x^8 + Mod(-20*y + 30, y^2 - 5)*
x^7 + Mod(-45/2*y + 145/2, y^2 - 5)*x^6 + Mod(-71/2*y + 121/2, y^2 - 5)*x^5 
+ Mod(-20*y + 60, y^2 - 5)*x^4 + Mod(-25*y + 5, y^2 - 5)*x^3 + 45*x^2 + Mod(
-5*y + 15, y^2 - 5)*x + Mod(-2*y + 6, y^2 - 5)), Mod(Mod(26/2945*y - 653/589
0, y^2 - 5)*x^9 + Mod(1633/5890*y - 869/2945, y^2 - 5)*x^8 + Mod(2951/5890*y
 - 5939/2945, y^2 - 5)*x^7 + Mod(21757/11780*y - 29451/11780, y^2 - 5)*x^6 +
 Mod(18733/11780*y - 69587/11780, y^2 - 5)*x^5 + Mod(1445/589*y - 9436/2945,
 y^2 - 5)*x^4 + Mod(7893/11780*y - 34679/11780, y^2 - 5)*x^3 + Mod(9461/5890
*y + 3919/2945, y^2 - 5)*x^2 + Mod(-8383/11780*y - 42919/11780, y^2 - 5)*x +
 Mod(261/589*y - 2467/2945, y^2 - 5), x^10 + Mod(-5/2*y + 5/2, y^2 - 5)*x^9 
+ Mod(-5*y + 20, y^2 - 5)*x^8 + Mod(-20*y + 30, y^2 - 5)*x^7 + Mod(-45/2*y +
 145/2, y^2 - 5)*x^6 + Mod(-71/2*y + 121/2, y^2 - 5)*x^5 + Mod(-20*y + 60, y
^2 - 5)*x^4 + Mod(-25*y + 5, y^2 - 5)*x^3 + 45*x^2 + Mod(-5*y + 15, y^2 - 5)
*x + Mod(-2*y + 6, y^2 - 5)), -1]
Mod(0, x^10 + Mod(-5/2*y + 5/2, y^2 - 5)*x^9 + Mod(-5*y + 20, y^2 - 5)*x^8 +
 Mod(-20*y + 30, y^2 - 5)*x^7 + Mod(-45/2*y + 145/2, y^2 - 5)*x^6 + Mod(-71/
2*y + 121/2, y^2 - 5)*x^5 + Mod(-20*y + 60, y^2 - 5)*x^4 + Mod(-25*y + 5, y^
2 - 5)*x^3 + 45*x^2 + Mod(-5*y + 15, y^2 - 5)*x + Mod(-2*y + 6, y^2 - 5))
1
[Mod(1, y^2 - 5)*x^5 + Mod(y, y^2 - 5), x^10 + Mod(77*y - 275, y^2 - 5)*x^5 
+ Mod(-41525*y + 96630, y^2 - 5), x^10 + Mod(77*y + 275, y^2 - 5)*x^5 + Mod(
41525*y + 96630, y^2 - 5)]
x^10 + 5*x^9 + 15*x^8 + 30*x^7 + 45*x^6 + Mod(2*y + 51, y^2 - 5)*x^5 + Mod(5
*y + 45, y^2 - 5)*x^4 + Mod(-10*y + 30, y^2 - 5)*x^3 + Mod(-20*y + 15, y^2 -
 5)*x^2 + Mod(-5*y + 5, y^2 - 5)*x + Mod(y + 6, y^2 - 5)
[x^10 + 5*x^9 + 15*x^8 + 30*x^7 + 45*x^6 + Mod(2*y + 51, y^2 - 5)*x^5 + Mod(
5*y + 45, y^2 - 5)*x^4 + Mod(-10*y + 30, y^2 - 5)*x^3 + Mod(-20*y + 15, y^2 
- 5)*x^2 + Mod(-5*y + 5, y^2 - 5)*x + Mod(y + 6, y^2 - 5), Mod(-32280/622201
*x^9 + Mod(22275/622201*y - 145260/622201, y^2 - 5)*x^8 + Mod(89100/622201*y
 - 397350/622201, y^2 - 5)*x^7 + Mod(244100/622201*y - 22995/20071, y^2 - 5)
*x^6 + Mod(420450/622201*y - 918351/622201, y^2 - 5)*x^5 + Mod(510720/622201
*y - 852705/622201, y^2 - 5)*x^4 + Mod(424640/622201*y - 238275/622201, y^2 
- 5)*x^3 + Mod(871950/622201*y + 235710/622201, y^2 - 5)*x^2 + Mod(714855/62
2201*y - 1610346/622201, y^2 - 5)*x + Mod(-62626/622201*y - 860751/622201, y
^2 - 5), x^10 + 5*x^9 + 15*x^8 + 30*x^7 + 45*x^6 + Mod(2*y + 51, y^2 - 5)*x^
5 + Mod(5*y + 45, y^2 - 5)*x^4 + Mod(-10*y + 30, y^2 - 5)*x^3 + Mod(-20*y + 
15, y^2 - 5)*x^2 + Mod(-5*y + 5, y^2 - 5)*x + Mod(y + 6, y^2 - 5)), Mod(-322
80/622201*x^9 + Mod(22275/622201*y - 145260/622201, y^2 - 5)*x^8 + Mod(89100
/622201*y - 397350/622201, y^2 - 5)*x^7 + Mod(244100/622201*y - 22995/20071,
 y^2 - 5)*x^6 + Mod(420450/622201*y - 918351/622201, y^2 - 5)*x^5 + Mod(5107
20/622201*y - 852705/622201, y^2 - 5)*x^4 + Mod(424640/622201*y - 238275/622
201, y^2 - 5)*x^3 + Mod(871950/622201*y + 235710/622201, y^2 - 5)*x^2 + Mod(
714855/622201*y - 988145/622201, y^2 - 5)*x + Mod(-62626/622201*y - 860751/6
22201, y^2 - 5), x^10 + 5*x^9 + 15*x^8 + 30*x^7 + 45*x^6 + Mod(2*y + 51, y^2
 - 5)*x^5 + Mod(5*y + 45, y^2 - 5)*x^4 + Mod(-10*y + 30, y^2 - 5)*x^3 + Mod(
-20*y + 15, y^2 - 5)*x^2 + Mod(-5*y + 5, y^2 - 5)*x + Mod(y + 6, y^2 - 5)), 
-1]
[x^2 + x + 1, Mod(0, x^2 + x + 1), Mod(x, x^2 + x + 1), -1]
[25339, [10960, 0, 0, -3420]~]
[x^3 - 3*x^2 + 3*x + 1, x^6 + 3*x^5 + 6*x^4 + 11*x^3 + 12*x^2 - 3*x + 1]
[x^3 - 3*x^2 + 3*x + 1, x^6 + 3*x^5 + 6*x^4 + 11*x^3 + 12*x^2 - 3*x + 1]
[[4]~, [33/343, 2/2401]~]
Mod(1/2*x - 1/2, x^2 + 23)
[1, 2]~
[1, 1/2*x - 1/2]
Mod(0, x)
Mod(-6/5, x)
  ***   at top-level: nfinit([y^3+2,[1,x]])
  ***                 ^---------------------
  *** nfinit: incorrect type in nfbasic_init (t_VEC).
  ***   at top-level: nfinit([y^3+2,[1,x,x^2]])
  ***                 ^-------------------------
  *** nfinit: incorrect type in nfbasic_init (t_VEC).
  ***   at top-level: nfinit([y^3+2,[1,y^5,y]])
  ***                 ^-------------------------
  *** nfinit: incorrect type in nfbasic_init (t_VEC).
  ***   at top-level: nfdisc([y^2+2,matid(3)])
  ***                 ^------------------------
  *** nfdisc: incorrect type in nfmaxord (t_MAT).
  ***   at top-level: nfdisc([2*y^2+1,matid(3)])
  ***                 ^--------------------------
  *** nfdisc: incorrect type in nfbasis [factorization expected] (t_MAT).
  ***   at top-level: nfdisc([y^2+2,""])
  ***                 ^------------------
  *** nfdisc: incorrect type in nfmaxord (t_STR).
  ***   at top-level: nfnewprec(x)
  ***                 ^------------
  *** nfnewprec: incorrect type in nfnewprec (t_POL).
  ***   at top-level: nfnewprec(quadgen(5))
  ***                 ^---------------------
  *** nfnewprec: incorrect type in nfnewprec (t_QUAD).
  ***   at top-level: nfnewprec(vector(5))
  ***                 ^--------------------
  *** nfnewprec: incorrect type in nfnewprec (t_VEC).
  ***   at top-level: nfnewprec(vector(6))
  ***                 ^--------------------
  *** nfnewprec: incorrect type in nfnewprec (t_VEC).
  ***   at top-level: nfnewprec(vector(8))
  ***                 ^--------------------
  *** nfnewprec: incorrect type in nfnewprec (t_VEC).
  ***   at top-level: nfnewprec(vector(9))
  ***                 ^--------------------
  *** nfnewprec: incorrect type in nfnewprec (t_VEC).
  ***   at top-level: nfnewprec(vector(16))
  ***                 ^---------------------
  *** nfnewprec: incorrect type in nfnewprec (t_VEC).
  ***   at top-level: nfcompositum(nfinit(x-1),x^3-2,x^3-1)
  ***                 ^-------------------------------------
  *** nfcompositum: incorrect priority in polcompositum: variable x >= x
  ***   at top-level: nfcompositum(nfinit(x^2+1),x^3-2,x^3-1)
  ***                 ^---------------------------------------
  *** nfcompositum: incorrect priority in polcompositum: variable x >= x
  ***   at top-level: nfcompositum(nfinit(x-1),y^3-2,y^3-1)
  ***                 ^-------------------------------------
  *** nfcompositum: incorrect priority in polcompositum: variable x >= y
  ***   at top-level: nfcompositum(bnfinit(x),x^3-2,x^3-1)
  ***                 ^------------------------------------
  *** nfcompositum: incorrect priority in polcompositum: variable x >= x
  ***   at top-level: nfisincl(y^2+1,z^4+z^2+1)
  ***                 ^-------------------------
  *** nfisincl: not an irreducible polynomial in nfisincl: z^4 + z^2 + 1.
  ***   at top-level: nfisisom(x,x^0)
  ***                 ^---------------
  *** nfisisom: not an irreducible polynomial in nfisincl: 1.
  ***   at top-level: idealhnf(nf,3,('a^2+1)*Mod(1,3))
  ***                 ^--------------------------------
  *** idealhnf: incorrect type in nf_to_scalar_or_basis (t_INTMOD).
  ***   at top-level: nfalgtobasis(nf,['a,'a]~)
  ***                 ^-------------------------
  *** nfalgtobasis: incorrect type in nfalgtobasis (t_COL).
Total time spent: 13920