#4681: [with patch, needs work] General Smith normal form implementation
---------------------------------------+------------------------------------
Reporter: davidloeffler | Owner: davidloeffler
Type: enhancement | Status: assigned
Priority: major | Milestone: sage-3.2.2
Component: linear algebra | Resolution:
Keywords: matrix, smith normal form |
---------------------------------------+------------------------------------
Comment (by davidloeffler):
Hmm. On reflection, perhaps the way the Sage code was already doing it is
the right way: smith_form should always return the transformation matrix,
and elementary_divisors should be provided separately.
This seems more logical to me, because one can define analogues of
elementary divisors over any Dedekind domain, but the result is a list of
ideals rather than of elements and thus there is no analogue of the
transformation matrix. PARI/GP has a function that does this over rings of
integers of a general number field. Also, even over ZZ where the
transformation matrices do make sense there are some fast algorithms for
elementary divisors that don't give them.
As for the inconsistency of ordering the results, I've called for a quick
straw poll on sage-devel.
The other issue is one of sign. Conventionally elementary divisors are
always *nonnegative* integers; one wouldn't want to calculate the
invariants of a finitely generated abelian group and be told that it had a
direct summand that was cyclic of order -5. But for general PID's there's
no canonical choice of sign for the generator of an ideal. I'm sure nobody
will actually be all that bothered by this, but I will drop the insistence
that U and V have det 1 and replace it with the insistence that the d_i
are >= 0, even though this is pretty meaningless.
Incidentally, I just realised the doctests don't pass! I added an
is_noetherian method for number field orders, but didn't notice that there
is a doctest in sage/rings/ring.pyx that is actually broken by this -- it
creates an order, calls is_noetherian() on it and insists that the result
should be NotImplementedError. I will fix this.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4681#comment:8>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---