![]() | 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.