source: git/Tst/Manual/Right_Groebner_bases_and_syzygies.tst @ 0d6b7fc

spielwiese Release-4-3-2p2
Last change on this file since 0d6b7fc was 894057, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
ADD: Tests from online manual (res+stat on mamawutz): short ones Tst/Manual/s.lst
  • Property mode set to 100644
File size: 1.5 KB
Line 
1LIB "tst.lib"; tst_init();
2// ----- setting up the algebra:
3LIB "ncalg.lib";
4def A = makeUsl2();
5setring A; A;
6// ----- equivalently, you may use
7// ring AA = 0,(e,f,h),dp;
8// matrix D[3][3];
9// D[1,2]=-h; D[1,3]=2*e; D[2,3]=-2*f;
10// def A=nc_algebra(1,D); setring A;
11option(redSB);
12option(redTail);
13matrix T;
14// --- define a generating set
15ideal   I = e2,f;
16ideal  LI = std(I); // the left Groebner basis of I
17LI;             // we see that I was not a Groebner basis
18module LS = syz(I); // the left syzygy module of I
19print(LS);
20 // check: LS is a left syzygy, if T=0:
21T  = transpose(LS)*transpose(I);
22print(T);
23// --- let us define the opposite algebra of A
24def Aop = opposite(A);
25setring Aop; Aop;         // see how Aop looks like
26// --- we "oppose" (transfer) objects from A to Aop
27ideal   Iop = oppose(A,I);
28ideal  RIop = std(Iop);  // the left Groebner basis of Iop in Aop
29module RSop = syz(Iop);  // the left syzygy module of Iop in Aop
30module LSop = oppose(A,LS);
31module RLS  = syz(transpose(LSop));
32// RLS is the left syzygy of transposed LSop in Aop
33// --- let us return to A and transfer (i.e. oppose)
34// all the computed objects back
35setring A;
36ideal  RI = oppose(Aop,RIop); // the right Groebner basis of I
37RI;              // it differs from the left Groebner basis LI
38module RS = oppose(Aop,RSop); // the right syzygy module of I
39print(RS);
40 // check: RS is a right syzygy, if T=0:
41T = matrix(I)*RS;
42T;
43module RLS;
44RLS = transpose(oppose(Aop,RLS));
45// RLS is the right syzygy of a left syzygy of I
46// it is I itself ?
47print(RLS);
48tst_status(1);$
Note: See TracBrowser for help on using the repository browser.