fact
stringlengths
8
1.54k
type
stringclasses
19 values
library
stringclasses
8 values
imports
listlengths
1
10
filename
stringclasses
98 values
symbolic_name
stringlengths
1
42
docstring
stringclasses
1 value
addvSrU V : (V <= U + V)%VS. Proof. by rewrite /subV vs2mxD addsmxSr. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
addvSr
addvC: commutative addV. Proof. by move=> U V; apply/vs2mxP; rewrite !vs2mxD addsmxC submx_refl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
addvC
addvA: associative addV. Proof. by move=> U V W; apply/vs2mxP; rewrite !vs2mxD addsmxA submx_refl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
addvA
addv_idPl{U V}: reflect (U + V = U)%VS (V <= U)%VS. Proof. by rewrite /subV (sameP addsmx_idPl eqmxP) -vs2mxD; apply: vs2mxP. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
addv_idPl
addv_idPr{U V} : reflect (U + V = V)%VS (U <= V)%VS. Proof. by rewrite addvC; apply: addv_idPl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
addv_idPr
addvv: idempotent_op addV. Proof. by move=> U; apply/addv_idPl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
addvv
add0v: left_id 0%VS addV. Proof. by move=> U; apply/addv_idPr/sub0v. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
add0v
addv0: right_id 0%VS addV. Proof. by move=> U; apply/addv_idPl/sub0v. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
addv0
sumfv: left_zero fullv addV. Proof. by move=> U; apply/addv_idPl/subvf. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
sumfv
addvf: right_zero fullv addV. Proof. by move=> U; apply/addv_idPr/subvf. Qed. HB.instance Definition _ := Monoid.isComLaw.Build {vspace vT} 0%VS addv addvA addvC add0v.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
addvf
memv_addu v U V : u \in U -> v \in V -> u + v \in (U + V)%VS. Proof. by rewrite !memvK genmxE linearD; apply: addmx_sub_adds. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
memv_add
memv_addP{w U V} : reflect (exists2 u, u \in U & exists2 v, v \in V & w = u + v) (w \in U + V)%VS. Proof. apply: (iffP idP) => [|[u Uu [v Vv ->]]]; last exact: memv_add. rewrite memvK genmxE => /sub_addsmxP[r /(canRL v2rK)->]. rewrite linearD /=; set u := r2v _; set v := r2v _. by exists u; last exists v; rewrite // mem_r2v submxMl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
memv_addP
sumv_supi0 P U Vs : P i0 -> (U <= Vs i0)%VS -> (U <= \sum_(i | P i) Vs i)%VS. Proof. by move=> Pi0 /subv_trans-> //; rewrite (bigD1 i0) ?addvSl. Qed. Arguments sumv_sup i0 [P U Vs].
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
sumv_sup
subv_sumP{P Us V} : reflect (forall i, P i -> Us i <= V)%VS (\sum_(i | P i) Us i <= V)%VS. Proof. apply: (iffP idP) => [sUV i Pi | sUV]. by apply: subv_trans sUV; apply: sumv_sup Pi _. by elim/big_rec: _ => [|i W Pi sWV]; rewrite ?sub0v // subv_add sUV. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
subv_sumP
memv_sumrP vs (Us : I -> {vspace vT}) : (forall i, P i -> vs i \in Us i) -> \sum_(i | P i) vs i \in (\sum_(i | P i) Us i)%VS. Proof. by move=> Uv; apply/rpred_sum=> i Pi; apply/(sumv_sup i Pi)/Uv. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
memv_sumr
memv_sumP{P} {Us : I -> {vspace vT}} {v} : reflect (exists2 vs, forall i, P i -> vs i \in Us i & v = \sum_(i | P i) vs i) (v \in \sum_(i | P i) Us i)%VS. Proof. apply: (iffP idP) => [|[vs Uv ->]]; last exact: memv_sumr. rewrite memvK vs2mx_sum => /sub_sumsmxP[r /(canRL v2rK)->]. pose f i := r2v (r i *m vs2mx (Us i)); rewrite linear_sum /=. by exists f => //= i _; rewrite mem_r2v submxMl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
memv_sumP
subv_capU V W : (U <= V :&: W)%VS = (U <= V)%VS && (U <= W)%VS. Proof. by rewrite /subV vs2mxI sub_capmx. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
subv_cap
capvSU1 U2 V1 V2 : (U1 <= U2 -> V1 <= V2 -> U1 :&: V1 <= U2 :&: V2)%VS. Proof. by rewrite /subV !vs2mxI; apply: capmxS. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
capvS
capvSlU V : (U :&: V <= U)%VS. Proof. by rewrite /subV vs2mxI capmxSl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
capvSl
capvSrU V : (U :&: V <= V)%VS. Proof. by rewrite /subV vs2mxI capmxSr. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
capvSr
capvC: commutative capV. Proof. by move=> U V; apply/vs2mxP; rewrite !vs2mxI capmxC submx_refl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
capvC
capvA: associative capV. Proof. by move=> U V W; apply/vs2mxP; rewrite !vs2mxI capmxA submx_refl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
capvA
capv_idPl{U V} : reflect (U :&: V = U)%VS (U <= V)%VS. Proof. by rewrite /subV(sameP capmx_idPl eqmxP) -vs2mxI; apply: vs2mxP. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
capv_idPl
capv_idPr{U V} : reflect (U :&: V = V)%VS (V <= U)%VS. Proof. by rewrite capvC; apply: capv_idPl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
capv_idPr
capvv: idempotent_op capV. Proof. by move=> U; apply/capv_idPl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
capvv
cap0v: left_zero 0%VS capV. Proof. by move=> U; apply/capv_idPl/sub0v. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
cap0v
capv0: right_zero 0%VS capV. Proof. by move=> U; apply/capv_idPr/sub0v. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
capv0
capfv: left_id fullv capV. Proof. by move=> U; apply/capv_idPr/subvf. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
capfv
capvf: right_id fullv capV. Proof. by move=> U; apply/capv_idPl/subvf. Qed. HB.instance Definition _ := Monoid.isComLaw.Build {vspace vT} fullv capv capvA capvC capfv.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
capvf
memv_capw U V : (w \in U :&: V)%VS = (w \in U) && (w \in V). Proof. by rewrite !memvE subv_cap. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
memv_cap
memv_capP{w U V} : reflect (w \in U /\ w \in V) (w \in U :&: V)%VS. Proof. by rewrite memv_cap; apply: andP. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
memv_capP
vspace_modlU V W : (U <= W -> U + (V :&: W) = (U + V) :&: W)%VS. Proof. by move=> sUV; apply/vs2mxP; rewrite !(vs2mxD, vs2mxI); apply/eqmxP/matrix_modl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
vspace_modl
vspace_modrU V W : (W <= U -> (U :&: V) + W = U :&: (V + W))%VS. Proof. by rewrite -!(addvC W) !(capvC U); apply: vspace_modl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
vspace_modr
bigcapv_infi0 P Us V : P i0 -> (Us i0 <= V -> \bigcap_(i | P i) Us i <= V)%VS. Proof. by move=> Pi0; apply: subv_trans; rewrite (bigD1 i0) ?capvSl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
bigcapv_inf
subv_bigcapP{P U Vs} : reflect (forall i, P i -> U <= Vs i)%VS (U <= \bigcap_(i | P i) Vs i)%VS. Proof. apply: (iffP idP) => [sUV i Pi | sUV]. by rewrite (subv_trans sUV) ?(bigcapv_inf Pi). by elim/big_rec: _ => [|i W Pi]; rewrite ?subvf // subv_cap sUV. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
subv_bigcapP
addv_complfU : (U + U^C)%VS = fullv. Proof. apply/vs2mxP; rewrite vs2mxD -gen_vs2mx -genmx_adds !genmxE submx1 sub1mx. exact: addsmx_compl_full. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
addv_complf
capv_complU : (U :&: U^C = 0)%VS. Proof. apply/val_inj; rewrite [val]/= vs2mx0 vs2mxI -gen_vs2mx -genmx_cap. by rewrite capmx_compl genmx0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
capv_compl
diffvSlU V : (U :\: V <= U)%VS. Proof. by rewrite /subV genmxE diffmxSl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
diffvSl
capv_diffU V : ((U :\: V) :&: V = 0)%VS. Proof. apply/val_inj; rewrite [val]/= vs2mx0 vs2mxI -(gen_vs2mx V) -genmx_cap. by rewrite capmx_diff genmx0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
capv_diff
addv_diff_capU V : (U :\: V + U :&: V)%VS = U. Proof. apply/vs2mxP; rewrite vs2mxD -genmx_adds !genmxE. exact/eqmxP/addsmx_diff_cap_eq. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
addv_diff_cap
addv_diffU V : (U :\: V + V = U + V)%VS. Proof. by rewrite -{2}(addv_diff_cap U V) -addvA (addv_idPr (capvSr U V)). Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
addv_diff
dimv0: \dim (0%VS : {vspace vT}) = 0. Proof. by rewrite /dimv vs2mx0 mxrank0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
dimv0
dimv_eq0U : (\dim U == 0) = (U == 0%VS). Proof. by rewrite /dimv /= mxrank_eq0 [in RHS]/eq_op /= linear0 genmx0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
dimv_eq0
dimvf: \dim {:vT} = dim vT. Proof. by rewrite /dimv vs2mxF mxrank1. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
dimvf
dim_vlinev : \dim <[v]> = (v != 0). Proof. by rewrite /dimv mxrank_gen rank_rV (can2_eq v2rK r2vK) linear0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
dim_vline
dimvSU V : (U <= V)%VS -> \dim U <= \dim V. Proof. exact: mxrankS. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
dimvS
dimv_leqif_supU V : (U <= V)%VS -> \dim U <= \dim V ?= iff (V <= U)%VS. Proof. exact: mxrank_leqif_sup. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
dimv_leqif_sup
dimv_leqif_eqU V : (U <= V)%VS -> \dim U <= \dim V ?= iff (U == V). Proof. by rewrite eqEsubv; apply: mxrank_leqif_eq. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
dimv_leqif_eq
eqEdimU V : (U == V) = (U <= V)%VS && (\dim V <= \dim U). Proof. by apply/idP/andP=> [/eqP | [/dimv_leqif_eq/geq_leqif]] ->. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
eqEdim
dimv_complU : \dim U^C = (\dim {:vT} - \dim U)%N. Proof. by rewrite dimvf /dimv mxrank_gen mxrank_compl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
dimv_compl
dimv_cap_complU V : (\dim (U :&: V) + \dim (U :\: V))%N = \dim U. Proof. by rewrite /dimv !mxrank_gen mxrank_cap_compl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
dimv_cap_compl
dimv_sum_capU V : (\dim (U + V) + \dim (U :&: V) = \dim U + \dim V)%N. Proof. by rewrite /dimv !mxrank_gen mxrank_sum_cap. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
dimv_sum_cap
dimv_disjoint_sumU V : (U :&: V = 0)%VS -> \dim (U + V) = (\dim U + \dim V)%N. Proof. by move=> dxUV; rewrite -dimv_sum_cap dxUV dimv0 addn0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
dimv_disjoint_sum
dimv_add_leqifU V : \dim (U + V) <= \dim U + \dim V ?= iff (U :&: V <= 0)%VS. Proof. by rewrite /dimv /subV !mxrank_gen vs2mx0 genmxE; apply: mxrank_adds_leqif. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
dimv_add_leqif
diffv_eq0U V : (U :\: V == 0)%VS = (U <= V)%VS. Proof. rewrite -dimv_eq0 -(eqn_add2l (\dim (U :&: V))) addn0 dimv_cap_compl eq_sym. by rewrite (dimv_leqif_eq (capvSl _ _)) (sameP capv_idPl eqP). Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
diffv_eq0
dimv_leq_sumI r (P : pred I) (Us : I -> {vspace vT}) : \dim (\sum_(i <- r | P i) Us i) <= \sum_(i <- r | P i) \dim (Us i). Proof. elim/big_rec2: _ => [|i d vs _ le_vs_d]; first by rewrite dim_vline eqxx. by apply: (leq_trans (dimv_add_leqif _ _)); rewrite leq_add2l. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
dimv_leq_sum
addv_expr:= Sumv { addv_val :> wrapped {vspace vT}; addv_dim : wrapped nat; _ : mxsum_spec (vs2mx (unwrap addv_val)) (unwrap addv_dim) }.
Structure
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
addv_expr
vs2mx_sum_expr_subproof(S : addv_expr) : mxsum_spec (vs2mx (unwrap S)) (unwrap (addv_dim S)). Proof. by case: S. Qed.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
vs2mx_sum_expr_subproof
vs2mx_sum_exprS := ProperMxsumExpr (vs2mx_sum_expr_subproof S).
Canonical
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
vs2mx_sum_expr
trivial_addvU := @Sumv (Wrap U) (Wrap (\dim U)) (TrivialMxsum _).
Canonical
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
trivial_addv
proper_addv_expr:= ProperSumvExpr { proper_addv_val :> {vspace vT}; proper_addv_dim :> nat; _ : mxsum_spec (vs2mx proper_addv_val) proper_addv_dim }.
Structure
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
proper_addv_expr
proper_addvP(S : proper_addv_expr) := let: ProperSumvExpr _ _ termS := S return mxsum_spec (vs2mx S) S in termS.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
proper_addvP
proper_addv(S : proper_addv_expr) := @Sumv (wrap (S : {vspace vT})) (wrap (S : nat)) (proper_addvP S).
Canonical
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
proper_addv
binary_addv_expr:= ProperSumvExpr binary_addv_subproof.
Canonical
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
binary_addv_expr
nary_addv_expr:= ProperSumvExpr nary_addv_subproof.
Canonical
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
nary_addv_expr
directv_defS of phantom {vspace vT} (unwrap (addv_val S)) := \dim (unwrap S) == unwrap (addv_dim S).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
directv_def
directvE(S : addv_expr) : directv (unwrap S) = (\dim (unwrap S) == unwrap (addv_dim S)). Proof. by []. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
directvE
directvP{S : proper_addv_expr} : reflect (\dim S = S :> nat) (directv S). Proof. exact: eqnP. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
directvP
directv_trivialU : directv (unwrap (@trivial_addv U)). Proof. exact: eqxx. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
directv_trivial
dimv_sum_leqif(S : addv_expr) : \dim (unwrap S) <= unwrap (addv_dim S) ?= iff directv (unwrap S). Proof. rewrite directvE; case: S => [[U] [d] /= defUd]; split=> //=. rewrite /dimv; elim: {1}_ {U}_ d / defUd => // m1 m2 A1 A2 r1 r2 _ leA1 _ leA2. by apply: leq_trans (leq_add leA1 leA2); rewrite mxrank_adds_leqif. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
dimv_sum_leqif
directvEgeq(S : addv_expr) : directv (unwrap S) = (\dim (unwrap S) >= unwrap (addv_dim S)). Proof. by rewrite leq_eqVlt ltnNge eq_sym !dimv_sum_leqif orbF. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
directvEgeq
directv_addE(S1 S2 : addv_expr) : directv (unwrap S1 + unwrap S2) = [&& directv (unwrap S1), directv (unwrap S2) & unwrap S1 :&: unwrap S2 == 0]%VS. Proof. by rewrite /directv_def /dimv vs2mxD -mxdirectE mxdirect_addsE -vs2mxI -vs2mx0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
directv_addE
directv_addP{U V} : reflect (U :&: V = 0)%VS (directv (U + V)). Proof. by rewrite directv_addE !directv_trivial; apply: eqP. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
directv_addP
directv_add_unique{U V} : reflect (forall u1 u2 v1 v2, u1 \in U -> u2 \in U -> v1 \in V -> v2 \in V -> (u1 + v1 == u2 + v2) = ((u1, v1) == (u2, v2))) (directv (U + V)). Proof. apply: (iffP directv_addP) => [dxUV u1 u2 v1 v2 Uu1 Uu2 Vv1 Vv2 | dxUV]. apply/idP/idP=> [| /eqP[-> ->] //]; rewrite -subr_eq0 opprD addrACA addr_eq0. move/eqP=> eq_uv; rewrite xpair_eqE -subr_eq0 eq_uv oppr_eq0 subr_eq0 andbb. by rewrite -subr_eq0 -memv0 -dxUV memv_cap -memvN -eq_uv !memvB. apply/eqP; rewrite -subv0; apply/subvP=> v /memv_capP[U1v U2v]. by rewrite memv0 -[v == 0]andbb {1}eq_sym -xpair_eqE -dxUV ?mem0v // addrC. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
directv_add_unique
directv_sumP{Us : I -> {vspace vT}} : reflect (forall i, P i -> Us i :&: (\sum_(j | P j && (j != i)) Us j) = 0)%VS (directv (\sum_(i | P i) Us i)). Proof. rewrite directvE /= /dimv vs2mx_sum -mxdirectE; apply: (equivP mxdirect_sumsP). by do [split=> dxU i /dxU; rewrite -vs2mx_sum -vs2mxI -vs2mx0] => [/val_inj|->]. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
directv_sumP
directv_sumE{Ss : I -> addv_expr} (xunwrap := unwrap) : reflect [/\ forall i, P i -> directv (unwrap (Ss i)) & directv (\sum_(i | P i) xunwrap (Ss i))] (directv (\sum_(i | P i) unwrap (Ss i))). Proof. by rewrite !directvE /= /dimv 2!{1}vs2mx_sum -!mxdirectE; apply: mxdirect_sumsE. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
directv_sumE
directv_sum_independent{Us : I -> {vspace vT}} : reflect (forall us, (forall i, P i -> us i \in Us i) -> \sum_(i | P i) us i = 0 -> (forall i, P i -> us i = 0)) (directv (\sum_(i | P i) Us i)). Proof. apply: (iffP directv_sumP) => [dxU us Uu u_0 i Pi | dxU i Pi]. apply/eqP; rewrite -memv0 -(dxU i Pi) memv_cap Uu //= -memvN -sub0r -{1}u_0. by rewrite (bigD1 i) //= [_ - us i]addrC addKr memv_sumr // => j /andP[/Uu]. apply/eqP; rewrite -subv0; apply/subvP=> v. rewrite memv_cap memv0 => /andP[Uiv /memv_sumP[us Uu Dv]]. have: \sum_(j | P j) [eta us with i |-> - v] j = 0. rewrite (bigD1 i) //= eqxx {1}Dv addrC -sumrB big1 // => j /andP[_ i'j]. by rewrite (negPf i'j) subrr. move/dxU/(_ i Pi); rewrite /= eqxx -oppr_eq0 => -> // j Pj. by have [-> | i'j] := eqVneq; rewrite ?memvN // Uu ?Pj. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
directv_sum_independent
directv_sum_unique{Us : I -> {vspace vT}} : reflect (forall us vs, (forall i, P i -> us i \in Us i) -> (forall i, P i -> vs i \in Us i) -> (\sum_(i | P i) us i == \sum_(i | P i) vs i) = [forall (i | P i), us i == vs i]) (directv (\sum_(i | P i) Us i)). Proof. apply: (iffP directv_sum_independent) => [dxU us vs Uu Uv | dxU us Uu u_0 i Pi]. apply/idP/forall_inP=> [|eq_uv]; last by apply/eqP/eq_bigr => i /eq_uv/eqP. rewrite -subr_eq0 -sumrB => /eqP/dxU eq_uv i Pi. by rewrite -subr_eq0 eq_uv // => j Pj; apply: memvB; move: j Pj. apply/eqP; have:= esym (dxU us \0 Uu _); rewrite u_0 big1_eq eqxx. by move/(_ _)/forall_inP=> -> // j _; apply: mem0v. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
directv_sum_unique
memv_spanX v : v \in X -> v \in <<X>>%VS. Proof. by case/seq_tnthP=> i {v}->; rewrite unlock memvK genmxE (eq_row_sub i) // rowK. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
memv_span
memv_span1v : v \in <<[:: v]>>%VS. Proof. by rewrite memv_span ?mem_head. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
memv_span1
dim_spanX : \dim <<X>> <= size X. Proof. by rewrite unlock /dimv genmxE rank_leq_row. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
dim_span
span_subvP{X U} : reflect {subset X <= U} (<<X>> <= U)%VS. Proof. rewrite /subV [@span _ _]unlock genmxE. apply: (iffP row_subP) => /= [sXU | sXU i]. by move=> _ /seq_tnthP[i ->]; have:= sXU i; rewrite rowK memvK. by rewrite rowK -memvK sXU ?mem_tnth. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
span_subvP
sub_spanX Y : {subset X <= Y} -> (<<X>> <= <<Y>>)%VS. Proof. by move=> sXY; apply/span_subvP=> v /sXY/memv_span. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
sub_span
eq_spanX Y : X =i Y -> (<<X>> = <<Y>>)%VS. Proof. by move=> eqXY; apply: subv_anti; rewrite !sub_span // => u; rewrite eqXY. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
eq_span
span_defX : span X = (\sum_(u <- X) <[u]>)%VS. Proof. apply/subv_anti/andP; split. by apply/span_subvP=> v Xv; rewrite (big_rem v) // memvE addvSl. by rewrite big_tnth; apply/subv_sumP=> i _; rewrite -memvE memv_span ?mem_tnth. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
span_def
span_nil: (<<Nil vT>> = 0)%VS. Proof. by rewrite span_def big_nil. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
span_nil
span_seq1v : (<<[:: v]>> = <[v]>)%VS. Proof. by rewrite span_def big_seq1. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
span_seq1
span_consv X : (<<v :: X>> = <[v]> + <<X>>)%VS. Proof. by rewrite !span_def big_cons. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
span_cons
span_catX Y : (<<X ++ Y>> = <<X>> + <<Y>>)%VS. Proof. by rewrite !span_def big_cat. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
span_cat
coord_expanded_defn (X : n.-tuple vT) i v := (v2r v *m pinvmx (b2mx X)) 0 i.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
coord_expanded_def
coord:= locked_with span_key coord_expanded_def.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
coord
coord_unlockable:= [unlockable fun coord]. Fact coord_is_scalar n (X : n.-tuple vT) i : scalar (coord X i). Proof. by move=> k u v; rewrite unlock linearP mulmxDl -scalemxAl !mxE. Qed. HB.instance Definition _ n Xn i := GRing.isSemilinear.Build K vT K _ (coord Xn i) (GRing.semilinear_linear (@coord_is_scalar n Xn i)).
Canonical
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
coord_unlockable
coord_spann (X : n.-tuple vT) v : v \in span X -> v = \sum_i coord X i v *: X`_i. Proof. rewrite memvK span_b2mx genmxE => Xv. by rewrite unlock_with mul_b2mx mulmxKpV ?v2rK. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
coord_span
coord0i v : coord [tuple 0] i v = 0. Proof. rewrite unlock /pinvmx rank_rV; case: negP => [[] | _]. by apply/eqP/rowP=> j; rewrite !mxE (tnth_nth 0) /= linear0 mxE. by rewrite pid_mx_0 !(mulmx0, mul0mx) mxE. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
coord0
nil_free: free (Nil vT). Proof. by rewrite /free span_nil dimv0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
nil_free
seq1_freev : free [:: v] = (v != 0). Proof. by rewrite /free span_seq1 dim_vline; case: (~~ _). Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
seq1_free
perm_freeX Y : perm_eq X Y -> free X = free Y. Proof. by move=> eqXY; rewrite /free (perm_size eqXY) (eq_span (perm_mem eqXY)). Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
perm_free
free_directvX : free X = (0 \notin X) && directv (\sum_(v <- X) <[v]>). Proof. have leXi i (v := tnth (in_tuple X) i): true -> \dim <[v]> <= 1 ?= iff (v != 0). by rewrite -seq1_free -span_seq1 => _; apply/leqif_eq/dim_span. have [_ /=] := leqif_trans (dimv_sum_leqif _) (leqif_sum leXi). rewrite sum1_card card_ord !directvE /= /free andbC span_def !(big_tnth _ _ X). by congr (_ = _ && _); rewrite -has_pred1 -all_predC -big_all big_tnth big_andE. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
free_directv
free_not0v X : free X -> v \in X -> v != 0. Proof. by rewrite free_directv andbC => /andP[_ /memPn]; apply. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
free_not0
freePn (X : n.-tuple vT) : reflect (forall k, \sum_(i < n) k i *: X`_i = 0 -> (forall i, k i = 0)) (free X). Proof. rewrite free_b2mx; apply: (iffP idP) => [t_free k kt0 i | t_free]. suffices /rowP/(_ i): \row_i k i = 0 by rewrite !mxE. by apply/(row_free_inj t_free)/r2v_inj; rewrite mul0mx -lin_b2mx kt0 linear0. rewrite -kermx_eq0; apply/rowV0P=> rk /sub_kermxP kt0. by apply/rowP=> i; rewrite mxE {}t_free // mul_b2mx kt0 linear0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype bigop finfun tuple", "From mathcomp Require Import ssralg matrix mxalgebra zmodp" ]
algebra/vector.v
freeP