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 |
|---|---|---|---|---|---|---|
addsmx_subm3 (C : 'M_(m3, n)) :
(A + B <= C)%MS = (A <= C)%MS && (B <= C)%MS.
Proof. by rewrite addsmxE col_mx_sub. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | addsmx_sub | |
addsmxSl: (A <= A + B)%MS.
Proof. by have:= submx_refl (A + B)%MS; rewrite addsmx_sub; case/andP. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | addsmxSl | |
addsmxSr: (B <= A + B)%MS.
Proof. by have:= submx_refl (A + B)%MS; rewrite addsmx_sub; case/andP. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | addsmxSr | |
addsmx_idPr: reflect (A + B :=: B)%MS (A <= B)%MS.
Proof.
have:= @eqmxP _ _ _ (A + B)%MS B.
by rewrite addsmxSr addsmx_sub submx_refl !andbT.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | addsmx_idPr | |
addsmx_idPl: reflect (A + B :=: A)%MS (B <= A)%MS.
Proof.
have:= @eqmxP _ _ _ (A + B)%MS A.
by rewrite addsmxSl addsmx_sub submx_refl !andbT.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | addsmx_idPl | |
adds0mxm1 m2 n (B : 'M_(m2, n)) : ((0 : 'M_(m1, n)) + B :=: B)%MS.
Proof. by apply/eqmxP; rewrite addsmx_sub sub0mx addsmxSr /= andbT. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | adds0mx | |
addsmx0m1 m2 n (A : 'M_(m1, n)) : (A + (0 : 'M_(m2, n)) :=: A)%MS.
Proof. by apply/eqmxP; rewrite addsmx_sub sub0mx addsmxSl /= !andbT. Qed.
Let addsmx_nop_eq0 m n (A : 'M_(m, n)) : (addsmx_nop A == 0) = (A == 0).
Proof. by rewrite -!submx0 eqmx_sum_nop. Qed.
Let addsmx_nop0 m n : addsmx_nop (0 : 'M_(m, n)) = 0.
Proof. by apply/eqP; rewrite addsmx_nop_eq0. Qed.
Let addsmx_nop_id n (A : 'M_n) : addsmx_nop A = A.
Proof. exact: conform_mx_id. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | addsmx0 | |
addsmxCm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : (A + B = B + A)%MS.
Proof.
have: (A + B == B + A)%MS.
by apply/andP; rewrite !addsmx_sub andbC -addsmx_sub andbC -addsmx_sub.
move/genmxP; rewrite [@addsmx]unlock -!submx0 !submx0.
by do 2!case: eqP => [// -> | _]; rewrite ?genmx_id ?addsmx_nop0.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | addsmxC | |
adds0mx_idm1 n (B : 'M_n) : ((0 : 'M_(m1, n)) + B)%MS = B.
Proof. by rewrite unlock eqxx addsmx_nop_id. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | adds0mx_id | |
addsmx0_idm2 n (A : 'M_n) : (A + (0 : 'M_(m2, n)))%MS = A.
Proof. by rewrite addsmxC adds0mx_id. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | addsmx0_id | |
addsmxAm1 m2 m3 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(m3, n)) :
(A + (B + C) = A + B + C)%MS.
Proof.
have: (A + (B + C) :=: A + B + C)%MS.
by apply/eqmxP/andP; rewrite !addsmx_sub -andbA andbA -!addsmx_sub.
rewrite {1 3}[in @addsmx _ m1]unlock [in @addsmx _ n]unlock !addsmx_nop_id -!submx0.
rewrite !addsmx_sub ![@addsmx]unlock -!submx0; move/eq_genmx.
by do 3!case: (_ <= 0)%MS; rewrite //= !genmx_id.
Qed.
HB.instance Definition _ n :=
Monoid.isComLaw.Build (matrix F n n) 0%MS addsmx.body
(@addsmxA n n n n) (@addsmxC n n n) (@adds0mx_id n n). | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | addsmxA | |
addsmxMrm1 m2 n p (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(n, p)) :
((A + B)%MS *m C :=: A *m C + B *m C)%MS.
Proof. by apply/eqmxP; rewrite !addsmxE -!mul_col_mx !submxMr ?addsmxE. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | addsmxMr | |
addsmxSm1 m2 m3 m4 n (A : 'M_(m1, n)) (B : 'M_(m2, n))
(C : 'M_(m3, n)) (D : 'M_(m4, n)) :
(A <= C -> B <= D -> A + B <= C + D)%MS.
Proof.
move=> sAC sBD.
by rewrite addsmx_sub {1}addsmxC !(submx_trans _ (addsmxSr _ _)).
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | addsmxS | |
addmx_sub_addsm m1 m2 n (A : 'M_(m, n)) (B : 'M_(m, n))
(C : 'M_(m1, n)) (D : 'M_(m2, n)) :
(A <= C -> B <= D -> (A + B)%R <= C + D)%MS.
Proof.
move=> sAC; move/(addsmxS sAC); apply: submx_trans.
by rewrite addmx_sub ?addsmxSl ?addsmxSr.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | addmx_sub_adds | |
addsmx_addKln m1 m2 (A : 'M_(m1, n)) (B C : 'M_(m2, n)) :
(B <= A)%MS -> (A + (B + C)%R :=: A + C)%MS.
Proof.
move=> sBA; apply/eqmxP; rewrite !addsmx_sub !addsmxSl.
by rewrite -{3}[C](addKr B) !addmx_sub_adds ?eqmx_opp.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | addsmx_addKl | |
addsmx_addKrn m1 m2 (A B : 'M_(m1, n)) (C : 'M_(m2, n)) :
(B <= C)%MS -> ((A + B)%R + C :=: A + C)%MS.
Proof. by rewrite -!(addsmxC C) addrC; apply: addsmx_addKl. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | addsmx_addKr | |
adds_eqmxm1 m2 m3 m4 n (A : 'M_(m1, n)) (B : 'M_(m2, n))
(C : 'M_(m3, n)) (D : 'M_(m4, n)) :
(A :=: C -> B :=: D -> A + B :=: C + D)%MS.
Proof. by move=> eqAC eqBD; apply/eqmxP; rewrite !addsmxS ?eqAC ?eqBD. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | adds_eqmx | |
genmx_addsm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(<<(A + B)%MS>> = <<A>> + <<B>>)%MS.
Proof.
rewrite -(eq_genmx (adds_eqmx (genmxE A) (genmxE B))).
by rewrite [@addsmx]unlock !addsmx_nop_id !(fun_if (@genmx _ _ _)) !genmx_id.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | genmx_adds | |
sub_addsmxPm1 m2 m3 n
(A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(m3, n)) :
reflect (exists u, A = u.1 *m B + u.2 *m C) (A <= B + C)%MS.
Proof.
apply: (iffP idP) => [|[u ->]]; last by rewrite addmx_sub_adds ?submxMl.
rewrite addsmxE; case/submxP=> u ->; exists (lsubmx u, rsubmx u).
by rewrite -mul_row_col hsubmxK.
Qed.
Arguments sub_addsmxP {m1 m2 m3 n A B C}.
Variable I : finType.
Implicit Type P : pred I. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | sub_addsmxP | |
genmx_sumsP n (B_ : I -> 'M_n) :
<<(\sum_(i | P i) B_ i)%MS>>%MS = (\sum_(i | P i) <<B_ i>>)%MS.
Proof. exact: (big_morph _ (@genmx_adds n n n) (@genmx0 n n)). Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | genmx_sums | |
sumsmx_supi0 P m n (A : 'M_(m, n)) (B_ : I -> 'M_n) :
P i0 -> (A <= B_ i0)%MS -> (A <= \sum_(i | P i) B_ i)%MS.
Proof.
by move=> Pi0 sAB; apply: submx_trans sAB _; rewrite (bigD1 i0) // addsmxSl.
Qed.
Arguments sumsmx_sup i0 [P m n A B_]. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | sumsmx_sup | |
sumsmx_subPP m n (A_ : I -> 'M_n) (B : 'M_(m, n)) :
reflect (forall i, P i -> A_ i <= B)%MS (\sum_(i | P i) A_ i <= B)%MS.
Proof.
apply: (iffP idP) => [sAB i Pi | sAB].
by apply: submx_trans sAB; apply: sumsmx_sup Pi _.
by elim/big_rec: _ => [|i Ai Pi sAiB]; rewrite ?sub0mx // addsmx_sub sAB.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | sumsmx_subP | |
summx_sub_sumsP m n (A : I -> 'M[F]_(m, n)) B :
(forall i, P i -> A i <= B i)%MS ->
((\sum_(i | P i) A i)%R <= \sum_(i | P i) B i)%MS.
Proof.
by move=> sAB; apply: summx_sub => i Pi; rewrite (sumsmx_sup i) ?sAB.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | summx_sub_sums | |
sumsmxSP n (A B : I -> 'M[F]_n) :
(forall i, P i -> A i <= B i)%MS ->
(\sum_(i | P i) A i <= \sum_(i | P i) B i)%MS.
Proof.
by move=> sAB; apply/sumsmx_subP=> i Pi; rewrite (sumsmx_sup i) ?sAB.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | sumsmxS | |
eqmx_sumsP n (A B : I -> 'M[F]_n) :
(forall i, P i -> A i :=: B i)%MS ->
(\sum_(i | P i) A i :=: \sum_(i | P i) B i)%MS.
Proof. by move=> eqAB; apply/eqmxP; rewrite !sumsmxS // => i; move/eqAB->. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | eqmx_sums | |
sub_sums_genmxPP m n p (A : 'M_(m, p)) (B_ : I -> 'M_(n, p)) :
reflect (exists u_ : I -> 'M_(m, n), A = \sum_(i | P i) u_ i *m B_ i)
(A <= \sum_(i | P i) <<B_ i>>)%MS.
Proof.
apply: (iffP idP) => [| [u_ ->]]; last first.
by apply: summx_sub_sums => i _; rewrite genmxE; apply: submxMl.
have [b] := ubnP #|P|; elim: b => // b IHb in P A *.
case: (pickP P) => [i Pi | P0 _]; last first.
rewrite big_pred0 //; move/submx0null->.
by exists (fun _ => 0); rewrite big_pred0.
rewrite (cardD1x Pi) (bigD1 i) //= => /IHb{b IHb} /= IHi.
rewrite (adds_eqmx (genmxE _) (eqmx_refl _)) => /sub_addsmxP[u ->].
have [u_ ->] := IHi _ (submxMl u.2 _).
exists [eta u_ with i |-> u.1]; rewrite (bigD1 i Pi)/= eqxx; congr (_ + _).
by apply: eq_bigr => j /andP[_ /negPf->].
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | sub_sums_genmxP | |
sub_sumsmxPP m n (A : 'M_(m, n)) (B_ : I -> 'M_n) :
reflect (exists u_, A = \sum_(i | P i) u_ i *m B_ i)
(A <= \sum_(i | P i) B_ i)%MS.
Proof.
by rewrite -(eqmx_sums (fun _ _ => genmxE _)); apply/sub_sums_genmxP.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | sub_sumsmxP | |
sumsmxMr_genP m n A (B : 'M[F]_(m, n)) :
((\sum_(i | P i) A i)%MS *m B :=: \sum_(i | P i) <<A i *m B>>)%MS.
Proof.
apply/eqmxP/andP; split; last first.
by apply/sumsmx_subP=> i Pi; rewrite genmxE submxMr ?(sumsmx_sup i).
have [u ->] := sub_sumsmxP _ _ _ (submx_refl (\sum_(i | P i) A i)%MS).
by rewrite mulmx_suml summx_sub_sums // => i _; rewrite genmxE -mulmxA submxMl.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | sumsmxMr_gen | |
sumsmxMrP n (A_ : I -> 'M[F]_n) (B : 'M_n) :
((\sum_(i | P i) A_ i)%MS *m B :=: \sum_(i | P i) (A_ i *m B))%MS.
Proof.
by apply: eqmx_trans (sumsmxMr_gen _ _ _) (eqmx_sums _) => i _; apply: genmxE.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | sumsmxMr | |
rank_pid_mxm n r : r <= m -> r <= n -> \rank (pid_mx r : 'M_(m, n)) = r.
Proof.
do 2!move/subnKC <-; rewrite pid_mx_block block_mxEv row_mx0 -addsmxE addsmx0.
by rewrite -mxrank_tr tr_row_mx trmx0 trmx1 -addsmxE addsmx0 mxrank1.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | rank_pid_mx | |
rank_copid_mxn r : r <= n -> \rank (copid_mx r : 'M_n) = (n - r)%N.
Proof.
move/subnKC <-; rewrite /copid_mx pid_mx_block scalar_mx_block.
rewrite opp_block_mx !oppr0 add_block_mx !addr0 subrr block_mxEv row_mx0.
rewrite -addsmxE adds0mx -mxrank_tr tr_row_mx trmx0 trmx1.
by rewrite -addsmxE adds0mx mxrank1 addKn.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | rank_copid_mx | |
mxrank_complm n (A : 'M_(m, n)) : \rank A^C = (n - \rank A)%N.
Proof. by rewrite mxrankMfree ?row_free_unit ?rank_copid_mx. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | mxrank_compl | |
mxrank_kerm n (A : 'M_(m, n)) : \rank (kermx A) = (m - \rank A)%N.
Proof. by rewrite mxrankMfree ?row_free_unit ?unitmx_inv ?rank_copid_mx. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | mxrank_ker | |
kermx_eq0n m (A : 'M_(m, n)) : (kermx A == 0) = row_free A.
Proof. by rewrite -mxrank_eq0 mxrank_ker subn_eq0 row_leq_rank. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | kermx_eq0 | |
mxrank_cokerm n (A : 'M_(m, n)) : \rank (cokermx A) = (n - \rank A)%N.
Proof. by rewrite eqmxMfull ?row_full_unit ?unitmx_inv ?rank_copid_mx. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | mxrank_coker | |
cokermx_eq0n m (A : 'M_(m, n)) : (cokermx A == 0) = row_full A.
Proof. by rewrite -mxrank_eq0 mxrank_coker subn_eq0 col_leq_rank. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | cokermx_eq0 | |
mulmx_kerm n (A : 'M_(m, n)) : kermx A *m A = 0.
Proof.
by rewrite -{2}[A]mulmx_ebase !mulmxA mulmxKV // mul_copid_mx_pid ?mul0mx.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | mulmx_ker | |
mulmxKV_kerm n p (A : 'M_(n, p)) (B : 'M_(m, n)) :
B *m A = 0 -> B *m col_ebase A *m kermx A = B.
Proof.
rewrite mulmxA mulmxBr mulmx1 mulmxBl mulmxK //.
rewrite -{1}[A]mulmx_ebase !mulmxA => /(canRL (mulmxK (row_ebase_unit A))).
rewrite mul0mx // => BA0; apply: (canLR (addrK _)).
by rewrite -(pid_mx_id _ _ n (rank_leq_col A)) mulmxA BA0 !mul0mx addr0.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | mulmxKV_ker | |
sub_kermxPp m n (A : 'M_(m, n)) (B : 'M_(p, m)) :
reflect (B *m A = 0) (B <= kermx A)%MS.
Proof.
apply: (iffP submxP) => [[D ->]|]; first by rewrite -mulmxA mulmx_ker mulmx0.
by move/mulmxKV_ker; exists (B *m col_ebase A).
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | sub_kermxP | |
sub_kermxp m n (A : 'M_(m, n)) (B : 'M_(p, m)) :
(B <= kermx A)%MS = (B *m A == 0).
Proof. exact/sub_kermxP/eqP. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | sub_kermx | |
kermx0m n : (kermx (0 : 'M_(m, n)) :=: 1%:M)%MS.
Proof. by apply/eqmxP; rewrite submx1/= sub_kermx mulmx0. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | kermx0 | |
mulmx_free_eq0m n p (A : 'M_(m, n)) (B : 'M_(n, p)) :
row_free B -> (A *m B == 0) = (A == 0).
Proof. by rewrite -sub_kermx -kermx_eq0 => /eqP->; rewrite submx0. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | mulmx_free_eq0 | |
inj_row_freem n (A : 'M_(m, n)) :
(forall v : 'rV_m, v *m A = 0 -> v = 0) -> row_free A.
Proof.
move=> Ainj; rewrite -kermx_eq0; apply/eqP/row_matrixP => i.
by rewrite row0; apply/Ainj; rewrite -row_mul mulmx_ker row0.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | inj_row_free | |
row_freePnm n (M : 'M[F]_(m, n)) :
reflect (exists i, (row i M <= row' i M)%MS) (~~ row_free M).
Proof.
rewrite -kermx_eq0; apply: (iffP (rowV0Pn _)) => [|[i0 /submxP[D rM]]].
move=> [v /sub_kermxP vM_eq0 /rV0Pn[i0 vi0_neq0]]; exists i0.
have := vM_eq0; rewrite mulmx_sum_row (bigD1_ord i0)//=.
move=> /(canRL (addrK _))/(canRL (scalerK _))->//.
rewrite sub0r scalerN -scaleNr scalemx_sub// summx_sub// => l _.
by rewrite scalemx_sub// -row_rowsub row_sub.
exists (\row_j oapp (D 0) (- 1) (unlift i0 j)); last first.
by apply/rV0Pn; exists i0; rewrite !mxE unlift_none/= oppr_eq0 oner_eq0.
apply/sub_kermxP; rewrite mulmx_sum_row (bigD1_ord i0)//= !mxE.
rewrite unlift_none scaleN1r rM mulmx_sum_row addrC -sumrB big1 // => l _.
by rewrite !mxE liftK row_rowsub subrr.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | row_freePn | |
negb_row_freem n (M : 'M[F]_(m, n)) :
~~ row_free M = [exists i, (row i M <= row' i M)%MS].
Proof. exact/row_freePn/existsP. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | negb_row_free | |
mulmx0_rank_maxm n p (A : 'M_(m, n)) (B : 'M_(n, p)) :
A *m B = 0 -> \rank A + \rank B <= n.
Proof.
move=> AB0; rewrite -{3}(subnK (rank_leq_row B)) leq_add2r.
by rewrite -mxrank_ker mxrankS // sub_kermx AB0.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | mulmx0_rank_max | |
mxrank_Frobeniusm n p q (A : 'M_(m, n)) B (C : 'M_(p, q)) :
\rank (A *m B) + \rank (B *m C) <= \rank B + \rank (A *m B *m C).
Proof.
rewrite -{2}(mulmx_base (A *m B)) -mulmxA (eqmxMfull _ (col_base_full _)).
set C2 := row_base _ *m C.
rewrite -{1}(subnK (rank_leq_row C2)) -(mxrank_ker C2) addnAC leq_add2r.
rewrite addnC -{1}(mulmx_base B) -mulmxA eqmxMfull //.
set C1 := _ *m C; rewrite -{2}(subnKC (rank_leq_row C1)) leq_add2l -mxrank_ker.
rewrite -(mxrankMfree _ (row_base_free (A *m B))).
have: (row_base (A *m B) <= row_base B)%MS by rewrite !eq_row_base submxMl.
case/submxP=> D defD; rewrite defD mulmxA mxrankMfree ?mxrankS //.
by rewrite sub_kermx -mulmxA (mulmxA D) -defD -/C2 mulmx_ker.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | mxrank_Frobenius | |
mxrank_mul_minm n p (A : 'M_(m, n)) (B : 'M_(n, p)) :
\rank A + \rank B - n <= \rank (A *m B).
Proof.
by have:= mxrank_Frobenius A 1%:M B; rewrite mulmx1 mul1mx mxrank1 leq_subLR.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | mxrank_mul_min | |
addsmx_compl_fullm n (A : 'M_(m, n)) : row_full (A + A^C)%MS.
Proof.
rewrite /row_full addsmxE; apply/row_fullP.
exists (row_mx (pinvmx A) (cokermx A)); rewrite mul_row_col.
rewrite -{2}[A]mulmx_ebase -!mulmxA mulKmx // -mulmxDr !mulmxA.
by rewrite pid_mx_id ?copid_mx_id // -mulmxDl addrC subrK mul1mx mulVmx.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | addsmx_compl_full | |
sub_capmx_genm1 m2 m3 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(m3, n)) :
(A <= capmx_gen B C)%MS = (A <= B)%MS && (A <= C)%MS.
Proof.
apply/idP/andP=> [sAI | [/submxP[B' ->{A}] /submxP[C' eqBC']]].
rewrite !(submx_trans sAI) ?submxMl // /capmx_gen.
have:= mulmx_ker (col_mx B C); set K := kermx _.
rewrite -{1}[K]hsubmxK mul_row_col; move/(canRL (addrK _))->.
by rewrite add0r -mulNmx submxMl.
have: (row_mx B' (- C') <= kermx (col_mx B C))%MS.
by rewrite sub_kermx mul_row_col eqBC' mulNmx subrr.
case/submxP=> D; rewrite -[kermx _]hsubmxK mul_mx_row.
by case/eq_row_mx=> -> _; rewrite -mulmxA submxMl.
Qed.
Let capmx_witnessP m n (A : 'M_(m, n)) : equivmx A (qidmx A) (capmx_witness A).
Proof.
rewrite /equivmx qidmx_eq1 /qidmx /capmx_witness.
rewrite -sub1mx; case s1A: (1%:M <= A)%MS => /=; last first.
rewrite !genmxE submx_refl /= -negb_add; apply: contra {s1A}(negbT s1A).
have [<- | _] := eqP; first by rewrite genmxE.
by case: eqP A => //= -> A /eqP ->; rewrite pid_mx_1.
case: (m =P n) => [-> | ne_mn] in A s1A *.
by rewrite conform_mx_id submx_refl pid_mx_1 eqxx.
by rewrite nonconform_mx ?submx1 ?s1A ?eqxx //; case: eqP.
Qed.
Let capmx_normP m n (A : 'M_(m, n)) : equivmx_spec A (qidmx A) (capmx_norm A).
Proof. by case/andP: (chooseP (capmx_witnessP A)) => /eqmxP defN /eqP. Qed.
Let capmx_norm_eq m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
qidmx A = qidmx B -> (A == B)%MS -> capmx_norm A = capmx_norm B.
Proof.
move=> eqABid /eqmxP eqAB.
have{eqABid} eqAB: equivmx A
... | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | sub_capmx_gen | |
capmxEm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A :&: B :=: capmx_gen A B)%MS.
Proof.
rewrite unlock -sub1mx; apply/eqmxP.
have:= submx_refl (capmx_gen A B); rewrite !sub_capmx_gen => /andP[sIA sIB].
case idA: (qidmx A); first by rewrite !capmx_nopP submx_refl sub_qidmx.
case idB: (qidmx B); first by rewrite !capmx_nopP submx_refl sub_qidmx.
case s1B: (1%:M <= B)%MS; rewrite !capmx_normP ?sub_capmx_gen sIA ?sIB //=.
by rewrite submx_refl (submx_trans (submx1 _)).
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | capmxE | |
capmxSlm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : (A :&: B <= A)%MS.
Proof. by rewrite capmxE submxMl. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | capmxSl | |
sub_capmxm m1 m2 n (A : 'M_(m, n)) (B : 'M_(m1, n)) (C : 'M_(m2, n)) :
(A <= B :&: C)%MS = (A <= B)%MS && (A <= C)%MS.
Proof. by rewrite capmxE sub_capmx_gen. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | sub_capmx | |
capmxCm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : (A :&: B = B :&: A)%MS.
Proof.
have [eqAB|] := eqVneq (qidmx A) (qidmx B).
rewrite (capmx_eq_norm eqAB) (capmx_eq_norm (esym eqAB)).
apply: capmx_norm_eq; first by rewrite !qidmx_cap andbC.
by apply/andP; split; rewrite !sub_capmx andbC -sub_capmx.
by rewrite negb_eqb !unlock => /addbP <-; case: (qidmx A).
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | capmxC | |
capmxSrm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : (A :&: B <= B)%MS.
Proof. by rewrite capmxC capmxSl. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | capmxSr | |
capmx_idPrn m1 m2 (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
reflect (A :&: B :=: B)%MS (B <= A)%MS.
Proof.
have:= @eqmxP _ _ _ (A :&: B)%MS B.
by rewrite capmxSr sub_capmx submx_refl !andbT.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | capmx_idPr | |
capmx_idPln m1 m2 (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
reflect (A :&: B :=: A)%MS (A <= B)%MS.
Proof. by rewrite capmxC; apply: capmx_idPr. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | capmx_idPl | |
capmxSm1 m2 m3 m4 n (A : 'M_(m1, n)) (B : 'M_(m2, n))
(C : 'M_(m3, n)) (D : 'M_(m4, n)) :
(A <= C -> B <= D -> A :&: B <= C :&: D)%MS.
Proof.
by move=> sAC sBD; rewrite sub_capmx {1}capmxC !(submx_trans (capmxSr _ _)).
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | capmxS | |
cap_eqmxm1 m2 m3 m4 n (A : 'M_(m1, n)) (B : 'M_(m2, n))
(C : 'M_(m3, n)) (D : 'M_(m4, n)) :
(A :=: C -> B :=: D -> A :&: B :=: C :&: D)%MS.
Proof. by move=> eqAC eqBD; apply/eqmxP; rewrite !capmxS ?eqAC ?eqBD. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | cap_eqmx | |
capmxMrm1 m2 n p (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(n, p)) :
((A :&: B) *m C <= A *m C :&: B *m C)%MS.
Proof. by rewrite sub_capmx !submxMr ?capmxSl ?capmxSr. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | capmxMr | |
cap0mxm1 m2 n (A : 'M_(m2, n)) : ((0 : 'M_(m1, n)) :&: A)%MS = 0.
Proof. exact: submx0null (capmxSl _ _). Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | cap0mx | |
capmx0m1 m2 n (A : 'M_(m1, n)) : (A :&: (0 : 'M_(m2, n)))%MS = 0.
Proof. exact: submx0null (capmxSr _ _). Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | capmx0 | |
capmxTm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
row_full B -> (A :&: B :=: A)%MS.
Proof.
rewrite -sub1mx => s1B; apply/eqmxP.
by rewrite capmxSl sub_capmx submx_refl (submx_trans (submx1 A)).
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | capmxT | |
capTmxm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
row_full A -> (A :&: B :=: B)%MS.
Proof. by move=> Afull; apply/eqmxP; rewrite capmxC !capmxT ?andbb. Qed.
Let capmx_nop_id n (A : 'M_n) : capmx_nop A = A.
Proof. by rewrite /capmx_nop conform_mx_id. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | capTmx | |
cap1mxn (A : 'M_n) : (1%:M :&: A = A)%MS.
Proof. by rewrite unlock qidmx_eq1 eqxx capmx_nop_id. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | cap1mx | |
capmx1n (A : 'M_n) : (A :&: 1%:M = A)%MS.
Proof. by rewrite capmxC cap1mx. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | capmx1 | |
genmx_capm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
<<A :&: B>>%MS = (<<A>> :&: <<B>>)%MS.
Proof.
rewrite -(eq_genmx (cap_eqmx (genmxE A) (genmxE B))).
case idAB: (qidmx <<A>> || qidmx <<B>>)%MS.
rewrite [@capmx]unlock !capmx_nop_id !(fun_if (@genmx _ _ _)) !genmx_id.
by case: (qidmx _) idAB => //= ->.
case idA: (qidmx _) idAB => //= idB; rewrite {2}capmx_eq_norm ?idA //.
set C := (_ :&: _)%MS; have eq_idC: row_full C = qidmx C.
rewrite qidmx_cap idA -sub1mx sub_capmx genmxE; apply/andP=> [[s1A]].
by case/idP: idA; rewrite qidmx_eq1 -genmx1 (sameP eqP genmxP) submx1.
rewrite unlock /capmx_norm eq_idC.
by apply: choose_id (capmx_witnessP _); rewrite -eq_idC genmx_witnessP.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | genmx_cap | |
capmxAm1 m2 m3 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(m3, n)) :
(A :&: (B :&: C) = A :&: B :&: C)%MS.
Proof.
rewrite (capmxC A B) capmxC; wlog idA: m1 m3 A C / qidmx A.
move=> IH; case idA: (qidmx A); first exact: IH.
case idC: (qidmx C); first by rewrite -IH.
rewrite (@capmx_eq_norm n m3) ?qidmx_cap ?idA ?idC ?andbF //.
rewrite capmx_eq_norm ?qidmx_cap ?idA ?idC ?andbF //.
apply: capmx_norm_eq; first by rewrite !qidmx_cap andbAC.
by apply/andP; split; rewrite !sub_capmx andbAC -!sub_capmx.
rewrite -!(capmxC A) [in @capmx _ m1]unlock idA capmx_nop_id.
have [eqBC|] := eqVneq (qidmx B) (qidmx C).
rewrite (@capmx_eq_norm n) ?capmx_nopP // capmx_eq_norm //.
by apply: capmx_norm_eq; rewrite ?qidmx_cap ?capmxS ?capmx_nopP.
by rewrite !unlock capmx_nopP capmx_nop_id; do 2?case: (qidmx _) => //.
Qed.
HB.instance Definition _ n :=
Monoid.isComLaw.Build (matrix F n n) 1%:M capmx.body
(@capmxA n n n n) (@capmxC n n n) (@cap1mx n). | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | capmxA | |
bigcapmx_infi0 P m n (A_ : I -> 'M_n) (B : 'M_(m, n)) :
P i0 -> (A_ i0 <= B -> \bigcap_(i | P i) A_ i <= B)%MS.
Proof. by move=> Pi0; apply: submx_trans; rewrite (bigD1 i0) // capmxSl. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | bigcapmx_inf | |
sub_bigcapmxPP m n (A : 'M_(m, n)) (B_ : I -> 'M_n) :
reflect (forall i, P i -> A <= B_ i)%MS (A <= \bigcap_(i | P i) B_ i)%MS.
Proof.
apply: (iffP idP) => [sAB i Pi | sAB].
by apply: (submx_trans sAB); rewrite (bigcapmx_inf Pi).
by elim/big_rec: _ => [|i Pi C sAC]; rewrite ?submx1 // sub_capmx sAB.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | sub_bigcapmxP | |
genmx_bigcapP n (A_ : I -> 'M_n) :
(<<\bigcap_(i | P i) A_ i>> = \bigcap_(i | P i) <<A_ i>>)%MS.
Proof. exact: (big_morph _ (@genmx_cap n n n) (@genmx1 n)). Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | genmx_bigcap | |
matrix_modlm1 m2 m3 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(m3, n)) :
(A <= C -> A + (B :&: C) :=: (A + B) :&: C)%MS.
Proof.
move=> sAC; set D := ((A + B) :&: C)%MS; apply/eqmxP.
rewrite sub_capmx addsmxS ?capmxSl // addsmx_sub sAC capmxSr /=.
have: (D <= B + A)%MS by rewrite addsmxC capmxSl.
case/sub_addsmxP=> u defD; rewrite defD addrC addmx_sub_adds ?submxMl //.
rewrite sub_capmx submxMl -[_ *m B](addrK (u.2 *m A)) -defD.
by rewrite addmx_sub ?capmxSr // eqmx_opp mulmx_sub.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | matrix_modl | |
matrix_modrm1 m2 m3 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(m3, n)) :
(C <= A -> (A :&: B) + C :=: A :&: (B + C))%MS.
Proof. by rewrite !(capmxC A) -!(addsmxC C); apply: matrix_modl. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | matrix_modr | |
capmx_complm n (A : 'M_(m, n)) : (A :&: A^C)%MS = 0.
Proof.
set D := (A :&: A^C)%MS; have: (D <= D)%MS by [].
rewrite sub_capmx andbC => /andP[/submxP[B defB]].
rewrite submxE => /eqP; rewrite defB -!mulmxA mulKVmx ?copid_mx_id //.
by rewrite mulmxA => ->; rewrite mul0mx.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | capmx_compl | |
mxrank_mul_kerm n p (A : 'M_(m, n)) (B : 'M_(n, p)) :
(\rank (A *m B) + \rank (A :&: kermx B))%N = \rank A.
Proof.
apply/eqP; set K := kermx B; set C := (A :&: K)%MS.
rewrite -(eqmxMr B (eq_row_base A)); set K' := _ *m B.
rewrite -{2}(subnKC (rank_leq_row K')) -mxrank_ker eqn_add2l.
rewrite -(mxrankMfree _ (row_base_free A)) mxrank_leqif_sup.
by rewrite sub_capmx -(eq_row_base A) submxMl sub_kermx -mulmxA mulmx_ker/=.
have /submxP[C' defC]: (C <= row_base A)%MS by rewrite eq_row_base capmxSl.
by rewrite defC submxMr // sub_kermx mulmxA -defC -sub_kermx capmxSr.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | mxrank_mul_ker | |
mxrank_injPm n p (A : 'M_(m, n)) (f : 'M_(n, p)) :
reflect (\rank (A *m f) = \rank A) ((A :&: kermx f)%MS == 0).
Proof.
rewrite -mxrank_eq0 -(eqn_add2l (\rank (A *m f))).
by rewrite mxrank_mul_ker addn0 eq_sym; apply: eqP.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | mxrank_injP | |
mxrank_disjoint_summ1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A :&: B)%MS = 0 -> \rank (A + B)%MS = (\rank A + \rank B)%N.
Proof.
move=> AB0; pose Ar := row_base A; pose Br := row_base B.
have [Afree Bfree]: row_free Ar /\ row_free Br by rewrite !row_base_free.
have: (Ar :&: Br <= A :&: B)%MS by rewrite capmxS ?eq_row_base.
rewrite {}AB0 submx0 -mxrank_eq0 capmxE mxrankMfree //.
set Cr := col_mx Ar Br; set Crl := lsubmx _; rewrite mxrank_eq0 => /eqP Crl0.
rewrite -(adds_eqmx (eq_row_base _) (eq_row_base _)) addsmxE -/Cr.
suffices K0: kermx Cr = 0.
by apply/eqP; rewrite eqn_leq rank_leq_row -subn_eq0 -mxrank_ker K0 mxrank0.
move/eqP: (mulmx_ker Cr); rewrite -[kermx Cr]hsubmxK mul_row_col -/Crl Crl0.
rewrite mul0mx add0r -mxrank_eq0 mxrankMfree // mxrank_eq0 => /eqP->.
exact: row_mx0.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | mxrank_disjoint_sum | |
diffmxEm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A :\: B :=: A :&: (capmx_gen A B)^C)%MS.
Proof. by rewrite unlock; apply/eqmxP; rewrite !genmxE !capmxE andbb. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | diffmxE | |
genmx_diffm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(<<A :\: B>> = A :\: B)%MS.
Proof. by rewrite [@diffmx]unlock genmx_id. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | genmx_diff | |
diffmxSlm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : (A :\: B <= A)%MS.
Proof. by rewrite diffmxE capmxSl. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | diffmxSl | |
capmx_diffm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
((A :\: B) :&: B)%MS = 0.
Proof.
apply/eqP; pose C := capmx_gen A B; rewrite -submx0 -(capmx_compl C).
by rewrite sub_capmx -capmxE sub_capmx andbAC -sub_capmx -diffmxE -sub_capmx.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | capmx_diff | |
addsmx_diff_cap_eqm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A :\: B + A :&: B :=: A)%MS.
Proof.
apply/eqmxP; rewrite addsmx_sub capmxSl diffmxSl /=.
set C := (A :\: B)%MS; set D := capmx_gen A B.
suffices sACD: (A <= C + D)%MS.
by rewrite (submx_trans sACD) ?addsmxS ?capmxE.
have:= addsmx_compl_full D; rewrite /row_full addsmxE.
case/row_fullP=> U /(congr1 (mulmx A)); rewrite mulmx1.
rewrite -[U]hsubmxK mul_row_col mulmxDr addrC 2!mulmxA.
set V := _ *m _ => defA; rewrite -defA; move/(canRL (addrK _)): defA => defV.
suffices /submxP[W ->]: (V <= C)%MS by rewrite -mul_row_col addsmxE submxMl.
rewrite diffmxE sub_capmx {1}defV -mulNmx addmx_sub 1?mulmx_sub //.
by rewrite -capmxE capmxSl.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | addsmx_diff_cap_eq | |
mxrank_cap_complm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(\rank (A :&: B) + \rank (A :\: B))%N = \rank A.
Proof.
rewrite addnC -mxrank_disjoint_sum ?addsmx_diff_cap_eq //.
by rewrite (capmxC A) capmxA capmx_diff cap0mx.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | mxrank_cap_compl | |
mxrank_sum_capm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(\rank (A + B) + \rank (A :&: B) = \rank A + \rank B)%N.
Proof.
set C := (A :&: B)%MS; set D := (A :\: B)%MS.
have rDB: \rank (A + B)%MS = \rank (D + B)%MS.
apply/eqP; rewrite mxrank_leqif_sup; first by rewrite addsmxS ?diffmxSl.
by rewrite addsmx_sub addsmxSr -(addsmx_diff_cap_eq A B) addsmxS ?capmxSr.
rewrite {1}rDB mxrank_disjoint_sum ?capmx_diff //.
by rewrite addnC addnA mxrank_cap_compl.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | mxrank_sum_cap | |
mxrank_adds_leqifm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
\rank (A + B) <= \rank A + \rank B ?= iff (A :&: B <= (0 : 'M_n))%MS.
Proof.
rewrite -mxrank_sum_cap; split; first exact: leq_addr.
by rewrite addnC (@eqn_add2r _ 0) eq_sym mxrank_eq0 -submx0.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | mxrank_adds_leqif | |
rank_col_mx0m n p (A : 'M_(m, n)) :
\rank (col_mx A (0 : 'M_(p, n))) = \rank A.
Proof. by rewrite -addsmxE addsmx0. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | rank_col_mx0 | |
rank_col_0mxm n p (A : 'M_(m, n)) :
\rank (col_mx (0 : 'M_(p, n)) A) = \rank A.
Proof. by rewrite -addsmxE adds0mx. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | rank_col_0mx | |
rank_row_mx0m n p (A : 'M_(m, n)) :
\rank (row_mx A (0 : 'M_(m, p))) = \rank A.
Proof. by rewrite -mxrank_tr -[RHS]mxrank_tr tr_row_mx trmx0 rank_col_mx0. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | rank_row_mx0 | |
rank_row_0mxm n p (A : 'M_(m, n)) :
\rank (row_mx (0 : 'M_(m, p)) A) = \rank A.
Proof. by rewrite -mxrank_tr -[RHS]mxrank_tr tr_row_mx trmx0 rank_col_0mx. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | rank_row_0mx | |
rank_diag_block_mxm n p q
(A : 'M_(m, n)) (B : 'M_(p, q)) :
\rank (block_mx A 0 0 B) = (\rank A + \rank B)%N.
Proof.
rewrite block_mxEv -addsmxE mxrank_disjoint_sum ?rank_row_mx0 ?rank_row_0mx//.
apply/eqP/rowV0P => v; rewrite sub_capmx => /andP[/submxP[x ->]].
rewrite mul_mx_row mulmx0 => /submxP[y]; rewrite mul_mx_row mulmx0.
by move=> /eq_row_mx[-> _]; rewrite row_mx0.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | rank_diag_block_mx | |
proj_mx_subm n U V (W : 'M_(m, n)) : (W *m proj_mx U V <= U)%MS.
Proof. by rewrite !mulmx_sub // -addsmxE addsmx0. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | proj_mx_sub | |
proj_mx_compl_subm n U V (W : 'M_(m, n)) :
(W <= U + V -> W - W *m proj_mx U V <= V)%MS.
Proof.
rewrite addsmxE => sWUV; rewrite mulmxA -{1}(mulmxKpV sWUV) -mulmxBr.
by rewrite mulmx_sub // opp_col_mx add_col_mx subrr subr0 -addsmxE adds0mx.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | proj_mx_compl_sub | |
proj_mx_idm n U V (W : 'M_(m, n)) :
(U :&: V = 0)%MS -> (W <= U)%MS -> W *m proj_mx U V = W.
Proof.
move=> dxUV sWU; apply/eqP; rewrite -subr_eq0 -submx0 -dxUV.
rewrite sub_capmx addmx_sub ?eqmx_opp ?proj_mx_sub //= -eqmx_opp opprB.
by rewrite proj_mx_compl_sub // (submx_trans sWU) ?addsmxSl.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | proj_mx_id | |
proj_mx_0m n U V (W : 'M_(m, n)) :
(U :&: V = 0)%MS -> (W <= V)%MS -> W *m proj_mx U V = 0.
Proof.
move=> dxUV sWV; apply/eqP; rewrite -submx0 -dxUV.
rewrite sub_capmx proj_mx_sub /= -[_ *m _](subrK W) addmx_sub // -eqmx_opp.
by rewrite opprB proj_mx_compl_sub // (submx_trans sWV) ?addsmxSr.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | proj_mx_0 | |
add_proj_mxm n U V (W : 'M_(m, n)) :
(U :&: V = 0)%MS -> (W <= U + V)%MS ->
W *m proj_mx U V + W *m proj_mx V U = W.
Proof.
move=> dxUV sWUV; apply/eqP; rewrite -subr_eq0 -submx0 -dxUV.
rewrite -addrA sub_capmx {2}addrCA -!(opprB W).
by rewrite !{1}addmx_sub ?proj_mx_sub ?eqmx_opp ?proj_mx_compl_sub // addsmxC.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | add_proj_mx | |
proj_mx_projn (U V : 'M_n) :
let P := proj_mx U V in (U :&: V = 0)%MS -> P *m P = P.
Proof.
by move=> P dxUV; rewrite -[P in P *m _]mul1mx proj_mx_id ?proj_mx_sub ?mul1mx.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | proj_mx_proj | |
complete_unitmxm n (U : 'M_(m, n)) (f : 'M_n) :
\rank (U *m f) = \rank U -> {g : 'M_n | g \in unitmx & U *m f = U *m g}.
Proof.
move=> injfU; pose V := <<U>>%MS; pose W := V *m f.
pose g := proj_mx V (V^C)%MS *m f + cokermx V *m row_ebase W.
have defW: V *m g = W.
rewrite mulmxDr mulmxA proj_mx_id ?genmxE ?capmx_compl //.
by rewrite mulmxA mulmx_coker mul0mx addr0.
exists g; last first.
have /submxP[u ->]: (U <= V)%MS by rewrite genmxE.
by rewrite -!mulmxA defW.
rewrite -row_full_unit -sub1mx; apply/submxP.
have: (invmx (col_ebase W) *m W <= V *m g)%MS by rewrite defW submxMl.
case/submxP=> v def_v; exists (invmx (row_ebase W) *m (v *m V + (V^C)%MS)).
rewrite -mulmxA mulmxDl -mulmxA -def_v -{3}[W]mulmx_ebase -mulmxA.
rewrite mulKmx ?col_ebase_unit // [_ *m g]mulmxDr mulmxA.
rewrite (proj_mx_0 (capmx_compl _)) // mul0mx add0r 2!mulmxA.
rewrite mulmxK ?row_ebase_unit // copid_mx_id ?rank_leq_row //.
rewrite (eqmxMr _ (genmxE U)) injfU genmxE addrC -mulmxDl subrK.
by rewrite mul1mx mulVmx ?row_ebase_unit.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | complete_unitmx | |
eqmxMunitPm n (U V : 'M_(m, n)) :
reflect (exists2 P, P \in unitmx & U = P *m V) (U == V)%MS.
Proof.
apply: (iffP eqmxP) => [eqUV | [P Punit ->]]; last first.
by apply/eqmxMfull; rewrite row_full_unit.
have [D defU]: exists D, U = D *m V by apply/submxP; rewrite eqUV.
have{eqUV} [Pt Pt_unit defUt]: {Pt | Pt \in unitmx & V^T *m D^T = V^T *m Pt}.
by apply/complete_unitmx; rewrite -trmx_mul -defU !mxrank_tr eqUV.
by exists Pt^T; last apply/trmx_inj; rewrite ?unitmx_tr // defU !trmx_mul trmxK.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | eqmxMunitP | |
eq_rank_unitmxm1 m2 n (U : 'M_(m1, n)) (V : 'M_(m2, n)) :
\rank U = \rank V -> {f : 'M_n | f \in unitmx & V :=: U *m f}%MS.
Proof.
move=> eqrUV; pose f := invmx (row_ebase <<U>>%MS) *m row_ebase <<V>>%MS.
have defUf: (<<U>> *m f :=: <<V>>)%MS.
rewrite -[<<U>>%MS]mulmx_ebase mulmxA mulmxK ?row_ebase_unit // -mulmxA.
rewrite genmxE eqrUV -genmxE -{3}[<<V>>%MS]mulmx_ebase -mulmxA.
move: (pid_mx _ *m _) => W; apply/eqmxP.
by rewrite !eqmxMfull ?andbb // row_full_unit col_ebase_unit.
have{defUf} defV: (V :=: U *m f)%MS.
by apply/eqmxP; rewrite -!(eqmxMr f (genmxE U)) !defUf !genmxE andbb.
have injfU: \rank (U *m f) = \rank U by rewrite -defV eqrUV.
by have [g injg defUg] := complete_unitmx injfU; exists g; rewrite -?defUg.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | eq_rank_unitmx | |
maxrankfun: 'I_m ^ \rank A :=
[arg max_(f > finfun (widen_ord (rank_leq_row A))) \rank (rowsub f A)].
Local Notation mxf := maxrankfun. | Definition | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype finfun bigop finset fingroup perm order",
"From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix"
] | algebra/mxalgebra.v | maxrankfun |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.