Changeset baaef9 in git for Singular/LIB/hnoether.lib


Ignore:
Timestamp:
Apr 27, 2000, 11:06:09 PM (24 years ago)
Author:
Martin Lamm <lamm@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
6c2401eac1edf81c43de3aa4cd120cb316da37a1
Parents:
c91f2336478169b176097dcb6efd1ea442bc4513
Message:
* new procedure essdevelop (omits conjugate branches)
* procedure param can now be called with optional 2nd argument


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/hnoether.lib

    rc91f233 rbaaef9  
    1 // $Id: hnoether.lib,v 1.18 1999-12-13 15:33:46 obachman Exp $
    2 // last change:           31.08.99
    3 ///////////////////////////////////////////////////////////////////////////////
    4 // This library is for Singular 1-3-4 or newer
    5 
    6 version="$Id: hnoether.lib,v 1.18 1999-12-13 15:33:46 obachman Exp $";
     1// $Id: hnoether.lib,v 1.19 2000-04-27 21:06:09 lamm Exp $
     2// last change:           27.04.00
     3///////////////////////////////////////////////////////////////////////////////
     4// This library is for Singular 1-3-7 or newer
     5
     6version="$Id: hnoether.lib,v 1.19 2000-04-27 21:06:09 lamm Exp $";
    77info="
    88LIBRARY:  hnoether.lib   Procedures for the Hamburger-Noether (Puiseux) development
     
    1515           Algebroid curves in positive characteristic, Lecture Notes in Math.
    1616           813, Springer (1980).
    17            The library contains also procedures for computing the (topoligical)
     17           The library contains also procedures for computing the (topological)
    1818           numerical invariants of plane curve singularities.
    19  
     19
    2020MAIN PROCEDURES:
    2121 HNdevelop(f);       Hamburger-Noether development of f
    2222 develop(f [,n]);    Hamburger-Noether development of irreducible curves
    2323 reddevelop(f);      Hamburger-Noether development of reducible curves
     24 essdevelop(f);      Hamburger-Noether development of essential branches
    2425 extdevelop(hne,n);  extension of the Hamburger-Noether development hne of f
    25  param(hne);         returns a parametrization of f (input=output(develop))
     26 param(hne [,x]);    returns a parametrization of f (input=output(develop))
    2627 displayHNE(hne);    display Hamburger-Noether development as an ideal
    2728 invariants(hne);    invariants of f, e.g. the characteristic exponents
     
    911912
    912913proc param
    913 "USAGE:  param(l) takes the output of develop(f)
     914"USAGE:  param(l [,x]) takes the output of develop(f)
    914915        (list l (matrix m, intvec v, int s[,poly g,...]))
    915916        and gives a parametrization for f; the first variable of the active
    916917        ring is chosen as indefinite. If the ring contains more than
    917918        two variables, the 3rd variable is chosen (remember that develop takes
    918         the first two variables and therefore the other vars should be unused)
    919 RETURN: ideal of two polynomials: if the HNE was finite, f(param[1],param[2])
     919        the first two variables and therefore the other vars should be unused).
     920 @*     x is an optional parameter of any type.
     921RETURN: If only the list l is given:
     922        ideal of two polynomials: if the HNE was finite, f(param[1],param[2])
    920923        will be  zero. If not, the real parametrization will be
    921924        two power series; then param will return a truncation of these series.
     925
     926        If the optional parameter x is given:
     927        list L with L[1]=param(l) (the ideal containing the parametrization)
     928        and L[2]=intvec with two entries indicating the highest degree unto
     929        which the coefficients of the monomials in L[1] are exact (a value of
     930        -1 is for infinity, i.e. the corresponding polynomial is exact).
    922931SEE ALSO: develop, extdevelop
    923932KEYWORDS: parametrization
     
    927936{
    928937 //-------------------------- Initialisierungen -------------------------------
    929  matrix m=#[1];
    930  intvec v=#[2];
    931  int switch=#[3];
     938 if (typeof(#[1])=="list") {
     939   list Li=#[1];
     940   matrix m=Li[1];
     941   intvec v=Li[2];
     942   int switch=Li[3];
     943   int return_list=1;
     944 }
     945 else {
     946   matrix m=#[1];
     947   intvec v=#[2];
     948   int switch=#[3];
     949   int return_list=0;
     950 }
    932951 if (switch==-1) {
    933952   "An error has occurred in develop, so there is no HNE.";
     
    9871006 if (switch==0) {
    9881007   if (fehler>0) {
    989      if (fehlervor>0)
    990       { "// ** Warning: result is exact up to order",fehlervor-1,"in",
    991         maxideal(1)[1],"and",fehler-1,"in",maxideal(1)[2],"!";}
    992      else { "// ** Warning: result is exact up to order",fehler-1,"in",
    993         maxideal(1)[2],"!";}}
    994    return(ideal(z(2),z(1)));}
     1008     if (fehlervor>0) {
     1009       if ((voice==2) && (printlevel > -1)) {
     1010         "// ** Warning: result is exact up to order",fehlervor-1,"in",
     1011         maxideal(1)[1],"and",fehler-1,"in",maxideal(1)[2],"!";
     1012     }}
     1013     else {
     1014       if ((voice==2) && (printlevel > -1)) {
     1015         "// ** Warning: result is exact up to order",fehler-1,"in",
     1016         maxideal(1)[2],"!";
     1017     }}
     1018   }
     1019   if (return_list==0) { return(ideal(z(2),z(1))); }
     1020   else   { return(list(ideal(z(2),z(1)),intvec(fehlervor-1,fehler-1))); }
     1021 }
    9951022 else {
    9961023   if (fehler>0) {
    997      if (fehlervor>0)
    998       { "// ** Warning: result is exact up to order",fehler-1,"in",
    999         maxideal(1)[1],"and",fehlervor-1,"in",maxideal(1)[2],"!";}
    1000      else { "// ** Warning: result is exact up to order",fehler-1,"in",
    1001         maxideal(1)[1],"!";}}
    1002    return(ideal(z(1),z(2)));}
     1024     if (fehlervor>0) {
     1025      if ((voice==2) && (printlevel > -1)) {
     1026        "// ** Warning: result is exact up to order",fehler-1,"in",
     1027        maxideal(1)[1],"and",fehlervor-1,"in",maxideal(1)[2],"!";
     1028     }}
     1029     else {
     1030      if ((voice==2) && (printlevel > -1)) {
     1031        "// ** Warning: result is exact up to order",fehler-1,"in",
     1032        maxideal(1)[1],"!";
     1033     }}
     1034   }
     1035   if (return_list==0) { return(ideal(z(1),z(2))); }
     1036   else   { return(list(ideal(z(1),z(2)),intvec(fehler-1,fehlervor-1))); }
     1037 }
    10031038}
    10041039example
     
    10181053 param(hne_extended1);
    10191054 param(hne_extended2);
     1055 param(hne_extended2,0);
    10201056}
    10211057///////////////////////////////////////////////////////////////////////////////
     
    22962332 //------------------ Aufruf der geeigneten Prozedur --------------------------
    22972333   if (irred==0) {
    2298      list hne=reddevelop(f);
     2334     list hne=pre_HN(f,0);       // = reddevelop(f);
     2335     dbprint(printlevel+1,
     2336        "// result: "+string(size(hne))+" branch(es) successfully computed,",
     2337        "//         basering has changed to HNEring");
    22992338   }
    23002339   else {
     
    23632402EXAMPLE: example reddevelop;  shows an example
    23642403"
     2404{
     2405 list Ergebnis=pre_HN(f,0);
     2406 if (size(Ergebnis)>0) {     // otherwise an error may have occurred
     2407  dbprint(printlevel+1,
     2408   "// result: "+string(size(Ergebnis))+" branch(es) successfully computed,",
     2409   "//         basering has changed to HNEring");
     2410 }
     2411 keepring basering;
     2412 return(Ergebnis);
     2413}
     2414example
     2415{
     2416  // -------- prepare for example ---------
     2417  if (nameof(basering)=="HNEring") {
     2418   def rettering=HNEring;
     2419   kill HNEring;
     2420  }
     2421  // ------ the example starts here -------
     2422  "EXAMPLE:"; echo = 2;
     2423  ring r=0,(x,y),dp;
     2424  list hne=reddevelop(x4-y6);
     2425  size(hne);           // i.e. x4-y6 has two branches
     2426  print(hne[1][1]);    // HN-matrix of 1st branch
     2427  param(hne[1]);
     2428  param(hne[2]);
     2429  displayInvariants(hne);
     2430  kill HNEring,r;
     2431  pause("Hit RETURN to continue:");
     2432  // ----------------- a more interesting example: --------------------
     2433  ring r = 32003,(x,y),dp;
     2434  poly f = x25+x24-4x23-1x22y+4x22+8x21y-2x21-12x20y-4x19y2+4x20+10x19y
     2435          +12x18y2-24x18y-20x17y2-4x16y3+x18+60x16y2+20x15y3-9x16y
     2436          -80x14y3-10x13y4+36x14y2+60x12y4+2x11y5-84x12y3-24x10y5
     2437          +126x10y4+4x8y6-126x8y5+84x6y6-36x4y7+9x2y8-1y9;
     2438  list hne=reddevelop(f);
     2439  size(hne);
     2440  print(hne[1][1]);
     2441  print(hne[4][1]);
     2442  // a ring change was necessary, a is a parameter
     2443  HNEring;
     2444  kill HNEring,r;
     2445  echo = 0;
     2446  // --- restore HNEring if previously defined ---
     2447  if (defined(rettering)) {
     2448   setring rettering;
     2449   def HNEring=rettering;
     2450   export HNEring;
     2451  }
     2452}
     2453///////////////////////////////////////////////////////////////////////////////
     2454
     2455static proc pre_HN (poly f, int essential)
     2456"NOTE: This procedure is only for internal use, it is called via
     2457      reddevelop or essdevelop"
    23652458{
    23662459 def altring = basering;
     
    26192712   {"1st step: Treat Newton polygon until height",grenze1;}
    26202713 if (grenze1>0) {
    2621   hilflist=HN(f,grenze1,1);
     2714  hilflist=HN(f,grenze1,1,essential);
    26222715  if (typeof(hilflist[1][1])=="ideal") { hilflist[1]=list(); }
    26232716 //- fuer den Fall, dass keine Zweige in transz. Erw. berechnet werden konnten-
     
    26452738  if (EXTHNEnumber==0) { setring HNEring; }
    26462739  else                 { setring EXTHNEring(EXTHNEnumber); }
    2647   list hilflist=HN(xytausch(f),grenze2,1);
     2740  list hilflist=HN(xytausch(f),grenze2,1,essential);
    26482741  if (typeof(hilflist[1][1])=="ideal") { hilflist[1]=list(); }
    26492742  if (not defined(Ergebnis)) {
     
    26742767 kill EXTHNEnumber;
    26752768 keepring basering;
     2769 return(Ergebnis);
     2770}
     2771
     2772///////////////////////////////////////////////////////////////////////////////
     2773proc essdevelop (poly f)
     2774"USAGE:   essdevelop(f); f poly
     2775RETURN:  Hamburger-Noether development of essential branches of f:
     2776         A list of lists in the form of develop(f)
     2777         (matrix,intvec,int,poly -- the last int indicating irreducibility is
     2778         omitted); each entry contains the data for one of the branches of f.
     2779         For more details type `help develop;'
     2780CREATE:  a ring with name `HNEring', variables `x,y' and ordering `ls' over
     2781         a field extension of the current basering's ground field.
     2782         As the Hamburger-Noether development of a reducible curve normally
     2783         does not exist in the given basering, @code{essdevelop} always defines
     2784         HNEring and changes to it. The field extension is chosen minimal.
     2785NOTE:    If the HNE needs a field extension, some of the branches will be
     2786         conjugate. In this case @code{essdevelop} reduces the computation to
     2787         one representative for each group of conjugate branches.
     2788         Note that the degree of each branch is in general less than the degree
     2789         of the field extension in which all HNEs can be put.
     2790
     2791         Use @code{reddevelop} or @code{HNdevelop} to compute a complete HNE,
     2792         i.e. a HNE for all branches.
     2793SEE ALSO: develop, reddevelop, HNdevelop, extdevelop
     2794EXAMPLE: example essdevelop;  shows an example
     2795"
     2796{
     2797 list Ergebnis=pre_HN(f,1);
    26762798 dbprint(printlevel+1,
    2677    "// result: "+string(size(Ergebnis))+" branch(es) successfully computed,",
    2678    "//         basering has changed to HNEring");
     2799    "// result: "+string(size(Ergebnis))+" branch(es) successfully computed;");
     2800 if (string(minpoly) <> "0") {
     2801   dbprint(printlevel+1,
     2802    "// note that conjugate branches are omitted and that the number",
     2803    "// of branches represented by each remaining one may vary!");
     2804 }
     2805 dbprint(printlevel+1,
     2806    "// basering has changed to HNEring");
     2807 keepring basering;
    26792808 return(Ergebnis);
    26802809}
     
    26882817  // ------ the example starts here -------
    26892818  "EXAMPLE:"; echo = 2;
    2690   ring r=0,(x,y),dp;
    2691   list hne=reddevelop(x4-y6);
    2692   size(hne);           // i.e. x4-y6 has two branches
    2693   print(hne[1][1]);    // HN-matrix of 1st branch
    2694   param(hne[1]);
    2695   param(hne[2]);
    2696   displayInvariants(hne);
    2697   kill HNEring,r;
    2698   pause("Hit RETURN to continue:");
    2699   // ----------------- a more interesting example: --------------------
    2700   ring r = 32003,(x,y),dp;
    2701   poly f = x25+x24-4x23-1x22y+4x22+8x21y-2x21-12x20y-4x19y2+4x20+10x19y
    2702           +12x18y2-24x18y-20x17y2-4x16y3+x18+60x16y2+20x15y3-9x16y
    2703           -80x14y3-10x13y4+36x14y2+60x12y4+2x11y5-84x12y3-24x10y5
    2704           +126x10y4+4x8y6-126x8y5+84x6y6-36x4y7+9x2y8-1y9;
     2819  ring r=2,(x,y),dp;
     2820  poly f=(x4+x2y+y2)*(x3+xy2+y3);
     2821  // --------- compute all branches: ---------
    27052822  list hne=reddevelop(f);
    2706   size(hne);
    2707   print(hne[1][1]);
    2708   print(hne[4][1]);
    2709   // a ring change was necessary, a is a parameter
    2710   HNEring;
    2711   kill HNEring,r;
     2823  displayHNE(hne);
     2824  setring r;
     2825  // --- compute only one of conjugate branches: ---
     2826  list hne=essdevelop(f);
     2827  displayHNE(hne);
     2828  // nr. 1 of essdevelop represents nr. 1 - 3 of reddevelop and
     2829  // nr. 2 of essdevelop represents nr. 4 + 5 of reddevelop
    27122830  echo = 0;
    27132831  // --- restore HNEring if previously defined ---
     
    27182836  }
    27192837}
     2838
    27202839///////////////////////////////////////////////////////////////////////////////
    27212840static
    2722 proc HN (poly f,int grenze, int Aufruf_Ebene)
    2723 "NOTE: This procedure is only for internal use, it is called via reddevelop"
     2841proc HN (poly f,int grenze, int Aufruf_Ebene, int essential)
     2842"NOTE: This procedure is only for internal use, it is called via pre_HN"
    27242843{
    27252844 //---------- Variablendefinitionen fuer den unverzweigten Teil: --------------
     
    28802999     else {
    28813000 //------------------ faktorisiere das charakt. Polynom: ----------------------
    2882  // faktoren=factorize(charPoly(leitf,M,N));       wird ersetzt durch:
    2883        faktoren=factorlist(faktoren);
     3001       if ((numberofRingchanges==1) or (essential==0)) {
     3002         faktoren=factorlist(faktoren);
     3003       }
     3004       else {     // eliminiere alle konjugierten Nullstellen bis auf eine:
     3005         ideal hilf_id;
     3006         for (zaehler=1; zaehler<=size(faktoren[1]); zaehler++) {
     3007           hilf_id=factorize(faktoren[1][zaehler],0)[1];
     3008           if (size(hilf_id)>1) { faktoren[1][zaehler]=hilf_id[2]; }
     3009           else                 { faktoren[1][zaehler]=hilf_id[1]; }
     3010         }
     3011       }
    28843012     }
    28853013
     
    30803208    if (subst(transformiert,y,0)!=0) {
    30813209     lastRingnumber=EXTHNEnumber;
    3082      list HNerg=HN(transformiert,eis[j],Aufruf_Ebene+1);
     3210     list HNerg=HN(transformiert,eis[j],Aufruf_Ebene+1,essential);
    30833211     if (HNerg[2]==-1) {          // kein Ringwechsel in HN aufgetreten
    30843212       aneu=HNerg[1];  }
Note: See TracChangeset for help on using the changeset viewer.