Opened 7 years ago

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

Reported by: Owned by: steenpass somebody minor 4-1-0 and higher dontKnow 4-0-3 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 = module(dsum(matrix(l1), matrix(l2)));   // direct sum
```

This way, we have to set

```l_sum = l1;
l_sum = module(l1, l1, l1, 0);
```

Now we have

```> print(l_sum);
z,
y,
x
> print(l_sum);
-y,-x,0, 0,
z, 0, -x,0,
0, z, y, 0
> print(l_sum);
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");`
>
```

### comment:1 Changed 7 years ago by hannes

Resolution: → fixed new → closed

### comment:2 Changed 7 years ago by steenpass

Resolution: fixed closed → reopened

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.