Opened 7 years ago

Last modified 7 years ago

#763 reopened bug

betti() gives 'not a resolvent' for proper complex

Reported by: steenpass Owned by: somebody
Priority: minor Milestone: 4-1-0 and higher
Component: dontKnow Version: 4-0-3
Keywords: Cc: schreyer@…

Description

Consider the following two resolutions:

> option(noloadLib);
> LIB "matrix.lib";
> ring r = 0, (x,y,z), dp;
> ideal i1 = x, y, z;
> ideal i2 = 1;
> resolution s1 = res(i1, 0);
> resolution s2 = res(i2, 0);
> list l1 = s1;
> list l2 = s2;
> print(betti(l1, 0), "betti");
           0     1     2     3
------------------------------
    0:     1     3     3     1
------------------------------
total:     1     3     3     1

> print(betti(l2, 0), "betti");
           0     1
------------------
    0:     -     1
    1:     1     -
------------------
total:     1     1

> 

Now let

list l_sum;

be the direct sum of l1 and l2 such that

l_sum[3] = module(dsum(matrix(l1[3]), matrix(l2[1])));   // direct sum

This way, we have to set

l_sum[1] = l1[1];
l_sum[2] = module(l1[2][1], l1[2][2], l1[2][3], 0);

Now we have

> print(l_sum[1]);
z,
y,
x
> print(l_sum[2]);
-y,-x,0, 0,
z, 0, -x,0,
0, z, y, 0 
> print(l_sum[3]);
x, 0,
-y,0,
z, 0,
0, 1 

which is a proper complex. However, we get the following:

> print(betti(l_sum, 0), "betti");
   ? input not a resolvent
   ? error occurred in or before STDIN line 19: `print(betti(l_sum, 0), "betti");`
> 

Change History (2)

comment:1 Changed 7 years ago by hannes

Resolution: fixed
Status: newclosed

comment:2 Changed 7 years ago by steenpass

Resolution: fixed
Status: closedreopened

Thanks for the fix. Now the command succeeds:

> print(betti(l_sum, 0), "betti");
           0     1     2     3
------------------------------
   -3:     -     -     -     1
   -2:     -     -     -     -
   -1:     -     -     -     -
    0:     1     3     3     1
------------------------------
total:     1     3     3     2

However, the Betti table is wrong. I would expect

           0     1     2     3
------------------------------
   -1:     -     -     -     1
    0:     1     3     2     1
------------------------------
total:     1     3     3     2
Note: See TracTickets for help on using tickets.