|
3.1 betti
Syntax:
betti ( list_expression )
betti ( resolution_expression )
betti ( list_expression , int_expression )
betti ( resolution_expression , int_expression )
Type:
- intmat
Note:
- in the non-commutative case it makes sense only if your basering R has
homogeneous relations
Purpose:
- with 1 argument: computes the graded Betti numbers of a minimal resolution of
, if denotes the basering and
a homogeneous submodule of and the argument represents a
resolution of
.
The entry d of the intmat at place (i,j) is the minimal number of
generators in degree i+j of the j-th syzygy module (= module of
relations) of (the 0th (resp. 1st) syzygy module of is
(resp. )).The argument is considered to be the result of a res/sres/mres/nres/lres
command. This implies that a zero is only allowed (and counted) as a
generator in the first module.
For the computation betti uses only the initial monomials. This could lead
to confusing results for a non-homogeneous input.
The optional second argument is a switch for the minimization of the Betti
numbers. If it is 0 then the Betti numbers correspond exactly to the input -
otherwise the command is identical to the one-argument form.
Example:
| // proposed by Uli Walther
int N=2;
int i;
ring r=0,(x(1..N),d(1..N),q(1..N)),Dp;
matrix D[3*N][3*N];
for (i=1;i<=N;i++)
{
D[i,N+i]=q(i)^2;
}
ncalgebra(1,D); // a kind of homogenized Weyl algebra
r;
==> // characteristic : 0
==> // number of vars : 6
==> // block 1 : ordering Dp
==> // : names x(1) x(2) d(1) d(2) q(1) q(2)
==> // block 2 : ordering C
==> // noncommutative relations:
==> // d(1)x(1)=x(1)*d(1)+q(1)^2
==> // d(2)x(2)=x(2)*d(2)+q(2)^2
ideal I= maxideal(1);
I;
==> I[1]=x(1)
==> I[2]=x(2)
==> I[3]=d(1)
==> I[4]=d(2)
==> I[5]=q(1)
==> I[6]=q(2)
option(redSB);
option(redTail);
resolution R = mres(I,0); // the full length resolution
print(betti(R),"betti");
==> 0 1 2 3 4 5 6
==> ------------------------------------------------
==> 0: 1 6 15 20 15 6 1
==> ------------------------------------------------
==> total: 1 6 15 20 15 6 1
kill r;
// betti in qring
LIB "nctools.lib";
int N=1;
==> // ** redefining N **
int i;
==> // ** redefining i **
ring r=0,(x(1..N),d(1..N),q(1..N)),Dp;
matrix C = UpOneMatrix(3*N);
for (i=1;i<=N;i++)
{
C[i,N+i]=-1;
C[i,2*N+i]=-1;
C[N+i,2*N+i]=-1;
}
ncalgebra(C,0);
ideal I=0;
for (i=1;i<=N;i++)
{
I=I,x(i)^2,d(i)^2,x(i)*d(i)+q(i)^2;
}
option(redSB);
option(redTail);
I = twostd(I);
qring QR=I;
QR;
==> // characteristic : 0
==> // number of vars : 3
==> // block 1 : ordering Dp
==> // : names x(1) d(1) q(1)
==> // block 2 : ordering C
==> // noncommutative relations:
==> // d(1)x(1)=-x(1)*d(1)
==> // q(1)x(1)=-x(1)*q(1)
==> // q(1)d(1)=-d(1)*q(1)
==> // quotient ring from ideal
==> _[1]=d(1)^2
==> _[2]=x(1)*d(1)+q(1)^2
==> _[3]=x(1)^2
==> _[4]=d(1)*q(1)^2
==> _[5]=x(1)*q(1)^2
==> _[6]=q(1)^4
ideal M = maxideal(1);
resolution RM = mres(M,5); // only first 5 steps
print(betti(RM),"betti");
==> 0 1 2 3 4 5
==> ------------------------------------------
==> 0: 1 3 6 10 15 21
==> ------------------------------------------
==> total: 1 3 6 10 15 21
|
|