Section mxOverType.
Context {m n : nat} {T : Type}.
Implicit Types (S : {pred T}).
Definition mxOver (S : {pred T}) :=
[qualify a M : 'M[T]_(m, n) | [forall i, [forall j, M i j \in S]]].
Fact mxOver_key S : pred_key (mxOver S). Proof. by []. Qed.
Canonical mxOver_keyed S := KeyedQualifier (mxOver_key S).

Lemma mxOverP {S : {pred T}} {M : 'M[T]__} :
reflect (forall i j, M i j \in S) (M \is a mxOver S).