Changeset 8e4b8f in git
- Timestamp:
- Dec 2, 1997, 7:34:08 PM (26 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 49ad2961d9e55195212a89d87cd58e988173827a
- Parents:
- 8e8c238415436f1e7b7b5c31f9e75f02e172b83f
- 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 $ 10 2 /////////////////////////////////////////////////////////////////////////////// 11 3 12 4 LIBRARY: 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 13 10 14 11 basicinvariants(f); computes Milnor number, determinacy-bound and corank of f … … 21 18 morsesplit(f); residual part of f after applying the splitting lemma 22 19 quickclass(f) normal form of f determined by invariants (milnorcode) 23 //singinfo(N,[k,]); info about singularity given by its name N and index k24 20 singularity(s,[]); normal form of singularity given by its name s and index 25 moduli may be given.26 21 swap (a,b); returns b,a 27 22 tschirnhaus(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) 23 A_L(s/f) shortcut for quickclass(f) or normalform(s) 30 24 normalform(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 25 debug_log (lev,[]) print trace and debugging information w.r.t level>@DeBug 26 (parameters in square brackets [] are optional) 27 36 28 LIB "inout.lib"; 37 29 LIB "elim.lib"; 38 30 LIB "sing.lib"; 39 40 proc Classify 41 { 42 return(classify(#[1])); 43 } 44 /////////////////////////////////////////////////////////////////////////////// 31 /////////////////////////////////////////////////////////////////////////////// 32 45 33 proc classify (poly f_in) 46 34 USAGE: classify(f); f=poly … … 52 40 REMARK: This version of classify is only alpha. Please send bugs and 53 41 comments to: "Kai Krueger" <krueger@mathematik.uni-kl.de> 54 Be s hure to have at least Singular version 0.9.3, better 1.0.142 Be sure to have at least Singular version 0.9.3, better 1.0.1 55 43 Updates can be found under: 56 URL=http://www.mathematik.uni-kl.de/~krueger/ ...44 URL=http://www.mathematik.uni-kl.de/~krueger/Singular/ 57 45 NOTE: type init_debug(n); (0 <= n <= 10) in order to get intermediate 58 46 information, higher values of n give more information. … … 60 48 with @, hence there should be no name conflicts 61 49 EXAMPLE: example classify; shows an example 62 63 50 { 64 51 //---------------------------- initialisation --------------------------------- … … 86 73 s2 = v[2]; // s2: Typ des Polynoms f z.b: E[18] 87 74 corank = v[3]; 88 //hh; 75 89 76 //---------------- collect results and create return-value -------------------- 90 if( s2==" Fehler!" || s2=="NoClass") {77 if( s2=="error!" || s2=="NoClass") { 91 78 setring ring_ext; 92 79 return(f_in); … … 110 97 poly f=(x2+3y-2z)^2+xyz-(x-y3+x2*z3)^3; 111 98 classify(f); 112 //init_debug(3);113 //classify(f);99 init_debug(3); 100 classify(f); 114 101 } 115 102 … … 159 146 debug_log(0, "The Milnor number of the function is infinite."); 160 147 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)); 162 149 } 163 150 … … 234 221 else { 235 222 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); } 237 224 } 238 225 //-------------------------- classification done ------------------------------ … … 271 258 debug_log(0, "dimension 1 und deg != 1, 2 => error, ", 272 259 "this should never occur"); 273 return(printresult(3, f, " Fehler!", cstn, -1));260 return(printresult(3, f, "error!", cstn, -1)); 274 261 // Should never reach this line 275 262 } 276 263 // Should never reach this line 277 return(printresult(3, f, " Fehler!", cstn, -1));264 return(printresult(3, f, "error!", cstn, -1)); 278 265 } 279 266 … … 353 340 } 354 341 // Should never reach this line 355 return(printresult(6, f, " Fehler!", cstn, -1));342 return(printresult(6, f, "error!", cstn, -1)); 356 343 } 357 344 … … 390 377 } 391 378 // Should never reach this line 392 return(printresult(13, f, " Fehler!", cstn, -1));379 return(printresult(13, f, "error!", cstn, -1)); 393 380 } 394 381 … … 457 444 } 458 445 // Should never reach this line 459 return(printresult(17, f, " Fehler!", cstn, -1));446 return(printresult(17, f, "error!", cstn, -1)); 460 447 } 461 448 … … 511 498 "W#["+string(k)+","+string(Mu-12*k-2)+"]", cstn, 3*k-1)); 512 499 } 513 return(printresult(29, f, " Fehler!", cstn, -1));500 return(printresult(29, f, "error!", cstn, -1)); 514 501 } 515 502 else { … … 522 509 cstn, 3*k-1)); 523 510 } 524 if( Dim != 1 ) { return(printresult(29, f, " Fehler!", cstn, -1)); }511 if( Dim != 1 ) { return(printresult(29, f, "error!", cstn, -1)); } 525 512 526 513 //-------------------------- step 33(k) ------------------------------- … … 560 547 } 561 548 if(Mult!=3) { 562 return(printresult(36, f, " Fehler!", cstn, -1)); }549 return(printresult(36, f, "error!", cstn, -1)); } 563 550 } 564 else { return(printresult(36, f, " Fehler!", cstn, -1)); }551 else { return(printresult(36, f, "error!", cstn, -1)); } 565 552 } 566 553 } // Ende der While-Schleife 567 554 // Should never reach this line 568 return(printresult(25, f, " Fehler!", cstn, -1));555 return(printresult(25, f, "error!", cstn, -1)); 569 556 } 570 557 … … 597 584 init_debug(oldDebug); 598 585 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; 601 588 setring ring_top; 602 589 if( Typ == "E[6k]" ) { … … 621 608 } 622 609 // Should never reach this line 623 return(printresult(40, f, " Fehler!", cstn, -1));610 return(printresult(40, f, "error!", cstn, -1)); 624 611 } 625 612 … … 673 660 674 661 // Should never reach this line 675 return(printresult(50, f, " Fehler!", cstn, -1));662 return(printresult(50, f, "error!", cstn, -1)); 676 663 } 677 664 … … 900 887 } 901 888 // Should never reach this line 902 return(printresult(59, f, " Fehler!", cstn, -1));889 return(printresult(59, f, "error!", cstn, -1)); 903 890 } 904 891 … … 929 916 JetId = std(JetId); 930 917 "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)); 932 919 } 933 920 … … 1026 1013 return(Funktion83(f, cstn)); 1027 1014 } 1028 return(printresult(82, f, " Fehler!", cstn, -1));1015 return(printresult(82, f, "error!", cstn, -1)); 1029 1016 } 1030 1017 … … 1170 1157 else { return(printresult(83, f, "NoClass", cstn, -1)); } 1171 1158 } // ENDE While 1172 return(printresult(83, f, " Fehler!", cstn, -1));1159 return(printresult(83, f, "error!", cstn, -1)); 1173 1160 } 1174 1161 … … 1321 1308 1322 1309 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 1331 1310 B = -int(Coeff(Matx[1,1], x(2), x(2))); 1332 1311 C = -int(Coeff(Maty[1,1], x(1), x(1))); … … 1334 1313 beta = int(Coeff(Matx[2,1], x(1)*x(2), x(1)*x(2))); 1335 1314 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);1344 1315 1345 1316 bb[rvar(x(1))] = x(1) - (2*gamma / (B - beta))*x(2); … … 1439 1410 "The singularity"; 1440 1411 " `"+Show(jet(f, K))+"'"; 1441 if( typ != " Fehler!" && typ != "NoClass" ) {1412 if( typ != "error!" && typ != "NoClass" ) { 1442 1413 "is R-equivalent to "+typ+"."; 1443 1414 } … … 1446 1417 } 1447 1418 // if(K>=0) { " det = "+string(K); } 1448 if(Mu>=0) { " M u= "+string(Mu); }1449 if(m>=0) { " m = "+string(m); }1419 if(Mu>=0) { " Milnor number = "+string(Mu); } 1420 if(m>=0) { " modality = "+string(m); } 1450 1421 } 1451 1422 v[1] = f; … … 1456 1427 } 1457 1428 1458 ///////////////////////////////////////////////////////////////////////////////1459 1429 /////////////////////////////////////////////////////////////////////////////// 1460 1430 proc Funktion47 (poly f, list cstn) … … 1518 1488 proc morsesplit(poly f) 1519 1489 USAGE: morsesplit(f); f=poly 1520 RETURN: Normal -Form of f in M^3";1521 COMPUTE: ap lly the splittinglemmato f1490 RETURN: Normal form of f in M^3 after application of the splitting lemma 1491 COMPUTE: apply the splitting lemma (generalized Morse lemma) to f 1522 1492 EXAMPLE: example morsesplit; shows an example 1523 1493 { … … 1763 1733 proc quickclass(poly f); 1764 1734 USAGE: quickclass(f); f=poly 1765 RETURN: Normal -Form of f1735 RETURN: Normal form of f in Arnold's list 1766 1736 REMARK: try to determine the normal form of f by invariants, mainly by 1767 computing the Hilbert funktion of the Milnor albegra, no1768 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'). 1769 1739 EXAMPLE: example quickclass; shows an example 1770 1740 { … … 1802 1772 } 1803 1773 if(cnt==1) { 1804 debug_log(1,"Getting Normalform from database.");1805 " Normal form :",AL(Typ);1806 return(A L(Typ));1774 debug_log(1,"Getting normal form from database."); 1775 "normal form :",A_L(Typ); 1776 return(A_L(Typ)); 1807 1777 } 1808 1778 // Hier nun der Fall cnt>1 1809 1779 "Hilbert-Code of Jf^2"; 1810 "We have ", cnt, "case to test.";1780 "We have ", cnt, "cases to test"; 1811 1781 Cubic(f); 1812 1782 return(Typ,cnt); … … 1845 1815 proc Hcode (intvec v) 1846 1816 USAGE: Hcode(v); v=intvec 1847 RETURN: intvec, coding v according to the number of successive repetitions1848 of an entry1817 RETURN: intvec, coding v according to the number of successive 1818 repetitions of an entry 1849 1819 EXAMPLE: example Hcode; shows an example. 1850 1820 { … … 2252 2222 /////////////////////////////////////////////////////////////////////////////// 2253 2223 proc 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 2224 USAGE: singularity(t, l); t=string (name of singularity), 2225 l=list of integers (index/indices of singularity) 2226 COMPUTE: 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 2258 2229 The name of the dbm-databasefile is: NFlist.[dir,pag] 2259 2230 The file is found in the current directory. If it does not 2260 2231 exists, please run the script MakeDBM first. 2261 RETURN: Normal -form and corank of the singularity named by typeand its2262 corank.2263 EXAMPLE: example info; shows an example2232 RETURN: Normal form and corank of the singularity named by type t and its 2233 index (indices) l 2234 EXAMPLE: example singularity; shows an example 2264 2235 { 2265 2236 poly a1, a2, a3, a4, f; … … 2410 2381 /////////////////////////////////////////////////////////////////////////////// 2411 2382 proc debug_log (int level, list #) 2412 USAGE: debug_log(level, "comma separated message list");2383 USAGE: debug_log(level,li); level=int, li=comma separated "message" list 2413 2384 COMPUTE: print "messages" if level>=@DeBug. 2414 usefull for userdefined trace-messages. 2385 useful for user-defined trace messages. 2386 EXAMPLE: example debug_log; shows an example 2415 2387 SEE ALSO: init_debug(); 2416 2388 { … … 2434 2406 when to print the list of strings. init_debug() reports only 2435 2407 changes of @DeBug. 2436 EXAMPLE: example init_debug; shows an example2437 2408 NOTE: The procedure init_debug(n); is usefull as trace-mode. n may 2438 2409 range from 0 to 10, higher values of n give more information. 2410 EXAMPLE: example init_debug; shows an example 2439 2411 { 2440 2412 int newDebug=0; … … 2505 2477 USAGE: corank(f); f=poly 2506 2478 RETURN: the corank of the Hessian matrix of f, of type int 2507 REMARK: corank(f) is the number of variables accuring in the residual2479 REMARK: corank(f) is the number of variables occuring in the residual 2508 2480 singulartity after applying 'morsesplit' to f 2509 2481 EXAMPLE: example corank; shows an example … … 2653 2625 s = 0; 2654 2626 2655 if(a<0 || b<0) { return("Error", 0,0,0); }2627 if(a<0 || b<0) { return("Error", 0, 0 ,0); } 2656 2628 Typ = s_in[1..a-1]; 2657 2629 s1 = s_in[a..b]; … … 2735 2707 2736 2708 /////////////////////////////////////////////////////////////////////////////// 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 2709 proc A_L 2710 USAGE: A_L(f); f=poly 2711 A_L("name"); type=string 2712 COMPUTE: the normal form in Arnold's list of the singularity given either 2713 by a polynomial f or by its name. 2714 RETURN: 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. 2718 EXAMPLE: example A_L; shows an example 2746 2719 { 2747 2720 // if trace/debug mode not set, do it! … … 2761 2734 { "EXAMPLE:"; echo=2; 2762 2735 ring r=0,(a,b,c),ds; 2763 poly f=A L("E[13]");2736 poly f=A_L("E[13]"); 2764 2737 f; 2765 A L(f);2738 A_L(f); 2766 2739 } 2767 2740 … … 2769 2742 proc normalform(string s_in) 2770 2743 USAGE: normalform(s); s=string 2771 COMPUTE: 2744 RETURN: Arnold's normal form of singularity with name s 2772 2745 EXAMPLE: example normalform; shows an example. 2773 2746 { … … 2778 2751 if(checkring()) { return(s_in); } 2779 2752 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),"."; 2781 2754 return(); 2782 2755 } … … 2784 2757 init_debug(); 2785 2758 2786 Typ, k,r,s=DecodeNormalFormString(s_in);2759 Typ, k, r, s = DecodeNormalFormString(s_in); 2787 2760 if(Typ=="Error") { return(0); } 2788 2761 f, crk = singularity(Typ, k, r, s); … … 2798 2771 proc swap 2799 2772 USAGE: swap(a,b); 2800 RETURN: return b,a.2773 RETURN: b,a if b,a is the input (any type) 2801 2774 { 2802 2775 return(#[2],#[1]); … … 2812 2785 { 2813 2786 string s="ring "+name+"=0,(x(1.."+ string(c) +")),(c,ds);"; 2814 // k;2815 2787 return(s); 2816 2788 } … … 2821 2793 RETURN: nothing, display names of internal procedures of classify.lib 2822 2794 EXAMPLE: 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 2825 2798 Funktion1bis (poly f, list cstn) 2826 2799 Funktion3 (poly f, list cstn) … … 2850 2823 "; 2851 2824 " Internal functions for the classifcation by invariants: 2852 Cubic (poly f) (for internal use only)2825 Cubic (poly f) 2853 2826 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) 2862 2835 "; 2863 2836 " Internal functions for the Morse-splitting lemma: … … 2872 2845 Faktorisiere(poly f, poly g, int p, int k) compute g = (ax+by^k)^p 2873 2846 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); 2879 2852 "; 2880 2853 } 2881 2854 /////////////////////////////////////////////////////////////////////////////// 2882 2855 // E n d O f F i l e 2883 ///////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.