#4681: [with new patch, needs review] 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  |  
---------------------------------------+------------------------------------
Changes (by davidloeffler):

 * cc: ncalexan (added)
  * summary:  [with patch, needs work] General Smith normal form
              implementation => [with new patch, needs
              review] General Smith normal form
              implementation

Comment:

 (cc'ed to ncalexan as symplectic_basis is his territory)

 Nobody's objected violently to the change yet on sage-devel, so the
 following patch changes SNF over ZZ, to put 1's first and 0's last. (Also,
 when M is non-square it puts the nonzero entries in the [i,i] diagonal,
 not on some shifted diagonal ending in the bottom corner like the previous
 code did -- I found that rather inconvenient.)

 As I suggested above, I've changed the call syntax over a general ring to
 be consistent with the existing code over ZZ, so I got rid of the
 "transformation=True" argument and added an extra function
 "elementary_divisors" which returns the diagonal entries of M. This can be
 overridden later, if anyone feels like implementing a fast algorithm for
 elementary divisors for more general rings.

 I've also fixed up "symplectic_basis" to be consistent with the new
 "smith_form"; it doesn't explicitly use smith_form, but the conventions
 for the output are chosen for consistency with smith_form, so I've changed
 them in tandem. (ncalexan: is this OK with you?)

 I didn't actually make it choose ideal representatives that compare as >=
 0 -- I decided I couldn't bear to fix such a horrible convention. This
 means that if R is a general PID, coercing integer matrices from ZZ to R
 doesn't quite commute with Smith form, but I don't see why one should
 expect it to.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4681#comment:9>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to