Changeset 492f2b in git


Ignore:
Timestamp:
Feb 11, 2019, 12:20:49 PM (5 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd25190065115c859833252500a64cfb7b11e3a50')
Children:
c74f9a041c8c07a27a1d6bb833e872c996747043db2d030f2978e4ac91d7c6c2ec8a30d848e9e0b7
Parents:
37cbc29f515f886b5506d4f7b5731a488acfe576c82ac11f84041c2f7aab6feb3b083d6f87da756e
Message:
Merge branch 'kabouzeid-release' into spielwiese
Files:
12 edited
2 moved

Legend:

Unmodified
Added
Removed
  • Singular/LIB/freegb.lib

    r37cbc2 r492f2b  
    2323
    2424PROCEDURES:
    25 freeAlgebra(r, d);               creates a Letterplace ring out of given data
    2625isFreeAlgebra(r);                check whether r is a letterplace ring (free algebra)
    2726lpDegBound(R);                   returns the degree bound of a letterplace ring
     
    3635isOrderingShiftInvariant(i);     tests shift-invariance of the monomial ordering
    3736isVar(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
    4137
    4238makeLetterplaceRing(d);          (deprecated, use freeAlgebra) creates a Letterplace ring out of given data
     
    6258
    6359LIB "qhmoduli.lib"; // for Max
    64 LIB "bfun.lib"; // for inForm
    65 LIB "fpadim.lib"; // for intvec conversion
    6660LIB "fpalgebras.lib"; // for compatibility
    6761
     
    8377  example lpPrint;
    8478  example isVar;
    85 
    86   example lpLmDivides;
    87   example lpVarAt;
    8879
    8980  example ivL2lpI;
     
    378369  poly i = 1;
    379370  isVar(i);
    380 }
    381 
    382 proc lpLmDivides(ideal I, poly p)
    383 "USAGE: lpLmDivides(I); I an ideal
    384 RETURN: boolean
    385 ASSUME: basering is a Letterplace ring
    386 PURPOSE: tests if there is a polynomial q in I with LM(q)|LM(p)
    387 EXAMPLE: example lpLmDivides; shows examples
    388 "
    389 {
    390   ERROR(" freegb.so not loaded");
    391 }
    392 example
    393 {
    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 int
    406 RETURN: poly
    407 ASSUME: basering is a Letterplace ring
    408 PURPOSE: returns the variable (as a poly) at position pos of the poly p
    409 EXAMPLE: example lpVarAt; shows examples
    410 "
    411 {
    412   ERROR(" freegb.so not loaded");
    413 }
    414 example
    415 {
    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);
    422371}
    423372
     
    10541003  def R = freeAlgebra(r, 7);
    10551004  isFreeAlgebra(R);
    1056 }
    1057 
    1058 proc freeAlgebra(def r, int d)
    1059 "USAGE:  freeAlgebra(r, d); r a ring, d an integer
    1060 RETURN:  ring
    1061 PURPOSE: creates a letterplace ring with the ordering of r
    1062 EXAMPLE: example freeAlgebra; shows examples
    1063 "
    1064 {
    1065   ERROR(" freegb.so not loaded");
    1066 }
    1067 example
    1068 {
    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;
    10761005}
    10771006
     
    38863815static proc mod_init()
    38873816{
    3888   LIB"freegb.so";
    3889 }
     3817  LIB"freealgebra.so";
     3818}
  • Singular/LIB/nctools.lib

    r37cbc2 r492f2b  
    13961396
    13971397///////////////////////////////////////////////////////////////////////////////
    1398 proc rightStd(def I)
     1398proc rightStd(def I)// just an alias for compatibility
    13991399"USAGE:  rightStd(I); I an ideal/ module
    14001400PURPOSE: compute a right Groebner basis of I
     
    14031403"
    14041404{
    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));
    14131406}
    14141407example
  • Singular/dyn_modules/Makefile.am

    r37cbc2 r492f2b  
    11ACLOCAL_AMFLAGS = -I ../m4
    22
    3 SUBDIRS=staticdemo bigintm subsets syzextra pyobject customstd gfanlib python gitfan polymake singmathic Order interval cohomo freegb
     3SUBDIRS=staticdemo bigintm subsets syzextra pyobject customstd gfanlib python gitfan polymake singmathic Order interval cohomo freealgebra
  • Singular/dyn_modules/freealgebra/Makefile.am

    r37cbc2 r492f2b  
    11ACLOCAL_AMFLAGS = -I ../../m4
    22
    3 if SI_BUILTIN_FREEGB
    4   noinst_LTLIBRARIES=freegb.la
     3if SI_BUILTIN_FREEALGEBRA
     4  noinst_LTLIBRARIES=freealgebra.la
    55  P_PROCS_MODULE_LDFLAGS = -module
    66  P_PROCS_CPPFLAGS_COMMON = -DSTATIC_VERSION
    77else
    8   module_LTLIBRARIES=freegb.la
     8  module_LTLIBRARIES=freealgebra.la
    99  moduledir = $(libexecdir)/singular/MOD
    1010  P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION
     
    1818
    1919
    20 freegb_la_CPPFLAGS  = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON}
    21 freegb_la_LDFLAGS   = ${AM_LDFLAGS} ${P_PROCS_MODULE_LDFLAGS} $(SINGULAR_LDFLAGS)
    22 SOURCES = freegb.cc
    23 freegb_la_SOURCES   = $(SOURCES)
     20freealgebra_la_CPPFLAGS  = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON}
     21freealgebra_la_LDFLAGS   = ${AM_LDFLAGS} ${P_PROCS_MODULE_LDFLAGS} $(SINGULAR_LDFLAGS)
     22SOURCES = freealgebra.cc
     23freealgebra_la_SOURCES   = $(SOURCES)
    2424
  • Singular/dyn_modules/freealgebra/freealgebra.cc

    r37cbc2 r492f2b  
    22
    33#ifdef HAVE_SHIFTBBA
    4 static BOOLEAN freegb(leftv res, leftv args)
     4static BOOLEAN freeAlgebra(leftv res, leftv args)
    55{
    66  const short t1[]={2,RING_CMD,INT_CMD};
     
    8080}
    8181
    82 /*==================== divide-test for freeGB  =================*/
    8382static BOOLEAN lpLmDivides(leftv res, leftv h)
    8483{
     
    112111}
    113112
    114 /*==================== get var for freeGB  ====================*/
    115113static BOOLEAN lpVarAt(leftv res, leftv h)
    116114{
     
    130128//------------------------------------------------------------------------
    131129// initialisation of the module
    132 extern "C" int SI_MOD_INIT(freegb)(SModulFunctions* p)
     130extern "C" int SI_MOD_INIT(freealgebra)(SModulFunctions* p)
    133131{
    134132#ifdef HAVE_SHIFTBBA
    135   p->iiAddCproc("freegb.so","freeAlgebra",FALSE,freegb);
    136   p->iiAddCproc("freegb.so","lpLmDivides",FALSE,lpLmDivides);
    137   p->iiAddCproc("freegb.so","lpVarAt",FALSE,lpVarAt);
    138   p->iiAddCproc("freegb.so","stest",TRUE,stest);
    139   p->iiAddCproc("freegb.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);
    140138#endif
    141139  return (MAX_TOK);
  • Singular/iparith.cc

    r37cbc2 r492f2b  
    51165116}
    51175117#endif
    5118 
     5118#ifdef HAVE_SHIFTBBA // do not place above jjSTD in this file because we need to reference it
     5119static 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
    51195177static BOOLEAN jjTYPEOF(leftv res, leftv v)
    51205178{
  • Singular/table.h

    r37cbc2 r492f2b  
    245245,{D(jjDUMMY),      RESOLUTION_CMD,  RESOLUTION_CMD, RESOLUTION_CMD, ALLOW_PLURAL |ALLOW_RING}
    246246,{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
    247250,{D(jjRINGLIST),   RINGLIST_CMD,    LIST_CMD,       RING_CMD      , ALLOW_NC |ALLOW_RING}
    248251,{D(jjRINGLIST_C), RING_LIST_CMD,   LIST_CMD,       CRING_CMD     , ALLOW_NC |ALLOW_RING}
     
    11681171  { "return",      0, RETURN ,            RETURN},
    11691172  { "RETURN",      0, END_GRAMMAR ,       RETURN},
     1173#ifdef HAVE_PLURAL
     1174  { "rightstd",    0, RIGHTSTD_CMD ,      CMD_1},
     1175#endif /* HAVE_PLURAL */
    11701176  { "ring",        0, RING_CMD ,          RING_CMD},
    11711177  { "ringlist",    0, RINGLIST_CMD ,      CMD_1},
  • Singular/tok.h

    r37cbc2 r492f2b  
    169169  RESTART_CMD,
    170170  RESULTANT_CMD,
     171  RIGHTSTD_CMD,
    171172  RINGLIST_CMD,
    172173  RING_LIST_CMD,
  • configure.ac

    r37cbc2 r492f2b  
    249249AC_CONFIG_FILES([Singular/dyn_modules/staticdemo/Makefile])
    250250AC_CONFIG_FILES([Singular/dyn_modules/subsets/Makefile])
    251 AC_CONFIG_FILES([Singular/dyn_modules/freegb/Makefile])
     251AC_CONFIG_FILES([Singular/dyn_modules/freealgebra/Makefile])
    252252AC_CONFIG_FILES([Singular/dyn_modules/gitfan/Makefile])
    253253AC_CONFIG_FILES([Singular/dyn_modules/interval/Makefile])
  • kernel/GBEngine/kstd1.cc

    r37cbc2 r492f2b  
    20932093
    20942094#ifdef HAVE_SHIFTBBA
    2095   if(rIsLPRing(currRing)) return freegb(F);
     2095  if(rIsLPRing(currRing)) return freegb(F, Q);
    20962096#endif
    20972097
  • kernel/GBEngine/kstd1.h

    r37cbc2 r492f2b  
    4141ideal kStdShift(ideal F, ideal Q, tHomog h,intvec ** mw, intvec *hilb=NULL,
    4242    int syzComp=0, int newIdeal=0, intvec *vw=NULL, BOOLEAN rightGB=FALSE);
     43
     44ideal freegb(ideal F, ideal Q);
     45ideal rightgb(ideal F, ideal Q);
    4346
    4447/* the following global data are defined in kutil.cc */
  • kernel/GBEngine/kstd2.cc

    r37cbc2 r492f2b  
    44594459
    44604460
    4461 ideal freegb(ideal F)
     4461ideal freegb(ideal F, ideal Q)
    44624462{
    44634463  assume(rIsLPRing(currRing));
    44644464  assume(idIsInV(F));
    4465   ideal RS = kStdShift(F, NULL, testHomog, NULL);
     4465  ideal RS = kStdShift(F, Q, testHomog, NULL);
    44664466  idSkipZeroes(RS); // is this even necessary?
    44674467  assume(idIsInV(RS));
  • kernel/GBEngine/kutil.h

    r37cbc2 r492f2b  
    861861int redFirstShift (LObject* h,kStrategy strat); // ok
    862862
    863 ideal freegb(ideal F);
    864 ideal rightgb(ideal F, ideal Q);
    865 
    866863ideal bbaShift(ideal F, ideal Q,intvec *w,intvec *hilb,kStrategy strat);
    867864// test syz strategy: // will be removed soon
  • m4/options.m4

    r37cbc2 r492f2b  
    321321  bi_staticdemo=false
    322322  bi_subsets=false
    323   bi_freegb=false
     323  bi_freealgebra=false
    324324  bi_syzextra=false
    325325  bi_pyobject=false
     
    357357       staticdemo ) bi_staticdemo=true;;
    358358       subsets ) bi_subsets=true;;
    359        freegb ) bi_freegb=true;;
     359       freealgebra ) bi_freealgebra=true;;
    360360       syzextra ) bi_syzextra=true ;;
    361361       pyobject ) bi_pyobject=true ;;
     
    396396 AM_CONDITIONAL([SI_BUILTIN_STATICDEMO], [test x$bi_staticdemo = xtrue])
    397397 AM_CONDITIONAL([SI_BUILTIN_SUBSETS], [test x$bi_subsets = xtrue])
    398  AM_CONDITIONAL([SI_BUILTIN_FREEGB], [test x$bi_freegb = xtrue])
     398 AM_CONDITIONAL([SI_BUILTIN_FREEALGEBRA], [test x$bi_freealgebra = xtrue])
    399399 AM_CONDITIONAL([SI_BUILTIN_SYZEXTRA], [test x$bi_syzextra = xtrue])
    400400 AM_CONDITIONAL([SI_BUILTIN_PYOBJECT], [test x$bi_pyobject = xtrue])
Note: See TracChangeset for help on using the changeset viewer.