Changeset 8e4b8f in git


Ignore:
Timestamp:
Dec 2, 1997, 7:34:08 PM (26 years ago)
Author:
Kai Krüger <krueger@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
49ad2961d9e55195212a89d87cd58e988173827a
Parents:
8e8c238415436f1e7b7b5c31f9e75f02e172b83f
Message:
*** empty log message ***


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/classify.lib

    r8e8c23 r8e4b8f  
    1 // $Id: classify.lib,v 1.16 1997-11-10 19:18:41 krueger Exp $
    2 //
    3 //  A library for the classification of isolated hypersurface singularities
    4 //  with respect to right equivalence. Based on the determinator of
    5 //  singularities by V.I. Arnold.
    6 //  Author: Kai Krueger, (ev. Post Adresse)
    7 //  Please send bugs and comments to krueger@mathematik.uni-kl.de
    8 //  last modified:
    9 //
     1// $Id: classify.lib,v 1.17 1997-12-02 18:34:08 krueger Exp $
    102///////////////////////////////////////////////////////////////////////////////
    113
    124LIBRARY:  classify.lib  PROCEDURES FOR THE ARNOLD-CLASSIFIER OF SINGULARITIES 
     5
     6   A library for classifying isolated hypersurface singularities w.r.t. right
     7   equivalence, based on the determinator of singularities by V.I. Arnold.
     8   Author: Kai Krueger, krueger@mathematik.uni-kl.de
     9   last modified: 08.11.1997
    1310
    1411basicinvariants(f);  computes Milnor number, determinacy-bound and corank of f
     
    2118morsesplit(f);       residual part of f after applying the splitting lemma
    2219quickclass(f)        normal form of f determined by invariants (milnorcode)
    23 //singinfo(N,[k,]);    info about singularity given by its name N and index k
    2420singularity(s,[]);   normal form of singularity given by its name s and index
    25                      moduli may be given.
    2621swap (a,b);          returns b,a
    2722tschirnhaus(f,v);    Tschirnhaus transformation of f w.r.t. variable v
    28 (parameters in square brackets [] are optional)
    29 AL(s/f)              shortcut for quickclass(f) or normalform(s)
     23A_L(s/f)              shortcut for quickclass(f) or normalform(s)
    3024normalform(s);       normal form of singularity given by its name s
    31 
    32 debug_log (int level, list #)     printout trace and debugging information
    33                                   depending on level>@DeBug. 
    34 
    35 // required libraries
     25debug_log (lev,[])   print trace and debugging information w.r.t level>@DeBug
     26           (parameters in square brackets [] are optional)
     27
    3628LIB "inout.lib";
    3729LIB "elim.lib";
    3830LIB "sing.lib";
    39 
    40 proc Classify
    41 {
    42   return(classify(#[1]));
    43 }
    44 ///////////////////////////////////////////////////////////////////////////////
     31///////////////////////////////////////////////////////////////////////////////
     32
    4533proc classify (poly f_in)
    4634USAGE:    classify(f);  f=poly
     
    5240REMARK:   This version of classify is only alpha. Please send bugs and
    5341          comments to: "Kai Krueger" <krueger@mathematik.uni-kl.de>
    54           Be shure to have at least Singular version 0.9.3, better 1.0.1
     42          Be sure to have at least Singular version 0.9.3, better 1.0.1
    5543          Updates can be found under:
    56           URL=http://www.mathematik.uni-kl.de/~krueger/...
     44          URL=http://www.mathematik.uni-kl.de/~krueger/Singular/
    5745NOTE:     type init_debug(n); (0 <= n <= 10) in order to get intermediate
    5846          information, higher values of n give more information.
     
    6048          with @, hence there should be no name conflicts
    6149EXAMPLE:  example classify; shows an example
    62 
    6350{
    6451//---------------------------- initialisation ---------------------------------
     
    8673  s2 = v[2];          // s2: Typ des Polynoms f z.b: E[18]
    8774  corank = v[3];
    88 //hh;
     75
    8976//---------------- collect results and create return-value --------------------
    90   if( s2=="Fehler!" || s2=="NoClass") {
     77  if( s2=="error!" || s2=="NoClass") {
    9178      setring ring_ext;
    9279      return(f_in);
     
    11097   poly f=(x2+3y-2z)^2+xyz-(x-y3+x2*z3)^3;
    11198   classify(f);
    112    //init_debug(3);
    113    //classify(f);
     99   init_debug(3);
     100   classify(f);
    114101}
    115102
     
    159146      debug_log(0, "The Milnor number of the function is infinite.");
    160147      debug_log(0, "The singularity is not in Arnolds list.");
    161       return(printresult(1, 1, "Fehler!", cstn, -1));
     148      return(printresult(1, 1, "error!", cstn, -1));
    162149    }
    163150
     
    234221    else {
    235222      if(corank == 3) { v_class = Funktion50(G, cstn); }
    236       else { v_class = printresult(1, f, "Fehler!", cstn, -1); }
     223      else { v_class = printresult(1, f, "error!", cstn, -1); }
    237224    }
    238225//-------------------------- classification done ------------------------------
     
    271258      debug_log(0, "dimension 1 und deg != 1, 2 => error, ",
    272259                        "this should never occur");
    273       return(printresult(3, f, "Fehler!", cstn, -1));
     260      return(printresult(3, f, "error!", cstn, -1));
    274261      // Should never reach this line
    275262    }
    276263    // Should never reach this line
    277     return(printresult(3, f, "Fehler!", cstn, -1));
     264    return(printresult(3, f, "error!", cstn, -1));
    278265}
    279266
     
    353340    }
    354341    // Should never reach this line
    355     return(printresult(6, f, "Fehler!", cstn, -1));
     342    return(printresult(6, f, "error!", cstn, -1));
    356343}
    357344
     
    390377    }
    391378    // Should never reach this line
    392     return(printresult(13, f, "Fehler!", cstn, -1));
     379    return(printresult(13, f, "error!", cstn, -1));
    393380}
    394381
     
    457444    }
    458445    // Should never reach this line
    459     return(printresult(17, f, "Fehler!", cstn, -1));
     446    return(printresult(17, f, "error!", cstn, -1));
    460447}
    461448
     
    511498                  "W#["+string(k)+","+string(Mu-12*k-2)+"]", cstn, 3*k-1));
    512499        }
    513         return(printresult(29, f, "Fehler!", cstn, -1));
     500        return(printresult(29, f, "error!", cstn, -1));
    514501      }
    515502      else {
     
    522509                  cstn, 3*k-1));
    523510        }
    524         if( Dim != 1 ) { return(printresult(29, f, "Fehler!", cstn, -1)); }
     511        if( Dim != 1 ) { return(printresult(29, f, "error!", cstn, -1)); }
    525512
    526513        //-------------------------- step 33(k) -------------------------------
     
    560547          }
    561548          if(Mult!=3) {
    562             return(printresult(36, f, "Fehler!", cstn, -1)); }
     549            return(printresult(36, f, "error!", cstn, -1)); }
    563550        }
    564         else { return(printresult(36, f, "Fehler!", cstn, -1)); }
     551        else { return(printresult(36, f, "error!", cstn, -1)); }
    565552      }
    566553    }  // Ende der While-Schleife
    567554    // Should never reach this line
    568     return(printresult(25, f, "Fehler!", cstn, -1));
     555    return(printresult(25, f, "error!", cstn, -1));
    569556}
    570557
     
    597584    init_debug(oldDebug);
    598585    Typ = v[2];
    599     Typ,kr,rr,sr=DecodeNormalFormString(Typ);
    600     r = kr-k;
     586    Typ, kr, rr, sr = DecodeNormalFormString(Typ);
     587    r   = kr-k;
    601588    setring ring_top;
    602589    if( Typ == "E[6k]" ) {
     
    621608    }
    622609    // Should never reach this line
    623     return(printresult(40, f, "Fehler!", cstn, -1));
     610    return(printresult(40, f, "error!", cstn, -1));
    624611}
    625612
     
    673660
    674661    // Should never reach this line
    675     return(printresult(50, f, "Fehler!", cstn, -1));
     662    return(printresult(50, f, "error!", cstn, -1));
    676663}
    677664
     
    900887    }
    901888    // Should never reach this line
    902     return(printresult(59, f, "Fehler!", cstn, -1));
     889    return(printresult(59, f, "error!", cstn, -1));
    903890}
    904891
     
    929916    JetId = std(JetId);
    930917    "nach z:",Show(fz), "  Id=", JetId, "  Dim=", dim(JetId);
    931     return(printresult(1, 66, "Fehler!", cstn, -1));
     918    return(printresult(1, 66, "error!", cstn, -1));
    932919}
    933920
     
    10261013      return(Funktion83(f, cstn));
    10271014    }
    1028     return(printresult(82, f, "Fehler!", cstn, -1));
     1015    return(printresult(82, f, "error!", cstn, -1));
    10291016}
    10301017
     
    11701157      else { return(printresult(83, f, "NoClass", cstn, -1)); }
    11711158    } // ENDE While
    1172     return(printresult(83, f, "Fehler!", cstn, -1));
     1159    return(printresult(83, f, "error!", cstn, -1));
    11731160}
    11741161
     
    13211308
    13221309      if( (a != 0) && (b != 0) ) { 
    1323         debug_log(8, "Mx", Matx);
    1324         debug_log(8, "My", Maty);
    1325         debug_log(8, "C(Mx[1,1], y, y)=", Coeff(Matx[1,1], x(2), x(2)));
    1326         debug_log(8, "C(Mx[1,1], x, x)=", Coeff(Maty[1,1], x(1), x(1)));
    1327         debug_log(8, "C(Mx[1,1], x, x2)=", Coeff(Matx[2,1], x(1), x(1)^2));
    1328         debug_log(8, "C(Mx[1,1],xy,xy)=",Coeff(Matx[2,1],x(1)*x(2),x(1)*x(2)));
    1329         debug_log(8, "C(Mx[1,1], y, y2)=", Coeff(Matx[2,1], x(2), x(2)^2));
    1330 
    13311310        B = -int(Coeff(Matx[1,1], x(2), x(2)));
    13321311        C = -int(Coeff(Maty[1,1], x(1), x(1)));
     
    13341313        beta  = int(Coeff(Matx[2,1], x(1)*x(2), x(1)*x(2)));
    13351314        gamma = int(Coeff(Matx[2,1], x(2), x(2)^2));
    1336 
    1337         debug_log(8, "B=", B);
    1338         debug_log(8, "C=", C);
    1339         debug_log(8, "alpha=", alpha);
    1340         debug_log(8, "beta =", beta);
    1341         debug_log(8, "gamma=", gamma);
    1342         debug_log(8, "(B-beta)/2=", (B-beta)/2);
    1343         debug_log(8, "(C-beta)/2=", (C-beta)/2);
    13441315
    13451316        bb[rvar(x(1))] = x(1) - (2*gamma / (B - beta))*x(2);
     
    14391410    "The singularity";
    14401411    "   `"+Show(jet(f, K))+"'";
    1441     if( typ != "Fehler!" && typ != "NoClass" ) {
     1412    if( typ != "error!" && typ != "NoClass" ) {
    14421413      "is R-equivalent to "+typ+".";
    14431414    }
     
    14461417    }
    14471418//    if(K>=0)  { "  det = "+string(K); }
    1448     if(Mu>=0) { "   Mu = "+string(Mu); }
    1449     if(m>=0)  { "   m  = "+string(m); }
     1419    if(Mu>=0) { "   Milnor number = "+string(Mu); }
     1420    if(m>=0)  { "   modality      = "+string(m); }
    14501421  }
    14511422  v[1] = f;
     
    14561427}
    14571428
    1458 ///////////////////////////////////////////////////////////////////////////////
    14591429///////////////////////////////////////////////////////////////////////////////
    14601430proc Funktion47 (poly f, list cstn)
     
    15181488proc morsesplit(poly f)
    15191489USAGE:    morsesplit(f);        f=poly
    1520 RETURN:   Normal-Form of f in M^3";
    1521 COMPUTE:  aplly the splittinglemma to f
     1490RETURN:   Normal form of f in M^3 after application of the splitting lemma
     1491COMPUTE:  apply the splitting lemma (generalized Morse lemma) to f
    15221492EXAMPLE:  example morsesplit; shows an example
    15231493{
     
    17631733proc quickclass(poly f);
    17641734USAGE:    quickclass(f);         f=poly
    1765 RETURN:   Normal-Form of f
     1735RETURN:   Normal form of f in Arnold's list
    17661736REMARK:   try to determine the normal form of f by invariants, mainly by
    1767           computing the Hilbert funktion of the Milnor albegra, no
    1768           coordinate change is needed (see also proc 'milnorcode').
     1737          computing the Hilbert funktion of the Milnor albegra,
     1738          no coordinate change is needed (see also proc 'milnorcode').
    17691739EXAMPLE:  example quickclass; shows an example
    17701740{
     
    18021772  }
    18031773  if(cnt==1) {
    1804     debug_log(1,"Getting Normalform from database.");
    1805     "Normal form :",AL(Typ);
    1806     return(AL(Typ));
     1774    debug_log(1,"Getting normal form from database.");
     1775    "normal form :",A_L(Typ);
     1776    return(A_L(Typ));
    18071777  }
    18081778  // Hier nun der Fall cnt>1
    18091779  "Hilbert-Code of Jf^2";
    1810   "We have ", cnt, "case to test.";
     1780  "We have ", cnt, "cases to test";
    18111781  Cubic(f);
    18121782  return(Typ,cnt);
     
    18451815proc Hcode (intvec v)
    18461816USAGE:    Hcode(v); v=intvec
    1847 RETURN:   intvec, coding v according to the number of successive repetitions
    1848           of an entry
     1817RETURN:   intvec, coding v according to the number of successive
     1818          repetitions of an entry
    18491819EXAMPLE:  example Hcode; shows an example.
    18501820{
     
    22522222///////////////////////////////////////////////////////////////////////////////
    22532223proc singularity(string typ, list #)
    2254 USAGE:    singularity(typ, list)
    2255 COMPUTE:  get the Singularity named by type from the database.
    2256           list # is as follows:
    2257           #= k [,r [,s [,a [,b [,c [,d]]]]]] k,r,s=int   a,b,c,d=poly
     2224USAGE:    singularity(t, l); t=string (name of singularity),
     2225          l=list of integers (index/indices of singularity)
     2226COMPUTE:  get the Singularity named by type t from the database.
     2227          list l is as follows:
     2228          l= k [,r [,s [,a [,b [,c [,d]]]]]] k,r,s=int   a,b,c,d=poly
    22582229          The name of the dbm-databasefile is: NFlist.[dir,pag]
    22592230          The file is found in the current directory. If it does not
    22602231          exists, please run the script MakeDBM first.
    2261 RETURN:   Normal-form and corank of the singularity named by type and its
    2262           corank.
    2263 EXAMPLE:  example info; shows an example
     2232RETURN:   Normal form and corank of the singularity named by type t and its
     2233          index (indices) l
     2234EXAMPLE:  example singularity; shows an example
    22642235{
    22652236  poly a1, a2, a3, a4, f;
     
    24102381///////////////////////////////////////////////////////////////////////////////
    24112382proc debug_log (int level, list #)
    2412 USAGE:    debug_log(level,"comma separated message list");
     2383USAGE:    debug_log(level,li); level=int, li=comma separated "message" list
    24132384COMPUTE:  print "messages" if level>=@DeBug.
    2414           usefull for userdefined trace-messages.
     2385          useful for user-defined trace messages.
     2386EXAMPLE:  example debug_log; shows an example
    24152387SEE ALSO: init_debug();
    24162388{
     
    24342406          when to print the list of strings. init_debug() reports only
    24352407          changes of @DeBug.
    2436 EXAMPLE:  example init_debug; shows an example
    24372408NOTE:     The procedure init_debug(n); is usefull as trace-mode. n may
    24382409          range from 0 to 10, higher values of n give more information.
     2410EXAMPLE:  example init_debug; shows an example
    24392411{
    24402412  int newDebug=0;
     
    25052477USAGE:    corank(f);   f=poly
    25062478RETURN:   the corank of the Hessian matrix of f, of type int
    2507 REMARK:   corank(f) is the number of variables accuring in the residual
     2479REMARK:   corank(f) is the number of variables occuring in the residual
    25082480          singulartity after applying 'morsesplit' to f
    25092481EXAMPLE:  example corank; shows an example
     
    26532625  s = 0;
    26542626
    2655   if(a<0 || b<0) { return("Error",0,0,0); }
     2627  if(a<0 || b<0) { return("Error", 0, 0 ,0); }
    26562628  Typ = s_in[1..a-1];
    26572629  s1  = s_in[a..b];
     
    27352707
    27362708///////////////////////////////////////////////////////////////////////////////
    2737 proc AL
    2738 USAGE:    AL(f);         f=poly
    2739           AL("name");    type=string
    2740 COMPUTE:  Arnold's List.
    2741           For AL(f): Computes via the Milnorcode the class of f and
    2742           returns the Normalform of f found in the database.
    2743           For AL("name"): Get the Normalform from the database for the
    2744           singularity given by its name.
    2745 EXAMPLE:  example AL; shows an example
     2709proc A_L
     2710USAGE:    A_L(f);         f=poly
     2711          A_L("name");    type=string
     2712COMPUTE:  the normal form in Arnold's list of the singularity given either
     2713          by a polynomial f or by its name.
     2714RETURN:   A_L(f): compute via 'milnorcode' the class of f and
     2715          return the normal form of f found in the database.
     2716          A_L("name"): Get the normal form from the database for
     2717          the singularity given by its name.
     2718EXAMPLE:  example A_L; shows an example
    27462719{
    27472720  // if trace/debug mode not set, do it!
     
    27612734{ "EXAMPLE:"; echo=2;
    27622735  ring r=0,(a,b,c),ds; 
    2763   poly f=AL("E[13]");
     2736  poly f=A_L("E[13]");
    27642737  f;
    2765   AL(f);
     2738  A_L(f);
    27662739}
    27672740
     
    27692742proc normalform(string s_in)
    27702743USAGE:    normalform(s);  s=string
    2771 COMPUTE:
     2744RETURN:   Arnold's normal form of singularity with name s
    27722745EXAMPLE:  example normalform; shows an example.
    27732746{
     
    27782751  if(checkring()) { return(s_in); }
    27792752  if(nvars(basering)<=1) {
    2780     "We need at least 2 variables in basering, You have",nvars(basering),".";
     2753    "We need at least 2 variables in basering, you have",nvars(basering),".";
    27812754    return();
    27822755  }
     
    27842757  init_debug();
    27852758
    2786   Typ,k,r,s=DecodeNormalFormString(s_in);
     2759  Typ, k, r, s = DecodeNormalFormString(s_in);
    27872760  if(Typ=="Error") { return(0); }
    27882761  f, crk = singularity(Typ, k, r, s);
     
    27982771proc swap
    27992772USAGE:    swap(a,b);
    2800 RETURN:   return b,a.
     2773RETURN:   b,a if b,a is the input (any type)
    28012774{
    28022775  return(#[2],#[1]);
     
    28122785{
    28132786  string s="ring "+name+"=0,(x(1.."+ string(c) +")),(c,ds);";
    2814  // k;
    28152787  return(s);
    28162788}
     
    28212793RETURN:  nothing, display names of internal procedures of classify.lib
    28222794EXAMPLE: no example
    2823 { "   Internal functions for the classification unsing Arnold's method:
    2824   Klassifiziere(poly f);             determine the type of the singularity f
     2795{ "   Internal functions for the classification using Arnold's method,";
     2796  "   the function numbers correspond to numbers in Arnold's classifier:";
     2797 "Klassifiziere(poly f);             determine the type of the singularity f
    28252798  Funktion1bis (poly f, list cstn)
    28262799  Funktion3 (poly f, list cstn)
     
    28502823  ";
    28512824  "   Internal functions for the classifcation by invariants:
    2852   Cubic (poly f)          (for internal use only)
     2825  Cubic (poly f)
    28532826  parity (int e)               return the parity of e
    2854   HKclass (intvec i)          (for internal use only)
    2855   HKclass3( intvec i)         (for internal use only)
    2856   HKclass3_teil_1 (intvec i)  (for internal use only)
    2857   HKclass5 (intvec i)         (for internal use only)
    2858   HKclass5_teil_1 (intvec i)  (for internal use only)
    2859   HKclass5_teil_2 (intvec i)  (for internal use only)
    2860   HKclass7 (intvec i)         (for internal use only)
    2861   HKclass7_teil_1 (intvec i)  (for internal use only)
     2827  HKclass (intvec i)
     2828  HKclass3( intvec i, string SG_Typ, int cnt)
     2829  HKclass3_teil_1 (intvec i, string SG_Typ, int cnt)
     2830  HKclass5 (intvec i, string SG_Typ, int cnt)
     2831  HKclass5_teil_1 (intvec i, string SG_Typ, int cnt)
     2832  HKclass5_teil_2 (intvec i, string SG_Typ, int cnt)
     2833  HKclass7 (intvec i, string SG_Typ, int cnt)
     2834  HKclass7_teil_1 (intvec i, string SG_Typ, int cnt)
    28622835  ";
    28632836  "   Internal functions for the Morse-splitting lemma:
     
    28722845  Faktorisiere(poly f, poly g, int p, int k)     compute g = (ax+by^k)^p
    28732846  Teile(poly f, poly g);                  Teilt f durch g.
    2874   GetRf(poly f, int n);                   (for internal use only)
    2875   Show(poly f);                           (for internal use only)
    2876   checkring();                    (for internal use only)
    2877   DecodeNormalFormString(string s); (for internal use only)
    2878   Setring
     2847  GetRf(poly f, int n);
     2848  Show(poly f);
     2849  checkring();
     2850  DecodeNormalFormString(string s);
     2851  Setring(int n, string ringname);
    28792852  ";
    28802853}
    28812854///////////////////////////////////////////////////////////////////////////////
    28822855// E n d   O f   F i l e
    2883 ///////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.