Changeset b4ffba in git
- Timestamp:
- Feb 8, 2010, 5:10:13 PM (13 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- 20118af1e5a05009f39d3544f712db755a96eb7b
- Parents:
- 224420bb74b68587e176a388ce296f410f692313
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/signature.lib
r224420b rb4ffba 11 11 12 12 PROCEDURES: 13 brieskornSign(a,b,c); computesignature of Brieskorn singularity x^a+y^b+z^c=014 newtonpairs(f); computenewton pairs of surface singularity15 signature(N,f); compute signature of the surface singularity z^N+f(x,y)=0 forf irreducible13 brieskornSign(a,b,c); signature of Brieskorn singularity x^a+y^b+z^c=0 14 newtonpairs(f); newton pairs of surface singularity 15 signature(N,f); signature of singularity z^+f(x,y)=0,f irreducible 16 16 17 17 "; 18 18 19 LIB "poly.lib";20 LIB "general.lib";21 19 LIB "hnoether.lib"; 22 23 20 /////////////////////////////////////////////////////////////////////////////// 24 21 proc signature(int N,poly f) … … 28 25 " 29 26 { 27 def R=basering; 28 ring S=0,(x,y),dp; 29 map phi =R,x,y; 30 poly f=phi(f); 30 31 list L=newtonpairs(f); 32 setring R; 31 33 if(size(L)>2) 32 34 { 33 return(Generalcase(N, f));35 return(Generalcase(N,L)); 34 36 } 35 37 if(size(L)==2) 36 38 { 37 return(signtwopairs(N, f));39 return(signtwopairs(N,L)); 38 40 } 39 41 return(brieskornSign(L[1][2],L[1][1],N)); … … 41 43 example 42 44 { "EXAMPLE:"; echo = 2; 43 ring r=0,(x,y ,z),dp;45 ring r=0,(x,y),dp; 44 46 int N=2; 45 47 poly f=y8+2x6y3+x10+x9y; … … 53 55 54 56 proc newtonpairs(poly f) 55 "USAGE:newtonpairs(f);f= poly56 RETURN:newton pairs of surface singularity f=057 "USAGE:newtonpairs(f);f= irreducible bivariate poly 58 RETURN:newton pairs of curve singularity f(x,y)=0 57 59 EXAMPLE:example newtonpairs; shows an example 58 60 " 59 61 { 62 def R=basering; 63 ring S=0,(x,y),dp; 64 map phi =R,x,y; 65 poly f=phi(f); 60 66 list M=invariants(f); 67 setring R; 61 68 list L=M[1][3]; 62 69 list K=M[1][4]; … … 82 89 example 83 90 { "EXAMPLE:"; echo = 2; 84 ring r=0,(x,y ,z),dp;91 ring r=0,(x,y),dp; 85 92 newtonpairs(y4+2x3y2+x6+x5y); 86 93 } … … 88 95 proc brieskornSign(a,b,c) 89 96 "USAGE:brieskornSign(a,b,c);a,b,c=integers 90 RETURN:signature of surface singularity defined by f=0 91 ASSUME:f is Brieskorn singularity,f=x^a+y^b+z^c 97 RETURN:signature of Brieskorn singularity x^a+y^b+z^c 92 98 EXAMPLE:example brieskornSign; shows an example 93 99 " 94 100 { 95 poly f=var(1)^a+var(2)^b+var(3)^c;96 101 int i,j,k,d; 97 102 for(i=1;i<=a-1;i++) … … 109 114 example 110 115 { "EXAMPLE:"; echo = 2; 111 ring r=0,(x,y,z),dp;116 ring R=0,x,dp; 112 117 brieskornSign(11,3,5); 113 118 } … … 135 140 example 136 141 { "EXAMPLE:"; echo = 2; 137 ring r=0, (x,y,z),dp;142 ring r=0,x,dp; 138 143 signsin(11/3); 139 144 } … … 151 156 int z=int(number(a)); 152 157 int y=int(number(b)); 153 154 158 r=z mod y; 155 159 int q=(z-r) div y; … … 161 165 example 162 166 { "EXAMPLE:"; echo = 2; 163 ring r=0, (x,y,z),dp;167 ring r=0,x,dp; 164 168 split1(11/3); 165 169 } … … 171 175 " 172 176 { 177 def R=basering; 178 ring S=0,x,dp; 173 179 int i; 174 180 poly f; 175 181 int z; 176 poly g;177 182 for(i=1;i<=n;i=i+2) 178 { 179 g=(-1)^z*x^i/factorial(i,0) ; 180 f=f+g; 183 { 184 f=f+(-1)^z*x^i/factorial(i,0) ; 181 185 z++; 182 } 183 return(f); 184 } 185 example 186 { "EXAMPLE:"; echo = 2; 187 ring r=0,(x,y,z),dp; 186 } 187 setring R; 188 map phi=S,var(1); 189 poly f=phi(f); 190 return(f); 191 } 192 example 193 { "EXAMPLE:"; echo = 2; 194 ring r=0,x,dp; 188 195 sin(10); 189 196 } … … 195 202 " 196 203 { 197 poly f; 198 poly g; 199 int i; 200 int z; 201 for(i=0;i<=n;i=i+2) 202 { 203 g=(-1)^z*x^i/factorial(i,0); 204 f=f+g; 205 z++; 206 } 204 def R=basering; 205 ring S=0,x,dp; 206 poly f; 207 int i; 208 int z; 209 for(i=0;i<=n;i=i+2) 210 { 211 f=f+(-1)^z*x^i/factorial(i,0); 212 z++; 213 } 214 setring R; 215 map phi=S,var(1); 216 poly f=phi(f); 207 217 return(f); 208 218 } 209 219 example 210 220 { "EXAMPLE:"; echo = 2; 211 ring r=0, (x,y,z),dp;221 ring r=0,x,dp; 212 222 cos(10); 213 223 } … … 235 245 example 236 246 { "EXAMPLE:"; echo = 2; 237 ring r=0, (x,y,z),dp;247 ring r=0,x,dp; 238 248 signcos(11/3); 239 249 } … … 245 255 " 246 256 { 247 list l=split1(u);257 list l=split1(u); 248 258 int z; 249 if( l[1] mod 2==0 )250 251 else259 if( l[1] mod 2==0 ) 260 { z=signsin(l[2]); } 261 else 252 262 { z=signcos(l[1]);} 253 return(z); } 254 example 255 { "EXAMPLE:"; echo = 2; 256 ring r=0,(x,y,z),dp; 263 return(z); 264 } 265 example 266 { "EXAMPLE:"; echo = 2; 267 ring r=0,x,dp; 257 268 signa(11/3); 258 269 } 259 270 260 static proc prods( poly f)261 "USAGE:product( f);f=poly262 RETURN:product of first components of Newton pairs of f271 static proc prods(list L) 272 "USAGE:product(L);L=list of intvec 273 RETURN:product of first components of Newton pairs in L 263 274 EXAMPLE:example product; shows an example 264 275 " 265 276 { 266 list L=newtonpairs(f);267 277 int a=L[2][1]; 268 278 int i; … … 275 285 example 276 286 { "EXAMPLE:"; echo = 2; 277 ring r=0,(x,y,z),dp; 278 poly f=y4+2x3y2+x6+x5y; 279 prods(f); 280 } 281 282 static proc Generalcase(int N,poly f) 283 "USAGE:Generalcase(N,f);N=integer,f=poly 284 RETURN:signature of surface singularity f=0 287 list L=intvec(2,3),intvec(2,1); 288 prods(L); 289 } 290 291 static proc Generalcase(int N, list L) 292 "USAGE:Generalcase(N,f);N=integer,list L of intvec 293 RETURN:signature of surface singularity with Newton pairs in L 285 294 ASSUME:number of newton pairs greater than 2 286 295 EXAMPLE:example Generalcase; shows an example … … 288 297 { 289 298 int i,j,k,n,m,t,p; 290 list L=newtonpairs(f);291 299 int a=L[1][2]; 292 int b=prods( f);300 int b=prods(L); 293 301 int d=gcd(N,b); 294 302 int q=d*brieskornSign(a,L[1][1],N/d); … … 328 336 example 329 337 { "EXAMPLE:"; echo = 2; 330 ring r=0,(x,y,z),dp;331 338 int N=2; 332 poly f=x15-21x14+8x13y-6x13-16x12y+20x11y2-x12+8x11y-36x10y2+24x9y3+4x9y2-16x8y3+26x7y4-6x6y4+8x5y5+4x3y6-y8;333 Generalcase(N, f);334 335 } 336 337 static proc signtwopairs(int N, poly f)338 "USAGE:signtwopairs(N,f);N=integer, f=poly339 RETURN:signature of surface singularity f=0339 list L=intvec(2,3),intvec(2,1),intvec(2,1); 340 Generalcase(N,L); 341 342 } 343 344 static proc signtwopairs(int N,list L) 345 "USAGE:signtwopairs(N,f);N=integer,L=list of intvec 346 RETURN:signature of surface singularity with Newton pairs in L 340 347 ASSUME:number of newton pairs equal to 2 341 348 EXAMPLE:example signtwopairs; shows an example 342 349 " 343 350 { 344 list L=newtonpairs(f);345 351 int a1,a2,b,d1,q,t; 346 352 a1=L[1][2]; 347 b=prods( f);353 b=prods(L); 348 354 d1=gcd(N,b); 349 355 q=d1*brieskornSign(a1,L[1][1],N/d1); … … 354 360 example 355 361 { "EXAMPLE:"; echo = 2; 356 ring r=0,(x,y,z),dp;357 362 int N=2; 358 poly f=y4+2x3y2+x6+x5y; 359 signtwopairs(N,f); 360 } 361 363 list L=intvec(2,3),intvec(2,1); 364 signtwopairs(N,L); 365 } 366 367 static proc DedekindSum(number b, number c, int a) 368 { 369 number s,d,e; 370 int k; 371 for(k=1;k<=a-1;k++) 372 { 373 d=k*b mod a; 374 e=k*c mod a; 375 if(d*e!=0) 376 { 377 s=s+(d/a-1/2)*(e/a-1/2); 378 } 379 } 380 return(s); 381 } 382
Note: See TracChangeset
for help on using the changeset viewer.