Changeset 933ed8 in git


Ignore:
Timestamp:
Apr 18, 2020, 12:13:54 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
4922ad56a6e60def4b4595cad0a4d77f563bfe73
Parents:
161411bdc5cc30f7965d2c36a5250edcb33d293ee645dbb37f4b69d6e6c541745eaba9b6e9450b23
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2020-04-18 12:13:54+02:00
git-committer:
GitHub <noreply@github.com>2020-04-18 12:13:54+02:00
Message:
Merge pull request #988 from levandov/spielwiese

letterplace big doc update
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/dmodapp.lib

    r161411 r933ed8  
    140140  - changed charVariety: no homogenization is needed
    141141  - changed inForm: code is much simpler using jet
     142 
     143  06.04.20 by VL:
     144  - engine updated with 2 more modular choices
    142145
    143146*/
     
    153156LIB "qhmoduli.lib"; // for Max
    154157LIB "sing.lib";     // for slocus
     158LIB "ncModslimgb.lib"; // for modular noncomm GB
    155159
    156160
     
    263267
    264268proc engine(def I, int i)
     269"USAGE:  engine(I,i);  I ideal/module/matrix, i an int
     270RETURN:  the same type as I
     271PURPOSE: compute the Groebner basis of I with the algorithm, chosen via i
     272NOTE:    By default and if i=0, slimgb is used;
     273if i=1, std does the job;
     274if i=2, modular slimgb is run without final exactness check;
     275if i=3, modular slimgb is run with final exactness check.
     276EXAMPLE: example engine; shows examples
     277"
     278{
     279  /* std - slimgb mix */
     280  def J;
     281  //  ideal J;
     282  if ((i<=0) || (i>=4))
     283  {
     284      i = 0;
     285      J = slimgb(I);
     286  }
     287  if (i==1)
     288  {
     289    // without options -> strange! (ringlist?)
     290    intvec v = option(get);
     291    option(redSB);
     292    option(redTail);
     293    J = std(I);
     294    option(set, v);
     295  }
     296  if (i==2)
     297  {
     298      // modular slimgb without final exactness check
     299      J = ncmodslimgb(I,0);
     300  }
     301  if (i==3)
     302  {
     303      // modular slimgb with final exactness check
     304      J = ncmodslimgb(I,1);
     305  } 
     306  return(J);
     307}
     308example
     309{
     310  "EXAMPLE:"; echo = 2;
     311  ring r = 0,(x,y),Dp;
     312  ideal I  = y*(x3-y2),x*(x3-y2);
     313  engine(I,0); // uses slimgb
     314  engine(I,1); // uses std
     315  engine(I,2); // uses modular slimgb without exactness check
     316  engine(I,3); // uses modular slimgb with exactness check
     317}
     318
     319/*
     320proc engine(def I, int i)
    265321"USAGE:  engine(I,i);  I  ideal/module/matrix, i an int
    266322RETURN:  the same type as I
     
    295351  engine(I,0); // uses slimgb
    296352  engine(I,1); // uses std
    297 }
     353}
     354*/
    298355
    299356proc poly2list (poly f)
  • Singular/LIB/freegb.lib

    r161411 r933ed8  
    457457  "EXAMPLE:"; echo = 2;
    458458  ring r = 0,(x,y),dp;
    459   def R = freeAlgebra(r, 4); // R with letterplace structure
    460   setring R;
     459  ring R = freeAlgebra(r, 4);
    461460  poly a = x*y; poly b = y;
    462461  lieBracket(a,b);
     
    490489 "EXAMPLE:"; echo = 2;
    491490 ring r = (0,a,b,g),(x,y),Dp;
    492  def R = freeAlgebra(r, 4); // constructs a Letterplace ring
    493  setring R; // downup algebra A
     491 ring R = freeAlgebra(r, 4); // downup algebra A
    494492 ideal J = x*x*y-a*x*y*x - b*y*x*x - g*x,
    495493 x*y*y-a*y*x*y - b*y*y*x - g*y;
     
    981979  "EXAMPLE:"; echo = 2;
    982980  ring r = 0,(x,y,z),dp;
    983   def R = freeAlgebra(r, 7);
     981  ring R = freeAlgebra(r, 7);
    984982  lpVarBlockSize(R);
    985983}
     
    10031001  ring r = 0,(x,y,z),dp;
    10041002  isFreeAlgebra(r);
    1005   def R = freeAlgebra(r, 7);
     1003  ring R = freeAlgebra(r, 7);
    10061004  isFreeAlgebra(R);
    10071005}
     
    10201018  "EXAMPLE:"; echo = 2;
    10211019  ring r = 0,(x,y,z),dp;
    1022   def R = freeAlgebra(r, 7, 10);
    1023   lpNcgenCount(R); // should be 10
     1020  ring R = freeAlgebra(r, 7, 3);
     1021  lpNcgenCount(R); // should be 3
    10241022}
    10251023
     
    28502848  "EXAMPLE:"; echo = 2;
    28512849ring r = 0,(x,y,z),dp;
    2852 int d =5; // degree
    2853 def R = freeAlgebra(r, d);
    2854 setring R;
     2850int d = 5; // degree
     2851ring R = freeAlgebra(r, d);
    28552852ideal I = y*x*y - z*y*z, x*y*x - z*x*y, z*x*z - y*z*x, x*x*x + y*y*y + z*z*z + x*y*z;
    28562853ideal J = letplaceGBasis(I); // compute a Letterplace Groebner basis
     
    28682865RETURN: list L
    28692866NOTE: - L[1] is NF(p,I)
    2870       - L[2] is the list of expressions [i,l_(ij),r_(ij)] with \sum_(i,j) l_(ij) g_i r_(ij) = p - NF(p,I)
     2867      - L[2] is the list of expressions [i,l_(ij),r_(ij)] with \sum_(i,j) l_(ij) g_i r_(ij) = p - NF(p,I) 
    28712868      - procedure lpGBPres2Poly, applied to L, reconstructs p
    28722869EXAMPLE: example lpDivision; shows examples
     
    29402937  "EXAMPLE:"; echo = 2;
    29412938  ring r = 0,(x,y),dp;
    2942   def R = freeAlgebra(r, 4); setring R;
     2939  ring R = freeAlgebra(r, 4);
    29432940  ideal I = x*x + y*y - 1; // 2D sphere
    2944   ideal J = letplaceGBasis(I); // compute a Letterplace Groebner basis
     2941  ideal J = twostd(I); // compute a two-sided Groebner basis
    29452942  J; // it is finite and nice
    29462943  poly h = x*x*y-y*x*x+x*y;
    2947   lpDivision(h,J); // what means that the NF of h wrt J is x*y
     2944  list L = lpDivision(h,J); L; // what means that the NF of h wrt J is x*y
    29482945  h - lpNF(h,J); // and this poly has the folowing two-sided Groebner presentation:
    29492946  -y*J[1] + J[1]*y;
     2947  lpGBPres2Poly(L,J); // reconstructs the above automatically
    29502948}
    29512949
     
    29692967  "EXAMPLE:"; echo = 2;
    29702968  ring r = 0,(x,y),dp;
    2971   def R = freeAlgebra(r, 4); setring R;
     2969  ring R = freeAlgebra(r, 4);
    29722970  ideal I = x*x + y*y - 1; // 2D sphere
    2973   ideal J = letplaceGBasis(I); // compute a Letterplace Groebner basis
     2971  ideal J = twostd(I); // compute a two-sided Groebner basis
    29742972  J; // it is finite and nice
    29752973  poly h = x*x*y-y*x*x+x*y;
    2976   list L = lpDivision(h,J); // what means that the NF of h wrt J is x*y
     2974  list L = lpDivision(h,J);
     2975  L[1]; // what means that the normal form (or the remainder) of h wrt J is x*y
    29772976  lpGBPres2Poly(L,J); // we see, that it is equal to h from above
    29782977}
    2979 
    2980 
    29812978
    29822979
     
    37823779  poly q = y*y*x*x;
    37833780  poly w = z*y*x*z;
    3784   // p,q,w are some polynomials we want to transform into their
     3781  // p, q, w are some polynomials we want to transform into their
    37853782  // intvec representation
    37863783  ideal G = p,q,w;
     
    37883785}
    37893786
    3790 proc testLift(ideal M, matrix T) {
     3787proc testLift(ideal M, matrix T)
     3788"USAGE: testLift(M,T); module M, matrix T
     3789RETURN: module
     3790PURPOSE: assembles the result of the lift procedure
     3791ASSUME: T is the lift matrix of a submodule of M
     3792NOTE: the inverse of the lift procedure
     3793EXAMPLE: example testLift; shows examples
     3794"
     3795{
    37913796  ideal R;
    37923797  if (ncols(M) != nrows(T)) { ERROR("cols(M) != rows(T)") }
     
    37993804  return(R);
    38003805}
    3801 
    3802 proc testSyz(ideal M, module S) {
     3806example
     3807{
     3808  "EXAMPLE:"; echo = 2;
     3809  LIB "freegb.lib";
     3810  ring r = 0,(x,y),(c,Dp);
     3811  ring R = freeAlgebra(r, 7, 2);
     3812  ideal I = std(x*y*x + 1);
     3813  print(matrix(I)); // finite two-sided Groebner basis
     3814  ideal SI = x*I[1]*y + y*x*I[2], I[1]*y*x + I[2]*y;
     3815  matrix T = lift(I, SI); // T is the lifting matrix of SI wrt I
     3816  print(T); //
     3817  print(matrix(SI)); // the original generators of SI as a matrix
     3818  print(matrix(testLift(I,T))); // and the result of testLift
     3819}
     3820
     3821proc testSyz(ideal M, module S)
     3822"USAGE: testSyz(M,S); module M, S
     3823RETURN: module
     3824PURPOSE: tests the result of the syz procedure
     3825ASSUME: S is the syzygy bimodule of M
     3826EXAMPLE: example testSyz; shows examples
     3827"
     3828{
    38033829  ideal R;
    38043830  if (ncols(M) != nrows(S)) { ERROR("cols(M) != rows(T)") }
     
    38113837  return(R);
    38123838}
     3839example
     3840{
     3841  "EXAMPLE:"; echo = 2;
     3842  LIB "freegb.lib";
     3843  ring r = 0,(x,y),(c,Dp);
     3844  ring R = freeAlgebra(r, 7, 2);
     3845  ideal I = twostd(x*y*x + 1);
     3846  print(matrix(I));
     3847  module S = syz(I);
     3848  print(S);
     3849  testSyz(I,S); // returns zero
     3850}
    38133851
    38143852static proc mod_init()
Note: See TracChangeset for help on using the changeset viewer.