spielwiese
Last change
on this file since 19609c 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:
1.1 KB
|
Line | |
---|
1 | LIB "tst.lib"; |
---|
2 | tst_init(); |
---|
3 | |
---|
4 | proc fitting(matrix M, int n) |
---|
5 | { |
---|
6 | n=nrows(M)-n; |
---|
7 | if(n<=0){return(ideal(1));} |
---|
8 | if((n>nrows(M))||(n>ncols(M))){return(ideal(0));} |
---|
9 | return(std(minor(M,n))); |
---|
10 | } |
---|
11 | |
---|
12 | proc isFlat(matrix M) |
---|
13 | { |
---|
14 | if(size(ideal(M))==0){return(1);} |
---|
15 | int w; |
---|
16 | ideal F=fitting(M,0); |
---|
17 | while(size(F)==0) |
---|
18 | { |
---|
19 | w++; |
---|
20 | F=fitting(M,w); |
---|
21 | } |
---|
22 | if(deg(std(F)[1])==0){return(1);} |
---|
23 | return(0); |
---|
24 | } |
---|
25 | |
---|
26 | ring A=0,(x,y),dp; |
---|
27 | matrix M[3][3]=x-1,y,x,x,x+1,y,x2,xy+x+1,x2+y; |
---|
28 | print(M); |
---|
29 | qring B=std(x2+x-y); |
---|
30 | matrix M=fetch(A,M); |
---|
31 | isFlat(M); |
---|
32 | setring A; |
---|
33 | qring C=std(x2+x+y); |
---|
34 | matrix M=fetch(A,M); |
---|
35 | isFlat(M); |
---|
36 | |
---|
37 | proc flatLocus(matrix M) |
---|
38 | { |
---|
39 | if(size(ideal(M))==0){return(ideal(1));} |
---|
40 | int v,w; |
---|
41 | ideal F=fitting(M,0); |
---|
42 | while(size(F)==0) |
---|
43 | { |
---|
44 | w++; |
---|
45 | F=fitting(M,w); |
---|
46 | } |
---|
47 | if(typeof(basering)=="qring") |
---|
48 | { |
---|
49 | for(v=w+1;v<=nrows(M);v++) |
---|
50 | { |
---|
51 | F=F+intersect(fitting(M,v),quotient(ideal(0), |
---|
52 | fitting(M,v-1))); |
---|
53 | } |
---|
54 | } |
---|
55 | return(interred(F)); |
---|
56 | } |
---|
57 | |
---|
58 | ring R=0,(x,y,z),dp; |
---|
59 | qring S=std(xyz); |
---|
60 | matrix M[3][3]=x,y,z,0,0,0,xyz,x3,z3; |
---|
61 | |
---|
62 | flatLocus(M); |
---|
63 | |
---|
64 | tst_status(1);$ |
---|
Note: See
TracBrowser
for help on using the repository browser.