up previous next
4.13.7 Example: Truncations
The user may assign one or more of three different truncation conditions to a module: DegTrunc, ResTrunc and RegTrunc; in this case the execution will stop when a bound is reached (see the examples, below).

For a time limit see GBasisTimeout .

DEGREE TRUNCATION:

Example
  Use R ::= ZZ/(32003)[a,b,c,d,e];
  I := Ideal(a+b+c+d, ab+bc+cd+da, abc+bcd+cda, abcd-e^4);
  I.DegTrunc := 3;
  $gb.Start_GBasis(I);
  $gb.Complete(I);
  [LT(F) | F In I.GBasis];
[a, b^2, bc^2]
-------------------------------
  I.DegTrunc := 6;
  $gb.Complete(I);
  [LT(F) | F In I.GBasis];
[a, b^2, bc^2, bcd^2, c^2d^2, cd^4, be^4, d^2e^4]
-------------------------------
RESOLUTION TRUNCATION:

Example
  Use R ::= ZZ/(32003)[x[1..10]];
  I := Ideal(Indets());
  I.ResTrunc := 4;
  $gb.Start_Res(I);
  $gb.Complete(I);
  $gb.GetRes(I);
0 --> R^252(-5) --> R^210(-4) --> R^120(-3) --> R^45(-2) --> R^10(-1)
-------------------------------
REGULARITY TRUNCATION: We know that the Castelnuovo regularity of I in the following example is 6.

Example
  Set Verbose;
  Use R_Gen ::= ZZ/(5)[x,y,z,t];
  M := 3; N := 4;
  D := DensePoly(2);
  P := Mat([ [ Randomized(D) | J In 1..N ] | I In 1.. M]);
  I := Ideal(Minors(2, P));
  $gb.Start_Res(I);
  $gb.Complete(I);
-- text suppressed --
Betti numbers: 17 48 48 18
318 steps of computation

  I := Ideal(Minors(2, P));
  $gb.Start_Res(I);
  I.RegTrunc := 6; -- here we store the Castelnuovo Regularity
  $gb.Complete(I);
...
Betti numbers: 17 48 48 18
281 steps of computation

  $gb.GetBettiMatrix(I);
-------------------
   0    0    0    0
   0    0    0    0
   0    0    0    0
   0    0    0   18
   0    0   16    0
   0    0   32    0
   0   48    0    0
  17    0    0    0
-------------------