Index: Singular/LIB/fpaprops.lib
===================================================================
--- Singular/LIB/fpaprops.lib	(revision 8ff090c8caf331f456d841b4dfcae0dab86cc3d3)
+++ Singular/LIB/fpaprops.lib	(revision 25c1b81b33a57f7dd03b06ccb5e90cbfeb1e77f8)
@@ -1277,2 +1277,3 @@
   def R = lpDelVar(2); setring R; R;
 }
+
Index: Singular/LIB/freegb.lib
===================================================================
--- Singular/LIB/freegb.lib	(revision 8ff090c8caf331f456d841b4dfcae0dab86cc3d3)
+++ Singular/LIB/freegb.lib	(revision 25c1b81b33a57f7dd03b06ccb5e90cbfeb1e77f8)
@@ -2521,8 +2521,4 @@
   int uptodeg = attrib(basering,"uptodeg");
   int lV = attrib(basering,"lV");
-  if (deg(a) + i > uptodeg)
-  {
-    ERROR("degree bound violated by the shift!");
-  }
   return(system("stest",a,i,uptodeg,lV));
 }
@@ -2539,4 +2535,30 @@
 }
 
+proc lastBlock(poly p)
+"USAGE:  lastBlock(p); p letterplace poly
+RETURN: int
+ASSUME: basering has letterplace ring structure
+PURPOSE: get the number of the last block occuring in the poly
+EXAMPLE: example lastBlock; shows examples
+"
+{
+  if (lpAssumeViolation())
+  {
+    ERROR("Incomplete Letterplace structure on the basering!");
+  }
+  int lV = attrib(basering,"lV");
+  // calls pLastVblock(p,lV);
+  return(system("btest",p,lV));
+}
+example
+{
+  "EXAMPLE:"; echo = 2;
+  ring r = 0,(x,y,z),dp;
+  int uptodeg = 5;
+  def R = makeLetterplaceRing(uptodeg);
+  setring R;
+  poly f = x(1)*z(2)*y(3) - 2*z(1)*y(2) + 3*x(1);
+  lastBlock(f); // should be 3
+}
 
 static proc mmLiebr(poly a, poly b)
@@ -3473,5 +3495,98 @@
 }
 
-
+proc isOrderingShiftInvariant(int withHoles)
+  "USAGE: isOrderingShiftInvariant(b); b an integer interpreted as a boolean
+  RETURN: int
+  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.
+@*      If withHoles != 0 even Letterplace polynomials with holes (eg. x(1)*y(4)) are considered.
+  ASSUME: - basering is a Letterplace ring.
+  "
+{
+  int shiftInvariant = 1;
+
+  int n = attrib(basering, "lV");
+  int d = attrib(basering, "uptodeg");
+
+  ideal monomials;
+  if (withHoles) {
+    monomials = delete(lpMonomialsWithHoles(d-1), 1); // ignore the first element (1)
+  } else {
+    monomials = lpMaxIdeal(d-1, 0);
+  }
+
+  for (int i = 1; i <= size(monomials); i++) {
+    poly monom = monomials[i];
+    int lastblock = lastBlock(monom);
+    for (int s = 1; s <= d - lastblock; s++) {
+      for (int s2 = 0; s2 < s; s2++) { // paranoid, check every pair
+        poly first = shiftPoly(monom,s2);
+        poly second = shiftPoly(monom,s);
+        if (!(first > second)) {
+          dbprint(string(first) + " <= " + string(second));
+          shiftInvariant = 0;
+        }
+        kill first; kill second;
+      } kill s2;
+    } kill s;
+    kill monom; kill lastblock;
+  } kill i;
+
+  return(shiftInvariant);
+}
+example
+{
+  "EXAMPLE:"; echo = 2;
+  ring r = 0,(x,y,z),dp;
+  def R = makeLetterplaceRing(5);
+  setring R;
+  isOrderingShiftInvariant(0);// should be 1
+
+  ring r = 0,(x,y,z),dp;
+  def R = makeLetterplaceRing(5);
+  list RL = ringlist(R);
+  RL[3][1][1] = "wp";
+  intvec weights = 1,1,1,1,1,1,1,2,3,1,1,1,1,1,1;
+  RL[3][1][2] = weights;
+  def Rw = setLetterplaceAttributes(ring(RL),5,3);
+  setring Rw;
+  printlevel = voice + 1;
+  isOrderingShiftInvariant(0);
+  isOrderingShiftInvariant(1);
+}
+
+static proc lpMonomialsWithHoles(int d)
+{
+  if (d < 0) {
+    ERROR("d must not be negative")
+  }
+
+  ideal monomials = 1;
+  if (d == 0) {
+     return (monomials);
+  }
+
+  int lV = attrib(basering, "lV"); // variable count
+  ideal prevMonomials = lpMonomialsWithHoles(d - 1);
+
+  for (int i = 1; i <= size(prevMonomials); i++) {
+    /* if (deg(prevMonomials[i]) >= d - 1) { */
+      for (int j = 1; j <= lV; j++) {
+        poly m = prevMonomials[i];
+        m = m * var(j + (d-1)*lV);
+        monomials = monomials, m;
+        kill m;
+      } kill j;
+    /* } */
+  } kill i;
+
+  if (d > 1) {
+    // removes the 1
+    monomials[1] = 0;
+    monomials = simplify(monomials,2);
+
+    monomials = prevMonomials, monomials;
+  }
+  return (monomials);
+}
 
 
