source: git/Singular/LIB/paramet.lib @ e008ba

fieker-DuValspielwiese
Last change on this file since e008ba was 93332c, checked in by Hans Schönemann <hannes@…>, 20 years ago
*hannes: lib changes git-svn-id: file:///usr/local/Singular/svn/trunk@7331 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 6.4 KB
Line 
1// last change:           17.01.2001
2///////////////////////////////////////////////////////////////////////////////
3version="$Id: paramet.lib,v 1.13 2004-08-05 15:59:22 Singular Exp $";
4category="Visualization";
5info="
6LIBRARY: paramet.lib   Parametrization of Varieties
7AUTHOR:  Thomas Keilen, keilen@mathematik.uni-kl.de
8SEE ALSO: normal_lib, primdec_lib, hnoether_lib
9
10PROCEDURES:
11 parametrize(I);       parametrizes a prime ideal via the normalization
12 parametrizepd(I);     calculates the prim.dec. and parametrizes the components
13 parametrizesing(f);   parametrizes an isolated plane curve singularity
14
15OVERVIEW:
16 A library to compute parametrizations of algebraic varieties (if possible)
17 with the aid of a normalization, or a primary decomposition, resp. to compute
18 a parametrization of a plane curve singularity with the aid of a
19 Hamburger-Noether expansion.
20";
21///////////////////////////////////////////////////////////////////////////////
22LIB "normal.lib";
23LIB "hnoether.lib";
24///////////////////////////////////////////////////////////////////////////////
25
26proc parametrize(ideal I)
27"USAGE:   parametrize(I); I ideal in an arbitrary number of variables,
28          whose radical is prime, in a ring with global ordering
29CREATE:   If the parametrization is successful, the basering will be changed to
30          the parametrization ring, that is to the ring PR=0,(s,t),dp;
31          respectively PR=0,t(1..d),dp;, depending on the dimension of the
32          parametrized variety.
33RETURN:   a list containing the parametrization ideal resp. the original ideal,
34          the number of variables needed for the parametrization resp. 0, and
35          1 resp. 0 depending on whether the parametrization was successful
36          or not
37SEE ALSO: primdecGTZ, normal, radical, parametrizepd
38KEYWORDS: parametrization; normalization
39EXAMPLE: example parametrize; shows an example"
40{
41  intvec ov=option(get);
42  option(noredefine);
43  def BAS=basering;
44  ideal newI=radical(std(I));
45  int d=dim(std(newI));
46  if (size(primdecGTZ(newI))==1)
47  {
48    list nor=normal(newI);
49    def N=nor[1];
50    if (d<=2)
51    {
52      ring PR=0,(s,t),dp;
53    }
54    else
55    {
56      ring PR=0,t(1..d),dp;
57    }
58    setring N;
59    // If the ideal is zero dimensional, the procedure works as well in good
60    // cases.
61    if ((size(norid)==0) or (d==0))
62    {
63      // Map the parametrization to the parametrization basering PR.
64      setring PR;
65      map p=N,maxideal(1);
66      ideal para=p(normap);
67      export para;
68      // The i-th list component contains the parametrization, the
69      // number of necessary variables, and the information, if
70      // the parametrization was successful.
71      list @param=para,d,1;
72//     if (d==0)
73//     {
74       // Include sometimes a test, whether the maximal ideal I is of the form
75       // (x-a,y-b,z-c), since only then normap=(a,b,c).
76//     }
77      setring BAS;
78      export(PR);
79      keepring(PR);
80    }
81    else
82    {
83      setring BAS;
84      list @param=I,0,0;
85    }
86  }
87  else
88  {
89    setring BAS;
90    list @param=I,0,0;
91  }
92  option(set,ov);
93  return(@param);
94}
95example
96{ "EXAMPLE:";echo = 2;
97  ring RING=0,(x,y,z),dp;
98  ideal I=z2-y2x2+x3;
99  parametrize(I);
100}
101///////////////////////////////////////////////////////////////////////////////
102
103proc parametrizepd(ideal I)
104"USAGE:   parametrizepd(I); I ideal in a polynomial ring with global ordering
105CREATE:   If the parametrization is successful, the basering will be changed to
106          the parametrization ring, that is to the ring PR=0,(s,t),dp;
107          respectively PR=0,t(1..d),dp;, depending on the dimension of the
108          parametrized variety.
109RETURN:   a list of lists, where each entry contains the parametrization
110          of a primary component of I resp. 0, the number of variables
111          resp. 0, and 1 resp. 0 depending on whether the parametrization
112          of the component was successful or not
113SEE ALSO: primdecGTZ, normal, parametrize
114KEYWORDS: parametrization; normalization
115EXAMPLE:  example parametrizepd; shows an example"
116{
117  intvec ov=option(get);
118  option(noredefine);
119  list primary,no,nor,para,@param;
120  def BAS=basering;
121  int d=dim(std(I));
122  if (d<=2)
123  {
124    ring PR=0,(s,t),dp;
125  }
126  else
127  {
128    ring PR=0,t(1..d),dp;
129  }
130  ideal max=maxideal(1);
131  setring BAS;
132  primary=primdecGTZ(I);
133  for (int ii=1; ii<=size(primary); ii=ii+1)
134  {
135    no=normal(std(primary[ii][2]));
136    nor[ii]=no[1];
137    def N=nor[ii];
138    setring N;
139    d=dim(std(norid));
140    // Test if the normalization is K, K[s] or K[s,t].
141    // Then give back the parametrization.
142    if (size(norid)==0)
143    {
144      setring PR;
145      map p=N,max;
146      para[ii]=p(normap);
147//         export para[ii];
148//         list inter=para[ii],nvars(N),1;
149      list inter=para[ii],d,1;
150//       if (d==0)
151//       {
152         // Include sometime a test, whether the maximal ideal I is of the form
153         // (x-a,y-b,z-c), since only then normap=(a,b,c).
154//       }
155      @param[ii]=inter;
156      kill inter;
157      setring BAS;
158    }
159    else
160    {
161      setring PR;
162      list inter=0,0,0;
163      @param[ii]=inter;
164      kill inter;
165      setring BAS;
166    }
167  }
168  export nor;
169  setring PR;
170  export PR;
171  keepring PR;
172  option(set,ov);
173  return(@param);
174}
175example
176{ "EXAMPLE:";echo = 2;
177  ring RING=0,(x,y,z),dp;
178  ideal I=(x2-y2z2+z3)*(x2-z2-z3),(x2-y2z2+z3)*yz;
179  parametrizepd(I);
180}
181/////////////////////////////////////////////////////////////////////////////
182
183proc parametrizesing(poly f)
184"USAGE:   parametrizesing(f); f a polynomial in two variables, ordering ls or ds
185CREATE:   If the parametrization is successful, the basering will be changed to
186          the parametrization ring, that is to the ring  0,(x,y),ls;
187RETURN:   a list containing the parametrizations of the different branches of the
188          singularity at the origin resp. 0, if f was not of the desired kind
189SEE ALSO: hnoether_lib, reddevelop
190KEYWORDS: parametrization; curve singularities
191EXAMPLE:  example parametrizesing; shows an example"
192{
193  intvec ov=option(get);
194  option(noredefine);
195  list hn,para;
196  if (nvars(basering)==2 and
197      (find(ordstr(basering), "ls") > 0 ||
198       find(ordstr(basering), "ds") > 0 ||
199       find(ordstr(basering), "lp") > 0))
200  {
201    hn = reddevelop(f);
202    for (int ii=1; ii<=size(hn); ii++)
203    {
204      para[ii]=@param(hn[ii]);
205    }
206  }
207  else
208  {
209    para[1]=0;
210  }
211  keepring basering;
212  option(set,ov);
213  return(para);
214}
215example
216{ "EXAMPLE:";echo = 2;
217  ring RING=0,(x,y),ls;
218  poly f=(x^2-y^3)*(x^2-y^2-y^3);
219  parametrizesing(f);
220}
Note: See TracBrowser for help on using the repository browser.