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
map2_mxC{opm : Monoid.com_law idm} : commutative (@map2_mx _ _ _ opm m n). Proof. by move=> A B; apply/matrixP=> i j; rewrite !mxE Monoid.mulmC. Qed. HB.instance Definition _ {opm : Monoid.com_law idm} := SemiGroup.isCommutativeLaw.Build 'M_(m, n) (@map2_mx _ _ _ opm _ _) map2_mxC.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
map2_mxC
map2_0mx{opm : Monoid.mul_law idm} : left_zero (const_mx idm) (@map2_mx _ _ _ opm m n). Proof. by move=> A; apply/matrixP=> i j; rewrite !mxE Monoid.mul0m. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
map2_0mx
map2_mx0{opm : Monoid.mul_law idm} : right_zero (const_mx idm) (@map2_mx _ _ _ opm m n). Proof. by move=> A; apply/matrixP=> i j; rewrite !mxE Monoid.mulm0. Qed. HB.instance Definition _ {opm : Monoid.mul_law idm} := Monoid.isMulLaw.Build 'M_(m, n) (const_mx idm) (@map2_mx _ _ _ opm _ _) map2_0mx map2_mx0.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
map2_mx0
map2_mxDl{mul : T -> T -> T} {add : Monoid.add_law idm mul} : left_distributive (@map2_mx _ _ _ mul m n) (@map2_mx _ _ _ add m n). Proof. by move=> A B C; apply/matrixP=> i j; rewrite !mxE Monoid.mulmDl. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
map2_mxDl
map2_mxDr{mul : T -> T -> T} {add : Monoid.add_law idm mul} : right_distributive (@map2_mx _ _ _ mul m n) (@map2_mx _ _ _ add m n). Proof. by move=> A B C; apply/matrixP=> i j; rewrite !mxE Monoid.mulmDr. Qed. HB.instance Definition _ {mul : T -> T -> T} {add : Monoid.add_law idm mul} := Monoid.isAddLaw.Build 'M_(m, n) (@map2_mx _ _ _ mul _ _) (@map2_mx _ _ _ add _ _) map2_mxDl map2_mxDr.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
map2_mxDr
addmx:= @map2_mx V V V +%R m n.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
addmx
addmxA: associative addmx := map2_mxA.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
addmxA
addmxC: commutative addmx := map2_mxC.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
addmxC
add0mx: left_id (const_mx 0) addmx := map2_1mx. HB.instance Definition _ := GRing.isNmodule.Build 'M[V]_(m, n) addmxA addmxC add0mx.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
add0mx
mulmxnEA d i j : (A *+ d) i j = A i j *+ d. Proof. by elim: d => [|d IHd]; rewrite ?mulrS mxE ?IHd. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
mulmxnE
summxEI r (P : pred I) (E : I -> 'M_(m, n)) i j : (\sum_(k <- r | P k) E k) i j = \sum_(k <- r | P k) E k i j. Proof. by apply: (big_morph (fun A => A i j)) => [A B|]; rewrite mxE. Qed. Fact const_mx_is_nmod_morphism : nmod_morphism const_mx. Proof. by split=> [|a b]; apply/matrixP => // i j; rewrite !mxE. Qed. #[deprecated(since="mathcomp 2.5.0", note="use `const_mx_is_nmod_morphism` instead")]
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
summxE
const_mx_is_semi_additive:= const_mx_is_nmod_morphism. HB.instance Definition _ := GRing.isNmodMorphism.Build V 'M[V]_(m, n) const_mx const_mx_is_nmod_morphism.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
const_mx_is_semi_additive
swizzle_mxk (A : 'M[V]_(m, n)) := \matrix[k]_(i, j) A (f i j) (g i j). Fact swizzle_mx_is_nmod_morphism k : nmod_morphism (swizzle_mx k). Proof. by split=> [|A B]; apply/matrixP => i j; rewrite !mxE. Qed. #[deprecated(since="mathcomp 2.5.0", note="use `swizzle_mx_is_nmod_morphism` instead")]
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
swizzle_mx
swizzle_mx_is_semi_additive:= swizzle_mx_is_nmod_morphism. HB.instance Definition _ k := GRing.isNmodMorphism.Build 'M_(m, n) 'M_(p, q) (swizzle_mx k) (swizzle_mx_is_nmod_morphism k).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
swizzle_mx_is_semi_additive
Definition_ m n := SwizzleAdd (@trmx V m n). HB.instance Definition _ m n i := SwizzleAdd (@row V m n i). HB.instance Definition _ m n j := SwizzleAdd (@col V m n j). HB.instance Definition _ m n i := SwizzleAdd (@row' V m n i). HB.instance Definition _ m n j := SwizzleAdd (@col' V m n j). HB.instance Definition _ m n m' n' f g := SwizzleAdd (@mxsub V m n m' n' f g). HB.instance Definition _ m n s := SwizzleAdd (@row_perm V m n s). HB.instance Definition _ m n s := SwizzleAdd (@col_perm V m n s). HB.instance Definition _ m n i1 i2 := SwizzleAdd (@xrow V m n i1 i2). HB.instance Definition _ m n j1 j2 := SwizzleAdd (@xcol V m n j1 j2). HB.instance Definition _ m n1 n2 := SwizzleAdd (@lsubmx V m n1 n2). HB.instance Definition _ m n1 n2 := SwizzleAdd (@rsubmx V m n1 n2). HB.instance Definition _ m1 m2 n := SwizzleAdd (@usubmx V m1 m2 n). HB.instance Definition _ m1 m2 n := SwizzleAdd (@dsubmx V m1 m2 n). HB.instance Definition _ m n := SwizzleAdd (@vec_mx V m n). HB.instance Definition _ m n := GRing.isNmodMorphism.Build 'M_(m, n) 'rV_(m * n) mxvec (can2_nmod_morphism (@vec_mxK V m n) mxvecK).
HB.instance
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
Definition
flatmx0n : all_equal_to (0 : 'M_(0, n)). Proof. by move=> A; apply/matrixP=> [] []. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
flatmx0
thinmx0n : all_equal_to (0 : 'M_(n, 0)). Proof. by move=> A; apply/matrixP=> i []. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
thinmx0
trmx0m n : (0 : 'M_(m, n))^T = 0. Proof. exact: trmx_const. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
trmx0
row0m n i0 : row i0 (0 : 'M_(m, n)) = 0. Proof. exact: row_const. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
row0
col0m n j0 : col j0 (0 : 'M_(m, n)) = 0. Proof. exact: col_const. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
col0
mxvec_eq0m n (A : 'M_(m, n)) : (mxvec A == 0) = (A == 0). Proof. by rewrite (can2_eq mxvecK vec_mxK) raddf0. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
mxvec_eq0
vec_mx_eq0m n (v : 'rV_(m * n)) : (vec_mx v == 0) = (v == 0). Proof. by rewrite (can2_eq vec_mxK mxvecK) raddf0. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
vec_mx_eq0
row_mx0m n1 n2 : row_mx 0 0 = 0 :> 'M_(m, n1 + n2). Proof. exact: row_mx_const. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
row_mx0
col_mx0m1 m2 n : col_mx 0 0 = 0 :> 'M_(m1 + m2, n). Proof. exact: col_mx_const. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
col_mx0
block_mx0m1 m2 n1 n2 : block_mx 0 0 0 0 = 0 :> 'M_(m1 + m2, n1 + n2). Proof. exact: block_mx_const. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
block_mx0
split_mxE:= apply/matrixP=> i j; do ![rewrite mxE | case: split => ?].
Ltac
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
split_mxE
add_row_mxm n1 n2 (A1 : 'M_(m, n1)) (A2 : 'M_(m, n2)) B1 B2 : row_mx A1 A2 + row_mx B1 B2 = row_mx (A1 + B1) (A2 + B2). Proof. by split_mxE. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
add_row_mx
add_col_mxm1 m2 n (A1 : 'M_(m1, n)) (A2 : 'M_(m2, n)) B1 B2 : col_mx A1 A2 + col_mx B1 B2 = col_mx (A1 + B1) (A2 + B2). Proof. by split_mxE. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
add_col_mx
add_block_mxm1 m2 n1 n2 (Aul : 'M_(m1, n1)) Aur Adl (Adr : 'M_(m2, n2)) Bul Bur Bdl Bdr : let A := block_mx Aul Aur Adl Adr in let B := block_mx Bul Bur Bdl Bdr in A + B = block_mx (Aul + Bul) (Aur + Bur) (Adl + Bdl) (Adr + Bdr). Proof. by rewrite /= add_col_mx !add_row_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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
add_block_mx
row_mx_eq0(m n1 n2 : nat) (A1 : 'M_(m, n1)) (A2 : 'M_(m, n2)): (row_mx A1 A2 == 0) = (A1 == 0) && (A2 == 0). Proof. apply/eqP/andP; last by case=> /eqP-> /eqP->; rewrite row_mx0. by rewrite -row_mx0 => /eq_row_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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
row_mx_eq0
col_mx_eq0(m1 m2 n : nat) (A1 : 'M_(m1, n)) (A2 : 'M_(m2, n)): (col_mx A1 A2 == 0) = (A1 == 0) && (A2 == 0). Proof. by rewrite -![_ == 0](inj_eq trmx_inj) !trmx0 tr_col_mx row_mx_eq0. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
col_mx_eq0
block_mx_eq0m1 m2 n1 n2 (Aul : 'M_(m1, n1)) Aur Adl (Adr : 'M_(m2, n2)) : (block_mx Aul Aur Adl Adr == 0) = [&& Aul == 0, Aur == 0, Adl == 0 & Adr == 0]. Proof. by rewrite col_mx_eq0 !row_mx_eq0 !andbA. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
block_mx_eq0
trmx_eq0m n (A : 'M_(m, n)) : (A^T == 0) = (A == 0). Proof. by rewrite -trmx0 (inj_eq trmx_inj). 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
trmx_eq0
matrix_eq0m n (A : 'M_(m, n)) : (A == 0) = [forall i, forall j, A i j == 0]. Proof. apply/eqP/'forall_'forall_eqP => [-> i j|A_eq0]; first by rewrite !mxE. by apply/matrixP => i j; rewrite A_eq0 !mxE. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
matrix_eq0
matrix0Pnm n (A : 'M_(m, n)) : reflect (exists i j, A i j != 0) (A != 0). Proof. by rewrite matrix_eq0; apply/(iffP forallPn) => -[i /forallPn]; exists i. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
matrix0Pn
rV0Pnn (v : 'rV_n) : reflect (exists i, v 0 i != 0) (v != 0). Proof. apply: (iffP (matrix0Pn _)) => [[i [j]]|[j]]; last by exists 0, j. by rewrite ord1; exists j. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
rV0Pn
cV0Pnn (v : 'cV_n) : reflect (exists i, v i 0 != 0) (v != 0). Proof. apply: (iffP (matrix0Pn _)) => [[i] [j]|[i]]; last by exists i, 0. by rewrite ord1; exists i. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
cV0Pn
nz_rowm n (A : 'M_(m, n)) := oapp (fun i => row i A) 0 [pick i | row i A != 0].
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
nz_row
nz_row_eq0m n (A : 'M_(m, n)) : (nz_row A == 0) = (A == 0). Proof. rewrite /nz_row; symmetry; case: pickP => [i /= nzAi | Ai0]. by rewrite (negPf nzAi); apply: contraTF nzAi => /eqP->; rewrite row0 eqxx. by rewrite eqxx; apply/eqP/row_matrixP=> i; move/eqP: (Ai0 i) ->; rewrite 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
nz_row_eq0
is_diag_mxm n (A : 'M[V]_(m, n)) := [forall i : 'I__, forall j : 'I__, (i != j :> nat) ==> (A i j == 0)].
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
is_diag_mx
is_diag_mxPm n (A : 'M[V]_(m, n)) : reflect (forall i j : 'I__, i != j :> nat -> A i j = 0) (is_diag_mx A). Proof. by apply: (iffP 'forall_'forall_implyP) => /(_ _ _ _)/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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
is_diag_mxP
mx0_is_diagm n : is_diag_mx (0 : 'M[V]_(m, n)). Proof. by apply/is_diag_mxP => i j _; rewrite mxE. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
mx0_is_diag
mx11_is_diag(M : 'M_1) : is_diag_mx M. Proof. by apply/is_diag_mxP => i j; rewrite !ord1 eqxx. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
mx11_is_diag
is_trig_mxm n (A : 'M[V]_(m, n)) := [forall i : 'I__, forall j : 'I__, (i < j)%N ==> (A i j == 0)].
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
is_trig_mx
is_trig_mxPm n (A : 'M[V]_(m, n)) : reflect (forall i j : 'I__, (i < j)%N -> A i j = 0) (is_trig_mx A). Proof. by apply: (iffP 'forall_'forall_implyP) => /(_ _ _ _)/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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
is_trig_mxP
is_diag_mx_is_trigm n (A : 'M[V]_(m, n)) : is_diag_mx A -> is_trig_mx A. Proof. by move=> /is_diag_mxP A_eq0; apply/is_trig_mxP=> i j lt_ij; rewrite A_eq0// ltn_eqF. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
is_diag_mx_is_trig
mx0_is_trigm n : is_trig_mx (0 : 'M[V]_(m, n)). Proof. by apply/is_trig_mxP => i j _; rewrite mxE. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
mx0_is_trig
mx11_is_trig(M : 'M_1) : is_trig_mx M. Proof. by apply/is_trig_mxP => i j; rewrite !ord1 ltnn. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
mx11_is_trig
is_diag_mxEtrigm n (A : 'M[V]_(m, n)) : is_diag_mx A = is_trig_mx A && is_trig_mx A^T. Proof. apply/is_diag_mxP/andP => [Adiag|[/is_trig_mxP Atrig /is_trig_mxP ATtrig]]. by split; apply/is_trig_mxP => i j lt_ij; rewrite ?mxE ?Adiag//; [rewrite ltn_eqF|rewrite gtn_eqF]. by move=> i j; case: ltngtP => // [/Atrig|/ATtrig]; rewrite ?mxE. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
is_diag_mxEtrig
is_diag_trmxm n (A : 'M[V]_(m, n)) : is_diag_mx A^T = is_diag_mx A. Proof. by rewrite !is_diag_mxEtrig trmxK andbC. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
is_diag_trmx
ursubmx_trigm1 m2 n1 n2 (A : 'M[V]_(m1 + m2, n1 + n2)) : m1 <= n1 -> is_trig_mx A -> ursubmx A = 0. Proof. move=> leq_m1_n1 /is_trig_mxP Atrig; apply/matrixP => i j. by rewrite !mxE Atrig//= ltn_addr// (@leq_trans m1). 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
ursubmx_trig
dlsubmx_diagm1 m2 n1 n2 (A : 'M[V]_(m1 + m2, n1 + n2)) : n1 <= m1 -> is_diag_mx A -> dlsubmx A = 0. Proof. move=> leq_m2_n2 /is_diag_mxP Adiag; apply/matrixP => i j. by rewrite !mxE Adiag// gtn_eqF//= ltn_addr// (@leq_trans n1). 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
dlsubmx_diag
ulsubmx_trigm1 m2 n1 n2 (A : 'M[V]_(m1 + m2, n1 + n2)) : is_trig_mx A -> is_trig_mx (ulsubmx A). Proof. move=> /is_trig_mxP Atrig; apply/is_trig_mxP => i j lt_ij. by rewrite !mxE Atrig. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
ulsubmx_trig
drsubmx_trigm1 m2 n1 n2 (A : 'M[V]_(m1 + m2, n1 + n2)) : m1 <= n1 -> is_trig_mx A -> is_trig_mx (drsubmx A). Proof. move=> leq_m1_n1 /is_trig_mxP Atrig; apply/is_trig_mxP => i j lt_ij. by rewrite !mxE Atrig//= -addnS leq_add. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
drsubmx_trig
ulsubmx_diagm1 m2 n1 n2 (A : 'M[V]_(m1 + m2, n1 + n2)) : is_diag_mx A -> is_diag_mx (ulsubmx A). Proof. rewrite !is_diag_mxEtrig trmx_ulsub. by move=> /andP[/ulsubmx_trig-> /ulsubmx_trig->]. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
ulsubmx_diag
drsubmx_diagm1 m2 n1 n2 (A : 'M[V]_(m1 + m2, n1 + n2)) : m1 = n1 -> is_diag_mx A -> is_diag_mx (drsubmx A). Proof. move=> eq_m1_n1 /is_diag_mxP Adiag; apply/is_diag_mxP => i j neq_ij. by rewrite !mxE Adiag//= eq_m1_n1 eqn_add2l. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
drsubmx_diag
is_trig_block_mxm1 m2 n1 n2 ul ur dl dr : m1 = n1 -> @is_trig_mx (m1 + m2) (n1 + n2) (block_mx ul ur dl dr) = [&& ur == 0, is_trig_mx ul & is_trig_mx dr]. Proof. move=> eq_m1_n1; rewrite {}eq_m1_n1 in ul ur dl dr *. apply/is_trig_mxP/and3P => [Atrig|]; last first. move=> [/eqP-> /is_trig_mxP ul_trig /is_trig_mxP dr_trig] i j; rewrite !mxE. do 2![case: split_ordP => ? ->; rewrite ?mxE//=] => lt_ij; rewrite ?ul_trig//. move: lt_ij; rewrite ltnNge -ltnS. by rewrite (leq_trans (ltn_ord _))// -addnS leq_addr. by rewrite dr_trig//; move: lt_ij; rewrite ltn_add2l. split. - apply/eqP/matrixP => i j; have := Atrig (lshift _ i) (rshift _ j). rewrite !mxE; case: split_ordP => k /eqP; rewrite eq_shift// ?mxE. case: split_ordP => l /eqP; rewrite eq_shift// ?mxE => /eqP-> /eqP<- <- //. by rewrite /= (leq_trans (ltn_ord _)) ?leq_addr. - apply/is_trig_mxP => i j lt_ij; have := Atrig (lshift _ i) (lshift _ j). rewrite !mxE; case: split_ordP => k /eqP; rewrite eq_shift// ?mxE. by case: split_ordP => l /eqP; rewrite eq_shift// ?mxE => /eqP<- /eqP<- ->. - apply/is_trig_mxP => i j lt_ij; have := Atrig (rshift _ i) (rshift _ j). rewrite !mxE; case: split_ordP => k /eqP; rewrite eq_shift// ?mxE. case: split_ordP => l /eqP; rewrite eq_shift// ?mxE => /eqP<- /eqP<- -> //. by rewrite /= ltn_add2l. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
is_trig_block_mx
trigmx_ind(P : forall m n, 'M_(m, n) -> Type) : (forall m, P m 0 0) -> (forall n, P 0 n 0) -> (forall m n x c A, is_trig_mx A -> P m n A -> P (1 + m)%N (1 + n)%N (block_mx x 0 c A)) -> forall m n A, is_trig_mx A -> P m n A. Proof. move=> P0l P0r PS m n A; elim: A => {m n} [m|n|m n xx r c] A PA; do ?by rewrite (flatmx0, thinmx0); by [apply: P0l|apply: P0r]. by rewrite is_trig_block_mx => // /and3P[/eqP-> _ Atrig]; apply: PS (PA _). 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
trigmx_ind
trigsqmx_ind(P : forall n, 'M[V]_n -> Type) : (P 0 0) -> (forall n x c A, is_trig_mx A -> P n A -> P (1 + n)%N (block_mx x 0 c A)) -> forall n A, is_trig_mx A -> P n A. Proof. move=> P0 PS n A; elim/sqmx_ind: A => {n} [|n x r c] A PA. by rewrite thinmx0; apply: P0. by rewrite is_trig_block_mx => // /and3P[/eqP-> _ Atrig]; apply: PS (PA _). 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
trigsqmx_ind
is_diag_block_mxm1 m2 n1 n2 ul ur dl dr : m1 = n1 -> @is_diag_mx (m1 + m2) (n1 + n2) (block_mx ul ur dl dr) = [&& ur == 0, dl == 0, is_diag_mx ul & is_diag_mx dr]. Proof. move=> eq_m1_n1. rewrite !is_diag_mxEtrig tr_block_mx !is_trig_block_mx// trmx_eq0. by rewrite andbACA -!andbA; congr [&& _, _, _ & _]; rewrite andbCA. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
is_diag_block_mx
diagmx_ind(P : forall m n, 'M_(m, n) -> Type) : (forall m, P m 0 0) -> (forall n, P 0 n 0) -> (forall m n x c A, is_diag_mx A -> P m n A -> P (1 + m)%N (1 + n)%N (block_mx x 0 c A)) -> forall m n A, is_diag_mx A -> P m n A. Proof. move=> P0l P0r PS m n A Adiag; have Atrig := is_diag_mx_is_trig Adiag. elim/trigmx_ind: Atrig Adiag => // {}m {}n r c {}A _ PA. rewrite is_diag_block_mx => // /and4P[_ /eqP-> _ Adiag]. exact: PS (PA _). 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
diagmx_ind
diagsqmx_ind(P : forall n, 'M[V]_n -> Type) : (P 0 0) -> (forall n x c A, is_diag_mx A -> P n A -> P (1 + n)%N (block_mx x 0 c A)) -> forall n A, is_diag_mx A -> P n A. Proof. move=> P0 PS n A; elim/sqmx_ind: A => [|{}n x r c] A PA. by rewrite thinmx0; apply: P0. rewrite is_diag_block_mx => // /and4P[/eqP-> /eqP-> _ Adiag]. exact: PS (PA _). 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
diagsqmx_ind
diag_mxn (d : 'rV[V]_n) := \matrix[diag_mx_key]_(i, j) (d 0 i *+ (i == j)).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
diag_mx
tr_diag_mxn (d : 'rV_n) : (diag_mx d)^T = diag_mx d. Proof. by apply/matrixP=> i j /[!mxE]; case: eqVneq => // ->. Qed. Fact diag_mx_is_nmod_morphism n : nmod_morphism (@diag_mx n). Proof. by split=> [|A B]; apply/matrixP => i j; rewrite !mxE ?mul0rn// mulrnDl. Qed. #[deprecated(since="mathcomp 2.5.0", note="use `diag_mx_is_nmod_morphism` instead")]
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
tr_diag_mx
diag_mx_is_semi_additive:= diag_mx_is_nmod_morphism. HB.instance Definition _ n := GRing.isNmodMorphism.Build 'rV_n 'M_n (@diag_mx n) (@diag_mx_is_nmod_morphism n).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
diag_mx_is_semi_additive
diag_mx_rowm n (l : 'rV_n) (r : 'rV_m) : diag_mx (row_mx l r) = block_mx (diag_mx l) 0 0 (diag_mx r). Proof. apply/matrixP => i j. by do ?[rewrite !mxE; case: split_ordP => ? ->]; rewrite mxE eq_shift. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
diag_mx_row
diag_mxPn (A : 'M[V]_n) : reflect (exists d : 'rV_n, A = diag_mx d) (is_diag_mx A). Proof. apply: (iffP (is_diag_mxP A)) => [Adiag|[d ->] i j neq_ij]; last first. by rewrite !mxE -val_eqE (negPf neq_ij). exists (\row_i A i i); apply/matrixP => i j; rewrite !mxE. by case: (altP (i =P j)) => [->|/Adiag->]. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
diag_mxP
diag_mx_is_diagn (r : 'rV[V]_n) : is_diag_mx (diag_mx r). Proof. by apply/diag_mxP; exists r. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
diag_mx_is_diag
diag_mx_is_trign (r : 'rV[V]_n) : is_trig_mx (diag_mx r). Proof. exact/is_diag_mx_is_trig/diag_mx_is_diag. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
diag_mx_is_trig
scalar_mxx : 'M[V]_n := \matrix[scalar_mx_key]_(i , j) (x *+ (i == j)).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
scalar_mx
diag_const_mxa : diag_mx (const_mx a) = a%:M :> 'M_n. Proof. by apply/matrixP=> i j; rewrite !mxE. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
diag_const_mx
tr_scalar_mxa : (a%:M)^T = a%:M. Proof. by apply/matrixP=> i j; rewrite !mxE eq_sym. Qed. Fact scalar_mx_is_nmod_morphism : nmod_morphism scalar_mx. Proof. by split=> [|a b]; rewrite -!diag_const_mx ?raddf0// !raddfD. Qed. #[deprecated(since="mathcomp 2.5.0", note="use `scalar_mx_is_nmod_morphism` instead")]
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
tr_scalar_mx
scalar_mx_is_semi_additive:= scalar_mx_is_nmod_morphism. HB.instance Definition _ := GRing.isNmodMorphism.Build V 'M_n scalar_mx scalar_mx_is_nmod_morphism.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
scalar_mx_is_semi_additive
is_scalar_mx(A : 'M[V]_n) := if insub 0 is Some i then A == (A i i)%:M else true.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
is_scalar_mx
is_scalar_mxPA : reflect (exists a, A = a%:M) (is_scalar_mx A). Proof. rewrite /is_scalar_mx; case: insubP => [i _ _ | ]. by apply: (iffP eqP) => [|[a ->]]; [exists (A i i) | rewrite mxE eqxx]. rewrite -eqn0Ngt => /eqP n0; left; exists 0. by rewrite raddf0; rewrite n0 in A *; rewrite [A]flatmx0. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
is_scalar_mxP
scalar_mx_is_scalara : is_scalar_mx a%:M. Proof. by apply/is_scalar_mxP; exists 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
scalar_mx_is_scalar
mx0_is_scalar: is_scalar_mx 0. Proof. by apply/is_scalar_mxP; exists 0; rewrite raddf0. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
mx0_is_scalar
scalar_mx_is_diaga : is_diag_mx a%:M. Proof. by rewrite -diag_const_mx diag_mx_is_diag. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
scalar_mx_is_diag
is_scalar_mx_is_diagA : is_scalar_mx A -> is_diag_mx A. Proof. by move=> /is_scalar_mxP[a ->]; apply: scalar_mx_is_diag. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
is_scalar_mx_is_diag
scalar_mx_is_triga : is_trig_mx a%:M. Proof. by rewrite is_diag_mx_is_trig// scalar_mx_is_diag. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
scalar_mx_is_trig
is_scalar_mx_is_trigA : is_scalar_mx A -> is_trig_mx A. Proof. by move=> /is_scalar_mx_is_diag /is_diag_mx_is_trig. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
is_scalar_mx_is_trig
mx11_scalar(A : 'M_1) : A = (A 0 0)%:M. Proof. by apply/rowP=> j; rewrite ord1 mxE. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
mx11_scalar
scalar_mx_blockn1 n2 a : a%:M = block_mx a%:M 0 0 a%:M :> 'M_(n1 + n2). Proof. apply/matrixP=> i j; rewrite !mxE. by do 2![case: split_ordP => ? ->; rewrite !mxE]; rewrite ?eq_shift. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
scalar_mx_block
mxtrace(A : 'M[V]_n) := \sum_i A i i. Local Notation "'\tr' A" := (mxtrace A) : ring_scope.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
mxtrace
mxtrace_trA : \tr A^T = \tr A. Proof. by apply: eq_bigr=> i _; rewrite mxE. Qed. Fact mxtrace_is_nmod_morphism : nmod_morphism mxtrace. Proof. split=> [|A B]; first by apply: big1 => i; rewrite mxE. by rewrite -big_split /=; apply: eq_bigr => i _; rewrite mxE. Qed. #[deprecated(since="mathcomp 2.5.0", note="use `mxtrace_is_nmod_morphism` instead")]
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
mxtrace_tr
mxtrace_is_semi_additive:= mxtrace_is_nmod_morphism. HB.instance Definition _ := GRing.isNmodMorphism.Build 'M_n V mxtrace mxtrace_is_nmod_morphism.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
mxtrace_is_semi_additive
mxtrace0: \tr 0 = 0. Proof. exact: raddf0. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
mxtrace0
mxtraceDA B : \tr (A + B) = \tr A + \tr B. Proof. exact: raddfD. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
mxtraceD
mxtrace_diagD : \tr (diag_mx D) = \sum_j D 0 j. Proof. by apply: eq_bigr => j _; rewrite mxE eqxx. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
mxtrace_diag
mxtrace_scalara : \tr a%:M = a *+ n. Proof. rewrite -diag_const_mx mxtrace_diag; under eq_bigr do rewrite mxE. by rewrite sumr_const card_ord. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
mxtrace_scalar
trace_mx11(A : 'M_1) : \tr A = A 0 0. Proof. by rewrite [A in LHS]mx11_scalar mxtrace_scalar. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
trace_mx11
mxtrace_blockn1 n2 (Aul : 'M_n1) Aur Adl (Adr : 'M_n2) : \tr (block_mx Aul Aur Adl Adr) = \tr Aul + \tr Adr. Proof. rewrite /(\tr _) big_split_ord /=. by congr (_ + _); under eq_bigr do rewrite (block_mxEul, block_mxEdr). 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
mxtrace_block
map_mx0: 0^f = 0 :> 'M_(m, n). Proof. by rewrite map_const_mx raddf0. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
map_mx0
map_mxDA B : (A + B)^f = A^f + B^f. Proof. by apply/matrixP=> i j; rewrite !mxE raddfD. 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 finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
map_mxD
map_mx_sum:= big_morph _ map_mxD map_mx0. HB.instance Definition _ := GRing.isNmodMorphism.Build 'M[aR]_(m, n) 'M[rR]_(m, n) (map_mx f) (map_mx0, map_mxD).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
map_mx_sum
oppmx:= @map_mx V V -%R m n.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
oppmx
addNmx: left_inverse (const_mx 0) oppmx (@addmx V m n). Proof. by move=> A; apply/matrixP=> i j; rewrite !mxE addNr. Qed. HB.instance Definition _ := GRing.Nmodule_isZmodule.Build 'M[V]_(m, n) addNmx. #[deprecated(since="mathcomp 2.5.0", note="use `raddfB` instead")] Fact const_mx_is_zmod_morphism : zmod_morphism const_mx. Proof. exact: raddfB. Qed. #[deprecated(since="mathcomp 2.5.0", note="use `raddfB` instead"), warning="-deprecated"]
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
addNmx
const_mx_is_additive:= const_mx_is_zmod_morphism.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
const_mx_is_additive
swizzle_mx_is_additive:= swizzle_mx_is_zmod_morphism.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
swizzle_mx_is_additive
split_mxE:= apply/matrixP=> i j; do ![rewrite mxE | case: split => ?].
Ltac
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice", "From mathcomp Require Import fintype finfun finset fingroup perm order div", "From mathcomp Require Import prime binomial ssralg countalg finalg zmodp bigop" ]
algebra/matrix.v
split_mxE