Changeset e182c8 in git for Singular/LIB/brnoeth.lib


Ignore:
Timestamp:
Apr 19, 2005, 5:23:42 PM (19 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
62a35c339c4e8ffbdfed49433b37436dd23ac10e
Parents:
c00e9bd260d0a0003533514dedab696c789b8a08
Message:
*lossen/greuel/hannes: new libs


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/brnoeth.lib

    rc00e9b re182c8  
    1 version="$Id: brnoeth.lib,v 1.13 2004-02-17 16:03:20 Singular Exp $";
     1version="$Id: brnoeth.lib,v 1.14 2005-04-19 15:23:38 Singular Exp $";
    22category="Coding theory";
    33info="
     
    135135    poly A=g1;
    136136    poly B=g2;
    137     ring raux1=char(basering),(x,y,a),lp;
     137    ring raux1=char(basering),(x,y,@a),lp;
    138138    poly G;
    139     ring raux2=(char(basering),a),(x,y),lp;
    140     map psi=BR,x,a;
     139    ring raux2=(char(basering),@a),(x,y),lp;
     140    map psi=BR,x,@a;
    141141    minpoly=number(psi(A));
    142142    poly f=psi(B);
     
    151151      setring raux1;
    152152      execute("G="+sg+";");
    153       G=subst(G,a,y);
     153      G=subst(G,@a,y);
    154154      setring BR;
    155155      map ppssii=raux1,var(1),var(2),0;
     
    374374        // the point is non-rational and a field extension with minpoly=aux
    375375        // is needed
    376         ring r_ext=(char(basering),a),(x,y,z),lp;
     376        ring r_ext=(char(basering),@a),(x,y,z),lp;
    377377        poly F=imap(r_auxz,F);
    378378        poly f_xz=subst(F,y,1);
    379379        poly aux=imap(base_r,aux);
    380         minpoly=number(subst(aux,x,a));
    381         map phi=r_ext,x+a,0,z;
     380        minpoly=number(subst(aux,x,@a));
     381        map phi=r_ext,x+@a,0,z;
    382382        poly f_origin=phi(f_xz);
    383383        if ( subst(subst(diff(f_origin,x),x,0),z,0)==0 &&
     
    769769{
    770770  // writes the generator "a" of a subfield of the coefficients field of
    771   //   basering in terms of the the current generator (also called "a") as a
     771  //   basering in terms of the current generator (also called "a") as a
    772772  //   string sf is an existing ring whose coefficient field is such a subfield
    773773  // warning : in basering there must be a variable called "x" and subfield
     
    11481148  int i,j,k;
    11491149  int m,n;
    1150 //  list L@HNE=essdevelop(CHI);
    1151   list L@HNE=ratdevelop(CHI);
     1150//  list L@HNE=essdevelop(CHI); 
     1151  list LLL=ratdevelop(CHI);
     1152  if (typeof(LLL[1])=="ring") {
     1153    def altring=basering;
     1154    def HNEring = LLL[1]; setring HNEring;
     1155    def L@HNE = hne;
     1156    kill hne;
     1157  }
     1158  else {
     1159    def L@HNE=LLL;
     1160    def HNEring=basering;
     1161    setring HNEring;
     1162  }
     1163  kill LLL;
    11521164  export(L@HNE);
    11531165  int n_branches=size(L@HNE);
     
    20002012          If @code{printlevel>=0} additional comments are displayed (default:
    20012013          @code{printlevel=0}).
     2014WARNING:  The parameter of the needed field extensions is called 'a'. Thus,
     2015          there should be no global object named 'a' when executing Adj_div.
    20022016KEYWORDS: Hamburger-Noether expansions; adjunction divisor
    20032017SEE ALSO: closed_points, NSplaces
     
    20182032  {
    20192033    ERROR("Base field not implemented");
     2034  }
     2035  if (defined(a)==1)
     2036  {
     2037    if ((typeof(a)=="int") or (typeof(a)=="intvec") or (typeof(a)=="intmat") or
     2038        (typeof(a)=="string") or (typeof(a)=="proc") or (typeof(a)=="list"))
     2039    {
     2040      print("WARNING: There is an object named 'a' of the global type "
     2041             + typeof(a)+".");
     2042      print("This will cause problems when "
     2043             + "executing Adj_div, as 'a' is used for "
     2044             + "the name of the parameter of the field extensions needed.");
     2045      ERROR("Please rename or kill the object named 'a'");
     2046    }
    20202047  }
    20212048  intvec opgt=option(get);
     
    21702197          See @ref{Adj_div} for a description of the entries in L.
    21712198NOTE:     The list_expression should be the output of the procedure Adj_div.@*
    2172           If @code{printlevel>=0} additional comments are displayed (default:
    2173           @code{printlevel=0}).
     2199          Raising @code{printlevel}, additional comments are displayed
     2200          (default: @code{printlevel=0}).
     2201WARNING:  The parameter of the needed field extensions is called 'a'. Thus,
     2202          there should be no global object named 'a' when executing NSplaces.
    21742203SEE ALSO: closed_points, Adj_div
    21752204EXAMPLE:  example NSplaces; shows an example
     
    21812210  // notice : if h==0 then nothing is done
    21822211  // warning : non-positive entries are forgotten
     2212  if (defined(a)==1)
     2213  {
     2214    if ((typeof(a)=="int") or (typeof(a)=="intvec") or (typeof(a)=="intmat") or
     2215        (typeof(a)=="string") or (typeof(a)=="proc") or (typeof(a)=="list"))
     2216    {
     2217      print("WARNING: There is an object named 'a' of the global type "
     2218             + typeof(a)+".");
     2219      print("This will cause problems when "
     2220             + "executing Adj_div, as 'a' is used for "
     2221             + "the name of the parameter of the field extensions needed.");
     2222      ERROR("Please rename or kill the object named 'a'");
     2223    }
     2224  }
    21832225  if (h==0)
    21842226  {
     
    22112253          for (j=1;j<=s;j=j+1)
    22122254          {
     2255            dbprint(printlevel-voice-2,"Place No.\ "+string(j));
    22132256            pP[3]=j;
    22142257            update_CURVE=place(pP,0,update_CURVE);
     
    28722915  poly LOC_EQ=phi(CHI);
    28732916  kill(A,B,phi);
    2874   list L@HNE=essdevelop(LOC_EQ)[1];
    2875   export(L@HNE);
    2876   int m=nrows(L@HNE[1]);
    2877   int n=ncols(L@HNE[1]);
    2878   intvec Li2=L@HNE[2];
    2879   int Li3=L@HNE[3];
    2880   setring ES;
    2881   string newa=subfield(HNEring);
    2882   poly paux=importdatum(HNEring,"L@HNE[4]",newa);
    2883   matrix Maux[m][n];
    2884   int i,j;
    2885   for (i=1;i<=m;i=i+1)
    2886   {
    2887     for (j=1;j<=n;j=j+1)
    2888     {
    2889       Maux[i,j]=importdatum(HNEring,"L@HNE[1]["+string(i)+","+
    2890                                                 string(j)+"]",newa);
    2891     }
    2892   }
     2917  list LLL=essdevelop(LOC_EQ);
     2918  if (typeof(LLL[1])=="ring") {
     2919    def altring=basering;
     2920    def HNEring = LLL[1];
     2921    setring HNEring;
     2922    def L@HNE = hne[1];
     2923    kill hne;
     2924    export(L@HNE);
     2925    int m=nrows(L@HNE[1]);
     2926    int n=ncols(L@HNE[1]);
     2927    intvec Li2=L@HNE[2];
     2928    int Li3=L@HNE[3];
     2929    setring ES;
     2930    string newa=subfield(HNEring);
     2931    poly paux=importdatum(HNEring,"L@HNE[4]",newa);
     2932    matrix Maux[m][n];
     2933    int i,j;
     2934    for (i=1;i<=m;i=i+1)
     2935    {
     2936      for (j=1;j<=n;j=j+1)
     2937      {
     2938        Maux[i,j]=importdatum(HNEring,"L@HNE[1]["+string(i)+","+
     2939                                                  string(j)+"]",newa);
     2940      }
     2941    }
     2942  }
     2943  else {
     2944    def L@HNE=LLL[1][1];
     2945    matrix Maux=L@HNE[1];
     2946    intvec Li2=L@HNE[2];
     2947    int Li3=L@HNE[3];
     2948    poly paux=L@HNE[4];
     2949    def HNEring=basering;
     2950    setring HNEring;
     2951  }
     2952  kill LLL;
     2953 
    28932954  list BRANCH=list();
    28942955  BRANCH[1]=Maux;
     
    33213382  matrix H0[1][N];
    33223383  int i,j;
    3323   for (i=1;i<=N;i=i+1)
    3324   {
    3325     H0[1,i]=VmW[k,i];
    3326   }
     3384  for (i=1;i<=N;i=i+1) { H0[1,i]=VmW[k,i]; }
    33273385  poly Ho;
    3328   for (i=1;i<=N;i=i+1)
    3329   {
    3330     Ho=Ho+(H0[1,i]*nFORMS(n)[i]);
    3331   }
     3386  for (i=1;i<=N;i=i+1) { Ho=Ho+(H0[1,i]*nFORMS(n)[i]); }
    33323387  list INTERD=intersection_div(Ho,update_CURVE);
    33333388  intvec NHo=INTERD[1];
     
    47064761static proc ratdevelop (poly chi)
    47074762{
    4708   def r=basering;
     4763  int ring_is_changed;
    47094764  int k1=res_deg();
    4710   list HND=essdevelop(chi);
     4765  list L=essdevelop(chi);
     4766  if (typeof(L[1])=="ring") {
     4767    def altring=basering;
     4768    def HNring = L[1]; setring HNring;
     4769    def HND = hne;
     4770    kill hne;
     4771    ring_is_changed=1;
     4772  }
     4773  else {
     4774    def HND=L[1];
     4775  }
    47114776  int k2=res_deg();
    47124777  if (k1<k2)
     
    47494814    }
    47504815  }
    4751   keepring(HNEring);
    4752   return(HND);
    4753 }
    4754 ;
    4755 
     4816  if (ring_is_changed==0) { return(HND); }
     4817  else { export HND; setring altring; return(HNring); }
     4818}
    47564819
    47574820
Note: See TracChangeset for help on using the changeset viewer.