Changeset 50cbdc in git
- Timestamp:
- Aug 27, 2001, 4:48:02 PM (22 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 2567b5a6cb7109be5a83e53eb94abb1c38fb9945
- Parents:
- 3de58c9ca0aeaafdf5cb29f986967bffa405b542
- Location:
- Singular
- Files:
-
- 2 added
- 109 edited
- 15 moved
Legend:
- Unmodified
- Added
- Removed
-
Singular/GMPrat.cc
r3de58c r50cbdc 21 21 22 22 #include <stdlib.h> 23 #include <float.h>24 23 #include <math.h> 25 24 #include <ctype.h> … … 62 61 } 63 62 64 Rational::Rational( long int a )65 {66 p = new rep;67 mpq_init( p->rat );68 mpq_set_si( p->rat,a,1 );69 }70 71 Rational::Rational( unsigned long int a )72 {73 p = new rep;74 mpq_init( p->rat );75 mpq_set_ui( p->rat,a,1 );76 }77 78 63 Rational::Rational( int a ) 79 64 { … … 83 68 } 84 69 85 Rational::Rational( unsigned int a )86 {87 p = new rep;88 mpq_init( p->rat );89 mpq_set_ui( p->rat,(unsigned long)a,1 );90 }91 92 70 Rational::Rational( const Rational& a ) 93 71 { … … 96 74 } 97 75 98 Rational::Rational( double a )99 {100 mpz_t h1,h2;101 int i=0;102 double aa=a;103 104 p = new rep;105 mpq_init( p->rat );106 mpz_init_set_ui( h1,1 );107 108 while( fabs( 10.0*aa ) < DBL_MAX && i<DBL_DIG )109 {110 aa *= 10.;111 mpz_mul_ui( h1,h1,10 );112 i++;113 }114 mpz_init_set_d( h2,aa );115 mpq_set_num( p->rat,h2 );116 mpq_set_den( p->rat,h1 );117 mpq_canonicalize( p->rat );118 mpz_clear( h1 );119 mpz_clear( h2 );120 }121 122 Rational::Rational(float a)123 {124 mpz_t h1,h2;125 int i=0;126 double aa=a;127 128 p=new rep;129 mpq_init(p->rat);130 mpz_init_set_ui(h1,1);131 while(fabs(10.*aa) < FLT_MAX && i<FLT_DIG){132 aa*=10.;133 mpz_mul_ui(h1,h1,10);134 i++;135 }136 mpz_init_set_d(h2,aa);137 mpq_set_num(p->rat,h2);138 mpq_set_den(p->rat,h1);139 mpq_canonicalize(p->rat);140 mpz_clear(h1);141 mpz_clear(h2);142 }143 144 // ----------------------------------------------------------------------------145 // Create a Rational from a string like "+1234.5678e-1234"146 // ----------------------------------------------------------------------------147 148 Rational::Rational( char *s )149 {150 mpz_t h1;151 int exp=0,i=0;152 char *s1,*s2,*ss;153 154 ss = new char[strlen(s)+1];155 strcpy( ss,s );156 s1 = ss;157 p = new rep;158 mpq_init( p->rat );159 if( isdigit(s1[0]) || s1[0]=='-' || s1[0]=='+' )160 {161 if (s1[0]=='+') ++s1;162 if (s1[0]=='-') ++i;163 164 while( isdigit( s1[i] ) )165 {166 ++i;167 }168 if (s1[i]=='.')169 {170 ++i;171 while( isdigit( s1[i] ) )172 {173 s1[i-1]=s1[i];174 ++i;175 --exp;176 }177 s1[i-1]='\0';178 }179 if (s1[i]=='e' || s1[i]=='E')180 {181 s2=s1+i+1;182 }183 else184 s2="";185 186 s1[i]='\0';187 i=exp+atoi(s2);188 mpz_init_set_str(h1,s1,10);189 delete[] ss;190 mpq_set_z(p->rat,h1);191 mpq_set_ui(save.p->rat,10,1);192 if (i>0)193 {194 for(int j=0;j<i;j++)195 mpq_mul(p->rat,p->rat,save.p->rat);196 }197 else if (i<0)198 {199 for(int j=0;j>i;j--)200 mpq_div(p->rat,p->rat,save.p->rat);201 }202 mpq_canonicalize(p->rat);203 mpz_clear(h1);204 }205 }206 207 76 // ---------------------------------------------------------------------------- 208 77 // Constructors with two arguments: numerator and denominator 209 78 // ---------------------------------------------------------------------------- 210 211 Rational::Rational(long int a, unsigned long int b)212 {213 p = new rep;214 mpq_init( p->rat );215 mpq_set_si( p->rat,a,b );216 mpq_canonicalize( p->rat );217 }218 219 Rational::Rational(unsigned long int a, unsigned long int b)220 {221 p=new rep;222 mpq_init(p->rat);223 mpq_set_ui(p->rat,a,b);224 mpq_canonicalize(p->rat);225 }226 227 Rational::Rational(int a, unsigned int b)228 {229 p=new rep;230 mpq_init(p->rat);231 mpq_set_si(p->rat,(long int) a,(unsigned long int) b);232 mpq_canonicalize(p->rat);233 }234 235 Rational::Rational(unsigned int a, unsigned int b)236 {237 p=new rep;238 mpq_init(p->rat);239 mpq_set_ui(p->rat,(unsigned long) a,(unsigned long int) b);240 mpq_canonicalize(p->rat);241 }242 79 243 80 Rational::Rational(const Rational& a, const Rational& b) … … 246 83 mpq_init(p->rat); 247 84 mpq_div(p->rat, a.p->rat, b.p->rat); 248 }249 250 Rational::Rational(long int a, long int b)251 {252 if (b<0) a=-a;253 p=new rep;254 mpq_init(p->rat);255 mpq_set_si(p->rat,a,abs(b));256 mpq_canonicalize(p->rat);257 85 } 258 86 … … 266 94 } 267 95 268 Rational::Rational(char *sn, char *sd)269 {270 Rational271 h=sd;272 273 p=new rep;274 mpq_init(p->rat);275 *this=sn;276 mpq_div(p->rat,p->rat,h.p->rat);277 }278 279 96 // ---------------------------------------------------------------------------- 280 97 // Destructor … … 292 109 // Assignment operators 293 110 // ---------------------------------------------------------------------------- 111 294 112 Rational& Rational::operator=(int a) 295 113 { 296 114 disconnect(); 297 115 mpq_set_si(p->rat,(long int) a,1); 298 return *this;299 }300 301 Rational& Rational::operator=(double a)302 {303 mpz_t304 h1,305 h2;306 int307 i=0;308 double309 aa=a;310 311 disconnect();312 mpz_init_set_ui(h1,1);313 while(fabs(10.*aa) < DBL_MAX && i<DBL_DIG){314 aa*=10.;315 mpz_mul_ui(h1,h1,10);316 i++;317 }318 mpz_init_set_d(h2,aa);319 mpq_set_num(p->rat,h2);320 mpq_set_den(p->rat,h1);321 mpq_canonicalize(p->rat);322 mpz_clear(h1);323 mpz_clear(h2);324 return *this;325 }326 327 Rational& Rational::operator=(float a)328 {329 mpz_t330 h1,331 h2;332 int333 i=0;334 double335 aa=a;336 337 disconnect();338 mpz_init_set_ui(h1,1);339 while(fabs(10.*aa) < FLT_MAX && i<FLT_DIG){340 aa*=10.;341 mpz_mul_ui(h1,h1,10);342 i++;343 }344 mpz_init_set_d(h2,aa);345 mpq_set_num(p->rat,h2);346 mpq_set_den(p->rat,h1);347 mpq_canonicalize(p->rat);348 mpz_clear(h1);349 mpz_clear(h2);350 return *this;351 }352 353 Rational& Rational::operator=(char *s)354 {355 mpz_t356 h1;357 int358 exp=0,359 i=0;360 char361 *s1=s,362 *s2,363 *ss;364 365 ss=new char[strlen(s)+1];366 strcpy(ss,s);367 s1=ss;368 disconnect();369 if (isdigit(s1[0]) || s1[0]=='-' || s1[0]=='+'){370 if (s1[0]=='+') ++s1;371 if (s1[0]=='-') ++i;372 while(isdigit(s1[i]))373 ++i;374 if (s1[i]=='.'){375 ++i;376 while(isdigit(s1[i])){377 s1[i-1]=s1[i];378 ++i;379 --exp;380 }381 s1[i-1]='\0';382 }383 if (s1[i]=='e' || s1[i]=='E'){384 s2=s1+i+1;385 }386 else387 s2="";388 s1[i]='\0';389 i=exp+atoi(s2);390 mpz_init_set_str(h1,s1,10);391 delete[] ss;392 mpq_set_z(p->rat,h1);393 mpq_set_ui(save.p->rat,10,1);394 if (i>0){395 for(int j=0;j<i;j++)396 mpq_mul(p->rat,p->rat,save.p->rat);397 }398 else if (i<0){399 for(int j=0;j>i;j--)400 mpq_div(p->rat,p->rat,save.p->rat);401 }402 mpq_canonicalize(p->rat);403 mpz_clear(h1);404 }405 else406 mpq_set_ui(p->rat,0,1);407 116 return *this; 408 117 } … … 455 164 // ---------------------------------------------------------------------------- 456 165 457 Rational::operator bool() 458 { 459 if (mpq_sgn(p->rat)) return true; 460 return false; 461 } 462 463 Rational::operator long int() 166 Rational::operator int() 464 167 { 465 168 mpz_t … … 474 177 475 178 return ret_val; 476 }477 478 Rational::operator unsigned long int()479 {480 mpz_t481 h;482 unsigned long int483 ret_val;484 485 mpz_init(h);486 mpz_tdiv_q(h,mpq_numref(p->rat),mpq_denref(p->rat));487 ret_val=mpz_get_ui(h);488 mpz_clear(h);489 return ret_val;490 }491 492 Rational::operator int()493 {494 mpz_t495 h;496 long int497 ret_val;498 499 mpz_init(h);500 mpz_tdiv_q(h,mpq_numref(p->rat),mpq_denref(p->rat));501 ret_val=mpz_get_si(h);502 mpz_clear(h);503 504 return ret_val;505 }506 507 Rational::operator unsigned int()508 {509 mpz_t510 h;511 unsigned long int512 ret_val;513 514 mpz_init(h);515 mpz_tdiv_q(h,mpq_numref(p->rat),mpq_denref(p->rat));516 ret_val=mpz_get_ui(h);517 mpz_clear(h);518 return ret_val;519 }520 521 Rational::operator short int()522 {523 mpz_t524 h;525 short int526 ret_val;527 528 mpz_init(h);529 mpz_tdiv_q(h,mpq_numref(p->rat),mpq_denref(p->rat));530 ret_val=mpz_get_si(h);531 mpz_clear(h);532 return ret_val;533 }534 535 Rational::operator unsigned short int()536 {537 mpz_t538 h;539 unsigned short int540 ret_val;541 542 mpz_init(h);543 mpz_tdiv_q(h,mpq_numref(p->rat),mpq_denref(p->rat));544 ret_val=mpz_get_ui(h);545 mpz_clear(h);546 return ret_val;547 }548 549 Rational::operator char()550 {551 mpz_t552 h;553 char554 ret_val;555 556 mpz_init(h);557 mpz_tdiv_q(h,mpq_numref(p->rat),mpq_denref(p->rat));558 ret_val=mpz_get_si(h);559 mpz_clear(h);560 return ret_val;561 }562 563 Rational::operator unsigned char()564 {565 mpz_t566 h;567 unsigned char568 ret_val;569 570 mpz_init(h);571 mpz_tdiv_q(h,mpq_numref(p->rat),mpq_denref(p->rat));572 ret_val=mpz_get_ui(h);573 mpz_clear(h);574 return ret_val;575 }576 577 Rational::operator double()578 {579 return mpq_get_d(p->rat);580 }581 582 Rational::operator float()583 {584 return mpq_get_d(p->rat);585 179 } 586 180 -
Singular/GMPrat.h
r3de58c r50cbdc 29 29 30 30 Rational( ); 31 Rational( long int );32 Rational( unsigned long int );33 31 Rational( int ); 34 Rational( unsigned int );35 Rational( double );36 Rational( float );37 Rational( char* );38 32 Rational( const Rational& ); 39 Rational( long int,unsigned long int );40 Rational( unsigned long int,unsigned long int );41 Rational( int, unsigned int );42 Rational( unsigned int,unsigned int );43 33 Rational( const Rational&,const Rational& ); 44 Rational( long int,long int );45 34 Rational( int,int ); 46 Rational( char*,char* );47 35 ~Rational( ); 48 36 49 37 Rational& operator = ( int ); 50 Rational& operator = ( double );51 Rational& operator = ( float );52 38 Rational& operator = ( char *s ); 53 39 Rational& operator = ( const Rational& ); … … 58 44 int get_num_si( ); 59 45 int get_den_si( ); 60 operator bool( );61 operator long int( );62 operator unsigned long int( );63 46 operator int( ); 64 operator unsigned int( );65 operator short int( );66 operator unsigned short int( );67 operator char( );68 operator unsigned char( );69 operator double( );70 operator float( );71 47 72 48 Rational operator - ( ); -
Singular/LIB/all.lib
r3de58c r50cbdc 1 // $Id: all.lib,v 1.3 6 2001-05-17 14:36:29Singular Exp $1 // $Id: all.lib,v 1.37 2001-08-27 14:47:46 Singular Exp $ 2 2 /////////////////////////////////////////////////////////////////////////////// 3 version="$Id: all.lib,v 1.3 6 2001-05-17 14:36:29Singular Exp $";3 version="$Id: all.lib,v 1.37 2001-08-27 14:47:46 Singular Exp $"; 4 4 category = "General purpose"; 5 5 info=" -
Singular/LIB/brnoeth.lib
r3de58c r50cbdc 1 version="$Id: brnoeth.lib,v 1.11 2001-02-09 13:11:35 lossen Exp $"; 1 version="$Id: brnoeth.lib,v 1.12 2001-08-27 14:47:46 Singular Exp $"; 2 category="Miscellaneous"; 2 3 info=" 3 4 LIBRARY: brnoeth.lib Brill-Noether Algorithm, Weierstrass-SG and AG-codes … … 1981 1982 In the intvec L[4] (conductor) the i-th entry corresponds to the 1982 1983 i-th entry in the list of places L[3]. 1983 1984 1984 1985 With no optional arguments, the conductor is computed by 1985 1986 local invariants of the singularities; otherwise it is computed … … 1989 1990 of the places above P in the list of closed places L[3]. @* 1990 1991 If the point is at infinity, P[1] is a homogeneous irreducible 1991 polynomial in two variables. 1992 1993 If @code{printlevel>=0} additional comments are displayed (default: 1994 @code{printlevel=0}). 1992 polynomial in two variables. 1993 1994 If @code{printlevel>=0} additional comments are displayed (default: 1995 @code{printlevel=0}). 1995 1996 KEYWORDS: Hamburger-Noether expansions; adjunction divisor 1996 1997 SEE ALSO: closed_points, NSplaces … … 2126 2127 Aff_SLocus; // ideal of the affine singular locus 2127 2128 Aff_SPoints[1]; // 1st affine singular point: (1:1:1), no.1 2128 Inf_Points[1]; // singular point(s) at infinity: (1:0:0), no.4 2129 Inf_Points[1]; // singular point(s) at infinity: (1:0:0), no.4 2129 2130 Inf_Points[2]; // list of non-singular points at infinity 2130 2131 // … … 2139 2140 // 2140 2141 pause("press RETURN"); 2141 // we look at the place(s) of degree 2 by changing to the ring 2142 // we look at the place(s) of degree 2 by changing to the ring 2142 2143 C[5][2][1]; 2143 def S(2)=C[5][2][1]; 2144 def S(2)=C[5][2][1]; 2144 2145 setring S(2); 2145 2146 POINTS; // base point(s) of place(s) of degree 2: (1:a:1) … … 2164 2165 See @ref{Adj_div} for a description of the entries in L. 2165 2166 NOTE: The list_expression should be the output of the procedure Adj_div.@* 2166 If @code{printlevel>=0} additional comments are displayed (default: 2167 @code{printlevel=0}). 2167 If @code{printlevel>=0} additional comments are displayed (default: 2168 @code{printlevel=0}). 2168 2169 SEE ALSO: closed_points, Adj_div 2169 2170 EXAMPLE: example NSplaces; shows an example … … 3369 3370 list C=Adj_div(x3y+y3+x); 3370 3371 C=NSplaces(3,C); 3371 // the first 3 Places in C[3] are of degree 1. 3372 // the first 3 Places in C[3] are of degree 1. 3372 3373 // we define the rational divisor G = 4*C[3][1]+4*C[3][3] (of degree 8): 3373 3374 intvec G=4,0,4; … … 3401 3402 // programm 3402 3403 poly auxp=gcd(F[1],F[2]); 3403 return(ideal(division( auxp,F)[1]));3404 return(ideal(division(F,auxp)[1])); 3404 3405 } 3405 3406 /////////////////////////////////////////////////////////////////////////////// … … 3522 3523 NOTE: The procedure must be called from the ring CURVE[1][2], 3523 3524 where CURVE is the output of the procedure @code{NSplaces}. 3524 @* i represents the place CURVE[3][i]. 3525 @* i represents the place CURVE[3][i]. 3525 3526 @* Rational functions are represented by numerator/denominator 3526 3527 in form of ideals with two homogeneous generators. … … 3915 3916 def ER=HC[1][4]; 3916 3917 setring ER; 3917 intvec G=5; // the rational divisor G = 5*HC[3][1] 3918 intvec G=5; // the rational divisor G = 5*HC[3][1] 3918 3919 intvec D=2..9; // D = sum of the rational places no. 2..9 over F_4 3919 3920 // let us construct the corresponding evaluation AG code : … … 3962 3963 def ER=HC[1][4]; 3963 3964 setring ER; 3964 intvec G=5; // the rational divisor G = 5*HC[3][1] 3965 intvec G=5; // the rational divisor G = 5*HC[3][1] 3965 3966 intvec D=2..9; // D = sum of the rational places no. 2..9 over F_4 3966 3967 // let us construct the corresponding residual AG code : … … 4366 4367 def ER=HC[1][4]; 4367 4368 setring ER; 4368 intvec G=5; // the rational divisor G = 5*HC[3][1] 4369 intvec G=5; // the rational divisor G = 5*HC[3][1] 4369 4370 intvec D=2..9; // D = sum of the rational places no. 2..9 over F_4 4370 4371 // construct the corresp. residual AG code of type [8,3,>=5] over F_4: 4371 4372 matrix C=AGcode_Omega(G,D,HC); 4372 // we can correct 1 error and the genus is 1, thus F must have degree 2 4373 // we can correct 1 error and the genus is 1, thus F must have degree 2 4373 4374 // and support disjoint from that of D; 4374 4375 intvec F=2; … … 4516 4517 def ER=HC[1][4]; 4517 4518 setring ER; 4518 intvec G=5; // the rational divisor G = 5*HC[3][1] 4519 intvec G=5; // the rational divisor G = 5*HC[3][1] 4519 4520 intvec D=2..9; // D = sum of the rational places no. 2..9 over F_4 4520 4521 // construct the corresp. residual AG code of type [8,3,>=5] over F_4: -
Singular/LIB/classify.lib
r3de58c r50cbdc 1 1 // KK,GMG last modified: 17.12.00 2 2 /////////////////////////////////////////////////////////////////////////////// 3 version = "$Id: classify.lib,v 1.4 8 2001-02-06 11:26:15 anneExp $";3 version = "$Id: classify.lib,v 1.49 2001-08-27 14:47:48 Singular Exp $"; 4 4 category="Singularities"; 5 5 info=" … … 57 57 "USAGE: classify(f); f=poly 58 58 COMPUTE: normal form and singularity type of f with respect to right 59 equivalence, as given in the book \"Singularities of differentiable 59 equivalence, as given in the book \"Singularities of differentiable 60 60 maps, Volume I\" by V.I. Arnold, S.M. Gusein-Zade, A.N. Varchenko 61 61 RETURN: normal form of f, of type poly 62 62 REMARK: This version of classify is only beta. Please send bugs and 63 63 comments to: \"Kai Krueger\" <krueger@mathematik.uni-kl.de> @* 64 Be sure to have at least Singular version 1.0.1. Updates can be 64 Be sure to have at least Singular version 1.0.1. Updates can be 65 65 found at: @* 66 66 URL=http://www.mathematik.uni-kl.de/~krueger/Singular/ -
Singular/LIB/equising.lib
r3de58c r50cbdc 1 version="$Id: equising.lib,v 1. 7 2001-02-05 12:01:37 lossenExp $";1 version="$Id: equising.lib,v 1.8 2001-08-27 14:47:49 Singular Exp $"; 2 2 category="Singularities"; 3 3 info=" … … 767 767 printlevel > 0 displays comments and pauses after intermediate 768 768 computations (default: printlevel=0) @* 769 This procedure uses @code{execute} or calls a procedure using 769 This procedure uses @code{execute} or calls a procedure using 770 770 @code{execute}. 771 771 EXAMPLE: example esStratum; shows an example … … 1168 1168 on the deformation parameters. 1169 1169 RETURN: list l of two integers, where 1170 @format 1170 @format 1171 1171 l[1]=1 if F is an equisingular deformation, l[1]=0 otherwise. 1172 1172 l[2]=1 if some error has occured, l[2]=0 otherwise. 1173 1173 @end format 1174 1174 NOTE: If m is given, the computation stops after m steps of the iteration. @* 1175 This procedure uses @code{execute} or calls a procedure using 1175 This procedure uses @code{execute} or calls a procedure using 1176 1176 @code{execute}. 1177 1177 EXAMPLE: example isEquising; shows an example -
Singular/LIB/general.lib
r3de58c r50cbdc 2 2 //anne, added deleteSublist and watchdog 12.12.2000 3 3 /////////////////////////////////////////////////////////////////////////////// 4 version="$Id: general.lib,v 1. 39 2001-03-26 14:05:30 Singular Exp $";4 version="$Id: general.lib,v 1.40 2001-08-27 14:47:50 Singular Exp $"; 5 5 category="General purpose"; 6 6 info=" … … 1161 1161 ERROR("First argument of watchdog has to be a positive integer."); 1162 1162 } 1163 } 1164 else 1165 { 1163 1166 ERROR("MP-support is not enabled in this version of Singular."); 1164 1167 } -
Singular/LIB/hnoether.lib
r3de58c r50cbdc 3 3 // This library is for Singular 1-3-7 or newer 4 4 5 version="$Id: hnoether.lib,v 1. 29 2001-02-05 13:27:00Singular Exp $";5 version="$Id: hnoether.lib,v 1.30 2001-08-27 14:47:51 Singular Exp $"; 6 6 category="Singularities"; 7 7 info=" … … 50 50 proc further_hn_proc() 51 51 "USAGE: further_hn_proc(); 52 NOTE: The library @code{hnoether.lib} contains some more procedures which 53 are not shown when typing @code{help hnoether.lib;}. They may be useful 52 NOTE: The library @code{hnoether.lib} contains some more procedures which 53 are not shown when typing @code{help hnoether.lib;}. They may be useful 54 54 for interactive use (e.g. if you want to do the calculation of an HN 55 development \"by hand\" to see the intermediate results), and they 55 development \"by hand\" to see the intermediate results), and they 56 56 can be enumerated by calling @code{further_hn_proc()}. @* 57 Use @code{help <procedure>;} for detailed information about each of 57 Use @code{help <procedure>;} for detailed information about each of 58 58 them. 59 59 " … … 78 78 referencepoly(D); a polynomial f s.t. D is the Newton diagram of f"; 79 79 80 // extrafactor(f,M,N); try to factor charPoly(f,M,N) where 'factorize' cannot81 // (will hopefully become obsolete soon)82 //83 80 // static procedures not useful for interactive use: 84 81 // polytest(f); tests coefficients and exponents of poly f … … 261 258 ASSUME: f is a bivariate polynomial (in the first 2 ring variables). 262 259 RETURN: poly, a squarefree divisor of f. 263 NOTE: Usually, the return value is the greatest squarefree divisor, but 264 there is one exception: factors with a p-th root, p the 260 NOTE: Usually, the return value is the greatest squarefree divisor, but 261 there is one exception: factors with a p-th root, p the 265 262 characteristic of the basering, are lost. 266 263 SEE ALSO: allsquarefree … … 412 409 proc is_irred (poly f) 413 410 "USAGE: is_irred(f); f poly 414 ASSUME: f is a squarefree bivariate polynomial (in the first 2 ring 411 ASSUME: f is a squarefree bivariate polynomial (in the first 2 ring 415 412 variables). 416 RETURN: int (0 or 1): @* 417 - @code{is_irred(f)=1} if f is irreducible as a formal power 418 series over the algebraic closure of its coefficient field (f 413 RETURN: int (0 or 1): @* 414 - @code{is_irred(f)=1} if f is irreducible as a formal power 415 series over the algebraic closure of its coefficient field (f 419 416 defines an analytically irreducible curve at zero), @* 420 417 - @code{is_irred(f)=0} otherwise. 421 NOTE: 0 and units in the ring of formal power series are considered to be 418 NOTE: 0 and units in the ring of formal power series are considered to be 422 419 not irreducible. 423 420 KEYWORDS: irreducible power series … … 467 464 proc develop 468 465 "USAGE: develop(f [,n]); f poly, n int 469 ASSUME: f is a bivariate polynomial (in the first 2 ring variables) and 466 ASSUME: f is a bivariate polynomial (in the first 2 ring variables) and 470 467 irreducible as power series (for reducible f use @code{reddevelop}). 471 468 RETURN: list @code{L} with: … … 476 473 Hamburger-Noether expansion (HNE). The end of the line is marked in 477 474 the matrix by the first ring variable (usually x). 478 @item @code{L[2]}; intvec: 475 @item @code{L[2]}; intvec: 479 476 indicating the length of lines of the HNE 480 477 @item @code{L[3]}; int: 481 478 0 if the 1st ring variable was transversal (with respect to f), @* 482 1 if the variables were changed at the beginning of the 479 1 if the variables were changed at the beginning of the 483 480 computation, @* 484 -1 if an error has occurred. 485 @item @code{L[4]}; poly: 486 the transformed polynomial of f to make it possible to extend the 481 -1 if an error has occurred. 482 @item @code{L[4]}; poly: 483 the transformed polynomial of f to make it possible to extend the 487 484 Hamburger-Noether development a posteriori without having to do 488 485 all the previous calculation once again (0 if not needed) 489 486 @item @code{L[5]}; int: 490 487 1 if the curve has exactly one branch (i.e., is irreducible), @* 491 0 else (i.e., the curve has more than one HNE, or f is not valid). 488 0 else (i.e., the curve has more than one HNE, or f is not valid). 492 489 @end table 493 490 @end texinfo … … 496 493 the LAST line of the HNE. If it is given, the HN-matrix @code{L[1]} 497 494 will have at least @code{n} columns. @* 498 Otherwise, the number of columns will be chosen minimal such that the 499 matrix contains all necessary information (i.e., all lines of the HNE 495 Otherwise, the number of columns will be chosen minimal such that the 496 matrix contains all necessary information (i.e., all lines of the HNE 500 497 but the last (which is in general infinite) have place). @* 501 If @code{n} is negative, the algorithm is stopped as soon as the 502 computed information is sufficient for @code{invariants(L)}, but the 503 HN-matrix @code{L[1]} may still contain undetermined elements, which 498 If @code{n} is negative, the algorithm is stopped as soon as the 499 computed information is sufficient for @code{invariants(L)}, but the 500 HN-matrix @code{L[1]} may still contain undetermined elements, which 504 501 are marked with the 2nd variable (of the basering). @* 505 502 For time critical computations it is recommended to use 506 503 @code{ring ...,(x,y),ls} as basering - it increases the algorithm's 507 504 speed. @* 508 If @code{printlevel>=0} comments are displayed (default is 509 @code{printlevel=0}). 505 If @code{printlevel>=0} comments are displayed (default is 506 @code{printlevel=0}). 510 507 SEE ALSO: reddevelop, extdevelop, displayHNE 511 508 EXAMPLES: example develop; shows an example … … 908 905 proc param 909 906 "USAGE: param(L [,x]); L list, x any type (optional) 910 ASSUME: L is the output of @code{develop(f)}, or of 911 @code{extdevelop(develop(f),n)}, or one entry of the output of 907 ASSUME: L is the output of @code{develop(f)}, or of 908 @code{extdevelop(develop(f),n)}, or one entry of the output of 912 909 @code{reddevelop(f)}. 913 910 RETURN: a parametrization for f in the following format: @* 914 - if only the list L is given, the result is an ideal of two 911 - if only the list L is given, the result is an ideal of two 915 912 polynomials p[1],p[2]: if the HNE was finite then f(p[1],p[2])=0}; 916 if not, the \"real\" parametrization will be two power series and 917 p[1],p[2] are truncations of these series.@* 913 if not, the \"real\" parametrization will be two power series and 914 p[1],p[2] are truncations of these series.@* 918 915 - if the optional parameter x is given, the result is a list l: 919 l[1]=param(L) (ideal) and l[2]=intvec with two entries indicating 920 the highest degree up to which the coefficients of the monomials in 916 l[1]=param(L) (ideal) and l[2]=intvec with two entries indicating 917 the highest degree up to which the coefficients of the monomials in 921 918 l[1] are exact (entry -1 means that the corresponding parametrization 922 919 is exact). 923 NOTE: If the basering has only 2 variables, the first variable is chosen 924 as indefinite. Otherwise, the 3rd variable is chosen. 920 NOTE: If the basering has only 2 variables, the first variable is chosen 921 as indefinite. Otherwise, the 3rd variable is chosen. 925 922 SEE ALSO: develop, extdevelop 926 923 KEYWORDS: parametrization … … 1049 1046 proc invariants 1050 1047 "USAGE: invariants(L); L list 1051 ASSUME: L is the output of @code{develop(f)}, or of 1052 @code{extdevelop(develop(f),n)}, or one entry of the output of 1048 ASSUME: L is the output of @code{develop(f)}, or of 1049 @code{extdevelop(develop(f),n)}, or one entry of the output of 1053 1050 @code{reddevelop(f)}. 1054 1051 RETURN: list, if L contains a valid HNE: … … 1153 1150 proc displayInvariants 1154 1151 "USAGE: displayInvariants(L); L list 1155 ASSUME: L is the output of @code{develop(f)}, or of 1156 @code{extdevelop(develop(f),n)}, or (one entry of) the output of 1152 ASSUME: L is the output of @code{develop(f)}, or of 1153 @code{extdevelop(develop(f),n)}, or (one entry of) the output of 1157 1154 @code{reddevelop(f)}. 1158 1155 RETURN: none … … 1240 1237 proc multiplicities 1241 1238 "USAGE: multiplicities(L); L list 1242 ASSUME: L is the output of @code{develop(f)}, or of 1243 @code{extdevelop(develop(f),n)}, or one entry of the output of 1244 @code{reddevelop(f)}. 1239 ASSUME: L is the output of @code{develop(f)}, or of 1240 @code{extdevelop(develop(f),n)}, or one entry of the output of 1241 @code{reddevelop(f)}. 1245 1242 RETURN: intvec of the different multiplicities that occur when successively 1246 1243 blowing-up the curve singularity corresponding to f. … … 1284 1281 1285 1282 proc puiseux2generators (intvec m, intvec n) 1286 "USAGE: puiseux2generators(m,n); m,n intvec 1283 "USAGE: puiseux2generators(m,n); m,n intvec 1287 1284 ASSUME: m, resp. n, represent the 1st, resp. 2nd, components of Puiseux pairs 1288 (e.g., @code{m=invariants(L)[3]}, @code{n=invariants(L)[4]}). 1285 (e.g., @code{m=invariants(L)[3]}, @code{n=invariants(L)[4]}). 1289 1286 RETURN: intvec of the generators of the semigroup of values. 1290 1287 SEE ALSO: invariants … … 1315 1312 proc intersection (list hn1, list hn2) 1316 1313 "USAGE: intersection(hne1,hne2); hne1, hne2 lists 1317 ASSUME: hne1, hne2 represent a HNE (i.e., are the output of 1318 @code{develop(f)}, or of @code{extdevelop(develop(f),n)}, or 1314 ASSUME: hne1, hne2 represent a HNE (i.e., are the output of 1315 @code{develop(f)}, or of @code{extdevelop(develop(f),n)}, or 1319 1316 one entry of the output of @code{reddevelop(f)}). 1320 1317 RETURN: int, the intersection multiplicity of the branches corresponding to … … 1424 1421 list hne=reddevelop((x2-y3)*(x2+y3)); 1425 1422 intersection(hne[1],hne[2]); 1426 kill HNEring,r; 1423 kill HNEring,r; 1427 1424 printlevel=plevel; echo = 0; 1428 1425 // --- restore HNEring if previously defined --- … … 1437 1434 proc multsequence 1438 1435 "USAGE: multsequence(L); L list 1439 ASSUME: L is the output of @code{develop(f)}, or of 1440 @code{extdevelop(develop(f),n)}, or one entry of the output of 1436 ASSUME: L is the output of @code{develop(f)}, or of 1437 @code{extdevelop(develop(f),n)}, or one entry of the output of 1441 1438 @code{reddevelop(f)}. 1442 RETURN: intvec corresponding to the multiplicity sequence of (a branch) 1439 RETURN: intvec corresponding to the multiplicity sequence of (a branch) 1443 1440 of the curve (the same as @code{invariants(L)[6]}). 1444 1441 ASSUME: L is the output of @code{reddevelop(f)}. … … 1447 1444 @table @asis 1448 1445 @item @code{multsequence(L)[1][i,*]} 1449 contains the multiplicities of the branches at their infinitely near point 1450 of 0 in its (i-1) order neighbourhood (i.e., i=1: multiplicity of the 1451 branches themselves, i=2: multiplicity of their 1st quadratic transformed, 1446 contains the multiplicities of the branches at their infinitely near point 1447 of 0 in its (i-1) order neighbourhood (i.e., i=1: multiplicity of the 1448 branches themselves, i=2: multiplicity of their 1st quadratic transformed, 1452 1449 etc., @* 1453 Hence, @code{multsequence(L)[1][*,j]} is the multiplicity sequence 1450 Hence, @code{multsequence(L)[1][*,j]} is the multiplicity sequence 1454 1451 of branch j. 1455 @item @code{multsequence(L)[2][i,*]}: 1452 @item @code{multsequence(L)[2][i,*]}: 1456 1453 contains the information which of these infinitely near points coincide. 1457 1454 @end table 1458 1455 @end texinfo 1459 NOTE: The order of elements of the list obtained from @code{reddevelop(f)} 1456 NOTE: The order of elements of the list obtained from @code{reddevelop(f)} 1460 1457 must not be changed (because then the coincident infinitely near points 1461 1458 couldn't be grouped together, cf. meaning of 2nd intmat in example). … … 1542 1539 } 1543 1540 // ------ the example starts here ------- 1544 "EXAMPLE:"; echo = 2; 1541 "EXAMPLE:"; echo = 2; 1545 1542 int plevel=printlevel; printlevel=-1; 1546 1543 ring r=0,(x,y),dp; … … 1565 1562 proc displayMultsequence 1566 1563 "USAGE: displayMultsequence(L); 1567 ASSUME: L is the output of @code{develop(f)}, or of 1568 @code{extdevelop(develop(f),n)}, or (one entry of) the output of 1564 ASSUME: L is the output of @code{develop(f)}, or of 1565 @code{extdevelop(develop(f),n)}, or (one entry of) the output of 1569 1566 @code{reddevelop(f)}. 1570 1567 RETURN: nothing 1571 1568 DISPLAY: the sequence of multiplicities: 1572 1569 @format 1573 - if @code{L=develop(f)} or @code{L=reddevelop(f)[i]}: 1574 @code{a , b , c , ....... , 1} 1575 - if @code{L=reddevelop(f)}: 1570 - if @code{L=develop(f)} or @code{L=reddevelop(f)[i]}: 1571 @code{a , b , c , ....... , 1} 1572 - if @code{L=reddevelop(f)}: 1576 1573 @code{[(a_1, .... , b_1 , .... , c_1)],} 1577 1574 @code{[(a_2, ... ), ... , (... , c_2)],} 1578 1575 @code{ ........................................ ,} 1579 1576 @code{[(a_n),(b_n), ....., (c_n)]} 1580 with: 1577 with: 1581 1578 @code{a_1 , ... , a_n} the sequence of multiplicities of the 1st branch, 1582 1579 @code{[...]} the multiplicities of the j-th transformed of all branches, … … 1637 1634 displayMultsequence(hne); 1638 1635 kill HNEring,r; 1639 printlevel=plevel; 1636 printlevel=plevel; 1640 1637 echo = 0; 1641 1638 // --- restore HNEring if previously defined --- … … 1650 1647 proc separateHNE (list hn1,list hn2) 1651 1648 "USAGE: separateHNE(hne1,hne2); hne1, hne2 lists 1652 ASSUME: hne1, hne2 are HNEs (=output of 1653 @code{develop(f)}, @code{extdevelop(develop(f),n)}, or 1649 ASSUME: hne1, hne2 are HNEs (=output of 1650 @code{develop(f)}, @code{extdevelop(develop(f),n)}, or 1654 1651 one entry of the output of @code{reddevelop(f)}). 1655 RETURN: number of quadratic transformations needed to separate both curves 1652 RETURN: number of quadratic transformations needed to separate both curves 1656 1653 (branches). 1657 1654 SEE ALSO: develop, reddevelop, multsequence, displayMultsequence … … 1751 1748 proc displayHNE(list ldev,list #) 1752 1749 "USAGE: displayHNE(L[,n]); L list, n int 1753 ASSUME: L has the format of the output of @code{develop(f)}, resp. of 1750 ASSUME: L has the format of the output of @code{develop(f)}, resp. of 1754 1751 @code{reddevelop(f)}. 1755 1752 RETURN: - if only one argument is given, no return value, but … … 1762 1759 HNE[r+1]= []*z(r)^2+[]*z(r)^3+...... 1763 1760 @end example 1764 where @code{x},@code{y} are the first 2 variables of the basering. 1765 The values of @code{[]} are the coefficients of the Hamburger-Noether 1766 matrix, the values of @code{<>} are represented by @code{x} in the 1767 HN-matrix.@* 1761 where @code{x},@code{y} are the first 2 variables of the basering. 1762 The values of @code{[]} are the coefficients of the Hamburger-Noether 1763 matrix, the values of @code{<>} are represented by @code{x} in the 1764 HN-matrix.@* 1768 1765 - if a second argument is given, create and export a new ring with 1769 name @code{displayring} containing an ideal @code{HNE} as described 1766 name @code{displayring} containing an ideal @code{HNE} as described 1770 1767 above.@* 1771 - if L corresponds to the output of @code{reddevelop(f)}, 1772 @code{displayHNE(L[,n])} shows the HNE's of all branches of f in the form 1768 - if L corresponds to the output of @code{reddevelop(f)}, 1769 @code{displayHNE(L[,n])} shows the HNE's of all branches of f in the form 1773 1770 described above. The optional parameter is then ignored. 1774 1771 NOTE: The 1st line of the above ideal (i.e., @code{HNE[1]}) means that 1775 1772 @code{y=[]*z(0)^1+...}, the 2nd line (@code{HNE[2]}) means that 1776 @code{x=[]*z(1)^2+...}, so you can see which indeterminate 1777 corresponds to which line (it's also possible that @code{x} corresponds 1773 @code{x=[]*z(1)^2+...}, so you can see which indeterminate 1774 corresponds to which line (it's also possible that @code{x} corresponds 1778 1775 to the 1st line and @code{y} to the 2nd). 1779 1776 1780 1777 SEE ALSO: develop, reddevelop 1781 1778 EXAMPLE: example displayHNE; shows an example … … 2014 2011 2015 2012 proc extdevelop (list l, int Exaktheit) 2016 "USAGE: extdevelop(L,N); list L, int N 2013 "USAGE: extdevelop(L,N); list L, int N 2017 2014 ASSUME: L is the output of @code{develop(f)}, or of @code{extdevelop(l,n)}, 2018 2015 or one entry of the output of @code{reddevelop(f)}. 2019 RETURN: an extension of the Hamburger-Noether development of f as a list 2016 RETURN: an extension of the Hamburger-Noether development of f as a list 2020 2017 in the same format as L has (up to the last entry in the output 2021 2018 of @code{develop(f)}).@* 2022 Type @code{help develop;}, resp. @code{help reddevelop;} for more 2019 Type @code{help develop;}, resp. @code{help reddevelop;} for more 2023 2020 details. 2024 2021 NOTE: The new HN-matrix will have at least N columns (if the HNE is not 2025 2022 finite). In particular, if f is irreducible then (in most cases) 2026 @code{extdevelop(develop(f),N)} will produce the same result as 2023 @code{extdevelop(develop(f),N)} will produce the same result as 2027 2024 @code{develop(f,N)}.@* 2028 If the matrix M of L has n columns then, compared with 2025 If the matrix M of L has n columns then, compared with 2029 2026 @code{param(L)}, @code{param(extdevelop(L,N))} will increase the 2030 2027 exactness by at least (N-n) more significant monomials. … … 2161 2158 } 2162 2159 // ------ the example starts here ------- 2163 "EXAMPLE:"; echo = 2; 2160 "EXAMPLE:"; echo = 2; 2164 2161 ring exring=0,(x,y),dp; 2165 2162 list hne=reddevelop(x14-3y2x11-y3x10-y2x9+3y4x8+y5x7+3y4x6+x5*(-y6+y5) 2166 2163 -3y6x3-y7x2+y8); 2167 print(hne[1][1]); // HNE of 1st branch is finite 2164 print(hne[1][1]); // HNE of 1st branch is finite 2168 2165 print(extdevelop(hne[1],5)[1]); 2169 2166 print(hne[2][1]); // HNE of 2nd branch can be extended … … 2185 2182 proc stripHNE (list l) 2186 2183 "USAGE: stripHNE(L); L list 2187 ASSUME: L is the output of @code{develop(f)}, or of 2188 @code{extdevelop(develop(f),n)}, or (one entry of) the output of 2184 ASSUME: L is the output of @code{develop(f)}, or of 2185 @code{extdevelop(develop(f),n)}, or (one entry of) the output of 2189 2186 @code{reddevelop(f)}. 2190 2187 RETURN: list in the same format as L, but all polynomials L[4], resp. … … 2211 2208 } 2212 2209 example 2213 { 2210 { 2214 2211 "EXAMPLE:"; echo = 2; 2215 2212 int plevel=printlevel; printlevel=-1; … … 2309 2306 "USAGE: HNdevelop(f); f poly 2310 2307 ASSUME: f is a bivariate polynomial (in the first 2 ring variables) 2311 CREATE: ring with name @code{HNEring}, variables @code{x,y} and ordering 2312 @code{ls} over a field extension of the current basering's ground 2308 CREATE: ring with name @code{HNEring}, variables @code{x,y} and ordering 2309 @code{ls} over a field extension of the current basering's ground 2313 2310 field. @* 2314 2311 Since the Hamburger-Noether development usually does not exist 2315 2312 in the originally given basering, @code{HNdevelop} always defines 2316 @code{HNEring} and CHANGES to it. The field extension is chosen 2313 @code{HNEring} and CHANGES to it. The field extension is chosen 2317 2314 minimally. 2318 2315 RETURN: list @code{L} of lists @code{L[i]} (corresponding to the output of 2319 @code{develop(f[i])}, f[i] a branch of f, but the last entry being 2316 @code{develop(f[i])}, f[i] a branch of f, but the last entry being 2320 2317 omitted). 2321 2318 @texinfo … … 2323 2320 @item @code{L[i][1]}; matrix: 2324 2321 Each row contains the coefficients of the corresponding line of the 2325 Hamburger-Noether expansion (HNE) for f[i]. The end of the line is 2322 Hamburger-Noether expansion (HNE) for f[i]. The end of the line is 2326 2323 marked in the matrix by the first ring variable (usually x). 2327 @item @code{L[i][2]}; intvec: 2324 @item @code{L[i][2]}; intvec: 2328 2325 indicating the length of lines of the HNE 2329 2326 @item @code{L[i][3]}; int: 2330 2327 0 if the 1st ring variable was transversal (with respect to f[i]), @* 2331 1 if the variables were changed at the beginning of the 2328 1 if the variables were changed at the beginning of the 2332 2329 computation, @* 2333 -1 if an error has occurred. 2334 @item @code{L[i][4]}; poly: 2335 the transformed polynomial of f[i] to make it possible to extend the 2330 -1 if an error has occurred. 2331 @item @code{L[i][4]}; poly: 2332 the transformed polynomial of f[i] to make it possible to extend the 2336 2333 Hamburger-Noether development a posteriori without having to do 2337 2334 all the previous calculation once again (0 if not needed) … … 2342 2339 If f is known to be irreducible as a power series, @code{develop(f)} 2343 2340 should be chosen instead to avoid the change of basering. @* 2344 If @code{printlevel>=0} comments are displayed (default is 2345 @code{printlevel=0}). 2341 If @code{printlevel>=0} comments are displayed (default is 2342 @code{printlevel=0}). 2346 2343 SEE ALSO: develop, reddevelop, extdevelop, essdevelop, param, displayHNE 2347 2344 EXAMPLE: example HNdevelop; shows an example … … 2429 2426 "USAGE: reddevelop(f); f poly 2430 2427 ASSUME: f is a bivariate polynomial (in the first 2 ring variables) 2431 CREATE: ring with name @code{HNEring}, variables @code{x,y} and ordering 2432 @code{ls} over a field extension of the current basering's ground 2428 CREATE: ring with name @code{HNEring}, variables @code{x,y} and ordering 2429 @code{ls} over a field extension of the current basering's ground 2433 2430 field. @* 2434 2431 Since the Hamburger-Noether development of a reducible curve 2435 2432 singularity usually does not exist in the originally given basering, 2436 @code{reddevelop} always defines @code{HNEring} and CHANGES to it. 2433 @code{reddevelop} always defines @code{HNEring} and CHANGES to it. 2437 2434 The field extension is chosen minimally. 2438 2435 RETURN: list @code{L} of lists @code{L[i]} (corresponding to the output of 2439 @code{develop(f[i])}, f[i] a branch of f, but the last entry being 2436 @code{develop(f[i])}, f[i] a branch of f, but the last entry being 2440 2437 omitted). 2441 2438 @texinfo … … 2443 2440 @item @code{L[i][1]}; matrix: 2444 2441 Each row contains the coefficients of the corresponding line of the 2445 Hamburger-Noether expansion (HNE) for f[i]. The end of the line is 2442 Hamburger-Noether expansion (HNE) for f[i]. The end of the line is 2446 2443 marked in the matrix by the first ring variable (usually x). 2447 @item @code{L[i][2]}; intvec: 2444 @item @code{L[i][2]}; intvec: 2448 2445 indicating the length of lines of the HNE 2449 2446 @item @code{L[i][3]}; int: 2450 2447 0 if the 1st ring variable was transversal (with respect to f[i]), @* 2451 1 if the variables were changed at the beginning of the 2448 1 if the variables were changed at the beginning of the 2452 2449 computation, @* 2453 -1 if an error has occurred. 2454 @item @code{L[i][4]}; poly: 2455 the transformed polynomial of f[i] to make it possible to extend the 2450 -1 if an error has occurred. 2451 @item @code{L[i][4]}; poly: 2452 the transformed polynomial of f[i] to make it possible to extend the 2456 2453 Hamburger-Noether development a posteriori without having to do 2457 2454 all the previous calculation once again (0 if not needed) 2458 2455 @end table 2459 2456 @end texinfo 2460 NOTE: If @code{printlevel>=0} comments are displayed (default is 2461 @code{printlevel=0}). 2457 NOTE: If @code{printlevel>=0} comments are displayed (default is 2458 @code{printlevel=0}). 2462 2459 SEE ALSO: develop, extdevelop, essdevelop, param, displayHNE 2463 2460 EXAMPLE: example reddevelop; shows an example … … 2489 2486 +126x10y4+4x8y6-126x8y5+84x6y6-36x4y7+9x2y8-1y9; 2490 2487 list hne=reddevelop(f); 2491 size(hne); // number of branches 2488 size(hne); // number of branches 2492 2489 print(hne[1][1]); // HN-matrix of 1st branch 2493 2490 print(hne[4][1]); // HN-matrix of 4th branch … … 2826 2823 "USAGE: essdevelop(f); f poly 2827 2824 ASSUME: f is a bivariate polynomial (in the first 2 ring variables) 2828 CREATE: ring with name @code{HNEring}, variables @code{x,y} and ordering 2829 @code{ls} over a field extension of the current basering's ground 2825 CREATE: ring with name @code{HNEring}, variables @code{x,y} and ordering 2826 @code{ls} over a field extension of the current basering's ground 2830 2827 field. @* 2831 2828 Since the Hamburger-Noether development of a reducible curve 2832 2829 singularity usually does not exist in the originally given basering, 2833 @code{essdevelop} always defines @code{HNEring} and CHANGES to it. 2830 @code{essdevelop} always defines @code{HNEring} and CHANGES to it. 2834 2831 The field extension is chosen minimally. 2835 2832 RETURN: list @code{L} of lists @code{L[i]} (corresponding to the output of 2836 @code{develop(f[i])}, f[i] an \"essential\" branch of f, but the last 2833 @code{develop(f[i])}, f[i] an \"essential\" branch of f, but the last 2837 2834 entry being omitted).@* 2838 2835 For more details type @code{help reddevelop;}. … … 2844 2841 Use @code{reddevelop} or @code{HNdevelop} to compute a complete HNE, 2845 2842 i.e., a HNE for all branches.@* 2846 If @code{printlevel>=0} comments are displayed (default is 2847 @code{printlevel=0}). 2843 If @code{printlevel>=0} comments are displayed (default is 2844 @code{printlevel=0}). 2848 2845 SEE ALSO: develop, reddevelop, HNdevelop, extdevelop 2849 2846 EXAMPLE: example essdevelop; shows an example … … 3050 3047 //---------- Sonderbehandlung: faktorisere einige Polynome ueber Q(a): ------- 3051 3048 if (charstr(basering)=="0,a") { 3052 faktoren,flag=extrafactor(leitf,M,N); // damit funktion. Bsp. Baladi 5 3053 if (flag==0) 3054 { ERROR("Could not factorize in field of type (0,a)!"); } 3049 faktoren=factorize(charPoly(leitf,M,N),2); // damit funktion. Bsp. Baladi 5 3055 3050 } 3056 3051 else { … … 3495 3490 } 3496 3491 /////////////////////////////////////////////////////////////////////////////// 3497 3498 proc extrafactor (poly leitf, int M, int N)3499 "USAGE: factors,flag=extrafactor(f,M,N);3500 list factors, int flag,M,N, poly f in x,y3501 RETURN: for some special f, factors is a list of the factors of3502 charPoly(f,M,N), same format as factorize3503 (see help charPoly; help factorize)3504 In this case, flag!=0 (TRUE). If extrafactor cannot factorize f,3505 flag will be 0 (FALSE), factors will be the empty list.3506 ASSUME: basering is (0,a),(x,y),ds or ls3507 Newton polygon of f is one side with height N, length M3508 NOTE: This procedure is designed to make reddevelop able to compute some3509 special cases that need a ring extension in char 0.3510 It becomes obsolete as soon as `factorize' works also in such rings.3511 EXAMPLE: example extrafactor; shows an example3512 "3513 {3514 list faktoren;3515 3516 if (a2==-1) {3517 poly testpol=charPoly(leitf,M,N);3518 if (testpol==1+2y2+y4) {3519 faktoren=list(ideal(y+a,y-a),intvec(2,2));3520 testpol=0;3521 }3522 //------------ ist Poly von der Form q*i+r*y^n, n in N, q,r in Q ?: ----------3523 if ((size(testpol)==2) && (find(string(lead(testpol)),"a")>0)3524 && (find(string(testpol-lead(testpol)),"a")==0)) {3525 faktoren=list(ideal(testpol),intvec(1));3526 testpol=0;3527 }3528 }3529 if (a4==-625) {3530 poly testpol=charPoly(leitf,M,N);3531 if (testpol==4a2-4y2)3532 { faktoren=list(ideal(-4,y+a,y-a),intvec(1,1,1)); testpol=0;}3533 if (testpol==-4a2-4y2)3534 { faktoren=list(ideal(-4,y+1/25*a3,y-1/25*a3),intvec(1,1,1));3535 testpol=0;}3536 }3537 if (a2+a==-1) {3538 poly testpol=charPoly(leitf,M,N);3539 if (testpol==1+2y+3y2+2y3+y4)3540 { faktoren=list(ideal(1,y-a,y+a+1),intvec(1,2,2)); testpol=0;}3541 }3542 if (defined(testpol)==0) { poly testpol=1; }3543 if (testpol!=0) {3544 "factorize not implemented in char (0,a)!";3545 "could not factorize:",charPoly(leitf,M,N);3546 if (printlevel>0) { pause("Hit RETURN to continue:"); }3547 }3548 return(faktoren,(testpol==0)); // Test: faktoren==list() geht leider nicht3549 }3550 example3551 { "EXAMPLE:"; echo=2;3552 ring r=(0,a),(x,y),ds;3553 minpoly=a2+1;3554 poly f=x4+2x2y2+y4;3555 charPoly(f,4,4);3556 list factors;3557 int flag;3558 factors,flag=extrafactor(f,4,4);3559 if (flag!=0) {factors;}3560 } -
Singular/LIB/latex.lib
r3de58c r50cbdc 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: latex.lib,v 1. 19 2001-02-09 10:19:33 lossenExp $";2 version="$Id: latex.lib,v 1.20 2001-08-27 14:47:53 Singular Exp $"; 3 3 category="Visualization"; 4 4 info=" … … 30 30 @code{TeXwidth} (int) -1, 0, 1..9, >9: controls breaking of long polynomials 31 31 @code{TeXnofrac} (int) flag: write 1/2 instead of \\frac@{1@}@{2@} 32 @code{TeXbrack} (string) \"@{\", \"(\", \"<\", \"|\", empty string: 32 @code{TeXbrack} (string) \"@{\", \"(\", \"<\", \"|\", empty string: 33 33 controls brackets around ideals and matrices 34 34 @code{TeXproj} (int) flag: write \":\" instead of \",\" in vectors … … 131 131 texobj("exp001","An ideal ",I); 132 132 closetex("exp001"); 133 tex("exp001"); 133 tex("exp001"); 134 134 echo=0; 135 135 pause("the created files will be deleted after pressing <RETURN>"); … … 284 284 proc texfactorize(string fname, poly f, list #) 285 285 "USAGE: texfactorize(fname,f); fname string, f poly 286 RETURN: if @code{fname=\"\"}: string, f as a product of its irreducible 286 RETURN: if @code{fname=\"\"}: string, f as a product of its irreducible 287 287 factors@* 288 otherwise: append this string to the file @code{<fname>}, and 288 otherwise: append this string to the file @code{<fname>}, and 289 289 return nothing. 290 290 NOTE: preceeding \">>\" are deleted and suffix \".tex\" (if not given) … … 369 369 proc texmap(string fname, def m, def @r1, def @r2, list #) 370 370 "USAGE: texmap(fname,m,@r1,@r2); fname string, m string/map, @r1,@r2 rings 371 RETURN: if @code{fname=\"\"}: string, the map m from @r1 to @r2 (preceeded 371 RETURN: if @code{fname=\"\"}: string, the map m from @r1 to @r2 (preceeded 372 372 by its name if m = string) in TeX-typesetting;@* 373 otherwise: append this string to the file @code{<fname>}, and 373 otherwise: append this string to the file @code{<fname>}, and 374 374 return nothing. 375 NOTE: preceeding \">>\" are deleted in @code{fname}, and suffix \".tex\" 375 NOTE: preceeding \">>\" are deleted in @code{fname}, and suffix \".tex\" 376 376 (if not given) is added to @code{fname}. 377 377 If m is a string then it has to be the name of an existing map … … 561 561 n = n+5*(i-anf); 562 562 anf =i; // the next text in ( , ) as exponent 563 if (op) 564 { 563 if (op) 564 { 565 565 if (s[i]== ","){anf = anf+1;} 566 566 while(s[i] !=")"){ i++;} … … 580 580 "USAGE: texname(fname,s); fname,s strings 581 581 RETURN: if @code{fname=\"\"}: string, the transformed string s, where the 582 following rules apply: 583 @example 582 following rules apply: 583 @example 584 584 s' + \"~\" --> \"\\tilde@{\"+ s' +\"@}\" 585 \"_\" + int --> \"_@{\" + int +\"@}\" 585 \"_\" + int --> \"_@{\" + int +\"@}\" 586 586 \"[\" + s' + \"]\" --> \"_@{\" + s' + \"@}\" 587 \"A..Z\" + int --> \"A..Z\" + \"^@{\" + int + \"@}\" 587 \"A..Z\" + int --> \"A..Z\" + \"^@{\" + int + \"@}\" 588 588 \"a..z\" + int --> \"a..z\" + \"_@{\" + int + \"@}\" 589 589 \"(\" + int + \",\" + s' + \")\" --> \"_@{\"+ int +\"@}\" + \"^@{\" + s'+\"@}\" 590 590 @end example 591 591 Anyhow, strings which begin with a @code{\"@{\"} are only changed 592 by deleting the first and last character (intended to remove the 592 by deleting the first and last character (intended to remove the 593 593 surrounding curly brackets). 594 594 595 if @code{fname!=\"\"}: append the transformed string s to the file 595 if @code{fname!=\"\"}: append the transformed string s to the file 596 596 @code{<fname>}, and return nothing. 597 NOTE: preceeding \">>\" are deleted in @code{fname}, and suffix \".tex\" 597 NOTE: preceeding \">>\" are deleted in @code{fname}, and suffix \".tex\" 598 598 (if not given) is added to @code{fname}. 599 599 EXAMPLE: example texname; shows an example … … 603 603 st=manipul(s); 604 604 if (size(fname)) 605 { 605 { 606 606 int i=1; 607 607 while (fname[i]==">"){i++;} 608 608 fname = fname[i,size(fname)-i+1]; 609 609 if (size(fname)>=4) // check if filename is ending with ".tex" 610 { 610 { 611 611 if(fname[size(fname)-3,4]!=".tex") {fname = fname +".tex"; } 612 612 } … … 634 634 635 635 static proc absterm(poly f) 636 { 636 { 637 637 int k; 638 638 for (k=1; k<=nvars(basering); k++) … … 645 645 "USAGE: texobj(fname,l); fname string, l list 646 646 RETURN: if @code{fname=\"\"}: string, the entries of l in LaTeX-typesetting;@* 647 otherwise: append this string to the file @code{<fname>}, and 647 otherwise: append this string to the file @code{<fname>}, and 648 648 return nothing. 649 NOTE: preceeding \">>\" are deleted in @code{fname}, and suffix \".tex\" 649 NOTE: preceeding \">>\" are deleted in @code{fname}, and suffix \".tex\" 650 650 (if not given) is added to @code{fname}. 651 651 EXAMPLE: example texobj; shows an example … … 687 687 { if (defined(`obj`)) 688 688 { if (typeof(`obj`)=="ideal") 689 { 689 { 690 690 Iname = obj; def e = `obj`; //convert to correct type ideal 691 691 kill obj; def obj = e; kill e; … … 900 900 } 901 901 example 902 { 902 { 903 903 echo=0; 904 904 // -------- prepare for example --------- … … 942 942 "USAGE: texproc(fname,pname); fname,pname strings 943 943 ASSUME: @code{`pname`} is a procedure. 944 RETURN: if @code{fname=\"\"}: string, the proc @code{`pname`} in a verbatim 944 RETURN: if @code{fname=\"\"}: string, the proc @code{`pname`} in a verbatim 945 945 environment in LaTeX-typesetting;@* 946 otherwise: append this string to the file @code{<fname>}, and 946 otherwise: append this string to the file @code{<fname>}, and 947 947 return nothing. 948 NOTE: preceeding \">>\" are deleted in @code{fname}, and suffix \".tex\" 948 NOTE: preceeding \">>\" are deleted in @code{fname}, and suffix \".tex\" 949 949 (if not given) is added to @code{fname}.@* 950 950 @code{texproc} cannot be applied to itself correctly. … … 1044 1044 "USAGE: texring(fname, r[,L]); fname string, r ring, L list 1045 1045 RETURN: if @code{fname=\"\"}: string, the ring in TeX-typesetting;@* 1046 otherwise: append this string to the file @code{<fname>} and 1046 otherwise: append this string to the file @code{<fname>} and 1047 1047 return nothing. 1048 1048 NOTE: preceeding \">>\" are deleted and suffix \".tex\" (if not given) … … 1177 1177 texring("",ralg,"mipo"); 1178 1178 // 1179 ring r49=(49,a),x,dp; // Galois field 1179 ring r49=(49,a),x,dp; // Galois field 1180 1180 texring("",r49); 1181 1181 // … … 1200 1200 proc rmx(string fname) 1201 1201 "USAGE: rmx(fname); fname string 1202 RETURN: nothing; removes the @code{.log} and @code{.aux} files associated to 1202 RETURN: nothing; removes the @code{.log} and @code{.aux} files associated to 1203 1203 the LaTeX file <fname>.@* 1204 NOTE: If @code{fname} ends by @code{\".dvi\"} or @code{\".tex\"}, the 1204 NOTE: If @code{fname} ends by @code{\".dvi\"} or @code{\".tex\"}, the 1205 1205 @code{.dvi} or @code{.tex} file will be deleted, too. 1206 1206 EXAMPLE: example rmx; shows an example … … 1286 1286 { "EXAMPLE:"; echo = 2; 1287 1287 intmat m[3][4] = 9,2,4,5,2,5,-2,4,-6,10,-1,2,7; 1288 opentex("exp001"); 1288 opentex("exp001"); 1289 1289 texobj("exp001","An intmat: ",m); 1290 1290 closetex("exp001"); … … 1300 1300 1301 1301 static proc parsr(string s) // parse real 1302 { 1302 { 1303 1303 string t; 1304 1304 if (s==" Inf") { return("\\infty",3);} … … 1312 1312 else {return(s[1,5]+"*10^"+t,23);} 1313 1313 } 1314 else 1314 else 1315 1315 { 1316 1316 return(s[1,5],12); … … 1319 1319 1320 1320 static proc parsg(string s) // parse Galois field 1321 { 1321 { 1322 1322 int i,j = 1,1; 1323 1323 string t; 1324 1324 if (short) 1325 { 1325 { 1326 1326 t =s[1]; 1327 1327 if(size(s)>1) {return(t+"^{" + s[2,size(s)-1] + "}",3+2*(size(s)-1));} … … 1329 1329 } 1330 1330 else 1331 { 1331 { 1332 1332 return(parselong(s+"!")); 1333 1333 } … … 1338 1338 "USAGE: texpoly(fname,p); fname string, p poly 1339 1339 RETURN: if @code{fname=\"\"}: string, the poly p in LaTeX-typesetting;@* 1340 otherwise: append this string to the file @code{<fname>}, and 1340 otherwise: append this string to the file @code{<fname>}, and 1341 1341 return nothing. 1342 NOTE: preceeding \">>\" are deleted in @code{fname}, and suffix \".tex\" 1342 NOTE: preceeding \">>\" are deleted in @code{fname}, and suffix \".tex\" 1343 1343 (if not given) is added to @code{fname}. 1344 1344 EXAMPLE: example texpoly; shows an example … … 1847 1847 This document illustrates the functionality of the library."+"\\\\" + nl); 1848 1848 write(fname,"\\begin{tabular}{ll}" + nl + 1849 "LIBRARY: {\\tt latex.lib} & PROCEDURES FOR TYPESETTING SINGULAR" + 1849 "LIBRARY: {\\tt latex.lib} & PROCEDURES FOR TYPESETTING SINGULAR" + 1850 1850 "\\\\" + nl + 1851 1851 " & OBJECTS IN LATEX2E"+ … … 1859 1859 "{\\tt texdemo([n]);} & produces a file explaining the features of this lib"+ 1860 1860 "\\\\" + nl + 1861 "{\\tt texfactorize(fnm,f);} & creates string in \\LaTeX-format for 1861 "{\\tt texfactorize(fnm,f);} & creates string in \\LaTeX-format for 1862 1862 factors of poly f"+ "\\\\" + nl + 1863 1863 "{\\tt texmap(fnm,m,r1,r2);} & creates string in \\LaTeX-format for 1864 1864 map m:r1$\\rightarrow$r2"+ "\\\\" + nl + 1865 "{\\tt texname(fnm,s);} & creates string in \\LaTeX-format for 1865 "{\\tt texname(fnm,s);} & creates string in \\LaTeX-format for 1866 1866 identifier"+ "\\\\" + nl + 1867 1867 "{\\tt texobj(l);} & creates string in \\LaTeX-format for … … 1871 1871 "{\\tt texproc(fnm,p);} & creates string in \\LaTeX-format of 1872 1872 text from proc p"+ "\\\\" + nl + 1873 "{\\tt texring(fnm,r[,l]);} & creates string in \\LaTeX-lformat for 1873 "{\\tt texring(fnm,r[,l]);} & creates string in \\LaTeX-lformat for 1874 1874 ring/qring"+ "\\\\" + nl + 1875 1875 "{\\tt rmx(s);} & removes .aux and .log files of \\LaTeX-files"+ … … 1881 1881 "\\\\" + nl2 + "\\vspace{0.2cm}" + nl2 + 1882 1882 "The global variables {\\tt TeXwidth}, {\\tt TeXnofrac}, {\\tt 1883 TeXbrack}, {\\tt TeXproj}, {\\tt TeXaligned}, {\\tt TeXreplace}, {\\tt 1883 TeXbrack}, {\\tt TeXproj}, {\\tt TeXaligned}, {\\tt TeXreplace}, {\\tt 1884 1884 NoDollars} are used to control the typesetting: " 1885 1885 ); … … 1901 1901 write(fname,"Notice that none of these global variables are defined when 1902 1902 loading \\verb|latex.lib|. A flag variable is set as soon as it is defined."); 1903 1903 1904 1904 1905 1905 //% The procs and … … 1909 1909 write(fname,"\\section{Opening a \\LaTeX\\ file}"); 1910 1910 write(fname,"In order to create a \\LaTeX\\ document and write a standard 1911 header into it, use the following command."+ 1911 header into it, use the following command."+ 1912 1912 bv+ 1913 1913 "> string fname = \"" + fname + "\";" + nl + 1914 "> texopen(fname);" + 1914 "> texopen(fname);" + 1915 1915 ev + nl); 1916 1916 … … 1934 1934 1935 1935 static proc part1(string fname) 1936 { 1936 { 1937 1937 1938 1938 int st = defined(texdemopart); … … 1956 1956 // -1a------ a ring in char 0, short varnames and poly. ordering ---------- 1957 1957 write(fname, 1958 " A ring in characteristic 0 with short names of variables and polynomial 1958 " A ring in characteristic 0 with short names of variables and polynomial 1959 1959 ordering." +nl); 1960 1960 ring r0=0,(x,y,z),dp; … … 1965 1965 "> texring(fname,r0);" + 1966 1966 ev); 1967 texring(fname,r0); 1967 texring(fname,r0); 1968 1968 write(fname,nl2); 1969 1969 write(fname, … … 1972 1972 "> texpoly(fname,g);" +nl + 1973 1973 ev); 1974 texpoly(fname,g); 1974 texpoly(fname,g); 1975 1975 write(fname,"\\\\"+nl2); 1976 1976 … … 1986 1986 ev 1987 1987 ); 1988 texpoly(fname,g/280); 1988 texpoly(fname,g/280); 1989 1989 kill r0; 1990 1990 1991 1991 write(fname,"\\\\"+nl2); 1992 1992 write(fname,"\\Line"); 1993 1993 // -2-------- a ring in char 7, indexed varnames and series ordering ---------- 1994 1994 write(fname, 1995 " A ring in characteristic 7 with indexed names of variables and local 1995 " A ring in characteristic 7 with indexed names of variables and local 1996 1996 ordering." +nl); 1997 1997 ring r1=7,(x1,x2,x3,x4),Ds; 1998 poly g=-2*x1+x4-1; 1999 write(fname, 2000 bv + 2001 "> ring r1=7,(x1,x2,x3,x4),Ds;" +nl + 1998 poly g=-2*x1+x4-1; 1999 write(fname, 2000 bv + 2001 "> ring r1=7,(x1,x2,x3,x4),Ds;" +nl + 2002 2002 "> texring(fname,r1);" +nl + 2003 2003 ev); 2004 texring(fname,r1); 2004 texring(fname,r1); 2005 2005 write(fname,lb); 2006 2006 2007 2007 write(fname, bv + 2008 "> poly g=-2*x1+x4-1; g;" +nl + 2008 "> poly g=-2*x1+x4-1; g;" +nl + 2009 2009 "> texpoly(fname,g);" +nl + 2010 2010 ev); 2011 2011 2012 2012 texpoly(fname,g); 2013 2013 2014 2014 write(fname,lb); 2015 2015 write(fname,"\\Line"); … … 2017 2017 // -3-------- a ring in char 0, indexed varnames and local ordering ---------- 2018 2018 write(fname, 2019 " A ring in characteristic 0 with indexed names of variables and local 2019 " A ring in characteristic 0 with indexed names of variables and local 2020 2020 ordering. 2021 2021 " +nl); … … 2027 2027 "> texring(fname,r2);" +nl + 2028 2028 ev); 2029 texring(fname,r2); 2029 texring(fname,r2); 2030 2030 2031 2031 write(fname, 2032 2032 bv + 2033 2033 "> poly g=-y(1)^3*x(5)+y(1)*x(2); g;" +nl+ 2034 string(g) + nl + 2034 string(g) + nl + 2035 2035 "> texpoly(fname,g);" +nl + 2036 2036 ev 2037 2037 ); 2038 texpoly(fname,g); 2038 texpoly(fname,g); 2039 2039 write(fname,lb); 2040 2040 2041 2041 write(fname,"\\Line"); 2042 2042 … … 2061 2061 ); 2062 2062 texpoly(fname,g); write(fname,lb); 2063 2063 2064 2064 write(fname,"\\Line"); 2065 2065 … … 2099 2099 ev); 2100 2100 texring(fname,r0t); 2101 write(fname, 2101 write(fname, 2102 2102 bv + 2103 2103 "> poly g=8*(-s+2t)/(st+t3)*x+t2*x-1; g;"+nl+ … … 2173 2173 2174 2174 write(fname, 2175 bv + 2175 bv + 2176 2176 "> poly g=-(2a13+a)*x2+a2*x-a+1; g;" +nl+ 2177 2177 string(g) +nl + … … 2198 2198 2199 2199 write(fname, 2200 bv + 2200 bv + 2201 2201 "> poly g=-(i+1)*x+2i2y2+i+x; g;" +nl+ 2202 2202 string(g) +nl + … … 2295 2295 "It is possible to display a ground field different from the 2296 2296 actual one by passing any letter in \\LaTeX \\ notation as additional 2297 argument. Predefined values are \\verb|\"\\\\C\"|, \\verb|\"\\\\R\"|, 2297 argument. Predefined values are \\verb|\"\\\\C\"|, \\verb|\"\\\\R\"|, 2298 2298 \\verb|\"k\"|, \\verb|\"K\"| and \\verb|\"R\"|."+nl+ 2299 2299 "If for example a ground field of characteristic 0 should be written as … … 2311 2311 special role when the ground field is an algebraic extension. In this case 2312 2312 the parameters will be omitted."); 2313 2313 2314 2314 write(fname, 2315 2315 bv + … … 2358 2358 2359 2359 write(fname,nl+ "\\vspace{0.2cm}" + nl2); 2360 2360 2361 2361 write(fname,"The first and the last variable will always be printed. 2362 2362 In order to print only these it is sufficient to give a 1 as third argument."); … … 2389 2389 write(fname,"It is also possible to pass several of the arguments described 2390 2390 above at once (in any order)."); 2391 2391 2392 2392 2393 2393 write(fname, … … 2407 2407 2408 2408 static proc part2(string fname) 2409 { 2409 { 2410 2410 2411 2411 int st = defined(texdemopart); … … 2427 2427 write(fname,"\\subsection{Factorized polynomials}"); 2428 2428 2429 write(fname,"The command \\verb|texfactorize| calls internally the 2430 {\\sc Singular} command \\verb|factorize| and returns the product of the 2431 irreducible factors. Note that, at the moment, it is not possible to pass 2429 write(fname,"The command \\verb|texfactorize| calls internally the 2430 {\\sc Singular} command \\verb|factorize| and returns the product of the 2431 irreducible factors. Note that, at the moment, it is not possible to pass 2432 2432 any optional arguments for \\verb|factorize| through \\verb|texfactorize|."); 2433 2433 … … 2466 2466 // --------------------------------------------- 2467 2467 write(fname,"By setting the global variable \\verb|TeXreplace| it is possible 2468 to define rules for replacing strings or variable names. 2468 to define rules for replacing strings or variable names. 2469 2469 \\verb|TeXreplace| has to be a list of twoelemented lists where the first 2470 2470 entry is the text which should be replaced by the second entry. 2471 This may be applied to replace names of variables, but is also used 2471 This may be applied to replace names of variables, but is also used 2472 2472 when calling \\verb|texname| or \\verb|texmap|. Note that it 2473 2473 is necessary to write a double backslash \\verb|\\\\\| at the beginning of … … 2534 2534 "\\]",nl); 2535 2535 2536 write(fname,"Note that the size of terms is calculated with certain 2536 write(fname,"Note that the size of terms is calculated with certain 2537 2537 multiplicities.",nl); 2538 2538 … … 2550 2550 ev); 2551 2551 2552 setring r0; 2552 setring r0; 2553 2553 poly g=-x2y+2y13z+1; 2554 2554 poly f=g^2; … … 2590 2590 write(fname,nl2,"\\Line"); 2591 2591 2592 write(fname,"There are two possibilities to convert a polynomial into 2592 write(fname,"There are two possibilities to convert a polynomial into 2593 2593 \\LaTeX \\ code: either by using \\verb|texpoly| or by calling \\verb|texobj|. 2594 2594 The difference is that \\verb|texpoly| puts the polynomial in textmode … … 2603 2603 2604 2604 // setring r3; 2605 2605 2606 2606 ring r3=0,(x_1,x_2,x_3),wp(3,2,1); 2607 2607 poly g=-x_1*x_2+2*x_2*x_3+x_1*x_3; … … 2641 2641 write(fname,"If the global variable \\verb|Texaligned| is set then the ideal 2642 2642 is displayed as a row vector."); 2643 2643 2644 2644 write(fname, 2645 2645 bv + … … 2725 2725 2726 2726 static proc part3(string fname) 2727 { 2727 { 2728 2728 int st=defined(texdemopart); 2729 2729 string nl=newline; … … 2734 2734 2735 2735 if (not(st) or st>=3) 2736 { 2736 { 2737 2737 print(" Call part2 first"); 2738 2738 return(); … … 2746 2746 write(fname,"\\section{Typeseting maps between rings}"); 2747 2747 write(fname,"By default, maps are displayed in the following way:"); 2748 2748 2749 2749 write(fname, 2750 2750 bv + … … 2754 2754 "> texmap(fname,phi,r4,r5);" + nl + 2755 2755 ev); 2756 2756 2757 2757 ring @r4_h=0,(x,y,z),dp; 2758 2758 if(system("with","Namespaces")) { exportto(Current, @r4_h); } … … 2767 2767 write(fname,"If the global variable \\verb|TeXaligned| is set, then the 2768 2768 map is displayed in one line."); 2769 2769 2770 2770 write(fname, 2771 2771 bv + … … 2786 2786 the second one contains the parameters for the domain. Note that if only one 2787 2787 list is present then it is applied to both of the rings."); 2788 2788 2789 2789 write(fname, 2790 2790 bv + … … 2802 2802 ev ); 2803 2803 2804 texmap(fname,@phi_h,@r4_h,r5,list(),list("{")); 2804 texmap(fname,@phi_h,@r4_h,r5,list(),list("{")); 2805 2805 2806 2806 write(fname,nl+"\\Line"); … … 2836 2836 write(fname, "Complex data structures such as matrices, vectors or modules 2837 2837 can be displayed by using the procedure \\verb|texobj|."); 2838 2838 2839 2839 write(fname,"\\subsection{Matrices and vectors}"); 2840 2840 //======================================================================= … … 2937 2937 ev ); 2938 2938 2939 setring r; 2939 setring r; 2940 2940 ideal I=3xz5+x2y3-3z,7xz5+y3z+x-z,-xyz2+4yz+2x; 2941 2941 int TeXproj; export TeXproj; 2942 2942 2943 2943 texobj(fname,V); 2944 2944 kill TeXproj; … … 2948 2948 "> kill TeXproj;"+nl+ 2949 2949 ev); 2950 2950 2951 2951 write(fname,"\\subsection{Modules}",nl2); 2952 2952 … … 2984 2984 2985 2985 write(fname,"Integer matrices are displayed in the following way."); 2986 2986 2987 2987 intmat m[3][4]=-1,3,5,2,-2,8,6,0,2,5,8,7; 2988 2988 … … 3065 3065 "// not an isolated singularity"; 3066 3066 } 3067 return(m_nr); 3067 return(m_nr); 3068 3068 } 3069 3069 export(milnor_number); … … 3072 3072 write(fname,"The following procedure allows to include the source code 3073 3073 of procedures into a \\LaTeX document."); 3074 write(fname, 3074 write(fname, 3075 3075 bv + 3076 3076 "> texproc(fname,\"milnor\_number\");" +nl+ 3077 3077 ev); 3078 3078 3079 3079 texproc(fname,"milnor_number"); 3080 3080 3081 3081 kill(milnor_number); 3082 3082 3083 3083 // ------------------------------ closing the tex file ------------------- 3084 3084 write(fname,"\\section{Closing the \\LaTeX\\ file}"); -
Singular/LIB/lll.lib
r3de58c r50cbdc 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: lll.lib,v 1. 2 2001-03-26 12:05:00Singular Exp $";2 version="$Id: lll.lib,v 1.3 2001-08-27 14:47:54 Singular Exp $"; 3 3 category="Commutative Algebra"; 4 4 info=" 5 LIBRARY: LLL.lib Integral LLL-Algorithm 5 LIBRARY: LLL.lib Integral LLL-Algorithm 6 6 AUTHOR: Alberto Vigneron-Tenorio and Alfredo Sanchez-Navarro 7 7 email: alberto.vigneron@uca.es, alfredo.sanchez@uca.es … … 57 57 { 58 58 dummy=system("sh","rm -f "+file+" "+resfile); 59 } 59 } 60 60 else 61 61 { 62 62 ERROR("external program returns "+string(dummy)+newline+ 63 63 "see "+file+" and "+resfile+" for details"); 64 } 64 } 65 65 66 66 execute(solution); // result is now in list "res" … … 72 72 list l=list(1,-2,4),list(2,1,-7); 73 73 LLL(l); 74 } 74 } 75 75 /////////////////////////////////////////////////////////////////////////////// -
Singular/LIB/mprimdec.lib
r3de58c r50cbdc 1 // $Id: mprimdec.lib,v 1. 3 2001-07-10 11:49:19 dreyer Exp $1 // $Id: mprimdec.lib,v 1.4 2001-08-27 14:47:54 Singular Exp $ 2 2 /////////////////////////////////////////////////////////////////////////////// 3 3 // mprimdec.lib 4 // algorithms for primary decomposition for modules based on 5 // the algorithms of Gianni, Trager and Zacharias and 4 // algorithms for primary decomposition for modules based on 5 // the algorithms of Gianni, Trager and Zacharias and 6 6 // Shimoyama and Yokoyama (generalization of the latter 7 // suggested by Hans-Gert Gräbe, Leipzig ) 8 // using elments of primdec.lib 9 // written by Alexander Dreyer 7 // suggested by Hans-Gert Gräbe, Leipzig ) 8 // using elments of primdec.lib 9 // written by Alexander Dreyer 10 10 // 11 11 // $Log: not supported by cvs2svn $ 12 // Revision 1.3 2001/07/10 11:49:19 dreyer 13 // + changed commands factor to factorize(...,2), idealsEqual to modulesEqual 14 // minAssPrimes to minAssGTZ; minAssChar; 15 // 12 16 // 13 17 /////////////////////////////////////////////////////////////////////////////// 14 18 15 version="$Id: mprimdec.lib,v 1. 3 2001-07-10 11:49:19 dreyer Exp $";19 version="$Id: mprimdec.lib,v 1.4 2001-08-27 14:47:54 Singular Exp $"; 16 20 category="Commutative Algebra"; 17 21 … … 162 166 { 163 167 if( (size(#)>0) ){ 164 list pr = minAssChar(ann); // causes message "/ ** redefining @res **" 168 list pr = minAssChar(ann); // causes message "/ ** redefining @res **" 165 169 } 166 170 else{ 167 list pr = minAssGTZ(ann); 171 list pr = minAssGTZ(ann); 168 172 } 169 173 } -
Singular/LIB/normal.lib
r3de58c r50cbdc 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: normal.lib,v 1.3 5 2001-03-19 22:57:16 greuelExp $";2 version="$Id: normal.lib,v 1.36 2001-08-27 14:47:56 Singular Exp $"; 3 3 category="Commutative Algebra"; 4 4 info=" … … 8 8 9 9 PROCEDURES: 10 normal(I); computes the normalization of basering/I 10 normal(I[,wd]); computes the normalization of basering/I 11 resp. computes the normalization of basering/I and 12 the delta-invariante 11 13 HomJJ(L); presentation of End_R(J) as affine ring, L a list 14 genus(I); computes the genus of the projective curve defined 15 by I 12 16 "; 13 17 … … 19 23 LIB "inout.lib"; 20 24 LIB "ring.lib"; 25 LIB "hnoether.lib"; 21 26 /////////////////////////////////////////////////////////////////////////////// 22 static proc isR_HomJR (list Li)23 "USAGE: isR_HomJR (Li); Li = list: ideal SBid, ideal J, poly p24 COMPUTE: module Hom_R(J,R) = R:J and compare with R25 ASSUME: R = P/SBid, P = basering26 SBid = standard basis of an ideal in P,27 J = ideal in P containing the polynomial p,28 p = nonzero divisor of R29 RETURN: 1 if R = R:J, 0 if not30 EXAMPLE: example isR_HomJR; shows an example31 "32 {33 int n, ii;34 def P = basering;35 ideal SBid = Li[1];36 ideal J = Li[2];37 poly p = Li[3];38 attrib(SBid,"isSB",1);39 attrib(p,"isSB",1);40 qring R = SBid;41 ideal J = fetch(P,J);42 poly p = fetch(P,p);43 ideal f = quotient(p,J);44 ideal lp = std(p);45 n=1;46 for (ii=1; ii<=size(f); ii++ )47 {48 if ( reduce(f[ii],lp) != 0)49 { n = 0; break; }50 }51 return (n);52 //?spaeter hier einen Test ob Hom(I,R) = Hom(I,I)?53 }54 example55 {"EXAMPLE:"; echo = 2;56 ring r = 0,(x,y,z),dp;57 ideal id = y7-x5+z2;58 ideal J = x3,y+z;59 poly p = xy;60 list Li = std(id),J,p;61 isR_HomJR (Li);62 63 ring s = 0,(t,x,y),dp;64 ideal id = x2-y2*(y-t);65 ideal J = jacob(id);66 poly p = J[1];67 list Li = std(id),J,p;68 isR_HomJR (Li);69 }70 ///////////////////////////////////////////////////////////////////////////////71 27 72 28 proc HomJJ (list Li) 73 "USAGE: HomJJ (Li); Li list: ideal SBid, ideal id, ideal J, poly p, int count29 "USAGE: HomJJ (Li); Li = list: ideal SBid, ideal id, ideal J, poly p 74 30 ASSUME: R = P/id, P = basering, a polynomial ring, id an ideal of P, 75 31 @* SBid = standard basis of id, 76 32 @* J = ideal of P containing the polynomial p, 77 33 @* p = nonzero divisor of R 78 @* count controls printlevel during recursive call79 34 COMPUTE: Endomorphism ring End_R(J)=Hom_R(J,J) with its ring structure as 80 35 affine ring, together with the canonical map R --> Hom_R(J,J), … … 86 41 endphi describes the canonical map R -> Hom_R(J,J) 87 42 l[2] : an integer which is 1 if phi is an isomorphism, 0 if not 43 l[3] : an integer, the contribution to delta 88 44 @end format 89 45 NOTE: printlevel >=1: display comments (default: printlevel=0) … … 93 49 //---------- initialisation --------------------------------------------------- 94 50 95 int isIso,isPr,isCo,isRe,isEq, ii,jj,q,y,count;51 int isIso,isPr,isCo,isRe,isEq,oSAZ,ii,jj,q,y; 96 52 intvec rw,rw1; 97 53 list L; 98 if(size(Li)>=5) 99 { 100 count = Li[5]; 101 } 102 y = printlevel-voice+count; 103 def P = basering; 54 y = printlevel-voice+2; // y=printlevel (default: y=0) 55 def P = basering; 104 56 ideal SBid, id, J = Li[1], Li[2], Li[3]; 105 57 poly p = Li[4]; … … 116 68 if(attrib(id,"isPrim")==1) { isPr=1; } 117 69 } 70 if( typeof(attrib(id,"onlySingularAtZero"))=="int" ) 71 { 72 if(attrib(id,"onlySingularAtZero")==1){oSAZ=1; } 73 } 118 74 if( typeof(attrib(id,"isIsolatedSingularity"))=="int" ) 119 75 { … … 133 89 } 134 90 //-------------------------- go to quotient ring ------------------------------ 135 qring R = SBid;91 qring R = SBid; 136 92 ideal id = fetch(P,id); 137 93 ideal J = fetch(P,J); … … 139 95 ideal f,rf,f2; 140 96 module syzf; 141 142 97 //---------- computation of p*Hom(J,J) as R-ideal ----------------------------- 143 98 if ( y>=1 ) … … 149 104 } 150 105 f = quotient(p*J,J); 106 151 107 if ( y>=1 ) 152 108 { "// the module p*Hom(J,J) = p*J:J, p a non-zerodivisor"; 153 109 "// p"; p; 154 "// f=p*J:J"; 155 if( y>=2 ) { f; } 110 "// f=p*J:J";f; 156 111 } 157 112 f2 = std(p); 158 159 if(isIso==0) 160 { 161 ideal f1=std(f); 162 attrib(f1,"isSB",1); 163 // if( codim(f1,f2) >= 0 ) 164 // { 165 // dbprint(printlevel-voice+3,"// dimension of non-normal locus is zero"); 166 // isIso=1; 167 // } 168 } 113 169 114 //---------- Test: Hom(J,J) == R ?, if yes, go home --------------------------- 170 115 171 116 rf = interred(reduce(f,f2)); // represents p*Hom(J,J)/p*R = Hom(J,J)/R 117 172 118 if ( size(rf) == 0 ) 173 119 { … … 186 132 setring lastRing; 187 133 134 attrib(endid,"onlySingularAtZero",oSAZ); 188 135 attrib(endid,"isCohenMacaulay",isCo); 189 136 attrib(endid,"isPrim",isPr); … … 195 142 L=lastRing; 196 143 L = insert(L,1,1); 144 dbprint(y,"// case R = Hom(J,J)"); 197 145 if(y>=1) 198 146 { 199 "// case R = Hom(J,J), we are ready with this component";147 "// R=Hom(J,J)"; 200 148 " "; 201 if( y>=2 ) 202 { 203 lastRing; 149 lastRing; 204 150 " "; 205 151 "// the new ideal"; 206 if( y>=2 ) { endid; }152 endid; 207 153 " "; 208 154 "// the old ring"; … … 222 168 pause(); 223 169 newline; 224 }225 170 } 226 171 setring P; 172 L[3]=0; 227 173 return(L); 228 174 } … … 230 176 { 231 177 "// R is not equal to Hom(J,J), we have to try again"; 232 if( y>=2 ) 233 { pause(); 234 newline; 235 } 178 pause(); 179 newline; 236 180 } 237 181 //---------- Hom(J,J) != R: create new ring and map from old ring ------------- 238 182 // the ring newR1/SBid+syzf will be isomorphic to Hom(J,J) as R-module 239 183 184 f=mstd(f)[2]; 185 ideal ann=quotient(f2,f); 186 int delta; 187 if(isIso&&isEq){delta=vdim(std(modulo(f,ideal(p))));} 188 240 189 f = p,rf; // generates pJ:J mod(p), i.e. p*Hom(J,J)/p*R as R-module 241 190 q = size(f); 191 242 192 syzf = syz(f); 243 193 … … 261 211 attrib(SBid,"isSB",1); 262 212 263 qring newR = std(SBid); 213 qring newR = std(SBid); 214 264 215 map psi = R,ideal(X(1..nvars(R))); 265 216 ideal id = psi(id); … … 286 237 "// the linear relations"; 287 238 " "; 288 if( y>=2 ) 289 { Lin; 290 pause(); 291 ""; 292 } 293 } 239 Lin; 240 " "; 241 } 242 294 243 for (ii=2; ii<=q; ii++ ) 295 244 { … … 300 249 } 301 250 } 251 302 252 if(y>=1) 303 253 { 304 254 "// the quadratic relations"; 305 if( y>=2 ) 306 { 307 " "; 308 interred(Quad); 309 pause(); 310 newline; 311 } 312 } 313 Q = Lin+Quad; 255 " "; 256 interred(Quad); 257 pause(); 258 newline; 259 } 260 Q = Lin,Quad; 314 261 Q = subst(Q,T(1),1); 315 Q = interred(reduce(Q,std(0)));262 Q=mstd(Q)[2]; 316 263 //---------- reduce number of variables by substitution, if possible ---------- 317 264 if (homo==1) … … 324 271 } 325 272 326 ideal endid = imap(newR,id) +imap(newR,Q);273 ideal endid = imap(newR,id),imap(newR,Q); 327 274 ideal endphi = ideal(X(1..nvars(R))); 328 275 329 276 L=substpart(endid,endphi,homo,rw); 277 330 278 def lastRing=L[1]; 331 279 setring lastRing; 280 281 attrib(endid,"onlySingularAtZero",0); 282 map sigma=R,endphi; 283 ideal an=sigma(ann); 284 export(an); //noetig? 285 ideal te=an,endid; 286 if(isIso&&(size(reduce(te,std(maxideal(1))))==0)) 287 { 288 attrib(endid,"onlySingularAtZero",oSAZ); 289 } 290 kill te; 332 291 attrib(endid,"isCohenMacaulay",isCo); 333 292 attrib(endid,"isPrim",isPr); … … 337 296 attrib(endid,"isCompleteIntersection",0); 338 297 attrib(endid,"isRad",0); 339 // export(endid);340 // export(endphi);341 298 if(y>=1) 342 299 { 343 300 "// the new ring after reduction of the number of variables"; 344 show(lastRing); 345 pause(); " 346 "; 347 if(y >=2) 348 { 301 " "; 349 302 lastRing; 350 303 " "; … … 369 322 pause(); 370 323 newline; 371 }372 324 } 373 325 L = lastRing; 374 326 L = insert(L,0,1); 327 L[3]=delta; 375 328 return(L); 376 329 } … … 394 347 395 348 proc normal(ideal id, list #) 396 "USAGE: normal(i [,choose]); i a radical ideal, choose empty or 1349 "USAGE: normal(i [,choose]); i a radical ideal, choose empty, 1 or "wd" 397 350 if choose=1 the normalization of the associated primes is computed 398 351 (which is sometimes more efficient) 352 if choose="wd" the delta-invariant is computed simultaneously 353 this may take much more time in the reducible case because the 354 factorizing standardbasis algorithm cannot be used. 399 355 ASSUME: The ideal must be radical, for non radical ideals the output may 400 356 be wrong (i=radical(i); makes i radical) 401 RETURN: a list of rings, say nor :357 RETURN: a list of rings, say nor and in case of choose="wd" an integer 402 358 @format 359 at the end of the list. 403 360 each ring nor[i] contains two ideals 404 361 with given names norid and normap such that … … 409 366 @end format 410 367 NOTE: to use the i-th ring type: def R=nor[i]; setring R;. 411 @* Not implemented for local or mixed orderings and quotient rings. 368 @* Increasing printlevel displays more comments (default: printlevel=0) 369 @* Not implemented for local or mixed orderings. 412 370 @* If the input ideal i is weighted homogeneous a weighted ordering may 413 371 be used (qhweight(i); computes weights). 414 @* printlevel = 1: count normalization loops (default: printlevel=0)415 @* printlevel > 1: protocoll of normalization steps416 @* printlevel > 2: protocoll of all normalization steps, pauses417 @* printlevel > 3: display some (>4 all) intermediate results, pauses418 372 EXAMPLE: example normal; shows an example 419 373 " 420 374 { 421 int i,j,y ;375 int i,j,y,withdelta; 422 376 string sr; 423 377 list result,prim,keepresult; 424 378 y = printlevel-voice+2; 425 379 if(size(#)>0) 380 { 381 if(typeof(#[1])=="string") 382 { 383 kill #; 384 list #; 385 withdelta=1; 386 } 387 } 426 388 attrib(id,"isRadical",1); 427 389 if ( ord_test(basering) != 1) … … 473 435 if(y>=1) 474 436 { 475 ""; 476 "// we have ",size(prim),"equidimensional component(s)"; 437 "// we have ",size(prim),"equidimensional components"; 438 } 439 if(withdelta &&(size(prim)>1)) 440 { 441 withdelta=0; 442 "WARNING! cannot compute delta,"; 443 "the ideal is not equidimensional"; 444 } 445 if(!withdelta) 446 { 447 option(redSB); 448 for(j=1;j<=size(prim);j++) 449 { 450 keepresult=keepresult+facstd(prim[j]); 451 } 452 prim=keepresult; 453 option(noredSB); 477 454 } 478 455 } … … 487 464 else 488 465 { 489 prim=minAss GTZ(id);466 prim=minAssPrimes(id); 490 467 } 491 468 } 492 469 else 493 470 { 494 prim=minAss GTZ(id);471 prim=minAssPrimes(id); 495 472 } 496 473 if(y>=1) 497 474 { 498 ""; 499 "// we have ",size(prim),"irreducible component(s)"; 475 "// we have ",size(prim),"irreducible components"; 500 476 } 501 477 } … … 504 480 if(y>=1) 505 481 { 506 ""; 507 "// BEGIN with equidimensional/irreducible component",i; 482 "// we are in loop ",i; 508 483 } 509 484 attrib(prim[i],"isCohenMacaulay",0); … … 520 495 attrib(prim[i],"isEquidimensional",1); 521 496 attrib(prim[i],"isCompleteIntersection",0); 497 attrib(prim[i],"onlySingularAtZero",0); 498 if( typeof(attrib(id,"onlySingularAtZero"))=="int" ) 499 { 500 if(attrib(id,"onlySingularAtZero")==1) 501 {attrib(prim[i],"onlySingularAtZero",1); } 502 } 522 503 523 504 if( typeof(attrib(id,"isIsolatedSingularity"))=="int" ) … … 533 514 } 534 515 keepresult=normalizationPrimes(prim[i],maxideal(1),0); 535 for(j=1;j<=size(keepresult);j++) 516 517 for(j=1;j<=size(keepresult)-1;j++) 536 518 { 537 519 result=insert(result,keepresult[j]); 538 520 } 539 sr = string(size(result)); 521 sr = string(size(result)); 522 } 523 if(withdelta) 524 { 525 sr = string(size(keepresult)-1); 526 result=keepresult; 540 527 } 541 528 dbprint(y+1," 542 529 // 'normal' created a list of "+sr+" ring(s). 530 // nor["+sr+"+1] is the delta-invariant in case of choose=wd. 543 531 // To see the rings, type (if the name of your list is nor): 544 show( nor);532 show( nor); 545 533 // To access the 1-st ring and map (similar for the others), type: 546 534 def R = nor[1]; setring R; norid; normap; … … 561 549 norid; 562 550 normap; 551 552 ring s=0,(x,y),dp; 553 ideal i=(x-y^2)^2 - y*x^3; 554 nor=normal(i,"wd"); 555 //the delta-invariant 556 nor[size(nor)]; 563 557 } 564 558 565 559 /////////////////////////////////////////////////////////////////////////////// 566 static proc normalizationPrimes(ideal i,ideal ihp, int count, list #)567 "USAGE: normalizationPrimes(i,ihp[,si ,countt]); i primeideal, ihp map568 (partial normalization), si ideal of singular locus,569 count = integer to count the number of normalization loops570 RETURN: a list of one ring L=R, in R are two ideals571 S,M such that R/M is the normalization of original basering572 S is a standardbasis of M573 NOTE: to use the ring: def r=L[1];setring r; 574 printlevel = 1: count normalization loops (default: printlevel=0)575 printlevel > 1: protocoll of normalization steps576 printlevel > 2: protocoll of all normalization steps, pauses577 printlevel > 3: display some (>4 all) intermediate results, pauses560 static proc normalizationPrimes(ideal i,ideal ihp,int delta, list #) 561 "USAGE: normalizationPrimes(i,ihp[,si]); i equidimensional ideal, ihp map 562 (partial normalization),delta partial delta-invariant, 563 # ideal of singular locus 564 RETURN: a list of rings, say nor, and an integer, the delta-invariant 565 at the end of the list. 566 each ring nor[i] contains two ideals 567 with given names norid and normap such that 568 - the direct sum of the rings nor[i]/norid is 569 the normalization of basering/id; 570 - normap gives the normalization map from basering/id 571 to nor[i]/norid (for each i) 578 572 EXAMPLE: example normalizationPrimes; shows an example 579 573 " 580 574 { 581 count = count+1; 582 int y = printlevel-voice+count+1; // y=printlevel (default: y=0) 583 if(y>=0) 584 { 585 "// START normalization LOOP ",count; 586 } 587 if( y>=3) 588 { 589 "// with ideal"; ""; 575 576 int y = printlevel-voice+2; // y=printlevel (default: y=0) 577 578 if(y>=1) 579 { 580 ""; 581 "// START a normalization loop with the ideal"; ""; 590 582 i; ""; 591 583 basering; ""; … … 593 585 newline; 594 586 } 595 596 587 597 588 def BAS=basering; … … 614 605 export normap; 615 606 result=newR7; 607 result[size(result)+1]=delta; 616 608 setring BAS; 617 609 return(result); … … 620 612 if(y>=1) 621 613 { 622 "// SB-computation of ideal of size",size(i),"in ring with",nvars(basering),"variables"; 623 } 624 // -------------- SB-computation of the input ideal ---------------------- 625 list SM=mstd(i); //here the work starts, SM[1] a SB of i 626 //SM[2] a smaller set of generators of i 627 int dimSM = dim(SM[1]); //dimension of i, V(i)=variety to normalize 614 "// SB-computation of the input ideal"; 615 } 616 list SM=mstd(i); //here the work starts 617 int dimSM = dim(SM[1]); //dimension of variety to normalize 628 618 // Case: Get an ideal containing a unit 629 619 if( dimSM == -1) … … 643 633 export normap; 644 634 result=newR6; 635 result[size(result)+1]=delta; 645 636 setring BAS; 646 637 return(result); … … 652 643 dimSM;""; 653 644 } 654 655 if(size(#)>0) //ideal of sing locus is given in #[1] 656 { 657 list JM=mstd(#[1]); 658 if( typeof(attrib(#[1],"isRad"))!="int" ) 659 { 660 attrib(JM[2],"isRad",0); 661 } 662 } 663 664 // -------- transfer attributes from ideal i to SM[2], SM = mstd(i) -------- 645 if(size(#)>0) 646 { 647 if(attrib(i,"onlySingularAtZero")) 648 { 649 list JM=maxideal(1),maxideal(1); 650 attrib(JM[1],"isSB",1); 651 attrib(JM[2],"isRad",1); 652 } 653 else 654 { 655 ideal te=#[1],SM[2]; 656 list JM=mstd(te); 657 kill te; 658 if( typeof(attrib(#[1],"isRad"))!="int" ) 659 { 660 attrib(JM[2],"isRad",0); 661 } 662 } 663 } 664 665 665 if(attrib(i,"isPrim")==1) 666 666 { … … 703 703 attrib(SM[2],"isEquidimensional",0); 704 704 } 705 705 if(attrib(i,"isCompleteIntersection")==1) 706 706 { 707 707 attrib(SM[2],"isCompleteIntersection",1); … … 711 711 attrib(SM[2],"isCompleteIntersection",0); 712 712 } 713 714 //************* case 0: check and prepare special cases **************** 715 //no computation for the normalization in case 0 716 717 //-------------------------- the smooth case ---------------------------- 713 if(attrib(i,"onlySingularAtZero")==1) 714 { 715 attrib(SM[2],"onlySingularAtZero",1); 716 } 717 else 718 { 719 attrib(SM[2],"onlySingularAtZero",0); 720 } 721 if((attrib(SM[2],"isIsolatedSingularity")==1)&&(homog(SM[2])==1)) 722 { 723 attrib(SM[2],"onlySingularAtZero",1); 724 } 725 726 //the smooth case 718 727 if(size(#)>0) 719 728 { … … 725 734 } 726 735 MB=SM[2]; 727 intvec rw; 736 intvec rw;; 728 737 list LL=substpart(MB,ihp,0,rw); 729 738 def newR6=LL[1]; … … 735 744 export normap; 736 745 result=newR6; 746 result[size(result)+1]=delta; 737 747 setring BAS; 738 748 return(result); 739 749 } 740 750 } 741 // recall: SM = mstd(i), i = ideal to start with in normaliztion loop 742 // JM = mstd(#[1]), #[1]= ideal of singular locus of i 743 // #[1] is given after the first normalization loop 744 745 //---------------- the homogeneous zero-dimensional case ---------------- 751 752 //the zero-dimensional case 746 753 if((dim(SM[1])==0)&&(homog(SM[2])==1)) 747 754 { … … 761 768 export normap; 762 769 result=newR5; 770 result[size(result)+1]=delta; 763 771 setring BAS; 764 772 return(result); 765 773 } 766 774 767 //------------- the homogeneous one-dimensional case ------------------- 768 //in this case i defines a line because it is irreducible and homogeneous 775 //the one-dimensional case 776 //in this case it is a line because 777 //it is irreducible and homogeneous 769 778 if((dim(SM[1])==1)&&(attrib(SM[2],"isPrim")==1) 770 779 &&(homog(SM[2])==1)) … … 785 794 export normap; 786 795 result=newR4; 796 result[size(result)+1]=delta; 787 797 setring BAS; 788 798 return(result); 789 799 } 790 //----------------------- the higher dimensional case ---------------------- 800 801 //the higher dimensional case 791 802 //we test first of all CohenMacaulay and 792 803 //complete intersection … … 802 813 } 803 814 } 804 805 //compute the singular locus+lower dimensional components 806 807 //------- case: not(isolated singularity and homogeneous) ------------------- 808 if((attrib(SM[2],"isIsolatedSingularity")==0) && (size(#)==0)) 809 { 810 //---------- computation of ideal of singular locus ------------------------- 815 if((attrib(SM[2],"onlySingularAtZero")==0)&&(size(i)==1)) 816 { 817 int tau=vdim(std(i+jacob(i))); 818 if(tau>=0) 819 { 820 execute("ring BASL="+charstr(BAS)+",("+varstr(BAS)+"),ds;"); 821 ideal i=imap(BAS,i); 822 int tauloc=vdim(std(i+jacob(i))); 823 setring BAS; 824 attrib(SM[2],"onlySingularAtZero",(tau==tauloc)); 825 kill BASL; 826 } 827 } 828 829 //compute the singular locus 830 if((attrib(SM[2],"onlySingularAtZero")==0)&&(size(#)==0)) 831 { 811 832 J=minor(jacob(SM[2]),nvars(basering)-dim(SM[1])); 812 //ti=timer;813 833 if(y >=1 ) 814 834 { 815 "// SB of singular locus will be computed "; 816 if(y >=2 ) 817 { 818 "//in ring:"; 819 show(basering); 820 } 821 } 822 823 J = simplify(J,16); //this makes ist for huge J much faster 824 ideal sin=J,SM[2]; 835 "// SB of singular locus will be computed"; 836 } 837 ideal sin=J,SM[1]; 825 838 list JM=mstd(sin); 826 827 //JM[1] SB of singular locus, JM[2] minbasis of singular locus 828 // SM[1] SB of ideal in normalisation loop, SM[2] minbasis829 839 attrib(JM[1],"isSB",1); 840 841 //JM[1] SB of singular locus, JM[2]=minbasis of singular locus 842 //SM[1] SB of the input ideal, SM[2] minbasis 830 843 if(y>=1) 831 844 { … … 833 846 dim(JM[1]); ""; 834 847 } 835 // timer-ti; 836 attrib(JM[1],"isSB",1); 848 837 849 if(dim(JM[1])==-1) 838 850 { … … 852 864 export normap; 853 865 result=newR3; 866 result[size(result)+1]=delta; 854 867 setring BAS; 855 868 return(result); 856 869 } 857 if(dim(JM[1])==0 && (homog(SM[2])==1))870 if(dim(JM[1])==0) 858 871 { 859 872 attrib(SM[2],"isIsolatedSingularity",1); 873 if(homog(SM[2])){attrib(SM[2],"onlySingularAtZero",1);} 860 874 } 861 875 if(dim(JM[1])<=dim(SM[1])-2) … … 864 878 } 865 879 } 866 867 //------------ case: isolated singularity and homogeneous ----------------- 868 if(attrib(SM[2],"isIsolatedSingularity")==1) 880 else 869 881 { 870 882 if(size(#)==0) 871 883 { 872 if(defined(JM)==voice) 873 { JM=maxideal(1),maxideal(1); 874 } 875 else 876 { list JM=maxideal(1),maxideal(1); 877 878 } 884 list JM=maxideal(1),maxideal(1); 885 879 886 attrib(JM[1],"isSB",1); 887 if(dim(SM[1])>=2){attrib(SM[2],"isRegInCodim2",1);} 880 888 } 881 889 } 882 883 //------------ case: Cohen Macaulay and regular in codim 2 -----------------884 //in this case we are ready, the ring is normal885 890 if((attrib(SM[2],"isRegInCodim2")==1)&&(attrib(SM[2],"isCohenMacaulay")==1)) 886 891 { … … 900 905 export normap; 901 906 result=newR6; 907 result[size(result)+1]=delta; 902 908 setring BAS; 903 909 return(result); 904 910 } 905 911 906 //************* case 1: isolated singularity and homogeneous **************** 907 908 // recall: SM = mstd(i), i = ideal to start with in normaliztion loop 909 // JM = mstd(#[1]), #[1]= ideal of singular locus of i 910 // #[1] is given after the first normalization loop 911 //if SM is an isolated singularity and homogeneous, we know that this 912 //persists in the following normalization loops and things are easier 913 //since the radical of the singular locus is the maximal ideal 912 //if it is an isolated singularity only at 0 things are easier 914 913 //JM ideal of singular locus, SM ideal of variety 915 916 if(attrib(SM[2],"isIsolatedSingularity")==1) 917 { 918 if(y>=1) 919 { 920 "// CASE 1: unique isolated singularity at 0"; 921 "// radial of singular locus is the maximal ideal"; 922 } 914 if(attrib(SM[2],"onlySingularAtZero")) 915 { 916 attrib(SM[2],"isIsolatedSingularity",1); 923 917 ideal SL=simplify(reduce(maxideal(1),SM[1]),2); 924 // SL =vars not contained in ideal918 //vars not contained in ideal 925 919 ideal Ann=quotient(SM[2],SL[1]); 926 ideal qAnn=simplify(reduce(Ann,SM[1]),2); 920 ideal qAnn=simplify(reduce(Ann,SM[1]),2); 927 921 //qAnn=0 ==> the first var(=SL[1]) not contained in SM is a nzd of R/SM 928 //--------------- case: a nonzero-divisor was found ---------------929 922 if(size(qAnn)==0) 930 923 { … … 932 925 { 933 926 ""; 934 "// a nonzero-divisor was found";935 927 "// the ideal rad(J):"; 936 928 ""; 937 929 maxideal(1); 938 930 newline; 939 "// TEST for normality: R=Hom(J,J)?";940 "";941 931 } 942 //test for normality:943 // ?spaeter: test for normality, Hom(I,R)==R?932 //again test for normality 933 //Hom(I,R)=R 944 934 list RR; 945 RR=SM[1],SM[2],maxideal(1),SL[1],count; 946 // ti=timer; 947 RR=HomJJ(RR); 948 // timer-ti; 949 if(RR[2]==0) 950 //the ring is not normal, start a new normalization loop 935 RR=SM[1],SM[2],maxideal(1),SL[1]; 936 937 RR=HomJJ(RR,y); 938 if(RR[2]==0) 951 939 { 952 940 def newR=RR[1]; 953 941 setring newR; 954 942 map psi=BAS,endphi; 955 // ti=timer; 956 list tluser=normalizationPrimes(endid,psi(ihp),count); 957 // timer-ti; 943 list tluser=normalizationPrimes(endid,psi(ihp),delta+RR[3],an); 958 944 setring BAS; 959 945 return(tluser); 960 946 } 961 //the ring is normal, prepare output and go home962 947 MB=SM[2]; 963 948 execute("ring newR7="+charstr(basering)+",("+varstr(basering)+"),(" … … 965 950 ideal norid=fetch(BAS,MB); 966 951 ideal normap=fetch(BAS,ihp); 952 delta=delta+RR[3]; 967 953 export norid; 968 954 export normap; 969 955 result=newR7; 956 result[size(result)+1]=delta; 970 957 setring BAS; 971 958 return(result); 972 959 973 960 } 974 //--------------- case: a zero-divisor was found --------------- 975 //Now the case where qAnn!=0, i.e.SL[1] is a zero-divisor of R/SM 961 //Now the case where qAnn!=0, i.e.SL[1] is a zero divisor of R/SM 976 962 //and we have found a splitting: id and id1 977 //id= qAnn+SM[2]defines components of R/SM in the complement of V(SL[1])963 //id=Ann defines components of R/SM in the complement of V(SL[1]) 978 964 //id1 defines components of R/SM in the complement of V(id) 979 //?????instead of id1 we can take SL[1]+Ann+SM[2]???????????980 965 else 981 966 { 982 if(y>=0) 983 { 984 "// a zero-divisor was found, we have SPLITTING of ideals"; 985 if(y >=2 ) 986 { 987 "// in ring:"; 988 show(basering); 989 } 990 ""; 991 } 992 993 ideal id=qAnn+SM[2]; 994 967 ideal id=Ann; 995 968 attrib(id,"isCohenMacaulay",0); 996 969 attrib(id,"isPrim",0); … … 999 972 attrib(id,"isCompleteIntersection",0); 1000 973 attrib(id,"isEquidimensional",0); 1001 1002 if(y>=0) 1003 { 1004 "// start a normalization loop with 1st split ideal (size",size(id),"in",nvars(basering),"vars)"; 1005 } 1006 keepresult1=normalizationPrimes(id,ihp,count); 1007 ideal id1=quotient(SM[2],Ann)+SM[2]; 1008 // evtl. qAnn statt Ann nehmen 1009 // ideal id=SL[1]+SM[2]; 1010 974 attrib(id,"onlySingularAtZero",1); 975 976 ideal id1=quotient(SM[2],Ann); 977 //ideal id=SL[1],SM[2]; 1011 978 attrib(id1,"isCohenMacaulay",0); 1012 979 attrib(id1,"isPrim",0); … … 1015 982 attrib(id1,"isCompleteIntersection",0); 1016 983 attrib(id1,"isEquidimensional",0); 1017 1018 if(y>=0) 1019 { 1020 "// start a normalization loop with 2nd split ideal (size",size(id),"in",nvars(basering),"vars)"; 1021 } 1022 keepresult2=normalizationPrimes(id1,ihp,count); 1023 1024 for(lauf=1;lauf<=size(keepresult2);lauf++) 984 attrib(id1,"onlySingularAtZero",1); 985 986 ideal t1=id,id1; 987 int mul=vdim(std(t1)); 988 kill t1; 989 990 keepresult1=normalizationPrimes(id,ihp,0); 991 992 keepresult2=normalizationPrimes(id1,ihp,0); 993 994 delta=delta+mul+keepresult1[size(keepresult1)] 995 +keepresult1[size(keepresult1)]; 996 997 for(lauf=1;lauf<=size(keepresult2)-1;lauf++) 1025 998 { 1026 999 keepresult1=insert(keepresult1,keepresult2[lauf]); 1027 1000 } 1001 keepresult1[size(keepresult1)]=delta; 1028 1002 return(keepresult1); 1029 1003 } 1030 1004 } 1031 1005 1032 //********** case 2: no unique isolated singularity at 0 ************* 1033 1034 //in this case the radical must be computed 1035 // recall: SM = mstd(i), i = ideal to start with in normaliztion loop 1036 // JM = mstd(#[1]), #[1]= ideal of singular locus of i 1037 // #[1] is given after the first normalization loop 1038 //test for normality: Hom(J,J)=R 1039 //test for non-normality: Hom(J,J)!=R, we can use Hom(J,J) to continue 1040 1041 if(y>=1) 1042 { 1043 "// CASE 2: no unique isolated singularity"; 1044 "// radical has to be computed"; 1045 } 1046 1006 //test for non-normality 1007 //Hom(I,I)<>R 1008 //we can use Hom(I,I) to continue 1047 1009 ideal SL=simplify(reduce(JM[2],SM[1]),2); 1048 //SL = elements of ideal of singular locus not contained in ideal i1049 1010 ideal Ann=quotient(SM[2],SL[1]); 1050 1011 ideal qAnn=simplify(reduce(Ann,SM[1]),2); 1051 //qAnn=0 ==> SL[1] is a nonzero-divisor of R/SM 1052 1053 //--------------- case: a nonzero-divisor was found --------------- 1012 1054 1013 if(size(qAnn)==0) 1055 1014 { 1056 1015 list RR; 1057 1016 list RS; 1058 //now we have to compute the radical1017 //now we have to compute the radical 1059 1018 if(y>=1) 1060 1019 { 1020 "// radical computation of singular locus"; 1021 } 1022 1023 J=radical(JM[2]); //the singular locus 1024 JM=mstd(J); 1025 1026 if((vdim(JM[1])==1)&&(size(reduce(J,std(maxideal(1))))==0)) 1027 { 1028 attrib(SM[2],"onlySingularAtZero",1); 1029 } 1030 if(y>=1) 1031 { 1032 "// radical is equal to:";""; 1033 J; 1061 1034 ""; 1062 "// a nonzero-divisor was found"; 1063 "// radical computation of ideal of singular locus"; 1064 } 1065 1066 //-------------- computation of the radical J -------------------- 1067 //We have at least two possibilities: 1068 //J=radical(JM[2]), the radical of the full singular locus, or 1069 //J=radical(SM[2]+ideal(SL[1])), JM[2] contains SM[2]+ideal(SL[1]) 1070 //the first is usually better! 1071 1072 if(y>=1) 1073 { 1074 "// compute radical J of ideal of singular locus";""; 1075 } 1076 1077 J=radical(JM[2]); 1078 // alternativ: J=radical(SM[2]+ideal(SL[1])); 1079 1080 if(y>=2) 1081 { 1082 "// the radical is equal to:"; 1083 J; 1084 newline; 1085 } 1086 if(y>=1) 1087 { 1088 "// TEST for normality: R=Hom(J,J)?"; 1089 ""; 1090 } 1091 1092 JM=J,J; //J = new ideal for singular locus 1035 } 1036 1037 if(deg(SL[1])>deg(J[1])) 1038 { 1039 Ann=quotient(SM[2],J[1]); 1040 qAnn=simplify(reduce(Ann,SM[1]),2); 1041 if(size(qAnn)==0){SL[1]=J[1];} 1042 } 1043 1093 1044 //evtl. fuer SL[1] anderen Nichtnullteiler aus J waehlen 1094 1095 //test for normality: 1096 RR=SM[1],SM[2],JM[2],SL[1],count; 1097 RS=HomJJ(RR); 1098 1099 //--- the ring is normal, prepare output and go home 1045 RR=SM[1],SM[2],JM[2],SL[1]; 1046 1047 // evtl eine geeignete Potenz von JM? 1048 if(y>=1) 1049 { 1050 "// compute Hom(rad(J),rad(J))"; 1051 } 1052 1053 RS=HomJJ(RR,y); 1054 1100 1055 if(RS[2]==1) 1101 1056 { … … 1108 1063 export norid; 1109 1064 export normap; 1065 result=lastR; 1066 result[size(result)+1]=delta+RS[3]; 1110 1067 setring BAS; 1111 return(lastR); 1112 } 1113 1114 //--- the ring is not normal, start a new normalization loop 1068 return(result); 1069 } 1115 1070 int n=nvars(basering); 1116 1071 ideal MJ=JM[2]; … … 1121 1076 map psi=BAS,endphi; 1122 1077 list tluser= 1123 normalizationPrimes(endid,psi(ihp),count,simplify(psi(MJ)+endid,4));1078 normalizationPrimes(endid,psi(ihp),delta+RS[3],psi(MJ)); 1124 1079 setring BAS; 1125 1080 return(tluser); 1126 1081 } 1127 //--------------- case: a zero-divisor was found --------------- 1128 //Now the case where qAnn!=0, i.e.SL[1] is a zero-divisor of R/SM 1129 //and we have found a splitting: id and id1 1130 //id=qAnn+SM[2] defines components of R/SM in the complement of V(SL[1]) 1131 //id1 defines components of R/SM in the complement of V(id) 1132 //?????instead of id1 we can take SL[1]+Ann+SM[2]??????????? 1133 1134 // A component with singular locus the whole component found: 1082 // A component with singular locus the whole component found 1135 1083 if( Ann == 1) 1136 1084 { … … 1151 1099 export normap; 1152 1100 result=newR6; 1101 result[size(result)+1]=delta; 1153 1102 setring BAS; 1154 1103 return(result); 1155 1104 } 1156 // The general case with splitting of ring, i.e. qAnn!=01157 1105 else 1158 1106 { 1159 1107 int equi=attrib(SM[2],"isEquidimensional"); 1160 ideal new1=qAnn+SM[2]; 1108 int oSAZ=attrib(SM[2],"onlySingularAtZero"); 1109 int isIs=attrib(SM[2],"isIsolatedSingularity"); 1110 1111 ideal new1=Ann; 1112 ideal new2=quotient(SM[2],Ann); 1113 //ideal new2=SL[1],SM[2]; 1114 1115 int mul; 1116 if(equi&&isIs) 1117 { 1118 ideal t2=new1,new2; 1119 mul=vdim(std(t2)); 1120 } 1161 1121 execute("ring newR1="+charstr(basering)+",("+varstr(basering)+"),(" 1162 1122 +ordstr(basering)+");"); 1163 if(y>=0) 1164 { 1165 "// a zero-divisor was found, we have SPLITTING of ideals"; 1166 ""; 1123 if(y>=1) 1124 { 1125 "// zero-divisor found"; 1167 1126 } 1168 1127 ideal vid=fetch(BAS,new1); … … 1170 1129 attrib(vid,"isCohenMacaulay",0); 1171 1130 attrib(vid,"isPrim",0); 1172 attrib(vid,"isIsolatedSingularity", 0);1131 attrib(vid,"isIsolatedSingularity",isIs); 1173 1132 attrib(vid,"isRegInCodim2",0); 1174 if(equi==1) 1175 { 1176 attrib(vid,"isEquidimensional",1); 1177 } 1178 else 1179 { 1180 attrib(vid,"isEquidimensional",0); 1181 } 1133 attrib(vid,"onlySingularAtZero",oSAZ); 1134 attrib(vid,"isEquidimensional",equi); 1182 1135 attrib(vid,"isCompleteIntersection",0); 1183 1136 1184 if(y>=0) 1185 { 1186 "// start a normalization loop with 1st split ideal (size",size(vid),"in",nvars(basering),"vars)"; 1187 } 1188 1189 keepresult1=normalizationPrimes(vid,ihp,count); 1190 1137 keepresult1=normalizationPrimes(vid,ihp,0); 1138 int delta1=keepresult1[size(keepresult1)]; 1191 1139 setring BAS; 1192 ideal new2=quotient(SM[2],Ann)+SM[2]; 1193 // evtl. qAnn nehmen 1140 1194 1141 execute("ring newR2="+charstr(basering)+",("+varstr(basering)+"),(" 1195 1142 +ordstr(basering)+");"); … … 1199 1146 attrib(vid,"isCohenMacaulay",0); 1200 1147 attrib(vid,"isPrim",0); 1201 attrib(vid,"isIsolatedSingularity", 0);1148 attrib(vid,"isIsolatedSingularity",isIs); 1202 1149 attrib(vid,"isRegInCodim2",0); 1203 if(equi==1) 1204 { 1205 attrib(vid,"isEquidimensional",1); 1206 } 1207 else 1208 { 1209 attrib(vid,"isEquidimensional",0); 1210 } 1150 attrib(vid,"isEquidimensional",equi); 1211 1151 attrib(vid,"isCompleteIntersection",0); 1212 1213 if(y>=0) 1214 { 1215 "// start a normalization loop with 2nd split ideal (size",size(vid),"in",nvars(basering),"vars)"; 1216 } 1217 1218 keepresult2=normalizationPrimes(vid,ihp,count); 1152 attrib(vid,"onlySingularAtZero",oSAZ); 1153 1154 keepresult2=normalizationPrimes(vid,ihp,0); 1155 int delta2=keepresult2[size(keepresult2)]; 1219 1156 1220 1157 setring BAS; 1221 for(lauf=1;lauf<=size(keepresult2);lauf++) 1158 1159 for(lauf=1;lauf<=size(keepresult2)-1;lauf++) 1222 1160 { 1223 1161 keepresult1=insert(keepresult1,keepresult2[lauf]); 1224 1162 } 1163 keepresult1[size(keepresult1)]=delta+mul+delta1+delta2; 1225 1164 return(keepresult1); 1226 1165 } … … 1240 1179 b6c+bc6+a2b4e-3ab2c2de+c4d2e-a3cde2-abd3e2+bce5; 1241 1180 1242 list pr=normalizationPrimes(i ,maxideal(1),1);1181 list pr=normalizationPrimes(i); 1243 1182 def r1=pr[1]; 1244 1183 setring r1; … … 1257 1196 int ii,jj; 1258 1197 map phi = basering,maxideal(1); 1259 1260 //endid=diagon(endid);1261 1198 1262 1199 list Le = elimpart(endid); … … 1334 1271 return(L); 1335 1272 } 1336 /////////////////////////////////////////////////////////////////////////////// 1337 static 1338 proc diagon(ideal i) 1273 ///////////////////////////////////////////////////////////////////////////// 1274 1275 proc genus(ideal K,list #) 1276 "USAGE: genus(I) or genus(i,1); I a 1-dimensional ideal 1277 RETURN: an integer, the geometric genus p_g = p_a - delta of the projective 1278 curve defined by I, where p_a is the arithmetic genus. 1279 NOTE: delta is the sum of all local delta-invariants of the singularities, 1280 i.e. dim(R'/R), R' the normalization of the local ring R of the 1281 singularity. 1282 genus(i,1) uses the normalization to compute delta. Usually this 1283 is slow but sometimes not. 1284 EXAMPLE: example genus; shows an example 1285 " 1339 1286 { 1340 matrix m; 1341 intvec iv = option(get); 1342 option(redSB); 1343 ideal j=liftstd(jet(i,1),m); 1344 option(set,iv); 1345 return(ideal(matrix(i)*m)); 1287 int w = printlevel-voice+2; // w=printlevel (default: w=0) 1288 1289 def R=basering; 1290 K=std(K); 1291 1292 if(nvars(R)==3) 1293 { 1294 if((dim(K)!=2)||(!homog(K))||(size(K)>1)){ERROR("Input is not a curve");} 1295 execute("ring newR=("+charstr(R)+"),(x,y),dp;"); 1296 map kappa=R,x,y,1; 1297 ideal K=kappa(K); 1298 } 1299 if((nvars(R)>3)||(size(K)>1)) 1300 { // hier geeignet projezieren 1301 ERROR("This case is not implemented yet"); 1302 } 1303 if(nvars(R)==2) 1304 { 1305 execute("ring newR=("+charstr(R)+"),(x,y),dp;"); 1306 map kappa=R,x,y; 1307 ideal K=kappa(K); 1308 } 1309 1310 // assume now that R is a ring with two variables 1311 poly p=K[1]; 1312 ideal I; 1313 if(homog(p)) 1314 { 1315 if(deg(squarefree(p))<deg(p)){ERROR("Curve is not reduced");} 1316 return(-deg(p)+1); 1317 } 1318 execute("ring S=("+charstr(R)+"),(x,y,t),dp;"); 1319 execute("ring C=("+charstr(R)+"),(x,y),ds;"); 1320 ideal I; 1321 execute("ring A=("+charstr(R)+"),(x,t),dp;"); 1322 map phi=S,1,x,t; 1323 map psi=S,x,1,t; 1324 poly g,h; 1325 ideal I,I1; 1326 execute("ring B=("+charstr(R)+"),(x,t),ds;"); 1327 1328 setring S; 1329 poly F=imap(newR,p); 1330 F=homog(F,t); 1331 int d=deg(F); 1332 int genus=(d-1)*(d-2)/2; 1333 1334 // if(w>=1){"test for smoothness";} 1335 // if(dim(std(jacob(F)))==0) //the smooth case 1336 // { 1337 // setring R; 1338 // return(genus); 1339 // } 1340 1341 int delta,deltaloc,deltainf,tau,tauinf,cusps,iloc,iglob, 1342 tauloc,tausing,k,rat,nbranchinf,nbranch,nodes; 1343 list inv; 1344 1345 if(w>=1){"singularities at oo";} 1346 setring A; 1347 g=phi(F); 1348 h=psi(F); 1349 I=g,jacob(g),var(2); 1350 I=std(I); 1351 if(deg(I[1])>0) 1352 { 1353 list qr=minAssGTZ(I); 1354 for(k=1;k<=size(qr);k++) 1355 { 1356 inv=deltaLoc(g,qr[k]); 1357 deltainf=deltainf+inv[1]; 1358 tauinf=tauinf+inv[2]; 1359 nbranchinf=nbranchinf+inv[3]; 1360 } 1361 } 1362 inv=deltaLoc(h,maxideal(1)); 1363 deltainf=deltainf+inv[1]; 1364 tauinf=tauinf+inv[2]; 1365 if(inv[2]>0){nbranchinf=nbranchinf+inv[3];} 1366 1367 if(w>=1) 1368 { 1369 "branches at oo:";nbranchinf; 1370 "tau at oo:";tauinf; 1371 "delta at oo:";deltainf; 1372 "singularities not at oo"; 1373 } 1374 1375 setring newR; //the singularities at the affine part 1376 map sigma=S,var(1),var(2),1; 1377 I=sigma(F); 1378 1379 if((size(#)!=0)||((char(basering)<181)&&(char(basering)!=0))) 1380 { //uses the normalization to compute delta 1381 list nor=normal(I,"wd"); 1382 delta=nor[size(nor)]; 1383 genus=genus-delta-deltainf; 1384 setring R; 1385 return(genus); 1386 } 1387 1388 ideal I1=jacob(I); 1389 matrix Hess[2][2]=jacob(I1); 1390 ideal ID=I+I1+ideal(det(Hess)); 1391 1392 if(w>=1){"the cusps and nodes";} 1393 1394 ideal radID=std(radical(ID)); 1395 ideal IDsing=minor(jacob(ID),2)+radID; 1396 iglob=vdim(std(IDsing)); 1397 1398 if(iglob!=0) 1399 { 1400 ideal radIDsing=reduce(IDsing,radID); 1401 if(size(radIDsing)==0) 1402 { 1403 radIDsing=radID; 1404 attrib(radIDsing,"isSB",1); 1405 } 1406 else 1407 { 1408 radIDsing=std(radical(IDsing)); 1409 } 1410 iglob=vdim(radIDsing); 1411 } 1412 cusps=vdim(radID)-iglob; 1413 1414 if(w>=1){"the other singularities";} 1415 1416 if(iglob==0) //only cusps and double points 1417 { 1418 tau=vdim(std(I+jacob(I))); 1419 nodes=tau-2*cusps; 1420 delta=nodes+cusps; 1421 nbranch=2*tau-3*cusps; 1422 } 1423 else 1424 { 1425 setring C; 1426 ideal I1=imap(newR,IDsing); 1427 iloc=vdim(std(I1)); 1428 if(iglob==iloc) // only cusps and nodes outside 0 1429 { 1430 I=imap(newR,I); 1431 tauloc=vdim(std(I+jacob(I))); 1432 setring newR; 1433 inv=deltaLoc(I[1],maxideal(1)); 1434 delta=inv[1]; 1435 tau=inv[2]; 1436 nodes=tau-tauloc-2*cusps; 1437 nbranch=inv[3]+ 2*nodes+cusps; 1438 delta=delta+nodes+cusps; 1439 } 1440 else 1441 { 1442 setring newR; 1443 list pr=minAssGTZ(IDsing); 1444 for(k=1;k<=size(pr);k++) 1445 { 1446 inv=deltaLoc(I[1],pr[k]); 1447 delta=delta+inv[1]; 1448 tausing=tausing+inv[2]; 1449 nbranch=nbranch+inv[3]; 1450 } 1451 nodes=tau-tauloc-2*cusps; 1452 tau=vdim(std(I+jacob(I))); 1453 delta=delta+nodes+cusps; 1454 nbranch=nbranch+2*nodes+cusps; 1455 } 1456 } 1457 1458 if(w>=1) 1459 { 1460 "branches :";nbranch; 1461 "nodes:"; nodes; 1462 "cusps:";cusps; 1463 "tau :";tau; 1464 "delta:";delta; 1465 } 1466 genus=genus-delta-deltainf; 1467 setring R; 1468 return(genus); 1346 1469 } 1347 ///////////////////////////////////////////////////////////////////////////// 1470 example 1471 { "EXAMPLE:"; echo = 2; 1472 ring r=0,(x,y),dp; 1473 ideal i=y^9 - x^2*(x - 1)^9; 1474 genus(i); 1475 } 1476 /////////////////////////////////////////////////////////////////////////// 1477 proc deltaLoc(poly f,ideal singL) 1478 { 1479 def R=basering; 1480 execute("ring S=("+charstr(R)+"),(x,y),lp;"); 1481 map phi=R,x,y; 1482 ideal singL=phi(singL); 1483 singL=std(singL); 1484 int d=vdim(singL); 1485 poly f=phi(f); 1486 int i; 1487 1488 if(d==1) 1489 { 1490 map alpha=S,var(1)-singL[2][2],var(2)-singL[1][2]; 1491 f=alpha(f); 1492 execute("ring C=("+charstr(S)+"),("+varstr(S)+"),ds;"); 1493 poly f=imap(S,f); 1494 } 1495 else 1496 { 1497 poly p; 1498 poly c; 1499 map psi; 1500 while((deg(singL[1])>1)&&(deg(singL[2])>1)) 1501 { 1502 psi=S,x,y+random(-100,100)*x; 1503 singL=psi(singL); 1504 singL=std(singL); 1505 } 1506 if(deg(singL[2])==1){p=singL[1];c=singL[2][2];} 1507 if(deg(singL[1])==1) 1508 { 1509 psi=S,y,x; 1510 f=psi(f); 1511 singL=psi(singL); 1512 p=singL[2]; 1513 c=singL[1][2]; 1514 } 1515 execute("ring B=("+charstr(S)+"),a,dp;"); 1516 map beta=S,a,a; 1517 poly p=beta(p); 1518 execute("ring C=("+charstr(S)+",a),("+varstr(S)+"),ds;"); 1519 number p=number(imap(B,p)); 1520 minpoly=p; 1521 number c=number(imap(S,c)); 1522 map alpha=S,x-c,y+a; 1523 1524 poly f=alpha(f); 1525 f=cleardenom(f); 1526 } 1527 ideal fstd=std(ideal(f)+jacob(f)); 1528 poly hc=highcorner(fstd); 1529 int tau=vdim(fstd); 1530 int o=ord(f); 1531 int delta,nb; 1532 1533 if(tau==0) //smooth case 1534 { 1535 setring R; 1536 return(list(0,0,1)); 1537 } 1538 if((char(basering)>=181)||(char(basering)==0)) 1539 { 1540 if(o==2) //A_k-singularity 1541 { 1542 setring R; 1543 delta=(tau+1)/2; 1544 return(list(d*delta,d*tau,d*(2*delta-tau+1))); 1545 } 1546 if((lead(f)==var(1)*var(2)^2)||(lead(f)==var(1)^2*var(2))) 1547 {//D_k- singularity 1548 setring R; 1549 delta=(tau+2)/2; 1550 return(list(d*delta,d*tau,d*(2*delta-tau+1))); 1551 } 1552 1553 int mu=vdim(std(jacob(f))); 1554 poly g=f+var(1)^mu+var(2)^mu; //to obtain a convinient Newton-polygon 1555 1556 list NP=newton(g); 1557 int s=size(NP); 1558 int nN=-NP[1][2]-NP[s][1]+1; // computation of the Newton-number 1559 intmat m[2][2]; 1560 for(i=1;i<=s-1;i++) 1561 { 1562 m=NP[i+1],NP[i]; 1563 nN=nN+det(m); 1564 } 1565 1566 if(mu==nN) // the Newton-polygon is non-degenerate 1567 { // compute nb, the number of branches 1568 for(i=1;i<=s-1;i++) 1569 { 1570 nb=nb+gcd(NP[i][2]-NP[i+1][2],NP[i][1]-NP[i+1][1]); 1571 } 1572 return(list(d*(mu+nb-1)/2,d*tau,d*nb)); 1573 } 1574 1575 //da reddevelop nur benutzt wird, um die Anzahl der Zweige zu bestimmen 1576 //kann man das sicher schneller machen: 1577 //die Aufblasung durchfuehren und stets testen, ob das Newton-polyeder 1578 //nicht ausgeartet ist. 1579 1580 if(s>2) // splitting of f 1581 { 1582 intvec v=NP[1][2]-NP[2][2],NP[2][1]; 1583 int de=w_deg(g,v); 1584 int st=w_deg(hc,v)+v[1]+v[2]; 1585 poly f1=var(2)^NP[2][2]; 1586 poly f2=jet(g,de,v)/var(2)^NP[2][2]; 1587 poly h=g-f1*f2; 1588 de=w_deg(h,v); 1589 poly k; 1590 ideal wi=var(2)^NP[2][2],f2; 1591 matrix li; 1592 while(de<st) 1593 { 1594 k=jet(h,de,v); 1595 li=lift(wi,k); 1596 f1=f1+li[2,1]; 1597 f2=f2+li[1,1]; 1598 h=g-f1*f2; 1599 de=w_deg(h,v); 1600 } 1601 nb=deltaLoc(f1,maxideal(1))[3]+deltaLoc(f2,maxideal(1))[3]; 1602 return(list(d*(mu+nb-1)/2,d*tau,d*nb)); 1603 } 1604 1605 f=jet(f,deg(hc)+2); 1606 list hne=reddevelop(f); 1607 nb=size(hne); 1608 setring R; 1609 kill HNEring; 1610 return(list(d*(mu+nb-1)/2,d*tau,d*nb)); 1611 } 1612 else //the case of small characteristic 1613 { 1614 f=jet(f,deg(hc)+2); 1615 list hne=reddevelop(f); 1616 nb=size(hne); 1617 if(nb==1) 1618 { 1619 delta=invariants(hne[1])[5]/2; 1620 setring R; 1621 kill HNEring; 1622 return(list(d*delta,d*tau,d)); 1623 } 1624 setring R; 1625 kill HNEring; 1626 //delta direkt aus reddevelop zurueckgeben 1627 ERROR("the case of small characteristic is not fully implemented yet"); 1628 } 1629 } 1630 1631 proc w_deg(poly p, intvec v) 1632 { 1633 if(p==0){return(-1);} 1634 int d=0; 1635 while(jet(p,d,v)==0){d++;} 1636 d=(transpose(leadexp(jet(p,d,v)))*v)[1]; 1637 return(d); 1638 } 1639 1640 proc newton (poly f) 1641 { 1642 def R1=basering; 1643 execute("ring R2=("+charstr(R1)+"),("+varstr(R1)+"),ls;"); 1644 poly f=imap(R1,f); 1645 intvec A=(0,ord(subst(f,var(1),0))); 1646 intvec B=(ord(subst(f,var(2),0)),0); 1647 intvec C,H; list L; 1648 int abbruch,i; 1649 poly hilf; 1650 L[1]=A; 1651 f=jet(f,A[2]*B[1]-1,intvec(A[2],B[1])); 1652 map xytausch=R2,var(2),var(1); 1653 for (i=2; f!=0; i++) 1654 { 1655 abbruch=0; 1656 while (abbruch==0) 1657 { 1658 C=leadexp(f); 1659 if(jet(f,A[2]*C[1]-A[1]*C[2]-1,intvec(A[2]-C[2],C[1]-A[1]))==0) 1660 { 1661 abbruch=1; 1662 } 1663 else 1664 { 1665 f=jet(f,-C[1]-1,intvec(-1,0)); 1666 } 1667 } 1668 hilf=jet(f,A[2]*C[1]-A[1]*C[2],intvec(A[2]-C[2],C[1]-A[1])); 1669 H=leadexp(xytausch(hilf)); 1670 A=H[2],H[1]; 1671 L[i]=A; 1672 f=jet(f,A[2]*B[1]-1,intvec(A[2],B[1]-A[1])); 1673 } 1674 L[i]=B; 1675 setring R1; 1676 return(L); 1677 } 1678 1679 /////////////////////////////////////////////////////////////////////////// 1680 1348 1681 /* 1349 Aenderungen:1350 1. normal kommentiert, bei Berechnung de singulaeren Ortes ein simplify(J,16)1351 eingefuehrt, um bei riesigen Minorenzahlen, das Ideal zu verkleinern (bis1352 Faktor 10 Beschleunigung).1353 Protokoll mit printlevel so gesteuert, dass es bei rekursivem Aufruf korrekt1354 arbeitet.1355 list nor = normal(i); //mit equidim Zerlegung1356 list nor = normal(i,1); //mit prim Zerlegung1357 Zeiten au sony_pumuckel (P2, 500)1358 1682 Examples: 1359 1683 LIB"normal.lib"; 1360 //1. Huneke, 1 Komponente 1361 //prim: 2 sec equidim:1sec 1684 //Huneke 1362 1685 ring qr=31991,(a,b,c,d,e),dp; 1363 1686 ideal i= … … 1372 1695 1373 1696 1374 // 2. Vasconcelos (dauert laenger: 83 sec auf sony_pumuckel)1697 //Vasconcelos (dauert laenger: 70 sec) 1375 1698 ring r=32003,(x,y,z,w,t),dp; 1376 1699 ideal i= … … 1379 1702 xw3+z3t+ywt2, 1380 1703 y2w4-xy2z2t-w3t3; 1381 1382 //2a. Vasconcelos verkleinert1383 //prim:2Komp, 2 Ringe, 16 sec (manchmal lange, haengt am Faktorisierer)1384 //equidim: 1 Komp, 7 loops, 2 ringe, 12sec1385 ring r=32003,(x,y,z,w,t),dp;1386 ideal i=1387 x+zw,1388 y3+xwt,1389 xw3+z3t+ywt2;1390 1391 //3. GM11392 // irreducible, 13 normalization loops, 1 Ring1393 //2sec mit prim, 1 sec mit equidim1394 ring r=32003,(x,y,z,u),dp;1395 ideal i = x2+y3,z2+u3,y2+z3;1396 1397 //3a. GM11398 ring r=32003,(x,y),dp;1399 ideal i = intersect(y3+x2,y2+x3); // beide 0 sec1400 ideal i = intersect(y3+x2,y2+x3,y2+x2+x3);1401 //prim 0sec,1402 //equidim sehr lange (Relationen in HomJJ zu gross)1403 1404 //4. GM21405 //i nicht reduziert, equidim bricht ab (0 sec)1406 //prim: 11 irred comp, 11 loops, (1sec)1407 ring r=32003,(x,y,z,u),dp;1408 ideal i = x2+y3,z2+u3,y2+z3,x2+z3;1409 1410 //5. GM3, radical von GM21411 //prim: 11 irred comp, 11 loops, 11 Ringe, (1sec)1412 //equidim: 1 equidim comp, 1 loop, 1 Ring, (0sec)1413 ring r=32003,(x,y,z,u),dp;1414 ideal i =yu+u,yz+z,y2+y,xy+x,x2+y,u3+z2,z3-y;1415 1416 //GM41417 //equidim: 2 equidim comp, 3 Ringe, (0sec);1418 //prim: 3 Komp, (0sec)1419 ring r=32003,(x,y,z,u),dp;1420 ideal i1 = x2+y3,u,z;1421 ideal i2 = u2+z3,x,y;1422 ideal i3 = x2+y2+z2+u4;1423 ideal i = intersect(i1,i2,i3);1424 1425 //GM4a Hier dauert prim laenger! (## facstd)1426 //equidim: 3 equidim Komp, 4 Ringe(0sec)1427 //prim 13 Komp (63 sec), wegen facstd1428 //##ev minAssGTZ(i,1) verwenden (ohne facstd, ist noch fehlerhaft)1429 ring r=32003,(x,y,z,u),dp;1430 ideal i1 = x2+y3,u,z;1431 ideal i2 = u2+z3,x,y;1432 ideal i3 = x2+y2+z2+u4;1433 ideal i4 =yu+u,yz+z,y2+y,xy+x,x2+y,u3+z2,z3-y;1434 ideal i = intersect(i1,i2,i3,i4);1435 1436 //GM51437 //equidim: 4 Komp,0sec, prim 13 Komp, 1sec1438 ring r=32003,(x,y,z,u,v),dp;1439 ideal i1 = x2+y3,v; //2dim1440 ideal i2 = u2+z3,x,y; //3dim1441 ideal i3 = x2+y2+z2+u4; //4dim1442 ideal i4 =yu+u,yz+z,y2+y,xy+x,x2+y,u3+z2,z3-y; //1dim1443 ideal i = intersect(i1,i2,i3,i4);1444 1445 //cyclic 51446 //equidim: 1 Komp 0sec, prim: 20 Komp, 3 sec1447 ring r=32003,(x,y,z,u,v),dp;1448 ideal i =1449 x+y+z+u+v,1450 xy+yz+zu+xv+uv,1451 xyz+yzu+xyv+xuv+zuv,1452 xyzu+xyzv+xyuv+xzuv+yzuv,1453 xyzuv-1;1454 1455 // cyclic 5 hat Normalisierung (1 embim weniger)1456 ///equidim: 1 Komp 0sec, prim: 20 Komp, 2 sec1457 ring r=32003,(x,y,z,u),dp;1458 ideal i =1459 x2+xz-yz+2xu+yu+u2,1460 xy2-xyz+y2z-y2u+xzu+yzu+z2u-xu2-2yu2+zu2-u3,1461 xyz2+xyzu+y2zu-xz2u+yz2u-z3u-xyu2-xzu2-2z2u2+xu3+yu3-zu3+u4,1462 2xyzu2+y2zu2+2yz2u2-xyu3-2xzu3-yzu3-z2u3+xu4+yu4-2zu4+u5-1;1463 1464 //cyclic(6)1465 //equidim: 1Komp in 5 vars 1sec1466 //prim: 90 (!) Ringe, 12 sec1467 1704 1468 1705 //Theo1 … … 1511 1748 ad; 1512 1749 1513 //Sturmfels, wo vorher Prim schneller (2 sec,sonst 860 sec)1514 1750 //ist CM 1515 //prim: 15 loops, 15 Komp, 1 sec, 1516 //equidim:15 Ringe, 93 sec mit simplify(J,16), 1517 //ohne simlify(J,16) 860sec?, 1518 //andere simplify sind z.T. viel langsamer 1751 //Sturmfels 1519 1752 ring r=32003,(b,s,t,u,v,w,x,y,z),dp; 1520 1753 ideal i= … … 1548 1781 1549 1782 //Horrocks: 1550 //CHAR 32003:mit prim 1 sec, equidim: 115 sec, beide 6 Ringe 1551 // Singulaere Ort hat zu Beginn > 106 000 Erzeuger!! 1552 //char 31991: prim 1sec, 8 Ringe, equidim: 25 Ringe(!), 162 sec, 1553 // nicht reduziert! 1554 // Singulaere Ort hat zu Beginn > 28 000 Erzeuger!! 1555 // i=radical(i) -> 8 Ringe, 1sec (radical <1 sec) 1556 //Horrocks: 1557 ring r=31991,(a,b,c,d,e,f),dp; 1783 ring r=32003,(a,b,c,d,e,f),dp; 1558 1784 ideal i= 1559 1785 adef-16000be2f+16001cef2, … … 1592 1818 1593 1819 1594 ring r=32003,(b,s,t,u,v,w,x,y,z),dp; //3sec1820 ring r=32003,(b,s,t,u,v,w,x,y,z),dp; 1595 1821 ideal k= 1596 1822 wy-vz, … … 1602 1828 ideal i=mstd(intersect(j,k))[2]; 1603 1829 1604 //22, 1605 // neu, prim: 3 sec, equidim 1 sec, je 4 Ringe 1830 1606 1831 ring r=32003,(b,s,t,u,v,w,x,y,z),dp; 1607 1832 ideal i= … … 1613 1838 1614 1839 1615 //riemenschneider, 5 Komponenten 1616 //33(alte Zeiten), normal+primary 3, primary 9, radical 1, minAssGTZ; 2 1617 //neu: prim 0sec, equi 1 sec, je 5 Ringe 1840 //riemenschneider 1618 1841 ring r=32000,(p,q,s,t,u,v,w,x,y,z),wp(1,1,1,1,1,1,2,1,1,1); 1619 1842 ideal i= … … 1631 1854 1632 1855 ring r=0,(u,v,w,x,y,z),wp(1,1,1,3,2,1); 1633 ideal i=wx,wy,wz,vx,vy,vz,ux,uy,uz,y3-x2; //0sec 1856 ideal i=wx,wy,wz,vx,vy,vz,ux,uy,uz,y3-x2; 1857 1858 //Yoshihiko Sakai 1859 ring r=0,(x,y),dp; //genus 0 4 nodes and 6 cusps 1860 ideal i=(x2+y^2-1)^3 +27x2y2; 1861 1862 ring r=0,(x,y),dp; //genus 0 1863 ideal i=(x-y^2)^2 - y*x^3; 1864 1865 ring r=0,(x,y),dp; //genus 4 1866 ideal i=y3-x6+1; 1867 1868 int m=9; // q=9: genus 0 1869 int p=2; 1870 int q=9;//2,...,9 1871 ring r=0,(x,y),dp; 1872 ideal i=y^m - x^p*(x - 1)^q; 1873 1874 ring r=0,(x,y),dp; //genus 19 1875 ideal i=55*x^8+66*y^2*x^9+837*x^2*y^6-75*y^4*x^2-70*y^6-97*y^7*x^2; 1876 1877 1878 ring r=0,(x,y),dp; //genus 34 1879 ideal i=y10+(-2494x2+474)*y8+(84366+2042158x4-660492)*y6 1880 +(128361096x4-47970216x2+6697080-761328152x6)*y4 1881 +(-12024807786x4-506101284x2+15052058268x6+202172841-3212x8)*y2 1882 +34263110700x4-228715574724x6+5431439286x2+201803238 1883 -9127158539954x10-3212722859346x8; 1884 1885 //Rob Koelman 1886 ring r=0,(x,y,z),dp;//genus 10 with 26 cusps 1887 ideal i= 1888 761328152*x^6*z^4-5431439286*x^2*y^8+2494*x^2*z^8+228715574724*x^6*y^4+ 1889 9127158539954*x^10-15052058268*x^6*y^2*z^2+3212722859346*x^8*y^2- 1890 134266087241*x^8*z^2-202172841*y^8*z^2-34263110700*x^4*y^6-6697080*y^6*z^4- 1891 2042158*x^4*z^6-201803238*y^10+12024807786*x^4*y^4*z^2-128361096*x^4*y^2*z^4+ 1892 506101284*x^2*z^2*y^6+47970216*x^2*z^4*y^4+660492*x^2*z^6*y^2- 1893 z^10-474*z^8*y^2-84366*z^6*y^4; 1894 1895 ring r=0,(x,y),dp;//genus 10 with 26 cusps 1896 ideal i=9127158539954x10+3212722859346x8y2+228715574724x6y4-34263110700x4y6 1897 -5431439286x2y8-201803238y10-134266087241x8-15052058268x6y2+12024807786x4y4 1898 +506101284x2y6-202172841y8+761328152x6-128361096x4y2+47970216x2y4-6697080y6 1899 -2042158x4+660492x2y2-84366y4+2494x2-474y2-1; 1900 1901 1902 ring r=0,(x,y),dp; // genuss 1 with 5 cusps 1903 ideal i=57y5+516x4y-320x4+66y4-340x2y3+73y3+128x2-84x2y2-96x2y;; 1904 1905 //Mark van Hoeij 1906 ring r=0,(x,y),dp; //genus 19 1907 ideal i=y20+y13x+x4y5+x3*(x+1)^2; 1908 1909 ring r=0,(x,y),dp; //genus 35 1910 ideal i=y30+y13x+x4y5+x3*(x+1)^2; 1911 1912 ring r=0,(x,y),dp; //genus 55 1913 ideal i=y40+y13x+x4y5+x3*(x+1)^2; 1914 1915 ring r=0,(x,y),dp; //genus 55 1916 ideal i=((x2+y3)^2+xy6)*((x3+y2)^2+x10y); 1917 1634 1918 */ 1635 1919 -
Singular/LIB/ntsolve.lib
r3de58c r50cbdc 1 1 //(GMG, last modified 16.12.00) 2 2 /////////////////////////////////////////////////////////////////////////////// 3 version="$Id: ntsolve.lib,v 1.1 2 2001-02-19 14:17:47 lossenExp $";3 version="$Id: ntsolve.lib,v 1.13 2001-08-27 14:47:56 Singular Exp $"; 4 4 category="Symbolic-numerical solving"; 5 5 info=" … … 23 23 ipar[1]: max. number of iterations 24 24 ipar[2]: accuracy (we have the l_2-norm ||.||): accept solution @code{sol} 25 if ||gls(sol)|| < eps0*(0.1^ipar[2]) 25 if ||gls(sol)|| < eps0*(0.1^ipar[2]) 26 26 where eps0 = ||gls(ini)|| is the initial error 27 27 @end format -
Singular/LIB/paramet.lib
r3de58c r50cbdc 1 1 // last change: 17.01.2001 2 2 /////////////////////////////////////////////////////////////////////////////// 3 version="$Id: paramet.lib,v 1.1 1 2001-02-19 14:17:47 lossenExp $";3 version="$Id: paramet.lib,v 1.12 2001-08-27 14:47:57 Singular Exp $"; 4 4 category="Visualization"; 5 5 info=" … … 8 8 SEE ALSO: normal_lib, primdec_lib, hnoether_lib 9 9 10 PROCEDURES: 11 parametrize(I); parametrizes a prime ideal via the normalization 10 PROCEDURES: 11 parametrize(I); parametrizes a prime ideal via the normalization 12 12 parametrizepd(I); calculates the prim.dec. and parametrizes the components 13 13 parametrizesing(f); parametrizes an isolated plane curve singularity … … 26 26 proc parametrize(ideal I) 27 27 "USAGE: parametrize(I); I ideal in an arbitrary number of variables, 28 whose radical is prime, in a ring with global ordering 28 whose radical is prime, in a ring with global ordering 29 29 CREATE: If the parametrization is successful, the basering will be changed to 30 the parametrization ring, that is to the ring PR=0,(s,t),dp; 31 respectively PR=0,t(1..d),dp;, depending on the dimension of the 30 the parametrization ring, that is to the ring PR=0,(s,t),dp; 31 respectively PR=0,t(1..d),dp;, depending on the dimension of the 32 32 parametrized variety. 33 33 RETURN: a list containing the parametrization ideal resp. the original ideal, … … 104 104 "USAGE: parametrizepd(I); I ideal in a polynomial ring with global ordering 105 105 CREATE: If the parametrization is successful, the basering will be changed to 106 the parametrization ring, that is to the ring PR=0,(s,t),dp; 107 respectively PR=0,t(1..d),dp;, depending on the dimension of the 106 the parametrization ring, that is to the ring PR=0,(s,t),dp; 107 respectively PR=0,t(1..d),dp;, depending on the dimension of the 108 108 parametrized variety. 109 109 RETURN: a list of lists, where each entry contains the parametrization … … 186 186 the parametrization ring, that is to the ring 0,(x,y),ls; 187 187 RETURN: a list containing the parametrizations of the different branches of the 188 singularity at the origin resp. 0, if f was not of the desired kind 188 singularity at the origin resp. 0, if f was not of the desired kind 189 189 SEE ALSO: hnoether_lib, reddevelop 190 190 KEYWORDS: parametrization; curve singularities -
Singular/LIB/presolve.lib
r3de58c r50cbdc 1 1 //last change: 13.02.2001 (Eric Westenberger) 2 2 /////////////////////////////////////////////////////////////////////////////// 3 version="$Id: presolve.lib,v 1.1 7 2001-02-19 14:17:48 lossenExp $";3 version="$Id: presolve.lib,v 1.18 2001-08-27 14:47:57 Singular Exp $"; 4 4 category="Symbolic-numerical solving"; 5 5 info=" … … 748 748 s1: name of new ring,@* 749 749 s2: new ordering@* 750 (default: s1=\"R(n)\" where n is the # of vars in the new ring, 750 (default: s1=\"R(n)\" where n is the # of vars in the new ring, 751 751 s2=\"dp\" or \"ds\" depending whether the first block of the old 752 752 ordering is a p- resp. an s-ordering) 753 753 754 754 CREATE: nothing, if id contains all vars of the basering.@* 755 755 Else, create a ring with same char as the basering, but possibly less … … 884 884 but with new ordering and vars sorted in the following manner: 885 885 @format 886 - each block of vars occuring in pi is sorted w.r.t. its complexity in id, 886 - each block of vars occuring in pi is sorted w.r.t. its complexity in id, 887 887 - ni controls the sorting in i-th block (= vars occuring in pi): 888 888 ni=0 (resp.!=0) means that less (resp. more) complex vars come first … … 893 893 in one block 894 894 @end format 895 Note that only simple ordstrings oi are allowed: 895 Note that only simple ordstrings oi are allowed: 896 896 \"lp\",\"dp\",\"Dp\",\"ls\",\"ds\",\"Ds\". 897 897 RETURN: nothing 898 898 NOTE: We define a variable x to be more complex than y (with respect to id) 899 899 if val(x) > val(y) lexicographically, where val(x) denotes the 900 valuation vector of x:@* 900 valuation vector of x:@* 901 901 consider id as list of polynomials in x with coefficients in the 902 902 remaining variables. Then:@* … … 953 953 { "EXAMPLE:"; echo = 2; 954 954 ring s = 32003,(x,y,z),dp; 955 ideal i=x3+y2,xz+z2; 955 ideal i=x3+y2,xz+z2; 956 956 sortandmap(i,"R_r","i"); 957 957 // i is now an ideal in the new basering R_r … … 987 987 NOTE: We define a variable x to be more complex than y (with respect to id) 988 988 if val(x) > val(y) lexicographically, where val(x) denotes the 989 valuation vector of x:@* 989 valuation vector of x:@* 990 990 consider id as list of polynomials in x with coefficients in the 991 991 remaining variables. Then:@* … … 1021 1021 { "EXAMPLE:"; echo = 2; 1022 1022 ring s=0,(x,y,z,w),dp; 1023 ideal i = x3+y2+yw2,xz+z2,xyz-w2; 1023 ideal i = x3+y2+yw2,xz+z2,xyz-w2; 1024 1024 sortvars(i,0,xy,1,zw); 1025 1025 } … … 1053 1053 We define a variable x to be more complex than y (with respect to id) 1054 1054 if val(x) > val(y) lexicographically, where val(x) denotes the 1055 valuation vector of x:@* 1055 valuation vector of x:@* 1056 1056 consider id as list of polynomials in x with coefficients in the 1057 1057 remaining variables. Then:@* -
Singular/LIB/primdec.lib
r3de58c r50cbdc 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: primdec.lib,v 1. 99 2001-03-29 11:34:59Singular Exp $";2 version="$Id: primdec.lib,v 1.100 2001-08-27 14:47:58 Singular Exp $"; 3 3 category="Commutative Algebra"; 4 4 info=" … … 379 379 /////////////////////////////////////////////////////////////////////////////// 380 380 381 staticproc idealsEqual( ideal k, ideal j)381 proc idealsEqual( ideal k, ideal j) 382 382 { 383 383 return(stdIdealsEqual(std(k),std(j))); … … 426 426 427 427 428 staticproc primaryTest (ideal i, poly p)428 proc primaryTest (ideal i, poly p) 429 429 { 430 430 int m=1; … … 797 797 for(i=1;i<=size(keep);i++) 798 798 { 799 l[size(l)+1]=keep[i]; 800 l[size(l)+1]=primaryTest(keep[i],keep[i][1]); 799 if(deg(keep[i][1])>0) 800 { 801 l[size(l)+1]=keep[i]; 802 l[size(l)+1]=primaryTest(keep[i],keep[i][1]); 803 } 801 804 } 802 805 } … … 952 955 } 953 956 } 957 954 958 if(size(#)==0) 955 959 { … … 3156 3160 RETURN: ideal, the radical of i. 3157 3161 NOTE: Uses the algorithm of Eisenbud/Huneke/Vasconcelos, which 3158 reduces the computation to the complete intersection case, 3162 reduces the computation to the complete intersection case, 3159 3163 by taking, in the general case, a generic linear combination 3160 3164 of the input. … … 3177 3181 intvec op=option(get); 3178 3182 matrix M; 3179 3183 3180 3184 option(redSB); 3181 3185 list m=mstd(i); -
Singular/LIB/primitiv.lib
r3de58c r50cbdc 3 3 // This library is for Singular 1.2 or newer 4 4 5 version="$Id: primitiv.lib,v 1.1 5 2001-02-05 12:01:39 lossenExp $";5 version="$Id: primitiv.lib,v 1.16 2001-08-27 14:47:59 Singular Exp $"; 6 6 category="Commutative Algebra"; 7 7 info=" … … 21 21 "USAGE: primitive(i); i ideal 22 22 ASSUME: i is given by generators m[1],...,m[n] such that for j=1,...,n @* 23 - m[j] is a polynomial in k[x(1),...,x(j)] @* 24 - m[j](a[1],...,a[j-1],x(j)) is the minimal polynomial for a[j] over 23 - m[j] is a polynomial in k[x(1),...,x(j)] @* 24 - m[j](a[1],...,a[j-1],x(j)) is the minimal polynomial for a[j] over 25 25 k(a[1],...,a[j-1]) @* 26 26 (k the ground field of the current basering and x(1),...,x(n) 27 the ring variables). 27 the ring variables). 28 28 RETURN: ideal j in k[x(n)] with 29 - j[1] a minimal polynomial for a primitive element b of 29 - j[1] a minimal polynomial for a primitive element b of 30 30 k(a[1],...,a[n]) over k, 31 - j[2],...,j[n+1] polynomials in k[x(n)] such that j[i+1](b)=a[i] 31 - j[2],...,j[n+1] polynomials in k[x(n)] such that j[i+1](b)=a[i] 32 32 for i=1,...,n. 33 NOTE: the number of variables in the basering has to be exactly n, 33 NOTE: the number of variables in the basering has to be exactly n, 34 34 the number of given generators (i.e., minimal polynomials).@* 35 If the ground field k has only a few elements it may happen that no 36 linear combination of a[1],...,a[n] is a primitive element. In this 35 If the ground field k has only a few elements it may happen that no 36 linear combination of a[1],...,a[n] is a primitive element. In this 37 37 case @code{primitive(i)} returns the zero ideal, and one should use 38 38 @code{primitive_extra(i)} instead. … … 134 134 j[2]; 135 135 j[3]; 136 // no element was primitive -- the calculation of primitive elements 136 // no element was primitive -- the calculation of primitive elements 137 137 // is based on a random choice. 138 138 } … … 142 142 "USAGE: primitive_extra(i); i ideal 143 143 ASSUME: The ground field of the basering is k=Q or k=Z/pZ and the ideal 144 i is given by 2 generators f,g with the following properties: 144 i is given by 2 generators f,g with the following properties: 145 145 @format 146 f is the minimal polynomial of a in k[x], 146 f is the minimal polynomial of a in k[x], 147 147 g is a polynomial in k[x,y] s.th. g(a,y) is the minpoly of b in k(a)[y]. 148 148 @end format … … 154 154 j[2] is a polynomial s.th. j[2](c)=a. 155 155 @end format 156 NOTE: While @code{primitive(i)} may fail for finite fields, 157 @code{primitive_extra(i)} tries all elements of k(a,b) and, hence, 156 NOTE: While @code{primitive(i)} may fail for finite fields, 157 @code{primitive_extra(i)} tries all elements of k(a,b) and, hence, 158 158 always finds a primitive element. @* 159 159 In order to do this (try all elements), field extensions like Z/pZ(a) 160 160 are not allowed for the ground field k. @* 161 @code{primitive_extra(i)} assumes that the second generator, g, is 161 @code{primitive_extra(i)} assumes that the second generator, g, is 162 162 monic as polynomial in (k[x])[y]. 163 163 EXAMPLE: example primitive_extra; shows an example … … 254 254 255 255 proc splitring 256 "USAGE: splitring(f,R[,L]); f poly, R string, L list of polys and/or ideals 256 "USAGE: splitring(f,R[,L]); f poly, R string, L list of polys and/or ideals 257 257 (optional) 258 258 ASSUME: f is univariate and irreducible over the active basering. @* 259 The active ring must allow an algebraic extension (e.g., it cannot 259 The active ring must allow an algebraic extension (e.g., it cannot 260 260 be a transcendent ring extension of Q or Z/p). 261 261 CREATE: a ring with name R, in which f is reducible, and CHANGE to it. 262 262 RETURN: list L mapped into the new ring R, if L is given; else nothing 263 263 NOTE: If the old ring has no parameter, the name @code{a} is chosen for the 264 parameter of R (if @code{a} is no ring variable; if it is, @code{b} is 265 chosen, etc.; if @code{a,b,c,o} are ring variables, 266 @code{splitring(f,R[,L])} produces an error message), otherwise the 267 name of the parameter is kept and only the minimal polynomial is 264 parameter of R (if @code{a} is no ring variable; if it is, @code{b} is 265 chosen, etc.; if @code{a,b,c,o} are ring variables, 266 @code{splitring(f,R[,L])} produces an error message), otherwise the 267 name of the parameter is kept and only the minimal polynomial is 268 268 changed. @* 269 269 The names of the ring variables and the orderings are not affected. @* 270 270 It is also allowed to call @code{splitring} with R=\"\". 271 Then the old basering will be REPLACED by the new ring (with the 271 Then the old basering will be REPLACED by the new ring (with the 272 272 same name as the old ring). 273 273 KEYWORDS: algebraic field extension; extension of rings … … 400 400 ring r=0,(x,y),dp; 401 401 splitring(x2-2,"r1"); // change to Q(sqrt(2)) 402 // change to Q(sqrt(2),sqrt(sqrt(2)))=Q(a) and return the transformed 402 // change to Q(sqrt(2),sqrt(sqrt(2)))=Q(a) and return the transformed 403 403 // old parameter: 404 splitring(x2-a,"r2",a); 404 splitring(x2-a,"r2",a); 405 405 // the result is (a)^2 = (sqrt(sqrt(2)))^2 406 406 nameof(basering); -
Singular/LIB/reesclos.lib
r3de58c r50cbdc 15 15 16 16 PROCEDURES: 17 ReesAlgebra(I); 18 normalI(I[,p[,r]]); 17 ReesAlgebra(I); computes the Rees Algebra of an ideal I 18 normalI(I[,p[,r]]); computes the integral closure of an ideal I using R[It] 19 19 "; 20 20 21 LIB "normal.lib"; // for HomJJ 21 LIB "normal.lib"; // for HomJJ 22 22 LIB "standard.lib"; // for groebner 23 23 … … 44 44 ideal m = maxideal(1); 45 45 46 46 47 47 // Create a new ring with variables for each generator of I 48 48 49 49 execute ("ring Rees = "+oldchar+",("+oldvar+",U(1.."+string(n)+")),dp"); 50 50 51 51 52 52 // Kxt is the old ring with additional variable t 53 53 // Here I -> t*I, so the generators of I generate the subalgebra R[It] in Kxt … … 59 59 for (k=1;k<=n;k++) 60 60 { 61 I[k]=t*I[k]; 62 } 63 61 I[k]=t*I[k]; 62 } 63 64 64 65 65 // Now we map from Rees to Kxt, identity on the original variables, and … … 76 76 ideal ker = preimage(Kxt,phi,zero); 77 77 export (ker); 78 78 79 79 list result = Rees,Kxt; 80 80 81 81 return(result); 82 82 83 83 } 84 84 example … … 93 93 ker; // R[It] is isomorphic to Rees/ker 94 94 } 95 95 96 96 97 97 //////////////////////////////////////////////////////////////////////////// … … 99 99 static 100 100 proc ClosureRees (list L) 101 "USAGE: ClosureRees (L); L a list 101 "USAGE: ClosureRees (L); L a list 102 102 ASSUME: L is a list containing 103 - a ring L[1], inside L[1] an ideal ker such that L[1]/ker is 103 - a ring L[1], inside L[1] an ideal ker such that L[1]/ker is 104 104 isomorphic to the Rees Algebra R[It] of an ideal I in k[x] 105 105 - a ring L[2]=k[x,t], inside L[1] an ideal mapI defining the 106 106 map L[1] --> L[2] with image R[It] 107 107 RETURN: quotients of elements of k[x,t] representing generators of the 108 integral closure of R[It]. The result of ClosureRees is a list 108 integral closure of R[It]. The result of ClosureRees is a list 109 109 images, the first size(images)-1 entries are the numerators of the 110 110 generators, the last one is the universal denominator 111 111 " 112 112 { 113 int dblvl=printlevel-voice+2; // toggles how much data is printed 113 int dblvl=printlevel-voice+2; // toggles how much data is printed 114 114 // during the procedure 115 115 … … 134 134 { 135 135 "// STEP 1: Compute the integral closure of R[It]"; 136 } 136 } 137 137 138 138 list RS; … … 182 182 list JM=groebner(sin),sin; 183 183 } 184 184 185 185 J=radical(JM[2]); 186 186 } … … 189 189 ideal J=radical(JM[2]); 190 190 } 191 191 192 192 if (dblvl>0) 193 193 { … … 199 199 JM =J,J; 200 200 poly nzd=SL[1]; // universal denominator for HomJJ 201 201 202 202 if (dblvl>0) 203 203 { … … 223 223 { // ring R(i+1) 224 224 ideal MJ=JM[2]; 225 226 def R(i+1)=RS[1]; // the data of and some variable decla- 225 226 def R(i+1)=RS[1]; // the data of and some variable decla- 227 227 setring R(i+1); // rations in R(i+1) needed in STEP 2 228 228 ideal ker(i+1)=endid; … … 253 253 list preimages; // here the fractions are stored in the 254 254 // form var(j)=preimages[j]/preimages[length+1] 255 // ('=' means identification via the inclusion) 255 // ('=' means identification via the inclusion) 256 256 // the last entry corresponds to nzd in R(i) 257 257 … … 283 283 for (k=i;k>1;k--) 284 284 { 285 // clear the fraction in the representation in R(i) 286 287 p=p*phi(nzd); 285 // clear the fraction in the representation in R(i) 286 287 p=p*phi(nzd); 288 288 289 289 // compute the preimage of [p mod ker(k)] under phi in R(k-1): … … 294 294 // compute this normal form h... 295 295 296 if (j==1) // in the first iteration: construct S(k)=R(k)[Z], fetch 296 if (j==1) // in the first iteration: construct S(k)=R(k)[Z], fetch 297 297 // endphi (the ideal defining phi) and ker(k) and construct 298 298 // the ideal from above … … 348 348 349 349 // at the end: go back to the original basering and construct gene- 350 // rators of the closure of I 350 // rators of the closure of I 351 351 352 352 setring Kxt; 353 353 map psi=R(1),mapI; // from ReesAlgebra: the map Rees->Kxt 354 354 355 list images=psi(preimages); 356 355 list images=psi(preimages); 356 357 357 if (dblvl>-1) 358 358 { … … 390 390 (the first size(L)-1 elements are the numerators, the last one 391 391 is the denominator) 392 - if # is given: #[1] is an integer, compute generators for the 392 - if # is given: #[1] is an integer, compute generators for the 393 393 closure of I, I^2, ..., I^#[1] 394 394 RETURN: the integral closure of I, ... I^#[1]. If # is not given, compute … … 399 399 closure of the desired powers of I. " 400 400 { 401 int dblvl=printlevel-voice+2; // toggles how much data is printed 402 // during the procedure 401 int dblvl=printlevel-voice+2; // toggles how much data is printed 402 // during the procedure 403 403 404 404 int j,k,d,computepow; // some counters … … 421 421 422 422 intmat m[nvars(basering)-1][1]; // an intvec used for jet and maxdeg1 423 intvec tw=m,1; // such that t has weight 1 and all 423 intvec tw=m,1; // such that t has weight 1 and all 424 424 // other variables have weight 0 425 425 … … 443 443 } 444 444 } 445 } 445 } 446 446 447 447 if (dblvl>0) … … 475 475 { 476 476 image=images[j]-jet(images[j],k-1,tw); 477 if (image<>0) 478 { 477 if (image<>0) 478 { 479 479 image=subst(image/t^k,t,0); 480 480 if (image<>0) … … 497 497 498 498 for (k=2;k<=pow;k++) 499 { 499 { 500 500 for (j=1;j<=(k div 2);j++) 501 { 501 { 502 502 result[k]=result[k]+result[j]*result[k-j]; 503 503 } 504 504 } 505 505 506 506 return(result); 507 507 } … … 537 537 { 538 538 "// Trivial case: I is a principal ideal"; 539 } 539 } 540 540 list result=I; 541 541 if (size(#)>0) … … 545 545 result=insert(result,I*result[k],k); 546 546 } 547 } 547 } 548 548 return(result); 549 549 } … … 575 575 result=insert(result,I*result[k],k); 576 576 } 577 } 577 } 578 578 return(result); 579 579 } … … 586 586 "// We start with the Rees Algebra of I:"; 587 587 } 588 588 589 589 list Rees = ReesAlgebra(I); 590 590 def R(1)=Rees[1]; 591 591 def Kxt=Rees[2]; 592 592 setring R(1); 593 593 594 594 if (dblvl>0) 595 595 { … … 599 599 "// Now ClosureRees computes generators for the integral closure"; 600 600 "// of R[It] step by step"; 601 } 601 } 602 602 603 603 // ClosureRees computes fractions in R[x,t] representing the generators … … 619 619 "//I is integrally closed!"; 620 620 } 621 621 622 622 setring BAS; 623 623 list result=I; … … 628 628 result=insert(result,I*result[k],k); 629 629 } 630 } 630 } 631 631 return(result); 632 632 } 633 633 634 634 // construct the fractions corresponding to the generators of the 635 // closure of I and its powers, depending on # (in fact, they will 635 // closure of I and its powers, depending on # (in fact, they will 636 636 // not be real fractions, of course). This is done in ClosurePower. 637 637 … … 642 642 setring BAS; 643 643 list result=fetch(Kxt,result); 644 return(result); 644 return(result); 645 645 } 646 646 example -
Singular/LIB/solve.lib
r3de58c r50cbdc 1 1 //last change: 13.02.2001 (Eric Westenberger) 2 2 /////////////////////////////////////////////////////////////////////////////// 3 version="$Id: solve.lib,v 1.2 1 2001-02-19 14:17:49 lossenExp $";3 version="$Id: solve.lib,v 1.22 2001-08-27 14:48:00 Singular Exp $"; 4 4 category="Symbolic-numerical solving"; 5 5 info=" … … 778 778 d>0: gives precision (1<d<p) for near-zero-determination,@* 779 779 (default: d=1/2*p) 780 780 781 781 ASSUME: the ground field has char 0;@* 782 782 l was computed using Algorithm of Lazard or Algorithm of Moeller -
Singular/LIB/spcurve.lib
r3de58c r50cbdc 1 1 // (anne, last modified 31.5.99) 2 2 ///////////////////////////////////////////////////////////////////////////// 3 version="$Id: spcurve.lib,v 1.1 5 2001-02-06 11:38:07 anneExp $";3 version="$Id: spcurve.lib,v 1.16 2001-08-27 14:48:00 Singular Exp $"; 4 4 category="Singularities"; 5 5 info=" … … 720 720 e.g. \"R\" leads to ring names R and R1 721 721 * v of size n(n+1) leads to the following module ordering @* 722 gen(v[1]) > gen(v[2]) > ... > gen(v[n(n+1)]) where the matrix 722 gen(v[1]) > gen(v[2]) > ... > gen(v[n(n+1)]) where the matrix 723 723 entry ij corresponds to gen((i-1)*n+j) 724 724 ASSUME: M is a quasihomogeneous n x (n+1) matrix where the n minors define -
Singular/LIB/spectrum.lib
r3de58c r50cbdc 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: spectrum.lib,v 1.1 5 2001-05-03 07:56:41 mschulzeExp $";2 version="$Id: spectrum.lib,v 1.16 2001-08-27 14:48:00 Singular Exp $"; 3 3 category="Singularities"; 4 4 info=" … … 14 14 proc spectrumnd (poly f,list #) 15 15 "USAGE: spectrumnd(f[,1]); poly f 16 ASSUME: basering has characteristic 0 and local ordering, 16 ASSUME: basering has characteristic 0 and local ordering, 17 17 f has isolated singularity at 0 and nondegenerate principal part 18 18 RETURN: … … 23 23 int S[2][i]: multiplicity of spectral number S[1][i] 24 24 @end format 25 NOTE: if a second argument 1 is given, 25 NOTE: if a second argument 1 is given, 26 26 no test for a degenerate principal part will be done 27 27 SEE_ALSO: gaussman_lib … … 69 69 } 70 70 /////////////////////////////////////////////////////////////////////////////// 71 72 proc spadd(list s1, list s2) 73 "USAGE: spadd(s1,s2); list s1, s2 74 RETURN: a list containing the sum of the two spectra s1 and s2 75 EXAMPLE: example spadd; shows an example 76 " 77 { 78 return (system("spadd",s1,s2)); 79 } 80 example 81 { "EXAMPLE:"; echo = 2; 82 ring r=0,(x,y),ds; 83 list s1=spectrumnd(x5+x2y2+y5); 84 s1; 85 list s2=spectrumnd(x2+y3); 86 s2; 87 spadd(s1,s2); 88 } 89 /////////////////////////////////////////////////////////////////////////////// 90 91 proc spmul(list s, int k) 92 "USAGE: spmul(s,k); list s, int k 93 RETURN: a list containing the product of the spectrum s with the integer k 94 EXAMPLE: example spmul; shows an example 95 " 96 { 97 return (system("spmul",s,k)); 98 } 99 example 100 { "EXAMPLE:"; echo = 2; 101 ring r=0,(x,y),ds; 102 list s=spectrumnd(x5+x2y2+y5); 103 s; 104 spmul(s,2); 105 >>>>>>> 1.12.2.1 106 } 107 /////////////////////////////////////////////////////////////////////////////// -
Singular/LIB/standard.lib
r3de58c r50cbdc 1 1 ////////////////////////////////////////////////////////////////////////////// 2 version="$Id: standard.lib,v 1.5 8 2001-02-22 16:02:55 westenbExp $";2 version="$Id: standard.lib,v 1.59 2001-08-27 14:48:01 Singular Exp $"; 3 3 category="Miscellaneous"; 4 4 info=" … … 71 71 PURPOSE: computes the standard basis of the homogeneous ideal in the basering, 72 72 via a Hilbert driven standard basis computation.@* 73 An optional second argument will be used as 1 -st Hilbert function.73 An optional second argument will be used as 1st Hilbert function. 74 74 ASSUME: The optional second argument is the first Hilbert series as computed 75 75 by @code{hilb}. … … 240 240 // we are still here -- do the actual computation 241 241 string ordstr_P = ordstr(P); 242 if ( find(ordstr_P,"s") > 0)242 if ((find(ordstr_P,"s") > 0)||(find(ordstr_P,"M") > 0)) 243 243 { 244 244 //spaeter den lokalen fall ueber lp oder aehnlich behandeln … … 435 435 @item @strong{Purpose:} 436 436 computes a (possibly minimal) free resolution of an ideal or module using 437 a heuristically cho osen method.437 a heuristically chosen method. 438 438 @* The second (int) argument (say, @code{k}) specifies the length of 439 439 the resolution. If it is not positive then @code{k} is assumed to be the … … 603 603 SYNTAX: @code{quot (} module_expression@code{,} ideal_expression @code{)} 604 604 TYPE: module 605 PURPOSE: computes the quotient of the first and the 2nd argument.605 PURPOSE: computes the quotient of the 1st and the 2nd argument. 606 606 If a 3rd argument 'n' is given the n-th method is used 607 607 (n=1...5). -
Singular/LIB/surf.lib
r3de58c r50cbdc 1 1 //last change: 02.03.2001 (Eric Westenberger) 2 2 /////////////////////////////////////////////////////////////////////////////// 3 version="$Id: surf.lib,v 1. 19 2001-03-02 13:41:19 westenbExp $";3 version="$Id: surf.lib,v 1.20 2001-08-27 14:48:01 Singular Exp $"; 4 4 category="Visualization"; 5 5 info=" … … 40 40 41 41 proc plot(ideal I,list #) 42 "USAGE: plot(I); I ideal 43 ASSUME: I defines a plane curve or a surface 42 "USAGE: plot(I); I ideal or poly 43 ASSUME: I defines a plane curve or a surface given by one equation 44 44 RETURN: nothing 45 45 NOTE: requires the external program 'surf' to be installed … … 75 75 } 76 76 ideal I=simplify(phi(I),2); 77 if (leadcoef(I[1]) <0) { I[1]=-I[1]; } 77 78 if (ncols(I)==1 and n<=2) // curve 78 79 { … … 131 132 example 132 133 { "EXAMPLE:"; echo =2; 133 134 134 // --------- plane curves ------------ 135 ring rr0 = 0,(x1,x2),dp; 135 136 136 137 137 ideal I = x1^3 - x2^2; 138 plot(I); 138 139 139 140 141 140 ring rr1 = 0,(x,y,z),dp; 141 ideal I(1) = 2x2-1/2x3 +1-y+1; 142 plot(I(1)); 142 143 143 144 // ---- Singular Logo -------------- … … 145 146 plot(logo); 146 147 147 // --------- implicit curves ------------ 148 // implicit curves 149 ideal I(1) = y,-x2; 150 plot(I(1)); 151 ideal I(2) = x2,-y2 +4; 152 plot(I(2)); 148 // Steiner surface 149 ideal J(2) = x^2*y^2+x^2*z^2+y^2*z^2-17*x*y*z; 150 plot(J(2)); 153 151 154 //the lemniscate 155 156 ideal I(3) = x4+2x2y2 + y4, x2-y2; 157 plot(I(3)); 158 159 // ----------- surfaces ------------------- 160 ideal J(1) = 3xy4 + 2xy2, x5y3 + x + y6,10x2; 161 plot(J(1)); 162 163 // Steiner surface 164 165 ideal J(2) = x^2*y^2+x^2*z^2+y^2*z^2-17*x*y*z; 166 plot(J(2)); 167 152 // -------------------- 168 153 plot(x*(x2-y2)+z2); 169 154 -
Singular/LIB/zeroset.lib
r3de58c r50cbdc 1 1 // Last change 12.02.2001 (Eric Westenberger) 2 2 /////////////////////////////////////////////////////////////////////////////// 3 version="$Id: zeroset.lib,v 1. 7 2001-02-19 14:17:50 lossenExp $";3 version="$Id: zeroset.lib,v 1.8 2001-08-27 14:48:02 Singular Exp $"; 4 4 category="Symbolic-numerical solving"; 5 5 info=" … … 86 86 - 'roots' is the list of roots of the polynomial f (no multiplicities) 87 87 - if the groundfield is Q(a') and the extension field is Q(a), then 88 'newA' is the representation of a' in Q(a). 88 'newA' is the representation of a' in Q(a). 89 89 If the basering contains a parameter 'a' and the minpoly remains unchanged 90 90 then 'newA' = 'a'. … … 312 312 If the basering contains a parameter 'a' and the minpoly remains unchanged 313 313 then 'newA' = 'a'. 314 If the basering does not contain a parameter then 'newA' = 'a' (default). 314 If the basering does not contain a parameter then 'newA' = 'a' (default). 315 315 - 'id' is the ideal I in Q(a)[x_1,...] (a' substituted by 'newA') 316 316 @end format -
Singular/Makefile.in
r3de58c r50cbdc 34 34 @SET_MAKE@ 35 35 CC = @CC@ 36 LD = @LD@ 36 37 CXX = @CXX@ 37 38 LEX = @LEX@ … … 149 150 SOURCES=${CSOURCES} ${CXXSOURCES} \ 150 151 grammar.y scanner.l libparse.l syz2.cc prCopyTemplate.cc \ 151 p_Delete__T emplate.cc p_ShallowCopyDelete__Template.cc \152 p_Copy__T emplate.cc p_Mult_nn__Template.cc pp_Mult_nn__Template.cc \153 pp_Mult_mm__T emplate.cc p_Mult_mm__Template.cc \154 p_Minus_mm_Mult_qq__T emplate.cc p_Add_q__Template.cc \155 p_Neg__T emplate.cc pp_Mult_Coeff_mm_DivSelect__Template.cc \156 pp_Mult_Coeff_mm_DivSelectMult__T emplate.cc \157 p_Merge_q__T emplate.cc pp_Mult_mm_Noether__Template.cc\158 p_kBucketSetLm__T emplate.cc \152 p_Delete__T.cc p_ShallowCopyDelete__T.cc \ 153 p_Copy__T.cc p_Mult_nn__T.cc pp_Mult_nn__T.cc \ 154 pp_Mult_mm__T.cc p_Mult_mm__T.cc \ 155 p_Minus_mm_Mult_qq__T.cc p_Add_q__T.cc \ 156 p_Neg__T.cc pp_Mult_Coeff_mm_DivSelect__T.cc \ 157 pp_Mult_Coeff_mm_DivSelectMult__T.cc \ 158 p_Merge_q__T.cc pp_Mult_mm_Noether__T.cc\ 159 p_kBucketSetLm__T.cc \ 159 160 kInline.cc utils.cc utils.h febase.inc \ 160 161 tesths.cc mpsr_Tok.cc claptmpl.cc … … 217 218 # MAKE SURE THAT THIS IS UP_TO_DATE 218 219 # 219 SLIBS = ainvar.lib algebra.lib all.lib brnoeth.lib classify.lib \ 220 SLIBS = COPYING \ 221 ainvar.lib algebra.lib all.lib brnoeth.lib classify.lib \ 220 222 deform.lib elim.lib equising.lib finvar.lib gaussman.lib \ 221 223 general.lib graphics.lib hnoether.lib homolog.lib inout.lib \ 222 224 intprog.lib latex.lib linalg.lib makedbm.lib matrix.lib \ 223 mondromy.lib mprimdec.lib mregular.lib normal.lib ntsolve.lib \ 224 paramet.lib poly.lib presolve.lib primdec.lib primitiv.lib \ 225 qhmoduli.lib random.lib reesclos.lib ring.lib rinvar.lib \ 226 sing.lib solve.lib spcurve.lib spectrum.lib standard.lib \ 227 stratify.lib surf.lib toric.lib triang.lib zeroset.lib 225 mprimdec.lib \ 226 mondromy.lib mregular.lib normal.lib ntsolve.lib paramet.lib \ 227 poly.lib presolve.lib primdec.lib primitiv.lib qhmoduli.lib \ 228 random.lib reesclos.lib ring.lib rinvar.lib sing.lib \ 229 solve.lib spcurve.lib spectrum.lib standard.lib stratify.lib \ 230 surf.lib toric.lib triang.lib zeroset.lib 228 231 229 232 SLIBS_FILES = $(addprefix LIB/,${SLIBS}) … … 362 365 363 366 p_Procs_%.so: p_Procs_Lib_%.dl_o 364 ld${SLDFLAGS} -o $@ $^367 $(LD) ${SLDFLAGS} -o $@ $^ 365 368 366 369 mpsr.so: $(MPSR_SOURCES:.cc=.dl_o) 367 ld${SLDFLAGS} -o $@ $^ -L${libdir} ${MP_LIBS}370 $(LD) ${SLDFLAGS} -o $@ $^ -L${libdir} ${MP_LIBS} 368 371 369 372 dbmsr.so: $(DBMSR_SOURCES:.cc=.dl_o) 370 ld${SLDFLAGS} -o $@ $^373 $(LD) ${SLDFLAGS} -o $@ $^ 371 374 372 375 src: scanner.cc grammar.h grammar.cc libparse.cc … … 429 432 ${INSTALL_PROGRAM} ${SING_EXEC} ${SINGULAR} 430 433 ${INSTALL_PROGRAM} libparse ${RUN_SINGULARS} ${bindir} 431 ${INSTALL_PROGRAM} ESingular ${bindir} 432 ${INSTALL_PROGRAM} TSingular ${bindir} 433 ${INSTALL_PROGRAM} ${DL_LIBS} ${bindir} 434 ${INSTALL_PROGRAM} ESingular TSingular ${DL_LIBS} ${bindir} 434 435 chmod a+x ${SINGULAR} 435 436 rm -f ${bindir}/${SING_EXEC}${EXEC_EXT} … … 486 487 ${MKINSTALLDIRS} ${install_bindir} 487 488 ${INSTALL_PROGRAM} -s ${SING_EXEC} ${install_bindir}/Singular 488 ${INSTALL_PROGRAM} -s libparse ${RUN_SINGULARS} ESingular TSingular ${ install_bindir}489 ${INSTALL_PROGRAM} -s libparse ${RUN_SINGULARS} ESingular TSingular ${DL_LIBS} ${install_bindir} 489 490 echo "#undef MAKE_DISTRIBUTION " > distrib.h 490 ${INSTALL_PROGRAM} ${DL_LIBS} ${install_bindir}491 491 492 492 install-sharedist: ${SLIBS_FILES} LIB/gftables -
Singular/clapsing.cc
r3de58c r50cbdc 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 // $Id: clapsing.cc,v 1.7 7 2001-02-21 10:17:57Singular Exp $5 // $Id: clapsing.cc,v 1.78 2001-08-27 14:46:49 Singular Exp $ 6 6 /* 7 7 * ABSTRACT: interface between Singular and factory … … 615 615 ideal singclap_factorize ( poly f, intvec ** v , int with_exps) 616 616 { 617 // with_exps: 1 return only true factors617 // with_exps: 3,1 return only true factors, no exponents 618 618 // 2 return true factors and exponents 619 // 0 return factors and exponents619 // 0 return coeff, factors and exponents 620 620 621 621 ideal res=NULL; 622 623 // handle factorize(0) ========================================= 622 624 if (f==NULL) 623 625 { … … 630 632 return res; 631 633 } 634 // handle factorize(mon) ========================================= 635 if (pNext(f)==NULL) 636 { 637 int i=0; 638 int n=0; 639 int e; 640 for(i=pVariables;i>0;i--) if(pGetExp(f,i)!=0) n++; 641 if (with_exps==0) n++; // with coeff 642 res=idInit(max(n,1),1); 643 switch(with_exps) 644 { 645 case 0: // with coef & exp. 646 res->m[0]=pOne(); 647 pSetCoeff(res->m[0],nCopy(pGetCoeff(f))); 648 // no break 649 case 2: // with exp. 650 (*v)=new intvec(n); 651 (**v)[0]=1; 652 // no break 653 case 1: ; 654 #ifdef TEST 655 default: ; 656 #endif 657 } 658 if (n==0) 659 { 660 res->m[0]=pOne(); 661 // (**v)[0]=1; is already done 662 return res; 663 } 664 for(i=pVariables;i>0;i--) 665 { 666 e=pGetExp(f,i); 667 if(e!=0) 668 { 669 n--; 670 poly p=pOne(); 671 pSetExp(p,i,1); 672 pSetm(p); 673 res->m[n]=p; 674 if (with_exps!=1) (**v)[n]=e; 675 } 676 } 677 return res; 678 } 679 // use factory/libfac in general ============================== 632 680 Off(SW_RATIONAL); 633 681 On(SW_SYMMETRIC_FF); … … 635 683 number N=NULL; 636 684 number NN=NULL; 685 number old_lead_coeff=nCopy(pGetCoeff(f)); 637 686 638 687 if (rField_is_Q() || rField_is_Zp()) … … 689 738 else if (rField_is_Extension()) 690 739 { 691 if ( nGetChar()==1) setCharacteristic( 0 );692 else setCharacteristic( -nGetChar() );740 if (rField_is_Q_a()) setCharacteristic( 0 ); 741 else setCharacteristic( -nGetChar() ); 693 742 if ((currRing->minpoly!=NULL) 694 && (nGetChar()<(-1)))743 ) 695 744 { 696 745 CanonicalForm mipo=convSingTrClapP(((lnumber)currRing->minpoly)->z); … … 698 747 CanonicalForm F( convSingAPClapAP( f,a ) ); 699 748 L.insert(F); 700 if ( F.isUnivariate())749 if ((nGetChar()<(-1)) && F.isUnivariate()) 701 750 { 702 751 L = factorize( F, a ); … … 704 753 else 705 754 { 755 CanonicalForm G( convSingTrPClapP( f ) ); 756 #ifdef HAVE_LIBFAC_P 757 CFList as(mipo); 758 L = newfactoras( G, as, 1); 759 #else 706 760 WarnS("complete factorization only for univariate polynomials"); 707 CanonicalForm G( convSingTrPClapP( f ) );708 761 if (nGetChar()==1) /* Q(a) */ 709 762 { … … 712 765 else 713 766 { 714 #ifdef HAVE_LIBFAC_P715 L = Factorize( G );716 #else717 767 goto notImpl; 718 #endif719 768 } 769 #endif 720 770 } 721 771 } … … 784 834 } 785 835 // delete constants 786 if ( (with_exps!=0) && (res!=NULL))836 if (res!=NULL) 787 837 { 788 838 int i=IDELEMS(res)-1; … … 790 840 for(;i>=0;i--) 791 841 { 792 if ((res->m[i]!=NULL) && (pNext(res->m[i])==NULL) && (pIsConstant(res->m[i]))) 842 if ((res->m[i]!=NULL) 843 && (pNext(res->m[i])==NULL) 844 && (pIsConstant(res->m[i]))) 793 845 { 794 pDelete(&(res->m[i])); 795 if ((v!=NULL) && ((*v)!=NULL)) 796 (**v)[i]=0; 797 j++; 798 } 846 if (with_exps!=0) 847 { 848 pDelete(&(res->m[i])); 849 if ((v!=NULL) && ((*v)!=NULL)) 850 (**v)[i]=0; 851 j++; 852 } 853 else if (i!=0) 854 { 855 res->m[0]=pMult(res->m[0],res->m[i]); 856 res->m[i]=NULL; 857 if ((v!=NULL) && ((*v)!=NULL)) 858 (**v)[i]=0; 859 j++; 860 } 861 } 799 862 } 800 863 if (j>0) … … 821 884 } 822 885 } 886 if (rField_is_Q_a() && (currRing->minpoly!=NULL)) 887 { 888 int i=IDELEMS(res)-1; 889 for(;i>=1;i--) 890 { 891 pNorm(res->m[i]); 892 } 893 pSetCoeff(res->m[0],old_lead_coeff); 894 } 895 else 896 nDelete(&old_lead_coeff); 823 897 notImpl: 824 898 if (res==NULL) … … 885 959 } 886 960 887 LL=IrrCharSeries(L); 888 int m= LL.length(); // Anzahl Zeilen 889 int n=0; 961 // a very bad work-around --- FIX IT in libfac 962 // should be fixed as of 2001/6/27 963 int tries=0; 964 int m,n; 890 965 ListIterator<CFList> LLi; 891 CFListIterator Li; 892 for ( LLi = LL; LLi.hasItem(); LLi++ ) 893 { 894 n = max(LLi.getItem().length(),n); 966 loop 967 { 968 LL=IrrCharSeries(L); 969 m= LL.length(); // Anzahl Zeilen 970 n=0; 971 for ( LLi = LL; LLi.hasItem(); LLi++ ) 972 { 973 n = max(LLi.getItem().length(),n); 974 } 975 if ((m!=0) && (n!=0)) break; 976 tries++; 977 if (tries>=5) break; 895 978 } 896 979 if ((m==0) || (n==0)) … … 903 986 } 904 987 res=mpNew(m,n); 988 CFListIterator Li; 905 989 for ( m=1, LLi = LL; LLi.hasItem(); LLi++, m++ ) 906 990 { … … 1153 1237 intvec *v=NULL; 1154 1238 int sw=(int)dummy->Data(); 1155 ideal f=singclap_factorize((poly)(u->Data()), &v, sw); 1239 int fac_sw=sw; 1240 if ((sw<0)||(sw>2)) fac_sw=1; 1241 ideal f=singclap_factorize((poly)(u->Data()), &v, fac_sw); 1156 1242 if (f==NULL) 1157 1243 return TRUE; -
Singular/claptmpl.cc
r3de58c r50cbdc 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 // $Id: claptmpl.cc,v 1.2 4 2000-07-06 13:26:22 pohlExp $5 // $Id: claptmpl.cc,v 1.25 2001-08-27 14:46:49 Singular Exp $ 6 6 /* 7 7 * ABSTRACT - instantiation of all templates … … 41 41 template class ListIterator<CFFactor>; 42 42 template class List<CanonicalForm>; 43 template class List<List<CanonicalForm> >; 43 44 template class ListIterator<CanonicalForm>; 44 45 template class Array<CanonicalForm>; … … 52 53 #ifndef NOSTREAMIO 53 54 template ostream & operator<<(ostream &, const List<Factor<CanonicalForm> > &); 55 template ostream & operator<<(ostream &, const List<List<CanonicalForm> > &); 54 56 template ostream & operator<<(ostream &, const List<Variable> &); 55 57 #endif … … 92 94 T exp() const { return _exp; } 93 95 #ifndef NOSTREAMIO 94 friend ostream & operator <<(ostream &, const Substitution<T> &); 96 friend ostream & operator <<<>(ostream &, Substitution<T> &); 97 void Substitution<T>::print ( ostream& s ) const 98 { 99 s << "(" << factor() << ")^" << exp(); 100 } 95 101 #endif 96 102 }; … … 119 125 #ifndef NOSTREAMIO 120 126 template <class T> 121 ostream& operator<< ( ostream & os, const Substitution<T> & a ) { return os; } 127 ostream & operator <<(ostream & os, Substitution<T> &a) 128 { 129 a.print(os); 130 return os; 131 } 132 template ostream & operator <<(ostream &, Substitution<CanonicalForm> &); 133 template ostream & operator <<(ostream &, const List<CanonicalForm> &); 134 template ostream & operator <<(ostream &, const Array<CanonicalForm> &); 135 template ostream & operator<<(ostream &, const List<Substitution<CanonicalForm> > &); 122 136 #endif 123 137 … … 152 166 153 167 // for charsets: 154 template class List<CFList>;155 168 template class ListIterator<CFList>; 156 169 -
Singular/cntrlc.cc
r3de58c r50cbdc 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: cntrlc.cc,v 1.3 7 2001-03-05 11:48:54Singular Exp $ */4 /* $Id: cntrlc.cc,v 1.38 2001-08-27 14:46:50 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - interupt handling … … 123 123 void sigsegv_handler(int sig, sigcontext s) 124 124 { 125 fprintf(stderr,"Singular : signal %d (v: %d/% lu):\n",sig,SINGULAR_VERSION,feVersionId);125 fprintf(stderr,"Singular : signal %d (v: %d/%u):\n",sig,SINGULAR_VERSION,feVersionId); 126 126 if (sig!=SIGINT) 127 127 { … … 230 230 void sigsegv_handler(int sig, int code, struct sigcontext *scp, char *addr) 231 231 { 232 fprintf(stderr,"Singular : signal %d, code %d (v: %d/% lu):\n",232 fprintf(stderr,"Singular : signal %d, code %d (v: %d/%u):\n", 233 233 sig,code,SINGULAR_VERSION,feVersionId); 234 234 if ((sig!=SIGINT)&&(sig!=SIGABRT)) … … 275 275 void sigsegv_handler(int sig) 276 276 { 277 fprintf(stderr,"Singular : signal %d (v: %d/% lu):\n",277 fprintf(stderr,"Singular : signal %d (v: %d/%u):\n", 278 278 sig,SINGULAR_VERSION,feVersionId); 279 279 if (sig!=SIGINT) -
Singular/configure
r3de58c r50cbdc 600 600 SINGULAR_MAJOR_VERSION=${SINGULAR_MAJOR_VERSION:-2} 601 601 SINGULAR_MINOR_VERSION=${SINGULAR_MINOR_VERSION:-1} 602 SINGULAR_SUB_VERSION=${SINGULAR_SUB_VERSION:- 0}602 SINGULAR_SUB_VERSION=${SINGULAR_SUB_VERSION:-2} 603 603 SINGULAR_VERSION="${SINGULAR_VERSION:-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION}" 604 VERSION_DATE=${VERSION_DATE:-" March2001"}604 VERSION_DATE=${VERSION_DATE:-"August 2001"} 605 605 606 606 …