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:
1.2 KB
|
Line | |
---|
1 | LIB "tst.lib"; |
---|
2 | tst_init(); |
---|
3 | |
---|
4 | proc finitenessTest(ideal I) |
---|
5 | "USAGE: finitenessTest(ideal I) |
---|
6 | RETURN: A list l, l[1] is 1 or 0 and l[2] is an ideal gener- |
---|
7 | ated by a subset of the variables. l[1]=1 if the map |
---|
8 | basering/I <-- K[l[2]] is finite and 0 else. |
---|
9 | NOTE: It is assumed that I is a reduced standard basis |
---|
10 | with respect to the lexicographical ordering lp, |
---|
11 | sorted w.r.t. increasing leading terms. |
---|
12 | " |
---|
13 | { |
---|
14 | intvec w=leadexp(I[1]); |
---|
15 | int j,t; |
---|
16 | int s=1; |
---|
17 | ideal k; |
---|
18 | // ----------- check leading exponents ---------------------- |
---|
19 | //compute s such that lead(I[1]) depends only on |
---|
20 | //var(s),...,var(n) by inspection of the leading exponents |
---|
21 | while (w[s]==0) {s++;} |
---|
22 | for (j=1; j<= size(I); j++) |
---|
23 | { |
---|
24 | w=leadexp(I[j]); |
---|
25 | if (size(ideal(w))==1) {t++;} |
---|
26 | } |
---|
27 | //----------------check finiteness ------------------------- |
---|
28 | //t is the number of elements of the standard basis which |
---|
29 | //have pure powers in the variables var(1),...,var(s) as |
---|
30 | //leading term. The map is finite iff s=t. |
---|
31 | if(s!=t) {return(list(0,k));} |
---|
32 | for (j=s+1; j<= nvars(basering);j++) |
---|
33 | { |
---|
34 | k[j]=var(j); |
---|
35 | } |
---|
36 | return (list(1,k)); |
---|
37 | } |
---|
38 | |
---|
39 | ring R=0,(x,y,z),lp; |
---|
40 | ideal I = y2+z3,x3+xyz; |
---|
41 | finitenessTest(I); |
---|
42 | |
---|
43 | tst_status(1);$ |
---|
Note: See
TracBrowser
for help on using the repository browser.