Changeset e182c8 in git for Singular/LIB/brnoeth.lib
- Timestamp:
- Apr 19, 2005, 5:23:42 PM (19 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- 62a35c339c4e8ffbdfed49433b37436dd23ac10e
- Parents:
- c00e9bd260d0a0003533514dedab696c789b8a08
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/brnoeth.lib
rc00e9b re182c8 1 version="$Id: brnoeth.lib,v 1.1 3 2004-02-17 16:03:20Singular Exp $";1 version="$Id: brnoeth.lib,v 1.14 2005-04-19 15:23:38 Singular Exp $"; 2 2 category="Coding theory"; 3 3 info=" … … 135 135 poly A=g1; 136 136 poly B=g2; 137 ring raux1=char(basering),(x,y, a),lp;137 ring raux1=char(basering),(x,y,@a),lp; 138 138 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; 141 141 minpoly=number(psi(A)); 142 142 poly f=psi(B); … … 151 151 setring raux1; 152 152 execute("G="+sg+";"); 153 G=subst(G, a,y);153 G=subst(G,@a,y); 154 154 setring BR; 155 155 map ppssii=raux1,var(1),var(2),0; … … 374 374 // the point is non-rational and a field extension with minpoly=aux 375 375 // is needed 376 ring r_ext=(char(basering), a),(x,y,z),lp;376 ring r_ext=(char(basering),@a),(x,y,z),lp; 377 377 poly F=imap(r_auxz,F); 378 378 poly f_xz=subst(F,y,1); 379 379 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; 382 382 poly f_origin=phi(f_xz); 383 383 if ( subst(subst(diff(f_origin,x),x,0),z,0)==0 && … … 769 769 { 770 770 // writes the generator "a" of a subfield of the coefficients field of 771 // basering in terms of the thecurrent generator (also called "a") as a771 // basering in terms of the current generator (also called "a") as a 772 772 // string sf is an existing ring whose coefficient field is such a subfield 773 773 // warning : in basering there must be a variable called "x" and subfield … … 1148 1148 int i,j,k; 1149 1149 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; 1152 1164 export(L@HNE); 1153 1165 int n_branches=size(L@HNE); … … 2000 2012 If @code{printlevel>=0} additional comments are displayed (default: 2001 2013 @code{printlevel=0}). 2014 WARNING: The parameter of the needed field extensions is called 'a'. Thus, 2015 there should be no global object named 'a' when executing Adj_div. 2002 2016 KEYWORDS: Hamburger-Noether expansions; adjunction divisor 2003 2017 SEE ALSO: closed_points, NSplaces … … 2018 2032 { 2019 2033 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 } 2020 2047 } 2021 2048 intvec opgt=option(get); … … 2170 2197 See @ref{Adj_div} for a description of the entries in L. 2171 2198 NOTE: 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}). 2201 WARNING: The parameter of the needed field extensions is called 'a'. Thus, 2202 there should be no global object named 'a' when executing NSplaces. 2174 2203 SEE ALSO: closed_points, Adj_div 2175 2204 EXAMPLE: example NSplaces; shows an example … … 2181 2210 // notice : if h==0 then nothing is done 2182 2211 // 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 } 2183 2225 if (h==0) 2184 2226 { … … 2211 2253 for (j=1;j<=s;j=j+1) 2212 2254 { 2255 dbprint(printlevel-voice-2,"Place No.\ "+string(j)); 2213 2256 pP[3]=j; 2214 2257 update_CURVE=place(pP,0,update_CURVE); … … 2872 2915 poly LOC_EQ=phi(CHI); 2873 2916 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 2893 2954 list BRANCH=list(); 2894 2955 BRANCH[1]=Maux; … … 3321 3382 matrix H0[1][N]; 3322 3383 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]; } 3327 3385 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]); } 3332 3387 list INTERD=intersection_div(Ho,update_CURVE); 3333 3388 intvec NHo=INTERD[1]; … … 4706 4761 static proc ratdevelop (poly chi) 4707 4762 { 4708 def r=basering;4763 int ring_is_changed; 4709 4764 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 } 4711 4776 int k2=res_deg(); 4712 4777 if (k1<k2) … … 4749 4814 } 4750 4815 } 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 } 4756 4819 4757 4820
Note: See TracChangeset
for help on using the changeset viewer.