Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

563640 views
1
2
3 The Ring Table
3
4
5
3.1 An Example for a Ring Table - Singular
6
7
todo: introductory text, mention: transposed matrices, the macros, refer to
8
the philosophy
9
10
3.1-1 BasisOfRowModule
11
12
BasisOfRowModule( M )  function
13
14
This is the entry of the homalg table, which calls the corresponding macro
15
BasisOfRowModule (3.1-2) inside the computer algebra system.
16
17
 Code 
18
BasisOfRowModule :=
19
 function( M )
20
 local N;
21
 
22
 N := HomalgVoidMatrix(
23
 "unknown_number_of_rows",
24
 NrColumns( M ),
25
 HomalgRing( M )
26
 );
27
 
28
 homalgSendBlocking( 
29
 [ "matrix ", N, " = BasisOfRowModule(", M, ")" ],
30
 "need_command",
31
 HOMALG_IO.Pictograms.BasisOfModule
32
 );
33
 
34
 return N;
35
 
36
 end,
37

38
39
3.1-2 BasisOfRowModule
40
41
BasisOfRowModule( M )  function
42
43
 Code 
44
 BasisOfRowModule := "\n\
45
proc BasisOfRowModule (matrix M)\n\
46
{\n\
47
 return(std(M));\n\
48
}\n\n",
49

50
51
3.1-3 BasisOfColumnModule
52
53
BasisOfColumnModule( M )  function
54
55
This is the entry of the homalg table, which calls the corresponding macro
56
BasisOfColumnModule (3.1-4) inside the computer algebra system.
57
58
 Code 
59
BasisOfColumnModule :=
60
 function( M )
61
 local N;
62
 
63
 N := HomalgVoidMatrix(
64
 NrRows( M ),
65
 "unknown_number_of_columns",
66
 HomalgRing( M )
67
 );
68
 
69
 homalgSendBlocking(
70
 [ "matrix ", N, " = BasisOfColumnModule(", M, ")" ],
71
 "need_command",
72
 HOMALG_IO.Pictograms.BasisOfModule
73
 );
74
 
75
 return N;
76
 
77
 end,
78

79
80
3.1-4 BasisOfColumnModule
81
82
BasisOfColumnModule( M )  function
83
84
 Code 
85
 BasisOfColumnModule := "\n\
86
proc BasisOfColumnModule (matrix M)\n\
87
{\n\
88
 return(Involution(BasisOfRowModule(Involution(M))));\n\
89
}\n\n",
90

91
92
3.1-5 DecideZeroRows
93
94
DecideZeroRows( A, B )  function
95
96
This is the entry of the homalg table, which calls the corresponding macro
97
DecideZeroRows (3.1-6) inside the computer algebra system.
98
99
 Code 
100
DecideZeroRows :=
101
 function( A, B )
102
 local N;
103
 
104
 N := HomalgVoidMatrix(
105
 NrRows( A ),
106
 NrColumns( A ),
107
 HomalgRing( A )
108
 );
109
 
110
 homalgSendBlocking( 
111
 [ "matrix ", N, " = DecideZeroRows(", A, B, ")" ],
112
 "need_command",
113
 HOMALG_IO.Pictograms.DecideZero
114
 );
115
 
116
 return N;
117
 
118
 end,
119

120
121
3.1-6 DecideZeroRows
122
123
DecideZeroRows( A, B )  function
124
125
 Code 
126
 DecideZeroRows := "\n\
127
proc DecideZeroRows (matrix A, module B)\n\
128
{\n\
129
 attrib(B,\"isSB\",1);\n\
130
 return(reduce(A,B));\n\
131
}\n\n",
132

133
134
3.1-7 DecideZeroColumns
135
136
DecideZeroColumns( A, B )  function
137
138
This is the entry of the homalg table, which calls the corresponding macro
139
DecideZeroColumns (3.1-8) inside the computer algebra system.
140
141
 Code 
142
DecideZeroColumns :=
143
 function( A, B )
144
 local N;
145
 
146
 N := HomalgVoidMatrix(
147
 NrRows( A ),
148
 NrColumns( A ),
149
 HomalgRing( A )
150
 );
151
 
152
 homalgSendBlocking(
153
 [ "matrix ", N, " = DecideZeroColumns(", A, B, ")" ],
154
 "need_command",
155
 HOMALG_IO.Pictograms.DecideZero
156
 );
157
 
158
 return N;
159
 
160
 end,
161

162
163
3.1-8 DecideZeroColumns
164
165
DecideZeroColumns( A, B )  function
166
167
 Code 
168
 DecideZeroColumns := "\n\
169
proc DecideZeroColumns (matrix A, matrix B)\n\
170
{\n\
171
 return(Involution(DecideZeroRows(Involution(A),Involution(B))));\n\
172
}\n\n",
173

174
175
3.1-9 SyzygiesGeneratorsOfRows
176
177
SyzygiesGeneratorsOfRows( M )  function
178
179
This is the entry of the homalg table, which calls the corresponding macro
180
SyzygiesGeneratorsOfRows (3.1-10) inside the computer algebra system.
181
182
 Code 
183
SyzygiesGeneratorsOfRows :=
184
 function( M )
185
 local N;
186
 
187
 N := HomalgVoidMatrix(
188
 "unknown_number_of_rows",
189
 NrRows( M ),
190
 HomalgRing( M )
191
 );
192
 
193
 homalgSendBlocking(
194
 [ "matrix ", N, " = SyzygiesGeneratorsOfRows(", M, ")" ],
195
 "need_command",
196
 HOMALG_IO.Pictograms.SyzygiesGenerators
197
 );
198
 
199
 return N;
200
 
201
 end,
202

203
204
3.1-10 SyzygiesGeneratorsOfRows
205
206
SyzygiesGeneratorsOfRows( M )  function
207
208
 Code 
209
 SyzygiesGeneratorsOfRows := "\n\
210
proc SyzygiesGeneratorsOfRows (matrix M)\n\
211
{\n\
212
 return(SyzForHomalg(M));\n\
213
}\n\n",
214

215
216
3.1-11 SyzygiesGeneratorsOfColumns
217
218
SyzygiesGeneratorsOfColumns( M )  function
219
220
This is the entry of the homalg table, which calls the corresponding macro
221
SyzygiesGeneratorsOfColumns (3.1-12) inside the computer algebra system.
222
223
 Code 
224
SyzygiesGeneratorsOfColumns :=
225
 function( M )
226
 local N;
227
 
228
 N := HomalgVoidMatrix(
229
 NrColumns( M ),
230
 "unknown_number_of_columns",
231
 HomalgRing( M )
232
 );
233
 
234
 homalgSendBlocking(
235
 [ "matrix ", N, " = SyzygiesGeneratorsOfColumns(", M, ")" ],
236
 "need_command",
237
 HOMALG_IO.Pictograms.SyzygiesGenerators
238
 );
239
 
240
 return N;
241
 
242
 end,
243

244
245
3.1-12 SyzygiesGeneratorsOfColumns
246
247
SyzygiesGeneratorsOfColumns( M )  function
248
249
 Code 
250
 SyzygiesGeneratorsOfColumns := "\n\
251
proc SyzygiesGeneratorsOfColumns (matrix M)\n\
252
{\n\
253
 return(Involution(SyzForHomalg(Involution(M))));\n\
254
}\n\n",
255

256
257
3.1-13 BasisOfRowsCoeff
258
259
BasisOfRowsCoeff( M, T )  function
260
261
This is the entry of the homalg table, which calls the corresponding macro
262
BasisOfRowsCoeff (3.1-14) inside the computer algebra system.
263
264
 Code 
265
BasisOfRowsCoeff :=
266
 function( M, T )
267
 local v, N;
268
 
269
 v := homalgStream( HomalgRing( M ) )!.variable_name;
270
 
271
 N := HomalgVoidMatrix(
272
 "unknown_number_of_rows",
273
 NrColumns( M ),
274
 HomalgRing( M )
275
 );
276
 
277
 homalgSendBlocking(
278
 [
279
 "list ", v, "l=BasisOfRowsCoeff(", M, "); ",
280
 "matrix ", N, " = ", v, "l[1]; ",
281
 "matrix ", T, " = ", v, "l[2]"
282
 ],
283
 "need_command",
284
 HOMALG_IO.Pictograms.BasisCoeff
285
 );
286
 
287
 return N;
288
 
289
 end,
290

291
292
3.1-14 BasisOfRowsCoeff
293
294
BasisOfRowsCoeff( M, T )  function
295
296
 Code 
297
 BasisOfRowsCoeff := "\n\
298
proc BasisOfRowsCoeff (matrix M)\n\
299
{\n\
300
 matrix B = BasisOfRowModule(M);\n\
301
 matrix T = lift(M,B);\n\
302
 list l = B,T;\n\
303
 return(l)\n\
304
}\n\n",
305

306
307
3.1-15 BasisOfColumnsCoeff
308
309
BasisOfColumnsCoeff( M, T )  function
310
311
This is the entry of the homalg table, which calls the corresponding macro
312
BasisOfColumnsCoeff (3.1-16) inside the computer algebra system.
313
314
 Code 
315
BasisOfColumnsCoeff :=
316
 function( M, T )
317
 local v, N;
318
 
319
 v := homalgStream( HomalgRing( M ) )!.variable_name;
320
 
321
 N := HomalgVoidMatrix(
322
 NrRows( M ),
323
 "unknown_number_of_columns",
324
 HomalgRing( M )
325
 );
326
 
327
 homalgSendBlocking( 
328
 [
329
 "list ", v, "l=BasisOfColumnsCoeff(", M, "); ",
330
 "matrix ", N, " = ", v, "l[1]; ",
331
 "matrix ", T, " = ", v, "l[2]"
332
 ],
333
 "need_command",
334
 HOMALG_IO.Pictograms.BasisCoeff
335
 );
336
 
337
 return N;
338
 
339
 end,
340

341
342
3.1-16 BasisOfColumnsCoeff
343
344
BasisOfColumnsCoeff( M, T )  function
345
346
 Code 
347
 BasisOfColumnsCoeff := "\n\
348
proc BasisOfColumnsCoeff (matrix M)\n\
349
{\n\
350
 list l = BasisOfRowsCoeff(Involution(M));\n\
351
 matrix B = l[1];\n\
352
 matrix T = l[2];\n\
353
 l = Involution(B),Involution(T);\n\
354
 return(l);\n\
355
}\n\n",
356

357
358
3.1-17 DecideZeroRowsEffectively
359
360
DecideZeroRowsEffectively( A, B, T )  function
361
362
This is the entry of the homalg table, which calls the corresponding macro
363
DecideZeroRowsEffectively (3.1-18) inside the computer algebra system.
364
365
 Code 
366
DecideZeroRowsEffectively :=
367
 function( A, B, T )
368
 local v, N;
369
 
370
 v := homalgStream( HomalgRing( A ) )!.variable_name;
371
 
372
 N := HomalgVoidMatrix(
373
 NrRows( A ),
374
 NrColumns( A ),
375
 HomalgRing( A )
376
 );
377
 
378
 homalgSendBlocking(
379
 [
380
 "list ", v, "l=DecideZeroRowsEffectively(", A, B, "); ",
381
 "matrix ", N, " = ", v, "l[1]; ",
382
 "matrix ", T, " = ", v, "l[2]"
383
 ],
384
 "need_command",
385
 HOMALG_IO.Pictograms.DecideZeroEffectively
386
 );
387
 
388
 return N;
389
 
390
 end,
391

392
393
3.1-18 DecideZeroRowsEffectively
394
395
DecideZeroRowsEffectively( A, B, T )  function
396
397
 Code 
398
 DecideZeroRowsEffectively := "\n\
399
proc DecideZeroRowsEffectively (matrix A, module B)\n\
400
{\n\
401
 attrib(B,\"isSB\",1);\n\
402
 matrix M = reduce(A,B);\n\
403
 matrix T = lift(B,M-A);\n\
404
 list l = M,T;\n\
405
 return(l);\n\
406
}\n\n",
407

408
409
3.1-19 DecideZeroColumnsEffectively
410
411
DecideZeroColumnsEffectively( A, B, T )  function
412
413
This is the entry of the homalg table, which calls the corresponding macro
414
DecideZeroColumnsEffectively (3.1-20) inside the computer algebra system.
415
416
 Code 
417
DecideZeroColumnsEffectively :=
418
 function( A, B, T )
419
 local v, N;
420
 
421
 v := homalgStream( HomalgRing( A ) )!.variable_name;
422
 
423
 N := HomalgVoidMatrix(
424
 NrRows( A ),
425
 NrColumns( A ),
426
 HomalgRing( A )
427
 );
428
 
429
 homalgSendBlocking(
430
 [
431
 "list ", v, "l=DecideZeroColumnsEffectively(", A, B, "); ",
432
 "matrix ", N, " = ", v, "l[1]; ",
433
 "matrix ", T, " = ", v, "l[2]"
434
 ],
435
 "need_command",
436
 HOMALG_IO.Pictograms.DecideZeroEffectively
437
 );
438
 
439
 return N;
440
 
441
 end,
442

443
444
3.1-20 DecideZeroColumnsEffectively
445
446
DecideZeroColumnsEffectively( A, B, T )  function
447
448
 Code 
449
 DecideZeroColumnsEffectively := "\n\
450
proc DecideZeroColumnsEffectively (matrix A, matrix B)\n\
451
{\n\
452
 list l = DecideZeroRowsEffectively(Involution(A),Involution(B));\n\
453
 matrix B = l[1];\n\
454
 matrix T = l[2];\n\
455
 l = Involution(B),Involution(T);\n\
456
 return(l);\n\
457
}\n\n",
458

459
460
3.1-21 RelativeSyzygiesGeneratorsOfRows
461
462
RelativeSyzygiesGeneratorsOfRows( M, M2 )  function
463
464
This is the entry of the homalg table, which calls the corresponding macro
465
RelativeSyzygiesGeneratorsOfRows (3.1-22) inside the computer algebra
466
system.
467
468
 Code 
469
RelativeSyzygiesGeneratorsOfRows :=
470
 function( M, M2 )
471
 local N;
472
 
473
 N := HomalgVoidMatrix(
474
 "unknown_number_of_rows",
475
 NrRows( M ),
476
 HomalgRing( M )
477
 );
478
 
479
 homalgSendBlocking(
480
 [ "matrix ", N, " = RelativeSyzygiesGeneratorsOfRows(", M, M2, ")" ],
481
 "need_command",
482
 HOMALG_IO.Pictograms.SyzygiesGenerators
483
 );
484
 
485
 return N;
486
 
487
 end,
488

489
490
3.1-22 RelativeSyzygiesGeneratorsOfRows
491
492
RelativeSyzygiesGeneratorsOfRows( M, M2 )  function
493
494
 Code 
495
 RelativeSyzygiesGeneratorsOfRows := "\n\
496
proc RelativeSyzygiesGeneratorsOfRows (matrix M1, matrix M2)\n\
497
{\n\
498
 return(BasisOfRowModule(modulo(M1, M2)));\n\
499
}\n\n",
500

501
502
3.1-23 RelativeSyzygiesGeneratorsOfColumns
503
504
RelativeSyzygiesGeneratorsOfColumns( M, M2 )  function
505
506
This is the entry of the homalg table, which calls the corresponding macro
507
RelativeSyzygiesGeneratorsOfColumns (3.1-24) inside the computer algebra
508
system.
509
510
 Code 
511
RelativeSyzygiesGeneratorsOfColumns :=
512
 function( M, M2 )
513
 local N;
514
 
515
 N := HomalgVoidMatrix(
516
 NrColumns( M ),
517
 "unknown_number_of_columns",
518
 HomalgRing( M )
519
 );
520
 
521
 homalgSendBlocking(
522
 [ "matrix ", N, " = RelativeSyzygiesGeneratorsOfColumns(", M, M2, ")" ],
523
 "need_command",
524
 HOMALG_IO.Pictograms.SyzygiesGenerators
525
 );
526
 
527
 return N;
528
 
529
 end,
530

531
532
3.1-24 RelativeSyzygiesGeneratorsOfColumns
533
534
RelativeSyzygiesGeneratorsOfColumns( M, M2 )  function
535
536
 Code 
537
 RelativeSyzygiesGeneratorsOfColumns := "\n\
538
proc RelativeSyzygiesGeneratorsOfColumns (matrix M1, matrix M2)\n\
539
{\n\
540
 return(Involution(RelativeSyzygiesGeneratorsOfRows(Involution(M1),Involution(M2))));\n\
541
}\n\n",
542

543
544
3.1-25 ReducedSyzygiesGeneratorsOfRows
545
546
ReducedSyzygiesGeneratorsOfRows( M )  function
547
548
This is the entry of the homalg table, which calls the corresponding macro
549
ReducedSyzygiesGeneratorsOfRows (3.1-26) inside the computer algebra system.
550
551
 Code 
552
ReducedSyzygiesGeneratorsOfRows :=
553
 function( M )
554
 local N;
555
 
556
 N := HomalgVoidMatrix(
557
 "unknown_number_of_rows",
558
 NrRows( M ),
559
 HomalgRing( M )
560
 );
561
 
562
 homalgSendBlocking(
563
 [ "matrix ", N, " = ReducedSyzygiesGeneratorsOfRows(", M, ")" ],
564
 "need_command",
565
 HOMALG_IO.Pictograms.SyzygiesGenerators
566
 );
567
 
568
 return N;
569
 
570
 end,
571

572
573
3.1-26 ReducedSyzygiesGeneratorsOfRows
574
575
ReducedSyzygiesGeneratorsOfRows( M )  function
576
577
 Code 
578
 ReducedSyzForHomalg := "\n\
579
proc ReducedSyzForHomalg (matrix M)\n\
580
{\n\
581
 return(matrix(nres(M,2)[2]));\n\
582
}\n\n",
583
 ReducedSyzygiesGeneratorsOfRows := "\n\
584
proc ReducedSyzygiesGeneratorsOfRows (matrix M)\n\
585
{\n\
586
 return(ReducedSyzForHomalg(M));\n\
587
}\n\n",
588

589
590
3.1-27 ReducedSyzygiesGeneratorsOfColumns
591
592
ReducedSyzygiesGeneratorsOfColumns( M )  function
593
594
This is the entry of the homalg table, which calls the corresponding macro
595
ReducedSyzygiesGeneratorsOfColumns (3.1-28) inside the computer algebra
596
system.
597
598
 Code 
599
ReducedSyzygiesGeneratorsOfColumns :=
600
 function( M )
601
 local N;
602
 
603
 N := HomalgVoidMatrix(
604
 NrColumns( M ),
605
 "unknown_number_of_columns",
606
 HomalgRing( M )
607
 );
608
 
609
 homalgSendBlocking(
610
 [ "matrix ", N, " = ReducedSyzygiesGeneratorsOfColumns(", M, ")" ],
611
 "need_command",
612
 HOMALG_IO.Pictograms.SyzygiesGenerators
613
 );
614
 
615
 return N;
616
 
617
 end,
618

619
620
3.1-28 ReducedSyzygiesGeneratorsOfColumns
621
622
ReducedSyzygiesGeneratorsOfColumns( M )  function
623
624
 Code 
625
 ReducedSyzygiesGeneratorsOfColumns := "\n\
626
proc ReducedSyzygiesGeneratorsOfColumns (matrix M)\n\
627
{\n\
628
 return(Involution(ReducedSyzForHomalg(Involution(M))));\n\
629
}\n\n",
630

631
632
633