Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

A possible solution is to compute echelon form over 2-adic numbers and then change the ring to Zmod(16) - like this:

a = matrix(Qp(2), [[1, 1], [1, 1]])
b = a.echelon_form().change_ring(Zmod(16))

A possible solution is to compute echelon form over 2-adic numbers and then change the ring to Zmod(16) - like this:

a = matrix(Qp(2), matrix(Zmod(16), [[1, 1], [1, 1]])
b = a.echelon_form().change_ring(Zmod(16))
a.change_ring(Qp(2)).echelon_form().change_ring(Zmod(16))

A Since $16=2^4$, a possible solution is to compute echelon form over 2-adic numbers and then change the ring to Zmod(16) - like this:

a = matrix(Zmod(16), [[1, 1], [1, 1]])
b = a.change_ring(Qp(2)).echelon_form().change_ring(Zmod(16))