Structured proof · Unit 149
lemma IndexDvd.trans
What it saysTransitivity. For a commutative ring O, an O-module V, submodules M, N, P \subseteq V and z, a \in O: if
IndexDvd M N z (h) and IndexDvd N P a (g), then IndexDvd M P (z\cdot a).The argument in briefCompose the two matrices: if m moves \Phi into N and m' moves the result into P, then m'\cdot m moves \Phi into P and \det(m'm) = \det m'\cdot\det m divides z\cdot a.
Let n and \Phi_1, \ldots, \Phi_n \in M. By h there is an n\times n matrix m with \det m \mid z (b.1) and \Psi_i = \sum_k m_{ik}\Phi_k \in N for all i (b.2).
By g applied to \Psi there is m' with \det m' \mid a and \sum_i m'_{ji}\Psi_i \in P for all j. The matrix m'\cdot m works: \det(m'm) = \det m'\cdot\det m divides a\cdot z = z\cdot a, and \sum_k (m'm)_{jk}\Phi_k = \sum_i m'_{ji}\Psi_i \in P.
Usesstep 1,
Matrix.,det_mul mul_dvd_mul,mul_smul