Changeset ba52354 in git


Ignore:
Timestamp:
Dec 12, 2018, 9:25:51 AM (5 years ago)
Author:
Karim Abou Zeid <karim.abou.zeid@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
b61db87696c50b4b348aa7aed9a1f5d0a91806c0
Parents:
868395f580cc618adf6e23743472e26e829d5ece
Message:
add lpDegBound lpBlockSize and lpIsFreeAlgebra to freegb.lib
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/freegb.lib

    r868395 rba52354  
    2323PROCEDURES:
    2424freeAlgebra(r, d);               creates a ring with d blocks of shifted original variables
    25 makeLetterplaceRing(d);          (deprecated) creates a ring with d blocks of shifted original variables
    26 setLetterplaceAttributes(R,d,b); supplies ring R with the letterplace structure
    27 lieBracket(a,b[, N]);            Lie bracket ab-ba of two letterplace polynomials
     25lpDegbound(R);                   returns the degree bound of a letterplace ring
     26lpBlockSize(R);                  returns the size of the letterplace blocks
     27lpIsFreeAlgebra(r);              check whether r is a letterplace ring (free algebra)
     28
    2829letplaceGBasis(I);               two-sided Groebner basis of a letterplace ideal I
     30
    2931lpDivision(f,I);                 two-sided division with remainder
    3032lpGBPres2Poly(L,I);              reconstructs a polynomial from the output of lpDivision
     33
     34lieBracket(a,b[, N]);            Lie bracket ab-ba of two letterplace polynomials
    3135isOrderingShiftInvariant(i);     tests shift-invariance of the monomial ordering
    32 
    3336isVar(p);                        check whether p is a power of a single variable
    3437
    3538lpLmDivides(ideal I, poly p)     tests if there is a polynomial q in I with LM(q)|LM(p)
    3639lpVarAt(poly p, int pos)         returns the variable (as a poly) at position pos of the poly p
     40
     41makeLetterplaceRing(d);          (deprecated) creates a ring with d blocks of shifted original variables
     42setLetterplaceAttributes(R,d,b); (for testing) supplies ring R with the letterplace structure
    3743
    3844SEE ALSO: fpadim_lib, fpaprops_lib, fpalgebras_lib, LETTERPLACE
     
    988994  //  print(s);
    989995  return(J);
     996}
     997
     998proc lpDegBound(def R)
     999"USAGE:  lpDegBound(R); R a letterplace ring
     1000RETURN:  int
     1001PURPOSE: returns the degree bound of the letterplace ring
     1002EXAMPLE: example lpDegBound; shows examples
     1003"
     1004{
     1005  int lV = attrib(R, "isLetterplaceRing");
     1006  if (lV < 1) {
     1007    ERROR("not a letterplace ring");
     1008  }
     1009  return (nvars(R) div lV);
     1010}
     1011example
     1012{
     1013  "EXAMPLE:"; echo = 2;
     1014  ring r = 0,(x,y,z),dp;
     1015  def R = freeAlgebra(r, 7);
     1016  lpDegBound(R);
     1017}
     1018
     1019proc lpBlockSize(def R)
     1020"USAGE:  lpBlockSize(R); R a letterplace ring
     1021RETURN:  int
     1022PURPOSE: returns the block size of the letterplace ring, that is the number of variables of the original ring.
     1023EXAMPLE: example lpBlockSize; shows examples
     1024"
     1025{
     1026  int lV = attrib(R, "isLetterplaceRing");
     1027  if (lV < 1) {
     1028    ERROR("not a letterplace ring");
     1029  }
     1030  return (lV);
     1031}
     1032example
     1033{
     1034  "EXAMPLE:"; echo = 2;
     1035  ring r = 0,(x,y,z),dp;
     1036  def R = freeAlgebra(r, 7);
     1037  lpBlockSize(R);
     1038}
     1039
     1040proc lpIsFreeAlgebra(def r)
     1041"USAGE:  lpIsFreeAlgebra(r); r a ring
     1042RETURN:  boolean
     1043PURPOSE: check whether R is a letterplace ring (free algebra)
     1044EXAMPLE: example lpIsFreeAlgebra; shows examples
     1045"
     1046{
     1047  int lV = attrib(r, "isLetterplaceRing");
     1048  if (lV < 1) {
     1049    return (0);
     1050  }
     1051  return (1);
     1052}
     1053example
     1054{
     1055  "EXAMPLE:"; echo = 2;
     1056  ring r = 0,(x,y,z),dp;
     1057  lpIsFreeAlgebra(r);
     1058  def R = freeAlgebra(r, 7);
     1059  lpIsFreeAlgebra(R);
    9901060}
    9911061
Note: See TracChangeset for help on using the changeset viewer.