source: git/Tst/Buch/Example_3_5_9.tst @ 891438c

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: 536 bytes
Line 
1LIB "tst.lib";
2tst_init();
3
4proc d(ideal I)
5{
6   int n=nvars(basering);
7   int j,b,a;
8   I=simplify(I,2);  //cancels zeros in the generators of I
9   if(size(I)==0) {return(n);}  //size counts the generators
10                                //not equal to 0
11   for(j=1;j<=n;j++)   
12   {
13     if(I[1]/var(j)!=0)
14     {
15        a=d(subst(I,var(j),0))-1;
16        //we need -1 here because we stay in the basering
17        if(a>b) {b=a;}
18     }
19   }
20   return(b);
21}
22
23ring R=0,(x,y,z),dp;
24ideal I=yz,xz;
25
26d(I);
27
28dim(std(I));
29
30tst_status(1);$
Note: See TracBrowser for help on using the repository browser.