spielwiese
Last change
on this file since 891438c 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:
696 bytes
|
Line | |
---|
1 | LIB "tst.lib"; |
---|
2 | tst_init(); |
---|
3 | |
---|
4 | proc projdim(module M) |
---|
5 | { |
---|
6 | list l=mres(M,0); |
---|
7 | int i; |
---|
8 | while(i<size(l)) |
---|
9 | { |
---|
10 | i++; |
---|
11 | if(size(l[i])==0){return(i-1);} |
---|
12 | } |
---|
13 | } |
---|
14 | |
---|
15 | proc isCohenMacaulay1(ideal I) |
---|
16 | { |
---|
17 | int de=nvars(basering)-projdim(I*freemodule(1)); |
---|
18 | int di=dim(std(I)); |
---|
19 | return(de==di); |
---|
20 | } |
---|
21 | ring R=0,(x,y,z),ds; |
---|
22 | ideal I=xz,yz; |
---|
23 | isCohenMacaulay1(I); |
---|
24 | |
---|
25 | |
---|
26 | I=x2-y3; |
---|
27 | isCohenMacaulay1(I); |
---|
28 | |
---|
29 | I=xz,yz,xy; |
---|
30 | isCohenMacaulay1(I); |
---|
31 | kill R; |
---|
32 | |
---|
33 | proc CohenMacaulayTest1(module M, int d) |
---|
34 | { |
---|
35 | return((d-projdim(M))==dim(std(Ann(M)))); |
---|
36 | } |
---|
37 | |
---|
38 | LIB"primdec.lib"; |
---|
39 | ring R=0,(x,y,z),ds; |
---|
40 | ideal I=xz,yz; |
---|
41 | module M=I*freemodule(1); |
---|
42 | CohenMacaulayTest1(M,3); |
---|
43 | |
---|
44 | I=x2+y2,z7; |
---|
45 | M=I*freemodule(1); |
---|
46 | CohenMacaulayTest1(M,3); |
---|
47 | |
---|
48 | |
---|
49 | tst_status(1);$ |
---|
Note: See
TracBrowser
for help on using the repository browser.