(* Sub- and factor representations induced by a (sub)module. *)
Section Submodule.
Variable U : 'M[F]_n.
Definition val_submod m : 'M_(m, \rank U) -> 'M_(m, n) := mulmxr (row_base U).
Definition in_submod m : 'M_(m, n) -> 'M_(m, \rank U) :=
mulmxr (invmx (row_ebase U) *m pid_mx (\rank U)).
Canonical val_submod_linear m := [linear of @val_submod m].
Canonical in_submod_linear m := [linear of @in_submod m].

(* Specifications: *)
Lemma val_submodE m W : @val_submod m W = W *m val_submod 1%:M.
Lemma val_submod_inj m : injective (@val_submod m).
Lemma in_submodK m W : (W <= U)%MS -> val_submod (@in_submod m W) = W.
Lemma val_submod_eq0 m W : (@val_submod m W == 0) = (W == 0).
Lemma mxrank_in_submod m (W : 'M_(m, n)) :
(W <= U)%MS -> \rank (in_submod W) = \rank W.