Changeset 269b1a in git


Ignore:
Timestamp:
Dec 8, 2000, 10:30:34 AM (23 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
5cfef2c9b6a5a17ba7edfb21ee59a14da6abb6e6
Parents:
f9602b8f7b0a32b385ad995c2280574abe06cb5b
Message:
*keilen


git-svn-id: file:///usr/local/Singular/svn/trunk@4841 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/paramet.lib

    rf9602b r269b1a  
    1 // $Id: paramet.lib,v 1.5 1999-07-06 15:32:55 Singular Exp $
     1// $Id: paramet.lib,v 1.6 2000-12-08 09:30:34 Singular Exp $
    22// author : Thomas Keilen email: keilen@mathematik.uni-kl.de
    3 // last change:           07.08.98
     3// last change:           05.12.2000
    44///////////////////////////////////////////////////////////////////////////////
    5 
    6 version="$Id: paramet.lib,v 1.5 1999-07-06 15:32:55 Singular Exp $";
     5version="$Id: paramet.lib,v 1.6 2000-12-08 09:30:34 Singular Exp $";
    76info="
    8 LIBRARY:  paramet.lib   PROCEDURES FOR PARAMETRIZATION OF PRIMARY
    9                         DECOMPOSITION, ETC.
    10 
    11 PROCEDURES:
    12  parametrize(I);       parametrizes a prime ideal if possible via the
    13                        normalization
    14  parametrizepd(I);     calculates the primary decomp. and parametrizes
    15                        the components
     7LIBRARY: paramet.lib   PROCEDURES FOR PARAMETRIZATIONS
     8AUTHOR:  Thomas Keilen, email: keilen@mathematik.uni-kl.de
     9
     10OVERVIEW:
     11 A library to compute parametrizations of algebraic varieties (if possible)
     12 with the aid of a primary decomposition, respectively to compute a
     13 parametrization of a plane curve singularity with the aid of a
     14 Hamburger-Noether expansion.
     15
     16 PROCEDURES:
     17 parametrize(I);       parametrizes a prime ideal via the normalization
     18 parametrizepd(I);     calculates the prim.dec. and parametrizes the components
    1619 parametrizesing(f);   parametrize an isolated plane curve singularity
    1720";
     
    3033         1 resp. 0 depending on whether the parametrization was successful
    3134         or not
    32 NOTE:    if successful, the basering is changed to the parametrization ring;
    33          the result will be incorrect, if the parametrization needs more than
    34          two variables
     35CREATE:  If the parametrization is successful, the basering will be changed to
     36         the parametrization ring, that is to the ring PR=0,(s,t),dp;
     37         respectively PR=0,t(1..d),dp;, depending on the dimension of the
     38         parametrized variety.
    3539EXAMPLE: example parametrize; shows an example
    3640"
    3741{
    38  def BAS=basering;
    39  ideal newI=radical(std(I));
    40  int d=dim(std(newI));
    41  if (size(primdecGTZ(newI))==1)
    42  {
    43    list nor=normal(newI);
    44    def N=nor[1];
    45    ring PR=0,(s,t),dp;
    46    setring N;
    47    // If the ideal is zero dimensional, the procedure works as well in good cases.
    48    if ((size(norid)==0) or (d==0))
    49    {
    50      // Map the parametrization to the parametrization basering PR.
    51      setring PR;
    52      map p=N,(s,t);
    53      ideal para=p(normap);
    54      export para;
    55      // The i-th list component contains the parametrization, the
    56      // number of necessary variables, and the information, if
    57      // the parametrization was successful.
    58      list param=para,d,1;
     42  intvec ov=option(get);
     43  option(noredefine);
     44  def BAS=basering;
     45  ideal newI=radical(std(I));
     46  int d=dim(std(newI));
     47  if (size(primdecGTZ(newI))==1)
     48  {
     49    list nor=normal(newI);
     50    def N=nor[1];
     51    if (d<=2)
     52    {
     53      ring PR=0,(s,t),dp;
     54    }
     55    else
     56    {
     57      ring PR=0,t(1..d),dp;
     58    }
     59    setring N;
     60    // If the ideal is zero dimensional, the procedure works as well in good
     61    // cases.
     62    if ((size(norid)==0) or (d==0))
     63    {
     64      // Map the parametrization to the parametrization basering PR.
     65      setring PR;
     66      map p=N,maxideal(1);
     67      ideal para=p(normap);
     68      export para;
     69      // The i-th list component contains the parametrization, the
     70      // number of necessary variables, and the information, if
     71      // the parametrization was successful.
     72      list param=para,d,1;
    5973//     if (d==0)
    6074//     {
    61        // Include sometime a test, whether the maximal ideal I is of the form
     75       // Include sometimes a test, whether the maximal ideal I is of the form
    6276       // (x-a,y-b,z-c), since only then normap=(a,b,c).
    6377//     }
    64      setring BAS;
    65      export(PR);
    66      keepring(PR);
    67    }
    68    else
    69    {
    70      list param=I,0,0;
    71    }
    72  }
    73  else
    74  {
    75    setring BAS;
    76    list param=I,0,0;
    77  }
    78  return(param);
     78      setring BAS;
     79      export(PR);
     80      keepring(PR);
     81    }
     82    else
     83    {
     84      setring BAS;
     85      list param=I,0,0;
     86    }
     87  }
     88  else
     89  {
     90    setring BAS;
     91    list param=I,0,0;
     92  }
     93  option(set,ov);
     94  return(param);
    7995}
    8096example
     
    8298  ring RING=0,(x,y,z),dp;
    8399  ideal I=z2-y2x2+x3;
    84   parametrize(I);
     100  parametrize(I);parametrize(I);
    85101}
    86102///////////////////////////////////////////////////////////////////////////////
     
    94110         resp. 0, and 1 resp. 0 depending on whether the parametrization
    95111         of the component was successful or not
    96 NOTE:    the basering will be changed to PR=0,(s,t),dp
    97          the result will be incorrect, if the parametrization needs more than two
    98          variables
     112CREATE:  If the parametrization is successful, the basering will be changed to
     113         the parametrization ring, that is to the ring PR=0,(s,t),dp;
     114         respectively PR=0,t(1..d),dp;, depending on the dimension of the
     115         parametrized variety.
    99116EXAMPLE: example parametrizepd; shows an example
    100117"
    101118{
    102  list primary,no,nor,para,param;
    103  def BAS=basering;
    104  ring PR=0,(s,t),dp;
    105  ideal max=s,t;
    106  setring BAS;
    107  primary=primdecGTZ(I);
    108  for (int ii=1; ii<=size(primary); ii=ii+1)
    109    {
    110      no=normal(std(primary[ii][2]));
    111      nor[ii]=no[1];
    112      def N=nor[ii];
    113      setring N;
    114      int d=dim(std(norid));
    115      // Test if the normalization is K, K[s] or K[s,t]. Then give back the parametrization.
    116      if (size(norid)==0)
    117      {
    118        setring PR;
    119        map p=N,max;
    120        para[ii]=p(normap);
    121 //       export para[ii];
    122 //       list inter=para[ii],nvars(N),1;
    123        list inter=para[ii],d,1;
     119  intvec ov=option(get);
     120  option(noredefine);
     121  list primary,no,nor,para,param;
     122  def BAS=basering;
     123  int d=dim(std(I));
     124  if (d<=2)
     125  {
     126    ring PR=0,(s,t),dp;
     127  }
     128  else
     129  {
     130    ring PR=0,t(1..d),dp;
     131  }
     132  ideal max=maxideal(1);
     133  setring BAS;
     134  primary=primdecGTZ(I);
     135  for (int ii=1; ii<=size(primary); ii=ii+1)
     136  {
     137    no=normal(std(primary[ii][2]));
     138    nor[ii]=no[1];
     139    def N=nor[ii];
     140    setring N;
     141    d=dim(std(norid));
     142    // Test if the normalization is K, K[s] or K[s,t].
     143    // Then give back the parametrization.
     144    if (size(norid)==0)
     145    {
     146      setring PR;
     147      map p=N,max;
     148      para[ii]=p(normap);
     149//         export para[ii];
     150//         list inter=para[ii],nvars(N),1;
     151      list inter=para[ii],d,1;
    124152//       if (d==0)
    125153//       {
     
    127155         // (x-a,y-b,z-c), since only then normap=(a,b,c).
    128156//       }
    129        param[ii]=inter;
    130        kill inter;
    131        setring BAS;
    132      }
    133      else
    134      {
    135        setring PR;
    136        list inter=0,0,0;
    137        param[ii]=inter;
    138        kill inter;
    139        setring BAS;
    140      }
    141    }
    142  export nor;
    143  setring PR;
    144  export PR;
    145  keepring PR;
    146  return(param);
     157      param[ii]=inter;
     158      kill inter;
     159      setring BAS;
     160    }
     161    else
     162    {
     163      setring PR;
     164      list inter=0,0,0;
     165      param[ii]=inter;
     166      kill inter;
     167      setring BAS;
     168    }
     169  }
     170  export nor;
     171  setring PR;
     172  export PR;
     173  keepring PR;
     174  option(set,ov);
     175  return(param);
    147176}
    148177example
     
    156185
    157186
    158 
    159187proc parametrizesing(poly f)
    160 "USAGE:  parametrizesing(); f a polynomial in two variables with ordering ls or ds
     188"USAGE:  parametrizesing(); f a polynomial in two variables,ordering ls or ds
    161189RETURN:  a list containing the parametrizations of the different branches of the
    162190         singularity at the origin resp. 0, if f was not of the desired kind
    163 NOTE:    if successful, the basering is changed to ring 0,(x,y),ls;
     191CREATE:  If the parametrization is successful, the basering will be changed to
     192         the parametrization ring, that is to the ring  0,(x,y),ls;
    164193EXAMPLE: example parametrizesing; shows an example
    165194"
    166195{
     196  intvec ov=option(get);
     197  option(noredefine);
    167198  list hn,para;
    168199  if (nvars(basering)==2 and
     
    182213  }
    183214  keepring basering;
     215  option(set,ov);
    184216  return(para);
    185217}
     
    190222  parametrizesing(f);
    191223}
    192 ///////////////////////////////////////////////////////////////////////////////
    193 
    194 
    195 
    196 
    197 
    198 ///////////////////////////////////////////////////////////////////////////////
     224
     225////////////////////////////////////////////////////////////////////////////
     226
     227
     228
     229
     230
     231///////////////////////////////////////////////////////////////////////////
    199232////////         Examples
    200 ///////////////////////////////////////////////////////////////////////////////
     233///////////////////////////////////////////////////////////////////////////
    201234/*
    202235
     
    350383/// Example 7 - wrong ring ordering
    351384
    352 ring r=0,(x,y),lp;
     385ring r=0,(x,y),dp;
    353386poly f=x2-y3;
    354387parametrizesing(f);
     
    356389
    357390/// To do:
    358 ///        1) Make sure that the result of parametrize/parametrizepd is correct
    359 ///           for any number of variables needed.
    360 ///        2) Let these two print more detailed failure reasons.
    361 ///        3) Let these two check, if the input is inside a ring with global ordering.
    362 ///        4) Include a better check, whether some variable in the normalization can
    363 ///           be dropped.
     391///        2) Let parametrize/parametrizepd print more detailed failure reasons.
     392///        3) Let these two check, if the input is inside a ring with global
     393///           ordering.
     394///        4) Include a better check, whether some variable in the
     395///           normalization can be dropped.
     396///        5) Drop ordering lp in parametrizesing, as soon as the link to
     397///           MuPAD allows to give back data in ordering ls.
     398
    364399
    365400
Note: See TracChangeset for help on using the changeset viewer.