(* Permutation matrix *)

Definition perm_mx n s : 'M_n := row_perm s 1%:M.Definition tperm_mx n i1 i2 : 'M_n := perm_mx (tperm i1 i2).

Lemma is_perm_mxMr n (A B : 'M_n) : is_perm_mx B -> is_perm_mx (A *m B) = is_perm_mx A.