source: git/Singular/LIB/noethernormal.lib @ 5a24c8

spielwiese
Last change on this file since 5a24c8 was 5a24c8, checked in by Olaf Bachmann <obachman@…>, 26 years ago
*** empty log message *** git-svn-id: file:///usr/local/Singular/svn/trunk@2473 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 2.9 KB
Line 
1// $Id: noethernormal.lib,v 1.1 1998-08-24 10:45:06 obachman Exp $
2//(GP, last modified 15.08.98)
3///////////////////////////////////////////////////////////////////////////////
4
5version="$Id: noethernormal.lib,v 1.1 1998-08-24 10:45:06 obachman Exp $";
6info="
7LIBRARY:  noetherNormal.lib    PROCEDURE FOR NOETHERNORMALIZATION
8
9 noetherNormal(id);   noether normalization of id
10";
11
12LIB "ring.lib";
13LIB "random.lib";
14///////////////////////////////////////////////////////////////////////////////
15proc noetherNormal(ideal i)
16"USAGE:  noetherNormal(id);  id ideal
17RETURN:  two ideals i1,i2. is is an ideal generated by a subset of the
18         variables, i1 defines a map: map phi=basering,i1 such that
19         k[var(1),...,var(n)]/phi(id) is finite over k[i2]
20EXAMPLE: noetherNormal; shows an example
21"
22{
23   def r=basering;
24   int n=nvars(r);
25
26   //a procedure from ring.lib changing the order to lp creating a new
27   //basering s
28   changeord("s","lp");
29
30   //creating lower triangular random generators for the maximal ideal
31   //a procedure form random.lib
32   ideal m=ideal(sparsetriag(n,n,0,100)*transpose(maxideal(1)));
33
34   map phi=r,m;
35   ideal i=std(phi(i));
36
37   //from theoretical point of view noether normalization should be
38   //o.k. but we need a test whether the coordinate change was random enough
39   list l=finitenessTest(i);
40
41   setring r;
42   list l=imap(s,l);
43
44   if(l[1]==1)
45   {
46      //the generic case
47      return(list(fetch(s,m),l[2]));
48   }
49   kill s;
50   //the bad case
51   return(noetherNormal(i));
52}
53example
54{ "EXAMPLE:"; echo = 2;
55   ring r=0,(x,y,z),dp;
56   ideal i= xy,xz;
57   noetherNormal(i);
58}
59
60
61proc finitenessTest(ideal i)
62{
63   intvec v,w;
64   int j;   
65   for(j=1;j<=size(i);j++)
66   {
67      w=leadexp(i[j]);
68      if(size(ideal(w))==1)
69      {
70         //the leading term of i[j] is a pure power of some variable
71         v=v+w;
72      }
73   }
74   //the nonzero entries of v correspond to variables which occur as
75   //pure power in the leading term of some polynomial in i
76   ideal k;
77   for(j=1;j<=size(v);j++)
78   {
79      if(v[j]==0)
80      {
81         k[size(k)+1]=var(j);
82      }
83   }
84   if(dim(i)<=size(k))
85   {
86      return(list(1,k));
87   }
88   return(list(0,k));
89}
90
91
92proc mapIsFinite(R, map phi, ideal I)
93"USAGE:  mapIsFinite(R,phi,I); R a ring, phi:R--->basering a map and
94         I an ideal in the basering
95RETURN:  1 if R---->basering/I is finite and 0 else
96EXAMPLE: mapIsFinite; shows an example
97
98{
99  int n=nvars(R);
100  def S=basering;
101 
102  setring R;
103  ideal jj=maxideal(1);
104  setring S;
105  ideal jj=phi(jj);
106 
107  def T=S+R;
108  setring T; 
109  changeord("@rr","lp");
110//  ideal j=imap(S,phi(jj));
111  ideal j=imap(S,jj);
112 
113  int i;
114  for(i=1;i<=nvars(S);i++)
115  {
116    j[i]=j[i]-var(i+n);
117  }
118  j=j+imap(S,I);
119  int l=finitenessTest(std(j))[1];
120  setring S;
121  kill(@rr);
122  return(l);
123}
124example
125{ "EXAMPLE:"; echo = 2;
126   ring r=0,(a,b,c),dp;
127   ring s=0,(x,y,z),dp;
128   ideal i= xy;
129   map phi=r,(xy)^3+x2+z,y2-1,z3;
130   
131   mapIsFinite(r,phi,i);
132}
Note: See TracBrowser for help on using the repository browser.