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
center_mxPm n A (R : 'A_(m, n)) : reflect (A \in R /\ forall B, B \in R -> B *m A = A *m B) (A \in 'Z(R))%MS. Proof. rewrite sub_capmx; case R_A: (A \in R); last by right; case. by apply: (iffP cent_mxP) => [cAR | [_ cAR]]. Qed. Arguments center_mxP {m n A R}.
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
center_mxP
mxring_id_uniqm n (R : 'A_(m, n)) e1 e2 : mxring_id R e1 -> mxring_id R e2 -> e1 = e2. Proof. by case=> [_ Re1 idRe1 _] [_ Re2 _ ide2R]; rewrite -(idRe1 _ Re2) ide2R. 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
mxring_id_uniq
cent_mx_idealm n (R : 'A_(m, n)) : left_mx_ideal 'C(R)%MS 'C(R)%MS. Proof. apply/mulsmx_subP=> A1 A2 C_A1 C_A2; apply/cent_mxP=> B R_B. by rewrite mulmxA (cent_mxP C_A1) // -!mulmxA (cent_mxP C_A2). 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
cent_mx_ideal
cent_mx_ringm n (R : 'A_(m, n)) : n > 0 -> mxring 'C(R)%MS. Proof. move=> n_gt0; rewrite /mxring cent_mx_ideal; apply/mxring_idP. exists 1%:M; split=> [||A _|A _]; rewrite ?mulmx1 ?mul1mx ?scalar_mx_cent //. by rewrite -mxrank_eq0 mxrank1 -lt0n. 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
cent_mx_ring
mxdirect_adds_centerm1 m2 n (R1 : 'A_(m1, n)) (R2 : 'A_(m2, n)) : mx_ideal (R1 + R2)%MS R1 -> mx_ideal (R1 + R2)%MS R2 -> mxdirect (R1 + R2) -> ('Z((R1 + R2)%MS) :=: 'Z(R1) + 'Z(R2))%MS. Proof. case/andP=> idlR1 idrR1 /andP[idlR2 idrR2] /mxdirect_addsP dxR12. apply/eqmxP/andP; split. apply/memmx_subP=> z0; rewrite sub_capmx => /andP[]. case/memmx_addsP=> z [R1z1 R2z2 ->{z0}] Cz. rewrite linearD addmx_sub_adds //= ?sub_capmx ?R1z1 ?R2z2 /=. apply/cent_mxP=> A R1_A; have R_A := submx_trans R1_A (addsmxSl R1 R2). have Rz2 := submx_trans R2z2 (addsmxSr R1 R2). rewrite -{1}[z.1](addrK z.2) mulmxBr (cent_mxP Cz) // mulmxDl. rewrite [A *m z.2]memmx0 1?[z.2 *m A]memmx0 ?addrK //. by rewrite -dxR12 sub_capmx (mulsmx_subP idlR1) // (mulsmx_subP idrR2). by rewrite -dxR12 sub_capmx (mulsmx_subP idrR1) // (mulsmx_subP idlR2). apply/cent_mxP=> A R2_A; have R_A := submx_trans R2_A (addsmxSr R1 R2). have Rz1 := submx_trans R1z1 (addsmxSl R1 R2). rewrite -{1}[z.2](addKr z.1) mulmxDr (cent_mxP Cz) // mulmxDl. rewrite mulmxN [A *m z.1]memmx0 1?[z.1 *m A]memmx0 ?addKr //. by rewrite -dxR12 sub_capmx (mulsmx_subP idrR1) // (mulsmx_subP idlR2). by rewrite -dxR12 sub_capmx (mulsmx_subP idlR1) // (mulsmx_subP idrR2). rewrite addsmx_sub; apply/andP; split. apply/memmx_subP=> z; rewrite sub_capmx => /andP[R1z cR1z]. have Rz := submx_trans R1z (addsmxSl R1 R2). rewrite sub_capmx Rz; apply/cent_mxP=> A0. case/memmx_addsP=> A [R1_A1 R2_A2] ->{A0}. have R_A2 : ...
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
mxdirect_adds_center
mxdirect_sums_center(I : finType) m n (R : 'A_(m, n)) R_ : (\sum_i R_ i :=: R)%MS -> mxdirect (\sum_i R_ i) -> (forall i : I, mx_ideal R (R_ i)) -> ('Z(R) :=: \sum_i 'Z(R_ i))%MS. Proof. move=> defR dxR idealR. have sR_R: (R_ _ <= R)%MS by move=> i; rewrite -defR (sumsmx_sup i). have anhR i j A B : i != j -> A \in R_ i -> B \in R_ j -> A *m B = 0. move=> ne_ij RiA RjB; apply: memmx0. have [[_ idRiR] [idRRj _]] := (andP (idealR i), andP (idealR j)). rewrite -(mxdirect_sumsP dxR j) // sub_capmx (sumsmx_sup i) //. by rewrite (mulsmx_subP idRRj) // (memmx_subP (sR_R i)). by rewrite (mulsmx_subP idRiR) // (memmx_subP (sR_R j)). apply/eqmxP/andP; split. apply/memmx_subP=> Z; rewrite sub_capmx => /andP[]. rewrite -{1}defR => /memmx_sumsP[z ->{Z} Rz cRz]. apply/memmx_sumsP; exists z => // i; rewrite sub_capmx Rz. apply/cent_mxP=> A RiA; have:= cent_mxP cRz A (memmx_subP (sR_R i) A RiA). rewrite (bigD1 i) //= mulmxDl mulmxDr mulmx_suml mulmx_sumr. by rewrite !big1 ?addr0 // => j; last rewrite eq_sym; move/anhR->. apply/sumsmx_subP => i _; apply/memmx_subP=> z; rewrite sub_capmx. case/andP=> Riz cRiz; rewrite sub_capmx (memmx_subP (sR_R i)) //=. apply/cent_mxP=> A; rewrite -{1}defR; case/memmx_sumsP=> a -> R_a. rewrite (bigD1 i) // mulmxDl mulmxDr mulmx_suml mulmx_sumr. rewrite !big1 => [|j|j]; first by rewrite !addr0 (cent_mxP cRiz). by rewrite eq_sym => /anhR->. by move/anhR->. 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
mxdirect_sums_center
Gaussian_elimination_mapm n (A : 'M_(m, n)) : Gaussian_elimination_ A^f = ((col_ebase A)^f, (row_ebase A)^f, \rank A). Proof. rewrite mxrankE /row_ebase /col_ebase unlock. elim: m n A => [|m IHm] [|n] A /=; rewrite ?map_mx1 //. set pAnz := [pred k | A k.1 k.2 != 0]. rewrite (@eq_pick _ _ pAnz) => [|k]; last by rewrite /= mxE fmorph_eq0. case: {+}(pick _) => [[i j]|]; last by rewrite !map_mx1. rewrite mxE -fmorphV -map_xcol -map_xrow -map_dlsubmx -map_drsubmx. rewrite -map_ursubmx -map_mxZ -map_mxM -map_mxB {}IHm /=. case: {+}(Gaussian_elimination_ _) => [[L U] r] /=; rewrite map_xrow map_xcol. by rewrite !(@map_block_mx _ _ f 1 _ 1) !map_mx0 ?map_mx1 ?map_scalar_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
Gaussian_elimination_map
mxrank_mapm n (A : 'M_(m, n)) : \rank A^f = \rank A. Proof. by rewrite mxrankE Gaussian_elimination_map. 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_map
row_free_mapm n (A : 'M_(m, n)) : row_free A^f = row_free A. Proof. by rewrite /row_free mxrank_map. 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_free_map
row_full_mapm n (A : 'M_(m, n)) : row_full A^f = row_full A. Proof. by rewrite /row_full mxrank_map. 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_full_map
map_row_ebasem n (A : 'M_(m, n)) : (row_ebase A)^f = row_ebase A^f. Proof. by rewrite {2}/row_ebase unlock Gaussian_elimination_map. 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
map_row_ebase
map_col_ebasem n (A : 'M_(m, n)) : (col_ebase A)^f = col_ebase A^f. Proof. by rewrite {2}/col_ebase unlock Gaussian_elimination_map. 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
map_col_ebase
map_row_basem n (A : 'M_(m, n)) : (row_base A)^f = castmx (mxrank_map A, erefl n) (row_base A^f). Proof. move: (mxrank_map A); rewrite {2}/row_base mxrank_map => eqrr. by rewrite castmx_id map_mxM map_pid_mx map_row_ebase. 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
map_row_base
map_col_basem n (A : 'M_(m, n)) : (col_base A)^f = castmx (erefl m, mxrank_map A) (col_base A^f). Proof. move: (mxrank_map A); rewrite {2}/col_base mxrank_map => eqrr. by rewrite castmx_id map_mxM map_pid_mx map_col_ebase. 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
map_col_base
map_pinvmxm n (A : 'M_(m, n)) : (pinvmx A)^f = pinvmx A^f. Proof. rewrite !map_mxM !map_invmx map_row_ebase map_col_ebase. by rewrite map_pid_mx -mxrank_map. 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
map_pinvmx
map_kermxm n (A : 'M_(m, n)) : (kermx A)^f = kermx A^f. Proof. by rewrite !map_mxM map_invmx map_col_ebase -mxrank_map map_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
map_kermx
map_cokermxm n (A : 'M_(m, n)) : (cokermx A)^f = cokermx A^f. Proof. by rewrite !map_mxM map_invmx map_row_ebase -mxrank_map map_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
map_cokermx
map_submxm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : (A^f <= B^f)%MS = (A <= B)%MS. Proof. by rewrite !submxE -map_cokermx -map_mxM map_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 bigop finset fingroup perm order", "From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix" ]
algebra/mxalgebra.v
map_submx
map_ltmxm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : (A^f < B^f)%MS = (A < B)%MS. Proof. by rewrite /ltmx !map_submx. 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
map_ltmx
map_eqmxm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : (A^f :=: B^f)%MS <-> (A :=: B)%MS. Proof. split=> [/eqmxP|eqAB]; first by rewrite !map_submx => /eqmxP. by apply/eqmxP; rewrite !map_submx !eqAB !submx_refl. 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
map_eqmx
map_genmxm n (A : 'M_(m, n)) : (<<A>>^f :=: <<A^f>>)%MS. Proof. by apply/eqmxP; rewrite !(genmxE, map_submx) 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
map_genmx
map_addsmxm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : (((A + B)%MS)^f :=: A^f + B^f)%MS. Proof. by apply/eqmxP; rewrite !addsmxE -map_col_mx !map_submx !addsmxE 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
map_addsmx
map_capmx_genm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : (capmx_gen A B)^f = capmx_gen A^f B^f. Proof. by rewrite map_mxM map_lsubmx map_kermx map_col_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
map_capmx_gen
map_capmxm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : ((A :&: B)^f :=: A^f :&: B^f)%MS. Proof. by apply/eqmxP; rewrite !capmxE -map_capmx_gen !map_submx -!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
map_capmx
map_complmxm n (A : 'M_(m, n)) : (A^C^f = A^f^C)%MS. Proof. by rewrite map_mxM map_row_ebase -mxrank_map map_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
map_complmx
map_diffmxm1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : ((A :\: B)^f :=: A^f :\: B^f)%MS. Proof. apply/eqmxP; rewrite !diffmxE -map_capmx_gen -map_complmx. by rewrite -!map_capmx !map_submx -!diffmxE 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
map_diffmx
map_eigenspacen (g : 'M_n) a : (eigenspace g a)^f = eigenspace g^f (f a). Proof. by rewrite map_kermx map_mxB ?map_scalar_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
map_eigenspace
eigenvalue_mapn (g : 'M_n) a : eigenvalue g^f (f a) = eigenvalue g a. Proof. by rewrite /eigenvalue -map_eigenspace map_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 bigop finset fingroup perm order", "From mathcomp Require Import div prime binomial ssralg finalg zmodp matrix" ]
algebra/mxalgebra.v
eigenvalue_map
memmx_mapm n A (E : 'A_(m, n)) : (A^f \in E^f)%MS = (A \in E)%MS. Proof. by rewrite -map_mxvec map_submx. 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
memmx_map
map_mulsmxm1 m2 n (E1 : 'A_(m1, n)) (E2 : 'A_(m2, n)) : ((E1 * E2)%MS^f :=: E1^f * E2^f)%MS. Proof. rewrite /mulsmx; elim/big_rec2: _ => [|i A Af _ eqA]; first by rewrite map_mx0. apply: (eqmx_trans (map_addsmx _ _)); apply: adds_eqmx {A Af}eqA. apply/eqmxP; rewrite !map_genmx !genmxE map_mxM. apply/rV_eqP=> u; congr (u <= _ *m _)%MS. by apply: map_lin_mx => //= A; rewrite map_mxM // map_vec_mx map_row. 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
map_mulsmx
map_cent_mxm n (E : 'A_(m, n)) : ('C(E)%MS)^f = 'C(E^f)%MS. Proof. rewrite map_kermx; congr kermx; apply: map_lin_mx => A; rewrite map_mxM. by congr (_ *m _); apply: map_lin_mx => B; rewrite map_mxB ?map_mxM. 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
map_cent_mx
map_center_mxm n (E : 'A_(m, n)) : (('Z(E))^f :=: 'Z(E^f))%MS. Proof. by rewrite /center_mx -map_cent_mx; apply: map_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
map_center_mx
eqmx_col{m} (V_ : forall i, 'M[F]_(p_ i, m)) : (\mxcol_i V_ i :=: \sum_i <<V_ i>>)%MS. Proof. apply/eqmxP/andP; split. apply/row_subP => i; rewrite row_mxcol. by rewrite (sumsmx_sup (sig1 i))// genmxE row_sub. apply/sumsmx_subP => i0 _; rewrite genmxE; apply/row_subP => j. apply: (eq_row_sub (Rank _ j)); apply/rowP => k. by rewrite !mxE Rank2K; case: _ / esym; rewrite cast_ord_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
eqmx_col
rank_mxdiag(V_ : forall i, 'M[F]_(p_ i)) : (\rank (\mxdiag_i V_ i) = \sum_i \rank (V_ i))%N. Proof. elim: {+}n {+}p_ V_ => [|m IHm] q_ V_. by move: (\mxdiag__ _); rewrite !big_ord0 => M; rewrite flatmx0 mxrank0. rewrite mxdiag_recl [RHS]big_ord_recl/= -IHm. by case: _ / mxsize_recl; rewrite ?castmx_id rank_diag_block_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
rank_mxdiag
rVpolyv := \poly_(k < d) (if insub k is Some i then v 0 i else 0).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
rVpoly
poly_rVp := \row_(i < d) p`_i.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
poly_rV
coef_rVpolyv k : (rVpoly v)`_k = if insub k is Some i then v 0 i else 0. Proof. by rewrite coef_poly; case: insubP => [i ->|]; rewrite ?if_same. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
coef_rVpoly
coef_rVpoly_ordv (i : 'I_d) : (rVpoly v)`_i = v 0 i. Proof. by rewrite coef_rVpoly valK. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
coef_rVpoly_ord
rVpoly_deltai : rVpoly (delta_mx 0 i) = 'X^i. Proof. apply/polyP=> j; rewrite coef_rVpoly coefXn. case: insubP => [k _ <- | j_ge_d]; first by rewrite mxE. by case: eqP j_ge_d => // ->; rewrite ltn_ord. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
rVpoly_delta
rVpolyK: cancel rVpoly poly_rV. Proof. by move=> u; apply/rowP=> i; rewrite mxE coef_rVpoly_ord. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
rVpolyK
poly_rV_Kp : size p <= d -> rVpoly (poly_rV p) = p. Proof. move=> le_p_d; apply/polyP=> k; rewrite coef_rVpoly. case: insubP => [i _ <- | ]; first by rewrite mxE. by rewrite -ltnNge => le_d_l; rewrite nth_default ?(leq_trans le_p_d). Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
poly_rV_K
poly_rV_is_semilinear: semilinear poly_rV. Proof. by split=> [a p|p q]; apply/rowP=> i; rewrite !mxE (coefZ, coefD). Qed. HB.instance Definition _ := GRing.isSemilinear.Build R {poly R} 'rV_d _ poly_rV poly_rV_is_semilinear. #[deprecated(since="mathcomp 2.5.0", note="Use linearP instead.")]
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
poly_rV_is_semilinear
poly_rV_is_linear: linear poly_rV. Proof. exact: linearP. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
poly_rV_is_linear
rVpoly_is_semilinear: semilinear rVpoly. Proof. split=> [a u|u v]; apply/polyP=> k; rewrite (coefZ, coefD) !coef_rVpoly. by case: insubP => [i _ _|_]; rewrite ?mxE // mulr0. by case: insubP=> [i _ _|_]; rewrite ?mxE ?addr0. Qed. HB.instance Definition _ := GRing.isSemilinear.Build R 'rV_d {poly R} _ rVpoly rVpoly_is_semilinear. #[deprecated(since="mathcomp 2.5.0", note="Use linearP instead.")]
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
rVpoly_is_semilinear
rvPoly_is_linear: linear rVpoly. Proof. exact: linearP. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
rvPoly_is_linear
Sylvester_mx: 'M[R]_dS := col_mx (band p) (band q).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
Sylvester_mx
Sylvester_mxE(i j : 'I_dS) : let S_ r k := r`_(j - k) *+ (k <= j) in Sylvester_mx i j = match split i with inl k => S_ p k | inr k => S_ q k end. Proof. move=> S_ /[1!mxE]; case: {i}(split i) => i /[!mxE]/=; by rewrite rVpoly_delta coefXnM ltnNge if_neg -mulrb. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
Sylvester_mxE
resultant:= \det Sylvester_mx.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
resultant
resultant_in_ideal(R : comNzRingType) (p q : {poly R}) : size p > 1 -> size q > 1 -> {uv : {poly R} * {poly R} | size uv.1 < size q /\ size uv.2 < size p & (resultant p q)%:P = uv.1 * p + uv.2 * q}. Proof. move=> p_nc q_nc; pose dp := (size p).-1; pose dq := (size q).-1. pose S := Sylvester_mx p q; pose dS := (dq + dp)%N. have dS_gt0: dS > 0 by rewrite /dS /dq -(subnKC q_nc). pose j0 := Ordinal dS_gt0. pose Ss0 := col_mx (p *: \col_(i < dq) 'X^i) (q *: \col_(i < dp) 'X^i). pose Ss := \matrix_(i, j) (if j == j0 then Ss0 i 0 else (S i j)%:P). pose u ds s := \sum_(i < ds) cofactor Ss (s i) j0 * 'X^i. exists (u _ (lshift dp), u _ ((rshift dq) _)). suffices sz_u ds s: ds > 1 -> size (u ds.-1 s) < ds by rewrite !sz_u. move/ltn_predK=> {2}<-; apply: leq_trans (size_sum _ _ _) _. apply/bigmax_leqP=> i _. have ->: cofactor Ss (s i) j0 = (cofactor S (s i) j0)%:P. rewrite rmorphM /= rmorph_sign -det_map_mx; congr (_ * \det _). by apply/matrixP=> i' j'; rewrite !mxE. apply: leq_trans (size_polyMleq _ _) (leq_trans _ (valP i)). by rewrite size_polyC size_polyXn addnS /= -add1n leq_add2r leq_b1. transitivity (\det Ss); last first. rewrite (expand_det_col Ss j0) big_split_ord !big_distrl /=. by congr (_ + _); apply: eq_bigr => i _; rewrite mxE eqxx (col_mxEu, col_mxEd) !mxE mulrC mulrA mulrAC. pose S_ j1 := map_mx polyC (\matrix_(i, j) S i (if j == j0 then j1 else j)). pose Ss0_ i dj := \poly_(j < dj) S i (insubd j0 j). pose Ss_ dj := \matrix_(i, j) (if j == j0 then Ss0_ i ...
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
resultant_in_ideal
resultant_eq0(R : idomainType) (p q : {poly R}) : (resultant p q == 0) = (size (gcdp p q) > 1). Proof. have dvdpp := dvdpp; set r := gcdp p q. pose dp := (size p).-1; pose dq := (size q).-1. have /andP[r_p r_q]: (r %| p) && (r %| q) by rewrite -dvdp_gcd. apply/det0P/idP=> [[uv nz_uv] | r_nonC]. have [p0 _ | p_nz] := eqVneq p 0. have: dq + dp > 0. rewrite lt0n; apply: contraNneq nz_uv => dqp0. by rewrite dqp0 in uv *; rewrite [uv]thinmx0. by rewrite /dp /dq /r p0 size_poly0 addn0 gcd0p -subn1 subn_gt0. do [rewrite -[uv]hsubmxK -{1}row_mx0 mul_row_col !mul_rV_lin1 /=] in nz_uv *. set u := rVpoly _; set v := rVpoly _; pose m := gcdp (v * p) (v * q). have lt_vp: size v < size p by rewrite (polySpred p_nz) ltnS size_poly. move/(congr1 rVpoly)/eqP; rewrite -linearD linear0 poly_rV_K; last first. rewrite (leq_trans (size_polyD _ _)) // geq_max. rewrite !(leq_trans (size_polyMleq _ _)) // -subn1 leq_subLR. by rewrite addnC addnA leq_add ?leqSpred ?size_poly. by rewrite addnCA leq_add ?leqSpred ?size_poly. rewrite addrC addr_eq0 => /eqP vq_up. have nz_v: v != 0. apply: contraNneq nz_uv => v0; apply/eqP. congr row_mx; apply: (can_inj rVpolyK); rewrite linear0 // -/u. by apply: contra_eq vq_up; rewrite v0 mul0r -addr_eq0 add0r => /mulf_neq0->. have r_nz: r != 0 := dvdpN0 r_p p_nz. have /dvdpP [[c w] /= nz_c wv]: v %| m by rewrite dvdp_gcd !dvdp_mulr. have m_wd d: m %| v * d -> w %| d. case/dvdpP=> [[k f]] /= nz_k /(congr1 ( ...
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
resultant_eq0
horner_mx:= horner_morph (comm_mx_scalar^~ A). HB.instance Definition _ := GRing.RMorphism.on horner_mx.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
horner_mx
horner_mx_Ca : horner_mx a%:P = a%:M. Proof. exact: horner_morphC. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
horner_mx_C
horner_mx_X: horner_mx 'X = A. Proof. exact: horner_morphX. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
horner_mx_X
horner_mxZ: scalable horner_mx. Proof. move=> a p /=; rewrite -mul_polyC rmorphM /=. by rewrite horner_mx_C [_ * _]mul_scalar_mx. Qed. HB.instance Definition _ := GRing.isScalable.Build R _ _ *:%R horner_mx horner_mxZ.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
horner_mxZ
powers_mxd := \matrix_(i < d) mxvec (A ^+ i).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
powers_mx
horner_rVpolym (u : 'rV_m) : horner_mx (rVpoly u) = vec_mx (u *m powers_mx m). Proof. rewrite mulmx_sum_row [rVpoly u]poly_def 2!linear_sum; apply: eq_bigr => i _. by rewrite valK /= 2!linearZ rmorphXn/= horner_mx_X rowK mxvecK. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
horner_rVpoly
horner_mx_diag(d : 'rV[R]_n) (p : {poly R}) : horner_mx (diag_mx d) p = diag_mx (map_mx (horner p) d). Proof. apply/matrixP => i j; rewrite !mxE. elim/poly_ind: p => [|p c ihp]; first by rewrite rmorph0 horner0 mxE mul0rn. rewrite !hornerE mulrnDl rmorphD rmorphM /= horner_mx_X horner_mx_C !mxE. rewrite (bigD1 j)//= ihp mxE eqxx mulr1n -mulrnAl big1 ?addr0. by have [->|_] := eqVneq; rewrite /= !(mulr1n, addr0, mul0r). by move=> k /negPf nkF; rewrite mxE nkF mulr0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
horner_mx_diag
comm_mx_hornerA B p : comm_mx A B -> comm_mx A (horner_mx B p). Proof. move=> fg; apply: commr_horner => // i. by rewrite coef_map; apply/comm_scalar_mx. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
comm_mx_horner
comm_horner_mxA B p : comm_mx A B -> comm_mx (horner_mx A p) B. Proof. by move=> ?; apply/comm_mx_sym/comm_mx_horner/comm_mx_sym. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
comm_horner_mx
comm_horner_mx2A p q : GRing.comm (horner_mx A p) (horner_mx A q). Proof. exact/comm_mx_horner/comm_horner_mx. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
comm_horner_mx2
horner_mx_stable(K : fieldType) m n p (V : 'M[K]_(n.+1, m.+1)) (f : 'M_m.+1) : stablemx V f -> stablemx V (horner_mx f p). Proof. move=> V_fstab; elim/poly_ind: p => [|p c]; first by rewrite rmorph0 stablemx0. move=> fp_stable; rewrite rmorphD rmorphM/= horner_mx_X horner_mx_C. by rewrite stablemxD ?stablemxM ?fp_stable ?stablemxC. Qed. Prenex Implicits horner_mx powers_mx.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
horner_mx_stable
char_poly_mx:= 'X%:M - map_mx (@polyC R) A.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
char_poly_mx
char_poly:= \det char_poly_mx. Let diagA := [seq A i i | i <- index_enum _ & true]. Let size_diagA : size diagA = n. Proof. by rewrite -[n]card_ord size_map; have [e _ _ []] := big_enumP. Qed. Let split_diagA : exists2 q, \prod_(x <- diagA) ('X - x%:P) + q = char_poly & size q <= n.-1. Proof. rewrite [char_poly](bigD1 1%g) //=; set q := \sum_(s | _) _; exists q. congr (_ + _); rewrite odd_perm1 mul1r big_map big_filter /=. by apply: eq_bigr => i _; rewrite !mxE perm1 eqxx. apply: leq_trans {q}(size_sum _ _ _) _; apply/bigmax_leqP=> s nt_s. have{nt_s} [i nfix_i]: exists i, s i != i. apply/existsP; rewrite -negb_forall; apply: contra nt_s => s_1. by apply/eqP/permP=> i; apply/eqP; rewrite perm1 (forallP s_1). apply: leq_trans (_ : #|[pred j | s j == j]|.+1 <= n.-1). rewrite -sum1_card (@big_mkcond nat) /= size_Msign. apply: (big_ind2 (fun p m => size p <= m.+1)) => [| p mp q mq IHp IHq | j _]. - by rewrite size_poly1. - apply: leq_trans (size_polyMleq _ _) _. by rewrite -subn1 -addnS leq_subLR addnA leq_add. rewrite !mxE eq_sym !inE; case: (s j == j); first by rewrite polyseqXsubC. by rewrite sub0r size_polyN size_polyC leq_b1. rewrite -[n in n.-1]card_ord -(cardC (pred2 (s i) i)) card2 nfix_i !ltnS. apply/subset_leq_card/subsetP=> j /(_ =P j) fix_j. rewrite !inE -{1}fix_j (inj_eq perm_inj) orbb. by apply: contraNneq nfix_i => <-; rewrite fix_j. Qed.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
char_poly
size_char_poly: size char_poly = n.+1. Proof. have [q <- lt_q_n] := split_diagA; have le_q_n := leq_trans lt_q_n (leq_pred n). by rewrite size_polyDl size_prod_XsubC size_diagA. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
size_char_poly
char_poly_monic: char_poly \is monic. Proof. rewrite monicE -(monicP (monic_prod_XsubC diagA xpredT id)). rewrite !lead_coefE size_char_poly. have [q <- lt_q_n] := split_diagA; have le_q_n := leq_trans lt_q_n (leq_pred n). by rewrite size_prod_XsubC size_diagA coefD (nth_default 0 le_q_n) addr0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
char_poly_monic
char_poly_trace: n > 0 -> char_poly`_n.-1 = - \tr A. Proof. move=> n_gt0; have [q <- lt_q_n] := split_diagA; set p := \prod_(x <- _) _. rewrite coefD {q lt_q_n}(nth_default 0 lt_q_n) addr0. have{n_gt0} ->: p`_n.-1 = ('X * p)`_n by rewrite coefXM eqn0Ngt n_gt0. have ->: \tr A = \sum_(x <- diagA) x by rewrite big_map big_filter. rewrite -size_diagA {}/p; elim: diagA => [|x d IHd]. by rewrite !big_nil mulr1 coefX oppr0. rewrite !big_cons coefXM mulrBl coefB IHd opprD addrC; congr (- _ + _). rewrite mul_polyC coefZ [size _]/= -(size_prod_XsubC _ id) -lead_coefE. by rewrite (monicP _) ?monic_prod_XsubC ?mulr1. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
char_poly_trace
char_poly_det: char_poly`_0 = (- 1) ^+ n * \det A. Proof. rewrite big_distrr coef_sum [0%N]lock /=; apply: eq_bigr => s _. rewrite -{1}rmorphN -rmorphXn mul_polyC coefZ /=. rewrite mulrA -exprD addnC exprD -mulrA -lock; congr (_ * _). transitivity (\prod_(i < n) - A i (s i)); last by rewrite prodrN card_ord. elim: (index_enum _) => [|i e IHe]; rewrite !(big_nil, big_cons) ?coef1 //. by rewrite coefM big_ord1 IHe !mxE coefB coefC coefMn coefX mul0rn sub0r. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
char_poly_det
mx_poly_ring_isom(R : nzSemiRingType) n' (n := n'.+1) : exists phi : {rmorphism 'M[{poly R}]_n -> {poly 'M[R]_n}}, [/\ bijective phi, forall p, phi p%:M = map_poly scalar_mx p, forall A, phi (map_mx polyC A) = A%:P & forall A i j k, (phi A)`_k i j = (A i j)`_k]. Proof. set M_RX := 'M[{poly R}]_n; set MR_X := ({poly 'M[R]_n}). pose Msize (A : M_RX) := \max_i \max_j size (A i j). pose phi (A : M_RX) := \poly_(k < Msize A) \matrix_(i, j) (A i j)`_k. have coef_phi A i j k: (phi A)`_k i j = (A i j)`_k. rewrite coef_poly; case: (ltnP k _) => le_m_k; rewrite mxE // nth_default //. by apply: leq_trans (leq_trans (leq_bigmax i) le_m_k); apply: (leq_bigmax j). have phi_is_nmod_morphism : nmod_morphism phi. by split=> [|A B]; apply/polyP => k; apply/matrixP => i j; rewrite !(coef_phi, mxE, coef0, coefD). have phi_is_monoid_morphism : monoid_morphism phi. split=> [|A B]; apply/polyP => k; apply/matrixP => i j. by rewrite coef_phi mxE coefMn !coefC; case: (k == _); rewrite ?mxE ?mul0rn. rewrite !coef_phi !mxE !coefM summxE coef_sum. pose F k1 k2 := (A i k1)`_k2 * (B k1 j)`_(k - k2). transitivity (\sum_k1 \sum_(k2 < k.+1) F k1 k2); rewrite {}/F. by apply: eq_bigr=> k1 _; rewrite coefM. rewrite exchange_big /=; apply: eq_bigr => k2 _. by rewrite mxE; apply: eq_bigr => k1 _; rewrite !coef_phi. have bij_phi: bijective phi. exists (fun P : MR_X => \matrix_(i, j) \poly_(k < size P) P`_k i j) => [A|P]. apply/matrixP=> i j; rewrite mxE; apply/polyP=> k. ...
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
mx_poly_ring_isom
Cayley_Hamilton(R : comNzRingType) n' (A : 'M[R]_n'.+1) : horner_mx A (char_poly A) = 0. Proof. have [phi [_ phiZ phiC _]] := mx_poly_ring_isom R n'. apply/rootP/factor_theorem; rewrite -phiZ -mul_adj_mx rmorphM /=. by move: (phi _) => q; exists q; rewrite rmorphB phiC phiZ map_polyX. Qed.
Theorem
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
Cayley_Hamilton
eigenvalue_root_char(F : fieldType) n (A : 'M[F]_n) a : eigenvalue A a = root (char_poly A) a. Proof. transitivity (\det (a%:M - A) == 0). apply/eigenvalueP/det0P=> [[v Av_av v_nz] | [v v_nz Av_av]]; exists v => //. by rewrite mulmxBr Av_av mul_mx_scalar subrr. by apply/eqP; rewrite -mul_mx_scalar eq_sym -subr_eq0 -mulmxBr Av_av. congr (_ == 0); rewrite horner_sum; apply: eq_bigr => s _. rewrite hornerM horner_exp !hornerE; congr (_ * _). rewrite (big_morph _ (fun p q => hornerM p q a) (hornerC 1 a)). by apply: eq_bigr => i _; rewrite !mxE !(hornerE, hornerMn). Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
eigenvalue_root_char
char_poly_trig{R : comNzRingType} n (A : 'M[R]_n) : is_trig_mx A -> char_poly A = \prod_(i < n) ('X - (A i i)%:P). Proof. move=> /is_trig_mxP Atrig; rewrite /char_poly det_trig. by apply: eq_bigr => i; rewrite !mxE eqxx. by apply/is_trig_mxP => i j lt_ij; rewrite !mxE -val_eqE ltn_eqF ?Atrig ?subrr. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
char_poly_trig
companionmx{R : nzRingType} (p : seq R) (d := (size p).-1) := \matrix_(i < d, j < d) if (i == d.-1 :> nat) then - p`_j else (i.+1 == j :> nat)%:R.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
companionmx
companionmxK{R : comNzRingType} (p : {poly R}) : p \is monic -> char_poly (companionmx p) = p. Proof. pose D n : 'M[{poly R}]_n := \matrix_(i, j) ('X *+ (i == j.+1 :> nat) - ((i == j)%:R)%:P). have detD n : \det (D n) = (-1) ^+ n. elim: n => [|n IHn]; first by rewrite det_mx00. rewrite (expand_det_row _ ord0) big_ord_recl !mxE /= sub0r. rewrite big1 ?addr0; last by move=> i _; rewrite !mxE /= subrr mul0r. rewrite /cofactor mul1r [X in \det X](_ : _ = D _) ?IHn ?exprS//. by apply/matrixP=> i j; rewrite !mxE /= /bump !add1n eqSS. elim/poly_ind: p => [|p c IHp]. by rewrite monicE lead_coef0 eq_sym oner_eq0. have [->|p_neq0] := eqVneq p 0. rewrite mul0r add0r monicE lead_coefC => /eqP->. by rewrite /companionmx /char_poly size_poly1 det_mx00. rewrite monicE lead_coefDl ?lead_coefMX => [p_monic|]; last first. rewrite size_polyC size_mulX ?polyX_eq0// ltnS. by rewrite (leq_trans (leq_b1 _)) ?size_poly_gt0. rewrite -[in RHS]IHp // /companionmx size_MXaddC (negPf p_neq0) /=. rewrite /char_poly polySpred //. have [->|spV1_gt0] := posnP (size p).-1. rewrite [X in \det X]mx11_scalar det_scalar1 !mxE ?eqxx det_mx00. by rewrite mul1r -horner_coef0 hornerMXaddC mulr0 add0r rmorphN opprK. rewrite (expand_det_col _ ord0) /= -[(size p).-1]prednK //. rewrite big_ord_recr big_ord_recl/= big1 ?add0r //=; last first. move=> i _; rewrite !mxE -val_eqE /= /bump leq0n add1n eqSS. by rewrite ltn_eqF ?subrr ?mul0r. rewrite !mxE ?subnn -horner_coef0 /= hornerMXaddC. rewrite !(eqxx ...
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
companionmxK
mulmx_delta_companion(R : nzRingType) (p : seq R) (i: 'I_(size p).-1) (i_small : i.+1 < (size p).-1): delta_mx 0 i *m companionmx p = delta_mx 0 (Ordinal i_small) :> 'rV__. Proof. apply/rowP => j; rewrite !mxE (bigD1 i) //= ?(=^~val_eqE, mxE) /= eqxx mul1r. rewrite ltn_eqF ?big1 ?addr0 1?eq_sym //; last first. by rewrite -ltnS prednK // (leq_trans _ i_small). by move=> k /negPf ki_eqF; rewrite !mxE eqxx ki_eqF mul0r. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
mulmx_delta_companion
row'_col'_char_poly_mx{R : nzRingType} m i (M : 'M[R]_m) : row' i (col' i (char_poly_mx M)) = char_poly_mx (row' i (col' i M)). Proof. by apply/matrixP => k l; rewrite !mxE (inj_eq lift_inj). Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
row'_col'_char_poly_mx
char_block_diag_mx{R : nzRingType} m n (A : 'M[R]_m) (B : 'M[R]_n) : char_poly_mx (block_mx A 0 0 B) = block_mx (char_poly_mx A) 0 0 (char_poly_mx B). Proof. rewrite /char_poly_mx map_block_mx/= !map_mx0. by rewrite scalar_mx_block opp_block_mx add_block_mx !subr0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
char_block_diag_mx
degree_mxminpoly:= ex_minn degree_mxminpoly_proof. Local Notation d := degree_mxminpoly. Local Notation Ad := (powers_mx A d).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
degree_mxminpoly
mxminpoly_nonconstant: d > 0. Proof. rewrite /d; case: ex_minnP => -[] //; rewrite leqn0 mxrank_eq0; move/eqP. by move/row_matrixP/(_ 0)/eqP; rewrite rowK row0 mxvec_eq0 -mxrank_eq0 mxrank1. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
mxminpoly_nonconstant
minpoly_mx1: (1%:M \in Ad)%MS. Proof. by apply: (eq_row_sub (Ordinal mxminpoly_nonconstant)); rewrite rowK. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
minpoly_mx1
minpoly_mx_free: row_free Ad. Proof. have:= mxminpoly_nonconstant; rewrite /d; case: ex_minnP => -[] // d' _ /(_ d'). by move/implyP; rewrite ltnn implybF -ltnS ltn_neqAle rank_leq_row andbT negbK. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
minpoly_mx_free
horner_mx_memp : (horner_mx A p \in Ad)%MS. Proof. elim/poly_ind: p => [|p a IHp]; first by rewrite rmorph0 // linear0 sub0mx. rewrite rmorphD rmorphM /= horner_mx_C horner_mx_X. rewrite addrC -scalemx1 linearP /= -(mul_vec_lin (mulmxr A)). case/submxP: IHp => u ->{p}. have: (powers_mx A (1 + d) <= Ad)%MS. rewrite -(geq_leqif (mxrank_leqif_sup _)). by rewrite (eqnP minpoly_mx_free) /d; case: ex_minnP. rewrite addnC; apply/row_subP=> i. by apply: eq_row_sub (lshift 1 i) _; rewrite !rowK. apply: submx_trans; rewrite addmx_sub ?scalemx_sub //. by apply: (eq_row_sub 0); rewrite rowK. rewrite -mulmxA mulmx_sub {u}//; apply/row_subP=> i. rewrite row_mul rowK mul_vec_lin /= mulmxE -exprSr. by apply: (eq_row_sub (rshift 1 i)); rewrite rowK. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
horner_mx_mem
mx_inv_hornerB := rVpoly (mxvec B *m pinvmx Ad).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
mx_inv_horner
mx_inv_horner0: mx_inv_horner 0 = 0. Proof. by rewrite /mx_inv_horner !(linear0, mul0mx). Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
mx_inv_horner0
mx_inv_hornerKB : (B \in Ad)%MS -> horner_mx A (mx_inv_horner B) = B. Proof. by move=> sBAd; rewrite horner_rVpoly mulmxKpV ?mxvecK. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
mx_inv_hornerK
minpoly_mxMB C : (B \in Ad -> C \in Ad -> B * C \in Ad)%MS. Proof. move=> AdB AdC; rewrite -(mx_inv_hornerK AdB) -(mx_inv_hornerK AdC). by rewrite -rmorphM ?horner_mx_mem. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
minpoly_mxM
minpoly_mx_ring: mxring Ad. Proof. apply/andP; split; first exact/mulsmx_subP/minpoly_mxM. apply/mxring_idP; exists 1%:M; split=> *; rewrite ?mulmx1 ?mul1mx //. by rewrite -mxrank_eq0 mxrank1. exact: minpoly_mx1. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
minpoly_mx_ring
mxminpoly:= 'X^d - mx_inv_horner (A ^+ d). Local Notation p_A := mxminpoly.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
mxminpoly
size_mxminpoly: size p_A = d.+1. Proof. by rewrite size_polyDl ?size_polyXn // size_polyN ltnS size_poly. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
size_mxminpoly
mxminpoly_monic: p_A \is monic. Proof. rewrite monicE /lead_coef size_mxminpoly coefB coefXn eqxx /=. by rewrite nth_default ?size_poly // subr0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
mxminpoly_monic
size_mod_mxminpolyp : size (p %% p_A) <= d. Proof. by rewrite -ltnS -size_mxminpoly ltn_modp // -size_poly_eq0 size_mxminpoly. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
size_mod_mxminpoly
mx_root_minpoly: horner_mx A p_A = 0. Proof. rewrite rmorphB -{3}(horner_mx_X A) -rmorphXn /=. by rewrite mx_inv_hornerK ?subrr ?horner_mx_mem. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
mx_root_minpoly
horner_rVpolyK(u : 'rV_d) : mx_inv_horner (horner_mx A (rVpoly u)) = rVpoly u. Proof. congr rVpoly; rewrite horner_rVpoly vec_mxK. by apply: (row_free_inj minpoly_mx_free); rewrite mulmxKpV ?submxMl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
horner_rVpolyK
horner_mxKp : mx_inv_horner (horner_mx A p) = p %% p_A. Proof. rewrite {1}(Pdiv.IdomainMonic.divp_eq mxminpoly_monic p) rmorphD rmorphM /=. rewrite mx_root_minpoly mulr0 add0r. by rewrite -(poly_rV_K (size_mod_mxminpoly _)) horner_rVpolyK. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
horner_mxK
mxminpoly_minp : horner_mx A p = 0 -> p_A %| p. Proof. by move=> pA0; rewrite /dvdp -horner_mxK pA0 mx_inv_horner0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
mxminpoly_min
mxminpoly_minPp : reflect (horner_mx A p = 0) (p_A %| p). Proof. apply: (iffP idP); last exact: mxminpoly_min. by move=> /Pdiv.Field.dvdpP[q ->]; rewrite rmorphM/= mx_root_minpoly mulr0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
mxminpoly_minP
dvd_mxminpolyp : (p_A %| p) = (horner_mx A p == 0). Proof. exact/mxminpoly_minP/eqP. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
dvd_mxminpoly
horner_rVpoly_inj: injective (horner_mx A \o rVpoly : 'rV_d -> 'M_n). Proof. apply: can_inj (poly_rV \o mx_inv_horner) _ => u /=. by rewrite horner_rVpolyK rVpolyK. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
horner_rVpoly_inj
mxminpoly_linear_is_scalar: (d <= 1) = is_scalar_mx A. Proof. have scalP := has_non_scalar_mxP minpoly_mx1. rewrite leqNgt -(eqnP minpoly_mx_free); apply/scalP/idP=> [|[[B]]]. case scalA: (is_scalar_mx A); [by right | left]. by exists A; rewrite ?scalA // -{1}(horner_mx_X A) horner_mx_mem. move/mx_inv_hornerK=> <- nsB; case/is_scalar_mxP=> a defA; case/negP: nsB. move: {B}(_ B); apply: poly_ind => [|p c]. by rewrite rmorph0 ?mx0_is_scalar. rewrite rmorphD ?rmorphM /= horner_mx_X defA; case/is_scalar_mxP=> b ->. by rewrite -rmorphM horner_mx_C -rmorphD /= scalar_mx_is_scalar. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
mxminpoly_linear_is_scalar
mxminpoly_dvd_char: p_A %| char_poly A. Proof. exact/mxminpoly_min/Cayley_Hamilton. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
mxminpoly_dvd_char
eigenvalue_root_mina : eigenvalue A a = root p_A a. Proof. apply/idP/idP=> Aa; last first. rewrite eigenvalue_root_char !root_factor_theorem in Aa *. exact: dvdp_trans Aa mxminpoly_dvd_char. have{Aa} [v Av_av v_nz] := eigenvalueP Aa. apply: contraR v_nz => pa_nz; rewrite -{pa_nz}(eqmx_eq0 (eqmx_scale _ pa_nz)). apply/eqP; rewrite -(mulmx0 _ v) -mx_root_minpoly. elim/poly_ind: p_A => [|p c IHp]. by rewrite rmorph0 horner0 scale0r mulmx0. rewrite !hornerE rmorphD rmorphM /= horner_mx_X horner_mx_C scalerDl. by rewrite -scalerA mulmxDr mul_mx_scalar mulmxA -IHp -scalemxAl Av_av. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import div fintype tuple finfun bigop fingroup perm", "From mathcomp Require Import ssralg zmodp matrix mxalgebra poly polydiv" ]
algebra/mxpoly.v
eigenvalue_root_min