Implicit Types (u : vT) (X : seq vT) (U V : {vspace vT}).Canonical space_eqType := EqType {vspace vT} space_eqMixin.Canonical space_choiceType := ChoiceType {vspace vT} space_choiceMixin.Definition subsetv U V := (vs2mx U <= vs2mx V)%MS.Definition vline u := mx2vs (v2r u).(* Vspace membership is defined as line inclusion. *)
Definition pred_of_vspace phV (U : Vector.space phV) : pred_class :=
  fun v => (vs2mx (vline v) <= vs2mx U)%MS.Canonical vspace_predType :=
  @mkPredType _ (unkeyed {vspace vT}) (@pred_of_vspace _).Definition addv U V := mx2vs (vs2mx U + vs2mx V).Definition complv U := mx2vs (vs2mx U)^C.Definition vpick U := r2v (nz_row (vs2mx U)).Fact span_key : unit.Definition span_expanded_def X := mx2vs (b2mx (in_tuple X)).Definition span := locked_with span_key span_expanded_def.Definition vbasis := locked_with span_key vbasis_def.Notation "\dim U" := (dimv U) : nat_scope.Notation "{ : vT }" := (@fullv _ vT) (only parsing) : vspace_scope.Implicit Types (a : K) (u v w : vT) (X Y : seq vT) (U V W : {vspace vT}).Local Notation subV := (@subsetv K vT) (only parsing).Local Notation addV := (@addv K vT) (only parsing).Local Notation capV := (@capv K vT) (only parsing).Let free_b2mx n (X : n.-tuple vT) : free X = row_free (b2mx X).
Proof. by rewrite /free /dimv span_b2mx genmxE size_tuple. Qed.
(* end hide *)y: (iffP idP) => [|[k ->]]; rewrite memvK genmxE ?linearZ ?scalemx_sub //.
by case/sub_rVP=> k; rewrite -linearZ => /v2r_inj->; exists k.
Qed.t=> [|a u v]; rewrite !memvK ?linear0 ?sub0mx // => Uu Uv.
by rewrite linearP addmx_sub ?scalemx_sub.Qed.Canonical memv_opprPred U := OpprPred (memv_submod_closed U).Canonical memv_addrPred U := AddrPred (memv_submod_closed U).

Qed.