# Revision history [back]

Use this to simplify the matrix:

O.parent()([x.full_simplify() for x in O.list()])


Then omega_i will just be the coefficients of this simplified matrix.

Use this to simplify the matrix:

O.parent()([x.full_simplify() for x in O.list()])


Then omega_i will just be the coefficients of this simplified matrix.

EDIT:

The command t.full_simplify() tries to simplify t as much as possible and return the result. The rest of the line is the application to the list of matrix coefficients O.list(), and then rebuilding the matrix ; O.parent() is the space of matrices of the correct size over the correct ring. This matrix space can swallow the list and give back a matrix. This could also be done more simply using

O.apply_map(lambda t:t.full_simplify())