## Feature #368

Status:
In Progress
Priority:
Normal
Category:
Target version:
Start date:
11 Jun 2013
Due date:
% Done:

10%

Estimated time:
Spent time:

### History

#### #1 Updated by Anna Maria Bigattiover 4 years ago

• Target version set to CoCoA-5.1.0 Easter14

#### #2 Updated by John Abbottover 4 years ago

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

#### #3 Updated by Anna Maria Bigattialmost 4 years ago

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

#### #4 Updated by John Abbott6 months 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 Abbott6 months 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]])
```
```matrix(ZZ,
[[5, -6],
[9,-2]])
```

#### #6 Updated by John Abbott6 months ago

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

Also available in: Atom PDF