source: git/Tst/Buch/Example_7_8_4.tst @ 1ebec3

spielwiese
Last change on this file since 1ebec3 was 891438c, checked in by Gerhard Pfister <pfister@…>, 23 years ago
*GP: initial release git-svn-id: file:///usr/local/Singular/svn/trunk@5579 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 774 bytes
Line 
1LIB "tst.lib";
2tst_init();
3
4LIB"algebra.lib";
5proc isCohenMacaulay(ideal I)
6{
7   def A    = basering;
8   list L   = noetherNormal(I);
9   map phi  = A,L[1];
10   I        = phi(I);
11   int s    = nvars(basering)-size(L[2]);
12   execute("ring B=("+charstr(A)+"),x(1..s),ds;");
13   ideal m  = maxideal(1);
14   map psi  = A,m;
15   ideal J  = std(psi(I));
16   ideal K  = kbase(J);
17   setring A;
18   execute("ring C=("+charstr(A)+"),("+varstr(A)+"),(dp(s),ds);");
19   ideal I  = imap(A,I);
20   qring D  = std(I);
21   ideal K  = fetch(B,K);
22   module N = std(syz(K));
23   intvec v = leadexp(N[size(N)]);
24   int i=1;
25   while((i<s)&&(v[i]==0)){i++;}
26   if(!v[i]){return(0);}
27   return(1);
28}
29
30ring r=0,(x,y,z),ds;
31ideal I=xz,yz;
32isCohenMacaulay(I);
33
34I=x2-y3;
35isCohenMacaulay(I);
36
37tst_status(1);$
Note: See TracBrowser for help on using the repository browser.