source: git/Tst/Plural/doc-division2.tst @ 1ebec3

spielwiese
Last change on this file since 1ebec3 was 9a446f3, checked in by Hans Schönemann <hannes@…>, 14 years ago
more plural tests git-svn-id: file:///usr/local/Singular/svn/trunk@12659 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.0 KB
Line 
1LIB "tst.lib";
2tst_init();
3LIB "dmod.lib";
4ring r = 0,(x,y),dp;
5poly f = x^3+xy;
6def S = Sannfs(f); setring S; // compute the annihilator of f^s
7LD; // is not a Groebner basis yet!
8poly f = imap(r,f);
9poly P = f*Dx-s*diff(f,x);
10ideal I = LD, f; // consider a bigger ideal
11module A = LD*gen(1), I*gen(2); module B = slimgb(A);
12vector V = [P,(s+1)^2]; NF(V,B); //0
13list LV = division(V,A);
14vector W = [1,s^2]; NF(W,B); //!=0
15list LW = division(W,A);
16matrix M = matrix(W); matrix N = matrix(A);
17matrix T = matrix(LW[1]); matrix R = matrix(LW[2]); matrix U  = matrix(LW[3]);
18// test:
19transpose(U)*transpose(M) - transpose(T)*transpose(N) - transpose(R); // must be 0
20vector W2 = [s^2,s^2]; NF(W2,B); //!=0
21// matrix to matrix
22matrix M2[2][2] = 1,s^2,s^2,1;
23list LW2 = division(M2,A);
24kill M,N;
25matrix M = matrix(M2); matrix N = matrix(A);
26kill T,R,U;
27matrix T = matrix(LW2[1]); matrix R = matrix(LW2[2]); matrix U  = matrix(LW2[3]);
28transpose(U)*transpose(M) - transpose(T)*transpose(N) - transpose(R); // must be 0
29tst_status(1);$
Note: See TracBrowser for help on using the repository browser.