Opened 8 years ago

Closed 8 years ago

# either primdecGTZ() or intersect() not working properly

Reported by: Owned by: steenpass somebody minor 4-1-0 and higher dontKnow 4-0-1 primdecGTZ, intersect

### Description

```> ring r = (0,p), (w,x,y,z), dp;
> minpoly = p2-p-1;
> poly f = 4*(p2x2-y2)*(p2y2-z2)*(p2z2-x2)-(1+2p)*(x2+y2+z2-w2)^2*w2;
> ideal I = jacob(f);   // !
> list L = primdecGTZ(I);
> ideal J = 1;
> int i;
> for (i = size(L); i > 0; i--) { J = intersect(J, L[i][1]); };
> size(reduce(I, std(J)));   // now J should be the same ideal as I, so this should be zero
3
> size(reduce(J, std(I)));   // dito
141
>
```

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

Resolution: → fixed new → closed

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

Resolution: fixed closed → reopened

With a very simple modification, the example still fails, but at a different step this time:

```> ring r = (0,@p), (w,x,y,z), dp;
> minpoly = @p^2-@p-1;
> poly f = 4*(@p^2*x^2-y^2)*(@p^2*y^2-z^2)*(@p^2*z^2-x^2)-(1+2*@p)*(x^2+y^2+z^2-w^2)^2*w^2;
> ideal I = jacob(f);
> list L = primdecGTZ(I);
? wrong range[2] in ideal/module _(1)
? error occurred in or before primdec.lib::algeDeco line 2738: `         K=K[2..size(K)];`
? leaving primdec.lib::algeDeco
? wrong range[2] in ideal/module _(1)
? error occurred in or before primdec.lib::algeDeco line 2738: `         K=K[2..size(K)];`
? leaving primdec.lib::algeDeco
>
```

Cf. the proposed patch: https://github.com/Singular/Sources/commit/08c3a5542750eda2ed5ef4337fad05bfab0a44ac

Thanks to Jakob Kröker for pointing out that the patch might not be sufficient.

### comment:3 Changed 8 years ago by hannes

according to http://www.singular.uni-kl.de/Manual/4-0-1/sing_37.htm the example given above is not legal Singular code. (2nd paragraph: @ as first letter of a name is reserved)

### comment:4 Changed 8 years ago by barakat

Resolution: → fixed reopened → closed

Hans is working on a cleaner solution and the reported example works.

### comment:5 Changed 8 years ago by Oleksandr

We consider to fix this in a future Singular version once we improve or rewrite the Singular Interpreter.

Note: See TracTickets for help on using tickets.