Commit 2020-10-05 11:38 72360845
View on Github →refactor(linear_algebra/matrix): consistent naming (#4345)
The naming of the maps between linear_map
and matrix
was a mess. This PR proposes to clean it up by standardising on two forms:
linear_map.to_matrix
andmatrix.to_linear_map
are the equivalences (in the respective direction) betweenM₁ →ₗ[R] M₂
andmatrix m n R
, given bases forM₁
andM₂
.linear_map.to_matrix'
andmatrix.to_lin'
are the equivalences between((n → R) →ₗ[R] (m → R))
andmatrix m n R
in the respective directions The following declarations are renamed:comp_to_matrix_mul
->linear_map.to_matrix'_comp
linear_equiv_matrix
->linear_map.to_matrix
linear_equiv_matrix_{apply,comp,id,mul,range}
->linear_map.to_matrix_{apply,comp,id,mul,range}
linear_equiv_matrix_symm_{apply,mul,one}
->matrix.to_lin_{apply,mul,one}
linear_equiv_matrix'
->linear_map.to_matrix'
linear_map.to_matrix_id
->linear_map.to_matrix'_id
matrix.mul_to_lin
->matrix.to_lin'_mul
matrix.to_lin
->matrix.mul_vec_lin
(which should get simplified tomatrix.to_lin'
)matrix.to_lin_apply
->matrix.to_lin'_apply
matrix.to_lin_one
->matrix.to_lin'_one
to_lin_to_matrix
->matrix.to_lin'_to_matrix'
to_matrix_to_lin
->linear_map.to_matrix'_to_lin'
The following declarations are deleted as unnecessary:linear_equiv_matrix_apply'
(uselinear_map.to_matrix_apply
instead)linear_equiv_matrix'_apply
(the originallinear_map.to_matrix
doesn't exist any more)linear_equiv_matrix'_symm_apply
(the originalmatrix.to_lin
doesn't exist any more)linear_map.to_matrixₗ
(uselinear_map.to_matrix'
instead)linear_map.to_matrix
(uselinear_map.to_matrix'
instead)linear_map.to_matrix_of_equiv
(uselinear_map.to_matrix'_apply
instead)matrix.eval
(usematrix.to_lin'
instead)matrix.to_lin.is_add_monoid_hom
(uselinear_equiv.to_add_monoid_hom
instead)matrix.to_lin_{add,zero,neg}
(uselinear_equiv.map_{add,zero,neg} matrix.to_lin'
instead)matrix.to_lin_of_equiv
(usematrix.to_lin'_apply
instead) Zulip thread: https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/Refactoring.20.60linear_map.20.3C-.3E.20matrix.60