Project

General

Profile

Feature #368

port SmithNormalForm (CoCoA-4)package to CoCoA-5

Added by Anna Maria Bigatti almost 11 years ago. Updated 3 months ago.

Status:
In Progress
Priority:
Normal
Category:
CoCoA-4 function to be added
Target version:
Start date:
11 Jun 2013
Due date:
% Done:

10%

Estimated time:
Spent time:

Related issues

Related to CoCoA-5 - Support #242: CoCoA-5 Projects for students (e.g. crediti F and tesi)In Progress2012-09-28

Related to CoCoALib - Feature #1001: CoCoALib: ideas for student projectsIn Progress2017-01-19

History

#1 Updated by Anna Maria Bigatti about 10 years ago

  • Target version set to CoCoA-5.1.0 Easter14

#2 Updated by John Abbott about 10 years ago

  • Target version changed from CoCoA-5.1.0 Easter14 to CoCoA-5.1.1 Seoul14

#3 Updated by Anna Maria Bigatti over 9 years ago

  • Assignee set to Anna Maria Bigatti
  • Target version changed from CoCoA-5.1.1 Seoul14 to CoCoA-5.?.?

#4 Updated by John Abbott about 6 years ago

  • Status changed from New to In Progress
  • Target version changed from CoCoA-5.?.? to CoCoA-5.2.4
  • % Done changed from 0 to 10

Anna says she has "cleaned up" the original CoCoA-4 code so that CoCoA-5 accepts it.
The code is in MatNormalForm.cpkg5 (original file was matrixnormalform.cpkg).
The package exports two names Smith and SmithFactor.

There is no entry in the CoCoA-5 documentation.
I would prefer SNF or SmithNormalForm rather than just Smith (or smith).

The code does not run properly. I got what I believe to be an infinite loop with the following input (given to a fresh CoCoA-5):

M := mat(ZZ,[[random(-9,9) | j in 1..4] | i in 1..4]);
Smith(M);

The matrix M above is
matrix(ZZ,
 [[2, -8, -2, -1],
  [-1, 6, -1, 4],
  [-2, -1, -7, 0],
  [-2, -3, -7, -3]])

#5 Updated by John Abbott about 6 years ago

More failing examples:

matrix(ZZ,
 [[6, -9, 0],
  [2, -2, 0],
  [6, -9, -4]])

matrix(ZZ,
 [[6, -8],
  [3, -6]])
matrix(ZZ,
 [[4, 2],
  [-3, 0]])

This one is diagonal, but still fails!

matrix(ZZ,
  [[2, 0],
   [0, 5]])

CONFIRMED 2021-03-15 the examples above take too long (or infinite loop)

#6 Updated by John Abbott about 6 years ago

This should be ported to CoCoALib (once it has been corrected). It would surely be faster ;-)

#7 Updated by John Abbott over 5 years ago

  • Target version changed from CoCoA-5.2.4 to CoCoA-5.3.0

#8 Updated by John Abbott over 4 years ago

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

I think Florian had done some implementing; perhaps we can delegate to him?

#9 Updated by John Abbott about 3 years ago

The current version of the code needs to be improved:

/**/ M := mat(ZZ,[[PowerMod(i,j-1,NextPrime(999)) | i in 1..20] | j in 1..20]);
/**/ MM := Smith(M);
--> ERROR: Too many nested scopes

#10 Updated by John Abbott about 3 years ago

  • Related to Support #242: CoCoA-5 Projects for students (e.g. crediti F and tesi) added

#11 Updated by John Abbott about 3 years ago

  • Related to Feature #1001: CoCoALib: ideas for student projects added

#12 Updated by John Abbott over 2 years ago

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

#13 Updated by John Abbott 3 months ago

JAA has some new code from Passau which should be in integrated...

Also available in: Atom PDF