Changeset db20ef in git
- Timestamp:
- Feb 11, 2019, 7:15:29 PM (5 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- c7fb9ff6da4316321f6a0c0453fa9136c1a675a9
- Parents:
- b4bd838b3690c680bc49a7beaa4e08a024be4f7377624bdb8f875aa938e9fda67d8720405651c08d
- Files:
-
- 26 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/fpadim.lib
rb4bd83 rdb20ef 15 15 16 16 KEYWORDS: finitely presented algebra; Letterplace Groebner basis; K-basis; K-dimension; Hilbert series 17 18 PROCEDURES:19 lpKDimCheck(G); checks whether the K-dimension of A/<G> is finite20 lpKDim(G[,d,n]); computes the K-dimension of A/<G>21 lpMonomialBasis(d, donly, J); computes a list of monomials not contained in J22 lpHilbert(G[,d,n]); computes the truncated Hilbert series of A/<G>23 lpSickleDim(G[,d,n]); computes the mistletoes and the K-dimension of A/<G>24 17 25 18 NOTE: … … 73 66 [Stu] G. Studzinski: Dimension computations in non-commutative, 74 67 associative algebras, Diploma thesis, RWTH Aachen, 2010. 68 69 PROCEDURES: 70 lpKDimCheck(G); checks whether the K-dimension of A/<G> is finite 71 lpKDim(G[,d,n]); computes the K-dimension of A/<G> 72 lpMonomialBasis(d, donly, J); computes a list of monomials not contained in J 73 lpHilbert(G[,d,n]); computes the truncated Hilbert series of A/<G> 74 lpSickleDim(G[,d,n]); computes the mistletoes and the K-dimension of A/<G> 75 75 76 76 SEE ALSO: freegb_lib, fpaprops_lib, ncHilb_lib -
Singular/LIB/fpalgebras.lib
rb4bd83 rdb20ef 78 78 RETURN: ideal 79 79 ASSUME: basering has a letterplace ring structure and 80 @*A is a generalized Cartan matrix with integer entries80 A is a generalized Cartan matrix with integer entries 81 81 PURPOSE: compute the ideal of Serre's relations associated to A 82 82 EXAMPLE: example serreRelations; shows examples … … 145 145 RETURN: ring (and ideal) 146 146 PURPOSE: compute the inhomogeneous Serre's relations associated to A in given 147 @*variable names147 variable names 148 148 ASSUME: three ideals in the input are of the same sizes and contain merely 149 @*variables which are interpreted as follows: N resp. P stand for negative150 @*resp. positive roots, C stand for Cartan elements. d is the degree bound for151 @*letterplace ring, which will be returned.152 @*The matrix A is a generalized Cartan matrix with integer entries153 @*The result is the ideal called 'fsRel' in the returned ring.149 variables which are interpreted as follows: N resp. P stand for negative 150 resp. positive roots, C stand for Cartan elements. d is the degree bound for 151 letterplace ring, which will be returned. 152 The matrix A is a generalized Cartan matrix with integer entries 153 The result is the ideal called 'fsRel' in the returned ring. 154 154 EXAMPLE: example fullSerreRelations; shows examples 155 155 " … … 363 363 RETURN: ring (and exports ideal) 364 364 PURPOSE: compute the ideal of Adem relations for i<2j in characteristic 0 365 @*the ideal is exported under the name AdemRel in the output ring365 the ideal is exported under the name AdemRel in the output ring 366 366 EXAMPLE: example ademRelations; shows examples 367 367 " -
Singular/LIB/fpaprops.lib
rb4bd83 rdb20ef 55 55 "USAGE: lpNoetherian(G); G an ideal in a Letterplace ring 56 56 RETURN: int 57 @*0 not Noetherian58 @*1 left Noetherian59 @*2 right Noetherian60 @*3 Noetherian61 @*4 weak Noetherian57 0 not Noetherian 58 1 left Noetherian 59 2 right Noetherian 60 3 Noetherian 61 4 weak Noetherian 62 62 PURPOSE: Check whether the monomial algebra A/<LM(G)> is (left/right) noetherian 63 63 ASSUME: - basering is a Letterplace ring 64 @*- G is a Groebner basis64 - G is a Groebner basis 65 65 THEORY: lpNoetherian works with the monomial algebra A/<LM(G)>. 66 66 If it gives an affirmative answer for one of the properties, then it … … 644 644 start. The parameter visited, cyclic and path should be 0. 645 645 RETURN: int 646 @*:Maximal number of distinct cycles646 Maximal number of distinct cycles 647 647 PURPOSE: Calculate the maximal number of distinct cycles in a single path starting at v 648 648 ASSUME: Basering is a Letterplace ring … … 730 730 proc lpUfGraph(ideal G, list #) 731 731 "USAGE: lpUfGraph(G); G a set of monomials in a letterplace ring. 732 @* lpUfGraph(G,1); G a set of monomials in a letterplace ring.733 732 RETURN: intmat or list 734 733 NOTE: lpUfGraph(G); returns intmat. lpUfGraph(G,1); returns list L with L[1] an intmat and L[2] an ideal. … … 882 881 RETURN: int 883 882 PURPOSE: Determines the Gelfand Kirillov dimension of A/<G> 884 @*-1 means positive infinite883 -1 means positive infinite 885 884 ASSUME: - basering is a Letterplace ring 886 @*- G is a Groebner basis885 - G is a Groebner basis 887 886 " 888 887 { -
Singular/LIB/freegb.lib
rb4bd83 rdb20ef 23 23 24 24 PROCEDURES: 25 freeAlgebra(r, d); creates a Letterplace ring out of given data26 25 isFreeAlgebra(r); check whether r is a letterplace ring (free algebra) 27 26 lpDegBound(R); returns the degree bound of a letterplace ring 28 27 lpVarBlockSize(R); returns the size of the letterplace blocks 29 30 letplaceGBasis(I); (deprecated, use twostd) two-sided Groebner basis of a letterplace ideal I 31 28 letplaceGBasis(I); (deprecated) two-sided Groebner basis of a letterplace ideal I 32 29 lpDivision(f,I); two-sided division with remainder 33 30 lpGBPres2Poly(L,I); reconstructs a polynomial from the output of lpDivision 34 35 31 lieBracket(a,b[, N]); Lie bracket ab-ba of two letterplace polynomials 36 32 isOrderingShiftInvariant(i); tests shift-invariance of the monomial ordering 37 33 isVar(p); check whether p is a power of a single variable 38 39 lpLmDivides(ideal I, poly p); tests whether there exists q in I, such that LM(q)|LM(p) 40 lpVarAt(poly p, int pos); returns the variable (as a poly) at position pos of the poly p 41 42 makeLetterplaceRing(d); (deprecated, use freeAlgebra) creates a Letterplace ring out of given data 34 makeLetterplaceRing(d); (deprecated) creates a Letterplace ring out of given data 43 35 setLetterplaceAttributes(R,d,b); (for testing purposes) supplies ring R with the letterplace structure 44 36 … … 62 54 63 55 LIB "qhmoduli.lib"; // for Max 64 LIB "bfun.lib"; // for inForm65 LIB "fpadim.lib"; // for intvec conversion66 56 LIB "fpalgebras.lib"; // for compatibility 67 57 … … 84 74 example isVar; 85 75 86 example lpLmDivides;87 example lpVarAt;88 89 76 example ivL2lpI; 90 77 example iv2lp; … … 100 87 RETURN: ring with special attributes set 101 88 PURPOSE: sets attributes for a letterplace ring: 102 @*'isLetterplaceRing' = true, 'uptodeg' = d, 'lV' = b, where103 @*'uptodeg' stands for the degree bound,104 @*'lV' for the number of variables in the block 0.89 'isLetterplaceRing' = true, 'uptodeg' = d, 'lV' = b, where 90 'uptodeg' stands for the degree bound, 91 'lV' for the number of variables in the block 0. 105 92 NOTE: Activate the resulting ring by using @code{setring} 106 93 " … … 340 327 RETURN: int 341 328 PURPOSE: check, whether leading monomial of p is a power of a single variable 342 @*from the basering. Returns the exponent or 0 if p is multivariate.329 from the basering. Returns the exponent or 0 if p is multivariate. 343 330 EXAMPLE: example isVar; shows examples 344 331 " … … 380 367 } 381 368 382 proc lpLmDivides(ideal I, poly p)383 "USAGE: lpLmDivides(I); I an ideal384 RETURN: boolean385 ASSUME: basering is a Letterplace ring386 PURPOSE: tests if there is a polynomial q in I with LM(q)|LM(p)387 EXAMPLE: example lpLmDivides; shows examples388 "389 {390 ERROR(" freegb.so not loaded");391 }392 example393 {394 "EXAMPLE:"; echo = 2;395 ring r = 0,(x,y),dp;396 def R = freeAlgebra(r, 5);397 setring R;398 poly p = x*y*y;399 lpLmDivides(y*y, p);400 lpLmDivides(y*x, p);401 lpLmDivides(ideal(y*y, y*x), p);402 }403 404 proc lpVarAt(poly p, int pos)405 "USAGE: lpVarAt(p, pos); p a poly, pos an int406 RETURN: poly407 ASSUME: basering is a Letterplace ring408 PURPOSE: returns the variable (as a poly) at position pos of the poly p409 EXAMPLE: example lpVarAt; shows examples410 "411 {412 ERROR(" freegb.so not loaded");413 }414 example415 {416 "EXAMPLE:"; echo = 2;417 ring r = 0,(x,y),dp;418 def R = freeAlgebra(r, 5);419 setring R;420 poly p = y*y*x;421 lpVarAt(p, 3);422 }423 424 369 proc letplaceGBasis(def I) 425 370 "USAGE: letplaceGBasis(I); I an ideal/module 426 371 RETURN: ideal/module 427 ASSUME: basering is a Letterplace ring, input consists of Letterplace 428 @* polynomials 429 PURPOSE: compute the two-sided Groebner basis of I via Letterplace 430 @* algorithm (legacy routine) 372 ASSUME: basering is a Letterplace ring, input consists of Letterplace polynomials 373 PURPOSE: compute the two-sided Groebner basis of I via Letterplace algorithm (legacy routine) 431 374 NOTE: the degree bound for this computation is read off the letterplace 432 @*structure of basering375 structure of basering 433 376 EXAMPLE: example letplaceGBasis; shows examples 434 377 " … … 469 412 PURPOSE:compute the Lie bracket [a,b] = ab - ba between letterplace polynomials 470 413 NOTE: if N>1 is specified, then the left normed bracket [a,[...[a,b]]]] is 471 @*computed.414 computed. 472 415 EXAMPLE: example lieBracket; shows examples 473 416 " … … 566 509 RETURN: ring 567 510 ASSUME: L has a special form. Namely, it is a list of modules, where 568 569 511 - each generator of every module stands for a monomial times coefficient in 570 @* free algebra, 571 512 free algebra, 572 513 - in such a vector generator, the 1st entry is a nonzero coefficient from the 573 @* ground field 574 514 ground field 575 515 - and each next entry hosts a variable from the basering. 576 516 PURPOSE: compute the two-sided Groebner basis of an ideal, encoded by L 577 @*in the free associative algebra, up to degree d517 in the free associative algebra, up to degree d 578 518 NOTE: Apply @code{lst2str} to the output in order to obtain a better readable 579 @*presentation519 presentation 580 520 EXAMPLE: example freeGBasis; shows examples 581 521 " … … 1054 994 def R = freeAlgebra(r, 7); 1055 995 isFreeAlgebra(R); 1056 }1057 1058 proc freeAlgebra(def r, int d)1059 "USAGE: freeAlgebra(r, d); r a ring, d an integer1060 RETURN: ring1061 PURPOSE: creates a letterplace ring with the ordering of r1062 EXAMPLE: example freeAlgebra; shows examples1063 "1064 {1065 ERROR(" freegb.so not loaded");1066 }1067 example1068 {1069 "EXAMPLE:"; echo = 2;1070 ring r = 0,(x,y,z),dp;1071 def R = freeAlgebra(r, 7);1072 R;1073 ring r2 = 0,(x,y,z),lp;1074 def R2 = freeAlgebra(r2, 7);1075 R2;1076 996 } 1077 997 … … 3231 3151 RETURN: int 3232 3152 NOTE: Tests whether the ordering of the current ring is shift invariant, which is the case, when LM(p) > LM(p') for all p and p' where p' is p shifted by any number of places. 3233 @* If withHoles != 0 even Letterplace polynomials with holes (eg. x(1)*y(4)) are considered. 3153 3154 If withHoles != 0 even Letterplace polynomials with holes (eg. x(1)*y(4)) are considered. 3234 3155 ASSUME: - basering is a Letterplace ring. 3235 3156 " … … 3886 3807 static proc mod_init() 3887 3808 { 3888 LIB"free gb.so";3889 } 3809 LIB"freealgebra.so"; 3810 } -
Singular/LIB/nctools.lib
rb4bd83 rdb20ef 1396 1396 1397 1397 /////////////////////////////////////////////////////////////////////////////// 1398 proc rightStd(def I) 1398 proc rightStd(def I)// just an alias for compatibility 1399 1399 "USAGE: rightStd(I); I an ideal/ module 1400 1400 PURPOSE: compute a right Groebner basis of I … … 1403 1403 " 1404 1404 { 1405 def A = basering; 1406 def Aopp = opposite(A); 1407 setring Aopp; 1408 def Iopp = oppose(A,I); 1409 def Jopp = groebner(Iopp); 1410 setring A; 1411 def J = oppose(Aopp,Jopp); 1412 return(J); 1405 return(rightstd(I)); 1413 1406 } 1414 1407 example … … 1771 1764 RETURN: ring 1772 1765 PURPOSE: create a copy of a given ring equipped with the 1773 @*elimination ordering for module components @code{(c,<)}1766 elimination ordering for module components @code{(c,<)} 1774 1767 NOTE: usually the list argument contains a ring to work with 1775 1768 EXAMPLE: example makeModElimRing; shows an example -
Singular/checklibs.c
rb4bd83 rdb20ef 7 7 #define LINE_LEN 200 8 8 #define RECOMMENDED_LEN 100 9 VARFILE *f;10 VARint trailing_spaces=0;11 VARint tabs=0;12 VARint verylong_lines=0;13 VARint lines=0;14 VARunsigned char buf[LINE_LEN];15 VARint proc_cnt=0;16 VARunsigned char *proc[NUM_PROC];17 VARunsigned char have_doc[NUM_PROC];18 VARunsigned char have_example[NUM_PROC];19 VARunsigned char proc_found[NUM_PROC];20 VARint non_ascii=0;21 VARint non_ascii_line=0;22 VARint star_nl=0;23 VARint footer=0;24 VARint header=0;25 VARint crlf=0;26 VARint proc_help_lines=0;27 VARint proc_help_texinfo=0;9 FILE *f; 10 int trailing_spaces=0; 11 int tabs=0; 12 int verylong_lines=0; 13 int lines=0; 14 unsigned char buf[LINE_LEN]; 15 int proc_cnt=0; 16 unsigned char *proc[NUM_PROC]; 17 unsigned char have_doc[NUM_PROC]; 18 unsigned char have_example[NUM_PROC]; 19 unsigned char proc_found[NUM_PROC]; 20 int non_ascii=0; 21 int non_ascii_line=0; 22 int star_nl=0; 23 int footer=0; 24 int header=0; 25 int crlf=0; 26 int proc_help_lines=0; 27 int proc_help_texinfo=0; 28 28 29 29 void get_next() -
Singular/dyn_modules/Makefile.am
rb4bd83 rdb20ef 1 1 ACLOCAL_AMFLAGS = -I ../m4 2 2 3 SUBDIRS=staticdemo bigintm subsets syzextra pyobject customstd gfanlib python gitfan polymake singmathic Order interval cohomo free gb3 SUBDIRS=staticdemo bigintm subsets syzextra pyobject customstd gfanlib python gitfan polymake singmathic Order interval cohomo freealgebra -
Singular/dyn_modules/freealgebra/Makefile.am
rb4bd83 rdb20ef 1 1 ACLOCAL_AMFLAGS = -I ../../m4 2 2 3 if SI_BUILTIN_FREE GB4 noinst_LTLIBRARIES=free gb.la3 if SI_BUILTIN_FREEALGEBRA 4 noinst_LTLIBRARIES=freealgebra.la 5 5 P_PROCS_MODULE_LDFLAGS = -module 6 6 P_PROCS_CPPFLAGS_COMMON = -DSTATIC_VERSION 7 7 else 8 module_LTLIBRARIES=free gb.la8 module_LTLIBRARIES=freealgebra.la 9 9 moduledir = $(libexecdir)/singular/MOD 10 10 P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION … … 18 18 19 19 20 free gb_la_CPPFLAGS = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON}21 free gb_la_LDFLAGS = ${AM_LDFLAGS} ${P_PROCS_MODULE_LDFLAGS} $(SINGULAR_LDFLAGS)22 SOURCES = free gb.cc23 free gb_la_SOURCES = $(SOURCES)20 freealgebra_la_CPPFLAGS = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON} 21 freealgebra_la_LDFLAGS = ${AM_LDFLAGS} ${P_PROCS_MODULE_LDFLAGS} $(SINGULAR_LDFLAGS) 22 SOURCES = freealgebra.cc 23 freealgebra_la_SOURCES = $(SOURCES) 24 24 -
Singular/dyn_modules/freealgebra/freealgebra.cc
rb4bd83 rdb20ef 2 2 3 3 #ifdef HAVE_SHIFTBBA 4 static BOOLEAN free gb(leftv res, leftv args)4 static BOOLEAN freeAlgebra(leftv res, leftv args) 5 5 { 6 6 const short t1[]={2,RING_CMD,INT_CMD}; … … 80 80 } 81 81 82 /*==================== divide-test for freeGB =================*/83 82 static BOOLEAN lpLmDivides(leftv res, leftv h) 84 83 { … … 112 111 } 113 112 114 /*==================== get var for freeGB ====================*/115 113 static BOOLEAN lpVarAt(leftv res, leftv h) 116 114 { … … 130 128 //------------------------------------------------------------------------ 131 129 // initialisation of the module 132 extern "C" int SI_MOD_INIT(free gb)(SModulFunctions* p)130 extern "C" int SI_MOD_INIT(freealgebra)(SModulFunctions* p) 133 131 { 134 132 #ifdef HAVE_SHIFTBBA 135 p->iiAddCproc("free gb.so","freeAlgebra",FALSE,freegb);136 p->iiAddCproc("free gb.so","lpLmDivides",FALSE,lpLmDivides);137 p->iiAddCproc("free gb.so","lpVarAt",FALSE,lpVarAt);138 p->iiAddCproc("free gb.so","stest",TRUE,stest);139 p->iiAddCproc("free gb.so","btest",TRUE,btest);133 p->iiAddCproc("freealgebra.so","freeAlgebra",FALSE,freeAlgebra); 134 p->iiAddCproc("freealgebra.so","lpLmDivides",FALSE,lpLmDivides); 135 p->iiAddCproc("freealgebra.so","lpVarAt",FALSE,lpVarAt); 136 p->iiAddCproc("freealgebra.so","stest",TRUE,stest); 137 p->iiAddCproc("freealgebra.so","btest",TRUE,btest); 140 138 #endif 141 139 return (MAX_TOK); -
Singular/iparith.cc
rb4bd83 rdb20ef 5116 5116 } 5117 5117 #endif 5118 5118 #ifdef HAVE_SHIFTBBA // do not place above jjSTD in this file because we need to reference it 5119 static BOOLEAN jjRIGHTSTD(leftv res, leftv v) 5120 { 5121 if (rIsLPRing(currRing)) 5122 { 5123 if (rField_is_numeric(currRing)) 5124 WarnS("groebner base computations with inexact coefficients can not be trusted due to rounding errors"); 5125 ideal result; 5126 ideal v_id=(ideal)v->Data(); 5127 /* intvec *w=(intvec *)atGet(v,"isHomog",INTVEC_CMD); */ 5128 /* tHomog hom=testHomog; */ 5129 /* if (w!=NULL) */ 5130 /* { */ 5131 /* if (!idTestHomModule(v_id,currRing->qideal,w)) */ 5132 /* { */ 5133 /* WarnS("wrong weights"); */ 5134 /* w=NULL; */ 5135 /* } */ 5136 /* else */ 5137 /* { */ 5138 /* hom=isHomog; */ 5139 /* w=ivCopy(w); */ 5140 /* } */ 5141 /* } */ 5142 /* result=kStd(v_id,currRing->qideal,hom,&w); */ 5143 result = rightgb(v_id, currRing->qideal); 5144 idSkipZeroes(result); 5145 res->data = (char *)result; 5146 if(!TEST_OPT_DEGBOUND) setFlag(res,FLAG_STD); 5147 /* if (w!=NULL) atSet(res,omStrDup("isHomog"),w,INTVEC_CMD); */ 5148 return FALSE; 5149 } 5150 else if (rIsPluralRing(currRing)) 5151 { 5152 ideal I=(ideal)v->Data(); 5153 5154 ring A = currRing; 5155 ring Aopp = rOpposite(A); 5156 currRing = Aopp; 5157 ideal Iopp = idOppose(A, I, Aopp); 5158 ideal Jopp = kStd(Iopp,currRing->qideal,testHomog,NULL); 5159 currRing = A; 5160 ideal J = idOppose(Aopp, Jopp, A); 5161 5162 id_Delete(&Iopp, Aopp); 5163 id_Delete(&Jopp, Aopp); 5164 rDelete(Aopp); 5165 5166 idSkipZeroes(J); 5167 res->data = (char *)J; 5168 if(!TEST_OPT_DEGBOUND) setFlag(res,FLAG_STD); 5169 return FALSE; 5170 } 5171 else 5172 { 5173 return jjSTD(res, v); 5174 } 5175 } 5176 #endif 5119 5177 static BOOLEAN jjTYPEOF(leftv res, leftv v) 5120 5178 { -
Singular/table.h
rb4bd83 rdb20ef 245 245 ,{D(jjDUMMY), RESOLUTION_CMD, RESOLUTION_CMD, RESOLUTION_CMD, ALLOW_PLURAL |ALLOW_RING} 246 246 ,{D(jjRESTART), RESTART_CMD, NONE, INT_CMD, ALLOW_NC |ALLOW_RING} 247 #ifdef HAVE_SHIFTBBA 248 ,{D(jjRIGHTSTD), RIGHTSTD_CMD, IDEAL_CMD, IDEAL_CMD , ALLOW_NC |NO_RING} 249 #endif 247 250 ,{D(jjRINGLIST), RINGLIST_CMD, LIST_CMD, RING_CMD , ALLOW_NC |ALLOW_RING} 248 251 ,{D(jjRINGLIST_C), RING_LIST_CMD, LIST_CMD, CRING_CMD , ALLOW_NC |ALLOW_RING} … … 1168 1171 { "return", 0, RETURN , RETURN}, 1169 1172 { "RETURN", 0, END_GRAMMAR , RETURN}, 1173 #ifdef HAVE_SHIFTBBA 1174 { "rightstd", 0, RIGHTSTD_CMD , CMD_1}, 1175 #endif /* HAVE_PLURAL */ 1170 1176 { "ring", 0, RING_CMD , RING_CMD}, 1171 1177 { "ringlist", 0, RINGLIST_CMD , CMD_1}, -
Singular/tok.h
rb4bd83 rdb20ef 169 169 RESTART_CMD, 170 170 RESULTANT_CMD, 171 RIGHTSTD_CMD, 171 172 RINGLIST_CMD, 172 173 RING_LIST_CMD, -
configure.ac
rb4bd83 rdb20ef 249 249 AC_CONFIG_FILES([Singular/dyn_modules/staticdemo/Makefile]) 250 250 AC_CONFIG_FILES([Singular/dyn_modules/subsets/Makefile]) 251 AC_CONFIG_FILES([Singular/dyn_modules/free gb/Makefile])251 AC_CONFIG_FILES([Singular/dyn_modules/freealgebra/Makefile]) 252 252 AC_CONFIG_FILES([Singular/dyn_modules/gitfan/Makefile]) 253 253 AC_CONFIG_FILES([Singular/dyn_modules/interval/Makefile]) -
kernel/GBEngine/kstd1.cc
rb4bd83 rdb20ef 2093 2093 2094 2094 #ifdef HAVE_SHIFTBBA 2095 if(rIsLPRing(currRing)) return freegb(F );2095 if(rIsLPRing(currRing)) return freegb(F, Q); 2096 2096 #endif 2097 2097 -
kernel/GBEngine/kstd1.h
rb4bd83 rdb20ef 41 41 ideal kStdShift(ideal F, ideal Q, tHomog h,intvec ** mw, intvec *hilb=NULL, 42 42 int syzComp=0, int newIdeal=0, intvec *vw=NULL, BOOLEAN rightGB=FALSE); 43 44 ideal freegb(ideal F, ideal Q); 45 ideal rightgb(ideal F, ideal Q); 43 46 44 47 /* the following global data are defined in kutil.cc */ -
kernel/GBEngine/kstd2.cc
rb4bd83 rdb20ef 4459 4459 4460 4460 4461 ideal freegb(ideal F )4461 ideal freegb(ideal F, ideal Q) 4462 4462 { 4463 4463 assume(rIsLPRing(currRing)); 4464 4464 assume(idIsInV(F)); 4465 ideal RS = kStdShift(F, NULL, testHomog, NULL);4465 ideal RS = kStdShift(F, Q, testHomog, NULL); 4466 4466 idSkipZeroes(RS); // is this even necessary? 4467 4467 assume(idIsInV(RS)); -
kernel/GBEngine/kutil.h
rb4bd83 rdb20ef 861 861 int redFirstShift (LObject* h,kStrategy strat); // ok 862 862 863 ideal freegb(ideal F);864 ideal rightgb(ideal F, ideal Q);865 866 863 ideal bbaShift(ideal F, ideal Q,intvec *w,intvec *hilb,kStrategy strat); 867 864 // test syz strategy: // will be removed soon -
kernel/ideals.h
rb4bd83 rdb20ef 140 140 ideal idLiftStd (ideal h1, matrix *m, tHomog h=testHomog, ideal *syz=NULL, GbVariant a=GbDefault); 141 141 142 ideal idLift (ideal mod, ideal su mod,ideal * rest=NULL,142 ideal idLift (ideal mod, ideal submod,ideal * rest=NULL, 143 143 BOOLEAN goodShape=FALSE, BOOLEAN isSB=TRUE,BOOLEAN divide=FALSE, 144 144 matrix *unit=NULL, GbVariant a=GbDefault); -
kernel/polys.cc
rb4bd83 rdb20ef 7 7 #include "kernel/ideals.h" 8 8 #include "polys/clapsing.h" 9 #include "polys/clapconv.h" 9 10 10 11 /// Widely used global variable which specifies the current polynomial ring for Singular interpreter and legacy implementatins. … … 50 51 if(p_GetComp(p,r)==0) 51 52 { 52 if ((r->cf->convSingNFactoryN!=ndConvSingNFactoryN) 53 if((rFieldType(r)==n_transExt) 54 &&(convSingTrP(p,r)) 55 &&(convSingTrP(q,r))) 56 { 57 poly res=singclap_pdivide(p, q, r); 58 p_Delete(&p,r); 59 p_Delete(&q,r); 60 return res; 61 } 62 else if ((r->cf->convSingNFactoryN!=ndConvSingNFactoryN) 53 63 &&(!rField_is_Ring(r))) 54 64 { … … 71 81 SI_RESTORE_OPT1(save_opt); 72 82 if (r!=save_ring) rChangeCurrRing(save_ring); 73 if (idIs0(R)) 74 { 75 matrix T = id_Module2formatedMatrix(m,1,1,r); 76 p=MATELEM(T,1,1); MATELEM(T,1,1)=NULL; 77 id_Delete((ideal *)&T,r); 78 } 79 else p=NULL; 83 matrix T = id_Module2formatedMatrix(m,1,1,r); 84 p=MATELEM(T,1,1); MATELEM(T,1,1)=NULL; 85 id_Delete((ideal *)&T,r); 80 86 id_Delete((ideal *)&U,r); 81 87 id_Delete(&R,r); … … 109 115 if (I->m[i]!=NULL) 110 116 { 111 if ((r->cf->convSingNFactoryN!=ndConvSingNFactoryN) 117 if((rFieldType(r)==n_transExt) 118 &&(convSingTrP(I->m[i],r)) 119 &&(convSingTrP(q,r))) 120 { 121 h=singclap_pdivide(I->m[i],q,r); 122 } 123 else if ((r->cf->convSingNFactoryN!=ndConvSingNFactoryN) 112 124 &&(!rField_is_Ring(r))) 113 125 h=singclap_pdivide(I->m[i],q,r); … … 164 176 return p_DivideM(p,q,r); 165 177 } 166 return FALSE; 178 return NULL; 179 } 180 181 poly p_DivRem(poly p, poly q, poly &rest, const ring r) 182 { 183 assume(q!=NULL); 184 rest=NULL; 185 if (q==NULL) 186 { 187 WerrorS("div. by 0"); 188 return NULL; 189 } 190 if (p==NULL) 191 { 192 p_Delete(&q,r); 193 return NULL; 194 } 195 if (rIsLPRing(r)) 196 { 197 WerrorS("not implemented for letterplace rings"); 198 return NULL; 199 } 200 if(p_GetComp(p,r)==0) 201 { 202 if((rFieldType(r)==n_transExt) 203 &&(convSingTrP(p,r)) 204 &&(convSingTrP(q,r))) 205 { 206 poly res=singclap_pdivide(p, q, r); 207 rest=singclap_pmod(p,q,r); 208 p_Delete(&p,r); 209 p_Delete(&q,r); 210 return res; 211 } 212 else if ((r->cf->convSingNFactoryN!=ndConvSingNFactoryN) 213 &&(!rField_is_Ring(r))) 214 { 215 poly res=singclap_pdivide(p, q, r); 216 rest=singclap_pmod(p,q,r); 217 p_Delete(&p,r); 218 p_Delete(&q,r); 219 return res; 220 } 221 else 222 { 223 ideal vi=idInit(1,1); vi->m[0]=q; 224 ideal ui=idInit(1,1); ui->m[0]=p; 225 ideal R; matrix U; 226 ring save_ring=currRing; 227 if (r!=currRing) rChangeCurrRing(r); 228 int save_opt; 229 SI_SAVE_OPT1(save_opt); 230 si_opt_1 &= ~(Sy_bit(OPT_PROT)); 231 ideal m = idLift(vi,ui,&R, FALSE,TRUE,TRUE,&U); 232 SI_RESTORE_OPT1(save_opt); 233 if (r!=save_ring) rChangeCurrRing(save_ring); 234 matrix T = id_Module2formatedMatrix(m,1,1,r); 235 p=MATELEM(T,1,1); MATELEM(T,1,1)=NULL; 236 id_Delete((ideal *)&T,r); 237 T = id_Module2formatedMatrix(R,1,1,r); 238 rest=MATELEM(T,1,1); MATELEM(T,1,1)=NULL; 239 id_Delete((ideal *)&T,r); 240 id_Delete((ideal *)&U,r); 241 id_Delete(&R,r); 242 //vi->m[0]=NULL; ui->m[0]=NULL; 243 id_Delete(&vi,r); 244 id_Delete(&ui,r); 245 return p; 246 } 247 } 248 return NULL; 167 249 } 168 250 -
kernel/polys.h
rb4bd83 rdb20ef 160 160 #endif 161 161 162 /// polynomial division , ignoring the rest162 /// polynomial division a/b, ignoring the rest 163 163 /// via singclap_pdivide resp. idLift 164 164 /// destroyes a,b 165 165 poly p_Divide(poly a, poly b, const ring r); 166 poly p_DivRem(poly a, poly b, poly &rest, const ring r); /*julia*/ 166 167 167 168 /// polynomial gcd -
libpolys/polys/clapconv.cc
rb4bd83 rdb20ef 290 290 while ( p!=NULL ) 291 291 { 292 n_Normalize(p_GetCoeff(p, r), r->cf);292 //n_Normalize(p_GetCoeff(p, r), r->cf); 293 293 294 294 // test if denominator is constant 295 if (! p_IsConstantPoly(DEN ((fraction)p_GetCoeff (p,r)),r->cf->extRing) && !errorreported)295 if (!errorreported && !p_IsConstantPoly(DEN ((fraction)p_GetCoeff (p,r)),r->cf->extRing)) 296 296 WerrorS("conversion error: denominator!= 1"); 297 297 … … 316 316 } 317 317 return result; 318 } 319 320 BOOLEAN convSingTrP(poly p, const ring r ) 321 { 322 while ( p!=NULL ) 323 { 324 n_Normalize(p_GetCoeff(p, r), r->cf); 325 326 // test if denominator is constant 327 if (!p_IsConstantPoly(DEN ((fraction)p_GetCoeff (p,r)),r->cf->extRing)) 328 return FALSE; 329 pIter(p); 330 } 331 return TRUE; 318 332 } 319 333 -
libpolys/polys/clapconv.h
rb4bd83 rdb20ef 30 30 31 31 CanonicalForm convSingTrPFactoryP ( poly p, const ring r ); 32 BOOLEAN convSingTrP(poly p, const ring r ); 32 33 poly convFactoryPSingTrP ( const CanonicalForm & f, const ring r ); 33 34 -
libpolys/polys/clapsing.cc
rb4bd83 rdb20ef 84 84 else 85 85 { 86 convSingTrP(f,r); 87 convSingTrP(g,r); 86 88 CanonicalForm F( convSingTrPFactoryP( f,r ) ), G( convSingTrPFactoryP( g,r ) ); 87 89 res= convFactoryPSingTrP( gcd( F, G ),r ); -
libpolys/polys/monomials/ring.cc
rb4bd83 rdb20ef 5130 5130 int lb = rBlocks(r) - 2; 5131 5131 return (r->order[lb] == ringorder_c || r->order[lb] == ringorder_C); 5132 }5133 5134 n_coeffType rFieldType(ring r)5135 {5136 return (r->cf->type);5137 if (rField_is_Zp(r)) return n_Zp;5138 if (rField_is_Q(r)) return n_Q;5139 if (rField_is_R(r)) return n_R;5140 if (rField_is_GF(r)) return n_GF;5141 if (rField_is_long_R(r)) return n_long_R;5142 if (rField_is_Zp_a(r)) return getCoeffType(r->cf);5143 if (rField_is_Q_a(r)) return getCoeffType(r->cf);5144 if (rField_is_long_C(r)) return n_long_C;5145 if (rField_is_Z(r)) return n_Z;5146 if (rField_is_Zn(r)) return n_Zn;5147 if (rField_is_Ring_PtoM(r)) return n_Znm;5148 if (rField_is_Ring_2toM(r)) return n_Z2m;5149 5150 return n_unknown;5151 5132 } 5152 5133 -
libpolys/polys/monomials/ring.h
rb4bd83 rdb20ef 548 548 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_has_simple_Alloc(r->cf); } 549 549 550 n_coeffType rFieldType(const ring r); 550 /// the type of the coefficient filed of r (n_Zp, n_Q, etc) 551 static inline n_coeffType rFieldType(const ring r) { return (r->cf->type); } 551 552 552 553 /// this needs to be called whenever a new ring is created: new fields -
m4/options.m4
rb4bd83 rdb20ef 321 321 bi_staticdemo=false 322 322 bi_subsets=false 323 bi_free gb=false323 bi_freealgebra=false 324 324 bi_syzextra=false 325 325 bi_pyobject=false … … 357 357 staticdemo ) bi_staticdemo=true;; 358 358 subsets ) bi_subsets=true;; 359 free gb ) bi_freegb=true;;359 freealgebra ) bi_freealgebra=true;; 360 360 syzextra ) bi_syzextra=true ;; 361 361 pyobject ) bi_pyobject=true ;; … … 396 396 AM_CONDITIONAL([SI_BUILTIN_STATICDEMO], [test x$bi_staticdemo = xtrue]) 397 397 AM_CONDITIONAL([SI_BUILTIN_SUBSETS], [test x$bi_subsets = xtrue]) 398 AM_CONDITIONAL([SI_BUILTIN_FREE GB], [test x$bi_freegb= xtrue])398 AM_CONDITIONAL([SI_BUILTIN_FREEALGEBRA], [test x$bi_freealgebra = xtrue]) 399 399 AM_CONDITIONAL([SI_BUILTIN_SYZEXTRA], [test x$bi_syzextra = xtrue]) 400 400 AM_CONDITIONAL([SI_BUILTIN_PYOBJECT], [test x$bi_pyobject = xtrue])
Note: See TracChangeset
for help on using the changeset viewer.