Local Notation "'Zm" := (scale_action _ _) (at level 8) : action_scope.
Section RowGroup.
Variable n : nat.
Local Notation rVn := 'rV[F]_n.
Definition rowg m (A : 'M[F]_(m, n)) : {set rVn} := [set u | u <= A]%MS.

(* Specifications: *)
Lemma mem_rowg m A v : (v \in @rowg m A) = (v <= A)%MS.
Canonical rowg_group m A := Group (@rowg_group_set m A).
Lemma rowg_stable m (A : 'M_(m, n)) : [acts setT, on rowg A | 'Zm].
Lemma eq_rowg m1 m2 (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A :=: B)%MS -> rowg A = rowg B.
Lemma rowg_mxS (L M : {set 'rV[F]_n}) :
L \subset M -> (rowg_mx L <= rowg_mx M)%MS.
Lemma sub_rowg_mx (L : {set rVn}) : L \subset rowg (rowg_mx L).
Lemma stable_rowg_mxK (L : {group rVn}) :
[acts setT, on L | 'Zm] -> rowg (rowg_mx L) = L.
Lemma rowg_mx1 : rowg_mx 1%g = 0.
Lemma rowgI m1 m2 (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
rowg (A :&: B)%MS = rowg A :&: rowg B.
Lemma rowgD m1 m2 (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
rowg (A + B)%MS = (rowg A * rowg B)%g.
Lemma cprod_rowg m1 m2 (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
rowg A \* rowg B = rowg (A + B)%MS.
Lemma bigcprod_rowg m I r (P : pred I) (A : I -> 'M[F]_n) (B : 'M[F]_(m, n)) :
(\sum_(i <- r | P i) A i :=: B)%MS ->
\big[cprod/1%g]_(i <- r | P i) rowg (A i) = rowg B.
Lemma bigdprod_rowg m (I : finType) (P : pred I) A (B : 'M[F]_(m, n)) :
let S := (\sum_(i | P i) A i)%MS in (S :=: B)%MS -> mxdirect S ->
\big[dprod/1%g]_(i | P i) rowg (A i) = rowg B.