|   | 1 |  initial version  | 
In the second case you are explicitly defining a matrix over the rationals, so you get rational matrices as output. There is an option C.smith_form(integral=True) which will force Sage to work over the integers. That happens to give different integer matrices than B.smith_form() in this case.
 Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.