Project

General

Profile

Support #1071

LinKerBasis is user-unfriendly

Added by John Abbott almost 7 years ago. Updated about 2 years ago.

Status:
In Progress
Priority:
Normal
Assignee:
-
Category:
enhancing/improving
Target version:
Start date:
18 May 2017
Due date:
% Done:

10%

Estimated time:
Spent time:

Description

The CoCoA-5 function LinKerBasis produces unhelpful error messages, and too many of them!

Part of the problem may be the manual page which needs to be clearer.

History

#1 Updated by John Abbott almost 7 years ago

This is an unfriendly error message:

>>> L := [1,2,3];
>>> LinKerBasis(L);
--> ERROR: Expecting type RING, but found type TYPE
--> WHERE: at line 620 (column 15) of mat.cpkg5
-->   X := indets(Ps[1]);
-->               ^^^^^

But the following, which is very similar, works:

>>> L := one(P)*[1,2,3];
>>> LinKerBasis(L);
[[1,  0,  0],  [0,  1,  0],  [0,  0,  1]]

#2 Updated by John Abbott almost 7 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

What is LinKerBasis supposed to do when given a list?

use QQ[x,y,z];
L := [x+y+z,y-z]; --> example from manual
LinKerBasis(L);
--> [[-2, 1, 1]]

// Slight variation
L := [x+y+z, y-z+1];
LinKerBasis(L);
--> same answer as before?!?

If the input is not linear...

L := [x*y+z, y-z];
LinKerBasis(L);
--> [[1, 0, 0]]

#3 Updated by John Abbott almost 7 years ago

The version that takes a list gives an unhelpful error when one component is zero:

use QQ[x,y,z];
L := [0, x+y+z];
LinKerBasis(L);
--> ERROR: more than one ring for argument list

It works (i.e. no error) if the zero from the ring is used:

L := [zero(CurrentRing), x+y+z];
LinKerBasis(L);
--> [[-1,  1,  0],  [-1,  0,  1]]

#4 Updated by John Abbott almost 7 years ago

I am not sure what is happening here:

use P ::= QQ[x,y,z];
FrF := NewFractionField(P);
use FrF[dummy];
L := [zero(CurrentRing),z,-y]; // cannot use 0!
LinKerBasis(L);
--> [[1]] ?!?

#5 Updated by John Abbott almost 7 years ago

Should the manual page for LinKerBasis also refer to the page for syz?

#6 Updated by Anna Maria Bigatti almost 7 years ago

LinKerBasis is the "sloppy" version of LinKer (which only takes a MAT, returns a MAT).

We added LIST of linear homogeneous polynomials, but there is no input check!
Ooops, my fault: I guess I wrote that code in a rush for private use.

#7 Updated by John Abbott about 4 years ago

  • Target version changed from CoCoA-5.?.? to CoCoA-5.4.0

The fn LinKerBasis is in the manual, but the arg checking is still sloppy. We should fix this!

#8 Updated by John Abbott about 2 years ago

  • Target version changed from CoCoA-5.4.0 to CoCoA-5.4.2

Also available in: Atom PDF