Definition mxvec (A : 'M[R]_(m, n)) :=
castmx (erefl _, mxvec_cast) (\row_k A (enum_val k).1 (enum_val k).2).
Fact vec_mx_key : unit. Proof. by []. Qed.
Definition vec_mx (u : 'rV[R]_(m * n)) :=
\matrix[vec_mx_key]_(i, j) u 0 (mxvec_index i j).

(* Specifications: *)
Lemma mxvecE A i j : mxvec A 0 (mxvec_index i j) = A i j.
Lemma curry_mxvec_bij : {on 'I_(m * n), bijective (prod_curry mxvec_index)}.
End VecMatrix.