statement
stringlengths
1
4.33k
proof
stringlengths
0
37.9k
type
stringclasses
25 values
symbolic_name
stringlengths
1
67
library
stringclasses
10 values
filename
stringclasses
112 values
imports
listlengths
2
138
deps
listlengths
0
64
docstring
stringclasses
798 values
source_url
stringclasses
1 value
commit
stringclasses
1 value
dvdp_mul d1 d2 m1 m2 : d1 %| m1 -> d2 %| m2 -> d1 * d2 %| m1 * m2.
Proof. case: (eqVneq d1 0) => [-> /dvd0pP -> | d1n0]; first by rewrite !mul0r dvdpp. case: (eqVneq d2 0) => [-> _ /dvd0pP -> | d2n0]; first by rewrite !mulr0. rewrite dvdp_eq; set c1 := _ ^+ _; set q1 := _ %/ _; move/eqP=> Hq1. rewrite dvdp_eq; set c2 := _ ^+ _; set q2 := _ %/ _; move/eqP=> Hq2. apply: (@eq_dvdp (c1 * ...
Lemma
dvdp_mul
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "c1", "c2", "dvd0pP", "dvdp_eq", "dvdpp", "eqVneq", "eq_dvdp", "expf_neq0", "lead_coef_eq0", "mul0r", "mulf_neq0", "mulr0", "mulrA", "mulrCA", "scalerA", "scalerAl", "scalerAr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_addr m d n : d %| m -> (d %| m + n) = (d %| n).
Proof. case: (eqVneq d 0) => [-> /dvd0pP -> | dn0]; first by rewrite add0r. rewrite dvdp_eq; set c1 := _ ^+ _; set q1 := _ %/ _; move/eqP=> Eq1. apply/idP/idP; rewrite dvdp_eq; set c2 := _ ^+ _; set q2 := _ %/ _. have sn0 : c1 * c2 != 0. by rewrite !mulf_neq0 // expf_eq0 lead_coef_eq0 (negPf dn0) andbF. move/eq...
Lemma
dvdp_addr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "Eq1", "add0r", "addKr", "addrC", "apply", "c1", "c2", "dvd0pP", "dvdp_eq", "eqVneq", "eq_dvdp", "expf_eq0", "lead_coef_eq0", "mulNr", "mulf_neq0", "mulrC", "mulrDl", "scaleNr", "scalerA", "scalerAl", "scalerBr", "scalerDr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_addl n d m : d %| n -> (d %| m + n) = (d %| m).
Proof. by rewrite addrC; apply: dvdp_addr. Qed.
Lemma
dvdp_addl
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "addrC", "apply", "dvdp_addr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_add d m n : d %| m -> d %| n -> d %| m + n.
Proof. by move/dvdp_addr->. Qed.
Lemma
dvdp_add
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_addr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_add_eq d m n : d %| m + n -> (d %| m) = (d %| n).
Proof. by move=> ?; apply/idP/idP; [move/dvdp_addr <-| move/dvdp_addl <-]. Qed.
Lemma
dvdp_add_eq
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "dvdp_addl", "dvdp_addr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_subr d m n : d %| m -> (d %| m - n) = (d %| n).
Proof. by move=> ?; apply: dvdp_add_eq; rewrite -addrA addNr simp. Qed.
Lemma
dvdp_subr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "addNr", "addrA", "apply", "dvdp_add_eq", "simp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_subl d m n : d %| n -> (d %| m - n) = (d %| m).
Proof. by move/dvdp_addl<-; rewrite subrK. Qed.
Lemma
dvdp_subl
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_addl", "subrK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_sub d m n : d %| m -> d %| n -> d %| m - n.
Proof. by move=> *; rewrite dvdp_subl. Qed.
Lemma
dvdp_sub
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_subl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_mod d n m : d %| n -> (d %| m) = (d %| m %% n).
Proof. have [-> | nn0] := eqVneq n 0; first by rewrite modp0. case: (eqVneq d 0) => [-> /dvd0pP -> | dn0]; first by rewrite modp0. rewrite dvdp_eq; set c1 := _ ^+ _; set q1 := _ %/ _; move/eqP=> Eq1. apply/idP/idP; rewrite dvdp_eq; set c2 := _ ^+ _; set q2 := _ %/ _. have sn0 : c1 * c2 != 0. by rewrite !mulf_neq0...
Lemma
dvdp_mod
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "Eq1", "addKr", "addrC", "apply", "c1", "c2", "divp_eq", "dvd0pP", "dvdp_eq", "eqVneq", "eq_dvdp", "expf_eq0", "lead_coef", "lead_coef_eq0", "modp0", "mulNr", "mulf_neq0", "mulrA", "mulrC", "mulrDl", "scalerA", "scalerAl", "scalerAr", "scalerBr", "scalerDr", "scalp"...
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_trans : transitive (@dvdp R).
Proof. move=> n d m. case: (eqVneq d 0) => [-> /dvd0pP -> // | dn0]. case: (eqVneq n 0) => [-> _ /dvd0pP -> // | nn0]. rewrite dvdp_eq; set c1 := _ ^+ _; set q1 := _ %/ _; move/eqP=> Hq1. rewrite dvdp_eq; set c2 := _ ^+ _; set q2 := _ %/ _; move/eqP=> Hq2. have sn0 : c1 * c2 != 0 by rewrite mulf_neq0 // expf_neq0 // le...
Lemma
dvdp_trans
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "c1", "c2", "dvd0pP", "dvdp", "dvdp_eq", "eqVneq", "eq_dvdp", "expf_neq0", "lead_coef_eq0", "mulf_neq0", "mulrA", "scalerA", "scalerAr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_mulIl p q : p %| p * q.
Proof. exact/dvdp_mulr/dvdpp. Qed.
Lemma
dvdp_mulIl
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_mulr", "dvdpp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_mulIr p q : q %| p * q.
Proof. exact/dvdp_mull/dvdpp. Qed.
Lemma
dvdp_mulIr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_mull", "dvdpp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_mul2r r p q : r != 0 -> (p * r %| q * r) = (p %| q).
Proof. move=> nzr. have [-> | pn0] := eqVneq p 0. by rewrite mul0r !dvd0p mulf_eq0 (negPf nzr) orbF. have [-> | qn0] := eqVneq q 0; first by rewrite mul0r !dvdp0. apply/idP/idP; last by move=> ?; rewrite dvdp_mul ?dvdpp. rewrite dvdp_eq; set c := _ ^+ _; set x := _ %/ _; move/eqP=> Hx. apply: (@eq_dvdp c x); first by...
Lemma
dvdp_mul2r
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "dvd0p", "dvdp0", "dvdp_eq", "dvdp_mul", "dvdpp", "eqVneq", "eq_dvdp", "expf_neq0", "last", "lead_coef_eq0", "mul0r", "mulIf", "mulf_eq0", "mulf_neq0", "mulrA", "scalerAl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_mul2l r p q: r != 0 -> (r * p %| r * q) = (p %| q).
Proof. by rewrite ![r * _]mulrC; apply: dvdp_mul2r. Qed.
Lemma
dvdp_mul2l
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "dvdp_mul2r", "mulrC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_divpr d p q : d %| q -> (size p < size (q %/ d)) = (size (p * d) < size q).
Proof. by move=> dv_d_q; rewrite !ltnNge leq_divpl. Qed.
Lemma
ltn_divpr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "leq_divpl", "ltnNge", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_exp d k p : 0 < k -> d %| p -> d %| (p ^+ k).
Proof. by case: k => // k _ d_dv_m; rewrite exprS dvdp_mulr. Qed.
Lemma
dvdp_exp
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_mulr", "exprS" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_exp2l d k l : k <= l -> d ^+ k %| d ^+ l.
Proof. by move/subnK <-; rewrite exprD dvdp_mull // ?lead_coef_exp ?unitrX. Qed.
Lemma
dvdp_exp2l
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_mull", "exprD", "lead_coef_exp", "subnK", "unitrX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_Pexp2l d k l : 1 < size d -> (d ^+ k %| d ^+ l) = (k <= l).
Proof. move=> sd; case: leqP => [|gt_n_m]; first exact: dvdp_exp2l. have dn0 : d != 0 by rewrite -size_poly_gt0; apply: ltn_trans sd. rewrite gtNdvdp ?expf_neq0 // polySpred ?expf_neq0 // size_exp /=. rewrite [size (d ^+ k)]polySpred ?expf_neq0 // size_exp ltnS ltn_mul2l. by move: sd; rewrite -subn_gt0 subn1; move->. Q...
Lemma
dvdp_Pexp2l
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "dvdp_exp2l", "expf_neq0", "gtNdvdp", "leqP", "ltnS", "ltn_mul2l", "ltn_trans", "polySpred", "size", "size_exp", "size_poly_gt0", "subn1", "subn_gt0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_exp2r p q k : p %| q -> p ^+ k %| q ^+ k.
Proof. case: (eqVneq p 0) => [-> /dvd0pP -> // | pn0]. rewrite dvdp_eq; set c := _ ^+ _; set t := _ %/ _; move/eqP=> e. apply: (@eq_dvdp (c ^+ k) (t ^+ k)); first by rewrite !expf_neq0 ?lead_coef_eq0. by rewrite -exprMn -exprZn; congr (_ ^+ k). Qed.
Lemma
dvdp_exp2r
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "dvd0pP", "dvdp_eq", "eqVneq", "eq_dvdp", "expf_neq0", "exprMn", "exprZn", "lead_coef_eq0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_exp_sub p q k l: p != 0 -> (p ^+ k %| q * p ^+ l) = (p ^+ (k - l) %| q).
Proof. move=> pn0; case: (leqP k l)=> [|/ltnW] hkl. move: (hkl); rewrite -subn_eq0; move/eqP->; rewrite expr0 dvd1p. exact/dvdp_mull/dvdp_exp2l. by rewrite -[in LHS](subnK hkl) exprD dvdp_mul2r // expf_eq0 (negPf pn0) andbF. Qed.
Lemma
dvdp_exp_sub
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvd1p", "dvdp_exp2l", "dvdp_mul2r", "dvdp_mull", "expf_eq0", "expr0", "exprD", "leqP", "ltnW", "subnK", "subn_eq0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_XsubCl p x : (('X - x%:P) %| p) = root p x.
Proof. by rewrite dvdpE; apply: Ring.rdvdp_XsubCl. Qed.
Lemma
dvdp_XsubCl
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "Ring", "apply", "dvdpE", "rdvdp_XsubCl", "root" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
root_dvdp p q x : p %| q -> root p x -> root q x.
Proof. by rewrite -!dvdp_XsubCl => /[swap]; exact: dvdp_trans. Qed.
Lemma
root_dvdp
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_XsubCl", "dvdp_trans", "root" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
polyXsubCP p x : reflect (p.[x] = 0) (('X - x%:P) %| p).
Proof. by rewrite dvdpE; apply: Ring.polyXsubCP. Qed.
Lemma
polyXsubCP
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "Ring", "apply", "dvdpE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_div_XsubC p c : (p == (p %/ ('X - c%:P)) * ('X - c%:P)) = ('X - c%:P %| p).
Proof. by rewrite dvdp_eq lead_coefXsubC expr1n scale1r. Qed.
Lemma
eqp_div_XsubC
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_eq", "expr1n", "lead_coefXsubC", "scale1r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
root_factor_theorem p x : root p x = (('X - x%:P) %| p).
Proof. by rewrite dvdp_XsubCl. Qed.
Lemma
root_factor_theorem
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_XsubCl", "root" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
uniq_roots_dvdp p rs : all (root p) rs -> uniq_roots rs -> (\prod_(z <- rs) ('X - z%:P)) %| p.
Proof. move=> rrs; case/(uniq_roots_prod_XsubC rrs)=> q ->. by apply: dvdp_mull; rewrite // (eqP (monic_prod_XsubC _)) unitr1. Qed.
Lemma
uniq_roots_dvdp
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "all", "apply", "dvdp_mull", "monic_prod_XsubC", "root", "uniq_roots", "uniq_roots_prod_XsubC", "unitr1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
root_bigmul x (ps : seq {poly R}) : ~~root (\big[*%R/1]_(p <- ps) p) x = all (fun p => ~~ root p x) ps.
Proof. elim: ps => [|p ps ihp]; first by rewrite big_nil root1. by rewrite big_cons /= rootM negb_or ihp. Qed.
Lemma
root_bigmul
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "all", "big_cons", "big_nil", "poly", "root", "root1", "rootM", "seq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqpP m n : reflect (exists2 c12, (c12.1 != 0) && (c12.2 != 0) & c12.1 *: m = c12.2 *: n) (m %= n).
Proof. apply: (iffP idP) => [| [[c1 c2]/andP[nz_c1 nz_c2 eq_cmn]]]; last first. rewrite /eqp (@eq_dvdp c2 c1%:P) -?eq_cmn ?mul_polyC // (@eq_dvdp c1 c2%:P)//. by rewrite eq_cmn mul_polyC. case: (eqVneq m 0) => [-> /andP [/dvd0pP -> _] | m_nz]. by exists (1, 1); rewrite ?scaler0 // oner_eq0. case: (eqVneq n 0) => ...
Lemma
eqpP
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "c1", "c2", "dvd0pP", "dvdp_eq", "eqVneq", "eq_dvdp", "eqp", "expf_eq0", "last", "lead_coef_eq0", "leq_addl", "leq_eqVlt", "ltnS", "mulIf", "mul_polyC", "mulf_eq0", "mulf_neq0", "mulrAC", "mulrC", "oner_eq0", "polySpred", "scaler0", "scalerA", "scalerAr", "...
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_eq p q: p %= q -> (lead_coef q) *: p = (lead_coef p) *: q.
Proof. move=> /eqpP [[c1 c2] /= /andP [nz_c1 nz_c2]] eq. have/(congr1 lead_coef) := eq; rewrite !lead_coefZ. move=> eqC; apply/(@mulfI _ c2%:P); rewrite ?polyC_eq0 //. by rewrite !mul_polyC scalerA -eqC mulrC -scalerA eq !scalerA mulrC. Qed.
Lemma
eqp_eq
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "c1", "c2", "eqC", "eqpP", "lead_coef", "lead_coefZ", "mul_polyC", "mulfI", "mulrC", "polyC_eq0", "scalerA" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqpxx : reflexive (@eqp R).
Proof. by move=> p; rewrite /eqp dvdpp. Qed.
Lemma
eqpxx
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdpp", "eqp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqpW p q : p = q -> p %= q.
Proof. by move->; rewrite eqpxx. Qed.
Lemma
eqpW
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "eqpxx" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_sym : symmetric (@eqp R).
Proof. by move=> p q; rewrite /eqp andbC. Qed.
Lemma
eqp_sym
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "eqp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_trans : transitive (@eqp R).
Proof. move=> p q r; case/andP=> Dp pD; case/andP=> Dq qD. by rewrite /eqp (dvdp_trans Dp) // (dvdp_trans qD). Qed.
Lemma
eqp_trans
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_trans", "eqp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_ltrans : left_transitive (@eqp R).
Proof. exact: sym_left_transitive eqp_sym eqp_trans. Qed.
Lemma
eqp_ltrans
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "eqp", "eqp_sym", "eqp_trans" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_rtrans : right_transitive (@eqp R).
Proof. exact: sym_right_transitive eqp_sym eqp_trans. Qed.
Lemma
eqp_rtrans
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "eqp", "eqp_sym", "eqp_trans" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp0 p : (p %= 0) = (p == 0).
Proof. by apply/idP/eqP => [/andP [_ /dvd0pP] | -> //]. Qed.
Lemma
eqp0
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "dvd0pP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp01 : (0 %= (1 : {poly R})) = false.
Proof. by rewrite eqp_sym eqp0 oner_eq0. Qed.
Lemma
eqp01
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "eqp0", "eqp_sym", "oner_eq0", "poly" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_scale p c : c != 0 -> c *: p %= p.
Proof. move=> c0; apply/eqpP; exists (1, c); first by rewrite c0 oner_eq0. by rewrite scale1r. Qed.
Lemma
eqp_scale
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "c0", "eqpP", "oner_eq0", "scale1r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_size p q : p %= q -> size p = size q.
Proof. have [->|Eq] := eqVneq q 0; first by rewrite eqp0; move/eqP->. rewrite eqp_sym; have [->|Ep] := eqVneq p 0; first by rewrite eqp0; move/eqP->. by case/andP => Dp Dq; apply: anti_leq; rewrite !dvdp_leq. Qed.
Lemma
eqp_size
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "anti_leq", "apply", "dvdp_leq", "eqVneq", "eqp0", "eqp_sym", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
size_poly_eq1 p : (size p == 1) = (p %= 1).
Proof. apply/size_poly1P/idP=> [[c cn0 ep] |]. by apply/eqpP; exists (1, c); rewrite ?oner_eq0 // alg_polyC scale1r. by move/eqp_size; rewrite size_poly1; move/eqP/size_poly1P. Qed.
Lemma
size_poly_eq1
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "alg_polyC", "apply", "eqpP", "eqp_size", "oner_eq0", "scale1r", "size", "size_poly1", "size_poly1P" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
polyXsubC_eqp1 (x : R) : ('X - x%:P %= 1) = false.
Proof. by rewrite -size_poly_eq1 size_XsubC. Qed.
Lemma
polyXsubC_eqp1
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "size_XsubC", "size_poly_eq1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_eqp1 p q : p %| q -> q %= 1 -> p %= 1.
Proof. move=> dpq hq. have sizeq : size q == 1 by rewrite size_poly_eq1. have n0q : q != 0 by case: eqP hq => // ->; rewrite eqp01. rewrite -size_poly_eq1 eqn_leq -{1}(eqP sizeq) dvdp_leq //= size_poly_gt0. by apply/eqP => p0; move: dpq n0q; rewrite p0 dvd0p => ->. Qed.
Lemma
dvdp_eqp1
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "dvd0p", "dvdp_leq", "eqn_leq", "eqp01", "p0", "size", "size_poly_eq1", "size_poly_gt0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_dvdr q p d: p %= q -> (d %| p) = (d %| q).
Proof. suff Hmn m n: m %= n -> (d %| m) -> (d %| n). by move=> mn; apply/idP/idP; apply: Hmn=> //; rewrite eqp_sym. by rewrite /eqp; case/andP=> pq qp dp; apply: (dvdp_trans dp). Qed.
Lemma
eqp_dvdr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "dvdp_trans", "eqp", "eqp_sym" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_dvdl d2 d1 p : d1 %= d2 -> (d1 %| p) = (d2 %| p).
suff Hmn m n: m %= n -> (m %| p) -> (n %| p). by move=> ?; apply/idP/idP; apply: Hmn; rewrite // eqp_sym. by rewrite /eqp; case/andP=> dd' d'd dp; apply: (dvdp_trans d'd). Qed.
Lemma
eqp_dvdl
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "dvdp_trans", "eqp", "eqp_sym" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdpZr c m n : c != 0 -> (m %| c *: n) = (m %| n).
Proof. by move=> cn0; exact/eqp_dvdr/eqp_scale. Qed.
Lemma
dvdpZr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "eqp_dvdr", "eqp_scale" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdpZl c m n : c != 0 -> (c *: m %| n) = (m %| n).
Proof. by move=> cn0; exact/eqp_dvdl/eqp_scale. Qed.
Lemma
dvdpZl
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "eqp_dvdl", "eqp_scale" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdpNl d p : ((- d) %| p) = (d %| p).
Proof. by rewrite -scaleN1r; apply/eqp_dvdl/eqp_scale; rewrite oppr_eq0 oner_neq0. Qed.
Lemma
dvdpNl
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "eqp_dvdl", "eqp_scale", "oner_neq0", "oppr_eq0", "scaleN1r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdpNr d p : (d %| (- p)) = (d %| p).
Proof. by apply: eqp_dvdr; rewrite -scaleN1r eqp_scale ?oppr_eq0 ?oner_eq0. Qed.
Lemma
dvdpNr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "eqp_dvdr", "eqp_scale", "oner_eq0", "oppr_eq0", "scaleN1r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_mul2r r p q : r != 0 -> (p * r %= q * r) = (p %= q).
Proof. by move=> nz_r; rewrite /eqp !dvdp_mul2r. Qed.
Lemma
eqp_mul2r
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_mul2r", "eqp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_mul2l r p q: r != 0 -> (r * p %= r * q) = (p %= q).
Proof. by move=> nz_r; rewrite /eqp !dvdp_mul2l. Qed.
Lemma
eqp_mul2l
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_mul2l", "eqp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_mull r p q: q %= r -> p * q %= p * r.
Proof. case/eqpP=> [[c d]] /andP [c0 d0 e]; apply/eqpP; exists (c, d); rewrite ?c0 //. by rewrite scalerAr e -scalerAr. Qed.
Lemma
eqp_mull
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "c0", "eqpP", "scalerAr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_mulr q p r : p %= q -> p * r %= q * r.
Proof. by move=> epq; rewrite ![_ * r]mulrC eqp_mull. Qed.
Lemma
eqp_mulr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "eqp_mull", "mulrC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_exp p q k : p %= q -> p ^+ k %= q ^+ k.
Proof. move=> pq; elim: k=> [|k ihk]; first by rewrite !expr0 eqpxx. by rewrite !exprS (@eqp_trans (q * p ^+ k)) // (eqp_mulr, eqp_mull). Qed.
Lemma
eqp_exp
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "eqp_mull", "eqp_mulr", "eqp_trans", "eqpxx", "expr0", "exprS" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
polyC_eqp1 (c : R) : (c%:P %= 1) = (c != 0).
Proof. apply/eqpP/idP => [[[x y]] |nc0] /=. case: (eqVneq c) => [->|] //= /andP [_] /negPf <- /eqP. by rewrite alg_polyC scaler0 eq_sym polyC_eq0. exists (1, c); first by rewrite nc0 /= oner_neq0. by rewrite alg_polyC scale1r. Qed.
Lemma
polyC_eqp1
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "alg_polyC", "apply", "eqVneq", "eq_sym", "eqpP", "oner_neq0", "polyC_eq0", "scale1r", "scaler0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdUp d p: d %= 1 -> d %| p.
Proof. by move/eqp_dvdl->; rewrite dvd1p. Qed.
Lemma
dvdUp
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvd1p", "eqp_dvdl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_size_eqp p q : p %| q -> (size p == size q) = (p %= q).
Proof. move=> pq; apply/idP/idP; last by move/eqp_size->. have [->|Hq] := eqVneq q 0; first by rewrite size_poly0 size_poly_eq0 eqp0. have [->|Hp] := eqVneq p 0. by rewrite size_poly0 eq_sym size_poly_eq0 eqp_sym eqp0. move: pq; rewrite dvdp_eq; set c := _ ^+ _; set x := _ %/ _; move/eqP=> eqpq. have /= := congr1 (si...
Lemma
dvdp_size_eqp
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "add1n", "addnS", "apply", "dvdp_eq", "eqVneq", "eq_sym", "eqn_add2r", "eqp0", "eqpP", "eqp_scale", "eqp_size", "eqp_sym", "expf_neq0", "last", "lead_coef_eq0", "mul0r", "mul_polyC", "p0", "scale_poly_eq0", "size", "size_mul", "size_poly0", "size_poly1P", "size_poly_eq0...
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_root p q : p %= q -> root p =1 root q.
Proof. move/eqpP=> [[c d]] /andP [c0 d0 e] x; move/negPf:c0=>c0; move/negPf:d0=>d0. by rewrite rootE -[_==_]orFb -c0 -mulf_eq0 -hornerZ e hornerZ mulf_eq0 d0. Qed.
Lemma
eqp_root
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "c0", "eqpP", "hornerZ", "mulf_eq0", "root", "rootE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_rmod_mod p q : rmodp p q %= modp p q.
Proof. rewrite modpE eqp_sym; case: ifP => ulcq //. apply: eqp_scale; rewrite invr_eq0 //. by apply: expf_neq0; apply: contraTneq ulcq => ->; rewrite unitr0. Qed.
Lemma
eqp_rmod_mod
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "contraTneq", "eqp_scale", "eqp_sym", "expf_neq0", "invr_eq0", "modp", "modpE", "rmodp", "unitr0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_rdiv_div p q : rdivp p q %= divp p q.
Proof. rewrite divpE eqp_sym; case: ifP=> ulcq//; apply: eqp_scale; rewrite invr_eq0//. by apply: expf_neq0; apply: contraTneq ulcq => ->; rewrite unitr0. Qed.
Lemma
eqp_rdiv_div
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "contraTneq", "divp", "divpE", "eqp_scale", "eqp_sym", "expf_neq0", "invr_eq0", "rdivp", "unitr0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvd_eqp_divl d p q (dvd_dp : d %| q) (eq_pq : p %= q) : p %/ d %= q %/ d.
Proof. case: (eqVneq q 0) eq_pq=> [->|q_neq0]; first by rewrite eqp0=> /eqP->. have d_neq0: d != 0 by apply: contraTneq dvd_dp=> ->; rewrite dvd0p. move=> eq_pq; rewrite -(@eqp_mul2r d) // !divpK // ?(eqp_dvdr _ eq_pq) //. rewrite (eqp_ltrans (eqp_scale _ _)) ?lc_expn_scalp_neq0 //. by rewrite (eqp_rtrans (eqp_scale _ ...
Lemma
dvd_eqp_divl
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "contraTneq", "divpK", "dvd0p", "eqVneq", "eqp0", "eqp_dvdr", "eqp_ltrans", "eqp_mul2r", "eqp_rtrans", "eqp_scale", "lc_expn_scalp_neq0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp p q
:= let: (p1, q1) := if size p < size q then (q, p) else (p, q) in if p1 == 0 then q1 else let fix loop (n : nat) (pp qq : {poly R}) {struct n} := let rr := modp pp qq in if rr == 0 then qq else if n is n1.+1 then loop n1 qq rr else rr in loop (size p1) p1 q1.
Definition
gcdp
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "modp", "nat", "poly", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcd0p : left_id 0 gcdp.
Proof. move=> p; rewrite /gcdp size_poly0 size_poly_gt0 if_neg. case: ifP => /= [_ | nzp]; first by rewrite eqxx. by rewrite polySpred !(modp0, nzp) //; case: _.-1 => [|m]; rewrite mod0p eqxx. Qed.
Lemma
gcd0p
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "eqxx", "gcdp", "mod0p", "modp0", "polySpred", "size_poly0", "size_poly_gt0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp0 : right_id 0 gcdp.
Proof. move=> p; have:= gcd0p p; rewrite /gcdp size_poly0 size_poly_gt0. by case: eqVneq => //= ->; rewrite eqxx. Qed.
Lemma
gcdp0
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "eqVneq", "eqxx", "gcd0p", "gcdp", "size_poly0", "size_poly_gt0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdpE p q : gcdp p q = if size p < size q then gcdp (modp q p) p else gcdp (modp p q) q.
Proof. pose gcdpE_rec := fix gcdpE_rec (n : nat) (pp qq : {poly R}) {struct n} := let rr := modp pp qq in if rr == 0 then qq else if n is n1.+1 then gcdpE_rec n1 qq rr else rr. have Irec: forall k l p q, size q <= k -> size q <= l -> size q < size p -> gcdpE_rec k p q = gcdpE_rec l p q. + elim=> [|m Hrec...
Lemma
gcdpE
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "eqVneq", "eqxx", "gcd0p", "gcdp", "gcdp0", "last", "leqW", "leq_trans", "ltnP", "ltnS", "ltnW", "ltn_modp", "mod0p", "modp", "modp0", "nat", "poly", "polySpred", "size", "size_poly0", "size_poly_gt0", "size_poly_leq0P" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
size_gcd1p p : size (gcdp 1 p) = 1.
Proof. rewrite gcdpE size_polyC oner_eq0 /= modp1; have [|/size1_polyC ->] := ltnP. by rewrite gcd0p size_polyC oner_eq0. have [->|p00] := eqVneq p`_0 0; first by rewrite modp0 gcdp0 size_poly1. by rewrite modpC // gcd0p size_polyC p00. Qed.
Lemma
size_gcd1p
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "eqVneq", "gcd0p", "gcdp", "gcdp0", "gcdpE", "ltnP", "modp0", "modp1", "modpC", "oner_eq0", "size", "size1_polyC", "size_poly1", "size_polyC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
size_gcdp1 p : size (gcdp p 1) = 1.
Proof. rewrite gcdpE size_polyC oner_eq0 /= modp1 ltnS; case: leqP. by move/size_poly_leq0P->; rewrite gcdp0 modp0 size_polyC oner_eq0. by rewrite gcd0p size_polyC oner_eq0. Qed.
Lemma
size_gcdp1
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "gcd0p", "gcdp", "gcdp0", "gcdpE", "leqP", "ltnS", "modp0", "modp1", "oner_eq0", "size", "size_polyC", "size_poly_leq0P" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdpp : idempotent_op gcdp.
Proof. by move=> p; rewrite gcdpE ltnn modpp gcd0p. Qed.
Lemma
gcdpp
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "gcd0p", "gcdp", "gcdpE", "idempotent_op", "ltnn", "modpp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_gcdlr p q : (gcdp p q %| p) && (gcdp p q %| q).
Proof. have [r] := ubnP (minn (size q) (size p)); elim: r => // r IHr in p q *. have [-> | nz_p] := eqVneq p 0; first by rewrite gcd0p dvdpp andbT. have [-> | nz_q] := eqVneq q 0; first by rewrite gcdp0 dvdpp /=. rewrite ltnS gcdpE; case: leqP => [le_pq | lt_pq] le_qr. suffices /IHr/andP[E1 E2]: minn (size q) (size (...
Lemma
dvdp_gcdlr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_mod", "dvdpp", "eqVneq", "gcd0p", "gcdp", "gcdp0", "gcdpE", "gtn_min", "leqP", "leq_trans", "ltnS", "ltn_modp", "minn", "nz_p", "size", "ubnP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_gcdl p q : gcdp p q %| p.
Proof. by case/andP: (dvdp_gcdlr p q). Qed.
Lemma
dvdp_gcdl
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_gcdlr", "gcdp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_gcdr p q :gcdp p q %| q.
Proof. by case/andP: (dvdp_gcdlr p q). Qed.
Lemma
dvdp_gcdr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_gcdlr", "gcdp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_gcdpl p q : p != 0 -> size (gcdp p q) <= size p.
Proof. by move=> pn0; move: (dvdp_gcdl p q); apply: dvdp_leq. Qed.
Lemma
leq_gcdpl
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "dvdp_gcdl", "dvdp_leq", "gcdp", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_gcdpr p q : q != 0 -> size (gcdp p q) <= size q.
Proof. by move=> qn0; move: (dvdp_gcdr p q); apply: dvdp_leq. Qed.
Lemma
leq_gcdpr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "dvdp_gcdr", "dvdp_leq", "gcdp", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_gcd p m n : (p %| gcdp m n) = (p %| m) && (p %| n).
Proof. apply/idP/andP=> [dv_pmn | []]. by rewrite ?(dvdp_trans dv_pmn) ?dvdp_gcdl ?dvdp_gcdr. have [r] := ubnP (minn (size n) (size m)); elim: r => // r IHr in m n *. have [-> | nz_m] := eqVneq m 0; first by rewrite gcd0p. have [-> | nz_n] := eqVneq n 0; first by rewrite gcdp0. rewrite gcdpE ltnS; case: leqP => [le_n...
Lemma
dvdp_gcd
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "dvdp_gcdl", "dvdp_gcdr", "dvdp_mod", "dvdp_trans", "eqVneq", "gcd0p", "gcdp", "gcdp0", "gcdpE", "gtn_min", "last", "leqP", "leq_trans", "ltnS", "ltn_modp", "minn", "size", "ubnP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdpC p q : gcdp p q %= gcdp q p.
Proof. by rewrite /eqp !dvdp_gcd !dvdp_gcdl !dvdp_gcdr. Qed.
Lemma
gcdpC
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_gcd", "dvdp_gcdl", "dvdp_gcdr", "eqp", "gcdp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcd1p p : gcdp 1 p %= 1.
Proof. rewrite -size_poly_eq1 gcdpE size_poly1; case: ltnP. by rewrite modp1 gcd0p size_poly1 eqxx. move/size1_polyC=> e; rewrite e. have [->|p00] := eqVneq p`_0 0; first by rewrite modp0 gcdp0 size_poly1. by rewrite modpC // gcd0p size_polyC p00. Qed.
Lemma
gcd1p
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "eqVneq", "eqxx", "gcd0p", "gcdp", "gcdp0", "gcdpE", "ltnP", "modp0", "modp1", "modpC", "size1_polyC", "size_poly1", "size_polyC", "size_poly_eq1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp1 p : gcdp p 1 %= 1.
Proof. by rewrite (eqp_ltrans (gcdpC _ _)) gcd1p. Qed.
Lemma
gcdp1
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "eqp_ltrans", "gcd1p", "gcdp", "gcdpC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp_addl_mul p q r: gcdp r (p * r + q) %= gcdp r q.
Proof. suff h m n d : gcdp d n %| gcdp d (m * d + n). apply/andP; split => //. by rewrite {2}(_: q = (-p) * r + (p * r + q)) ?H // mulNr addKr. by rewrite dvdp_gcd dvdp_gcdl /= dvdp_addr ?dvdp_gcdr ?dvdp_mull ?dvdp_gcdl. Qed.
Lemma
gcdp_addl_mul
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "addKr", "apply", "dvdp_addr", "dvdp_gcd", "dvdp_gcdl", "dvdp_gcdr", "dvdp_mull", "gcdp", "mulNr", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp_addl m n : gcdp m (m + n) %= gcdp m n.
Proof. by rewrite -[m in m + _]mul1r gcdp_addl_mul. Qed.
Lemma
gcdp_addl
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "gcdp", "gcdp_addl_mul", "mul1r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp_addr m n : gcdp m (n + m) %= gcdp m n.
Proof. by rewrite addrC gcdp_addl. Qed.
Lemma
gcdp_addr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "addrC", "gcdp", "gcdp_addl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp_mull m n : gcdp n (m * n) %= n.
Proof. have [-> | nn0] := eqVneq n 0; first by rewrite gcd0p mulr0 eqpxx. have [-> | mn0] := eqVneq m 0; first by rewrite mul0r gcdp0 eqpxx. rewrite gcdpE modp_mull gcd0p size_mul //; case: leqP; last by rewrite eqpxx. rewrite (polySpred mn0) addSn /= -[leqRHS]add0n leq_add2r -ltnS. rewrite -polySpred //= leq_eqVlt ltn...
Lemma
gcdp_mull
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "add0n", "addSn", "apply", "dvdpZl", "eqVneq", "eqp_scale", "eqpxx", "gcd0p", "gcdp", "gcdp0", "gcdpE", "last", "leqP", "leqRHS", "leq_add2r", "leq_eqVlt", "ltnS", "modp_eq0P", "modp_mull", "mul0r", "mul_polyC", "mulr0", "polySpred", "size_mul", "size_poly1P", "size...
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp_mulr m n : gcdp n (n * m) %= n.
Proof. by rewrite mulrC gcdp_mull. Qed.
Lemma
gcdp_mulr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "gcdp", "gcdp_mull", "mulrC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp_scalel c m n : c != 0 -> gcdp (c *: m) n %= gcdp m n.
Proof. move=> cn0; rewrite /eqp dvdp_gcd [gcdp m n %| _]dvdp_gcd !dvdp_gcdr !andbT. apply/andP; split; last first. by apply: dvdp_trans (dvdp_gcdl _ _) _; rewrite dvdpZr. by apply: dvdp_trans (dvdp_gcdl _ _) _; rewrite dvdpZl. Qed.
Lemma
gcdp_scalel
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "dvdpZl", "dvdpZr", "dvdp_gcd", "dvdp_gcdl", "dvdp_gcdr", "dvdp_trans", "eqp", "gcdp", "last", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp_scaler c m n : c != 0 -> gcdp m (c *: n) %= gcdp m n.
Proof. move=> cn0; apply: eqp_trans (gcdpC _ _) _. by apply: eqp_trans (gcdp_scalel _ _ _) _ => //; apply: gcdpC. Qed.
Lemma
gcdp_scaler
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "eqp_trans", "gcdp", "gcdpC", "gcdp_scalel" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_gcd_idl m n : m %| n -> gcdp m n %= m.
Proof. have [-> | mn0] := eqVneq m 0. by rewrite dvd0p => /eqP ->; rewrite gcdp0 eqpxx. rewrite dvdp_eq; move/eqP/(f_equal (gcdp m)) => h. apply: eqp_trans (gcdp_mull (n %/ m) _). by rewrite -h eqp_sym gcdp_scaler // expf_neq0 // lead_coef_eq0. Qed.
Lemma
dvdp_gcd_idl
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "dvd0p", "dvdp_eq", "eqVneq", "eqp_sym", "eqp_trans", "eqpxx", "expf_neq0", "gcdp", "gcdp0", "gcdp_mull", "gcdp_scaler", "lead_coef_eq0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_gcd_idr m n : n %| m -> gcdp m n %= n.
Proof. by move/dvdp_gcd_idl; exact/eqp_trans/gcdpC. Qed.
Lemma
dvdp_gcd_idr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_gcd_idl", "eqp_trans", "gcdp", "gcdpC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp_exp p k l : gcdp (p ^+ k) (p ^+ l) %= p ^+ minn k l.
Proof. case: leqP => [|/ltnW] /subnK <-; rewrite exprD; first exact: gcdp_mull. exact/(eqp_trans (gcdpC _ _))/gcdp_mull. Qed.
Lemma
gcdp_exp
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "eqp_trans", "exprD", "gcdp", "gcdpC", "gcdp_mull", "leqP", "ltnW", "minn", "subnK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp_eq0 p q : (gcdp p q == 0) = (p == 0) && (q == 0).
Proof. apply/idP/idP; last by case/andP => /eqP -> /eqP ->; rewrite gcdp0. have h m n: gcdp m n == 0 -> (m == 0). by rewrite -(dvd0p m); move/eqP<-; rewrite dvdp_gcdl. by move=> ?; rewrite (h _ q) // (h _ p) // -eqp0 (eqp_ltrans (gcdpC _ _)) eqp0. Qed.
Lemma
gcdp_eq0
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "dvd0p", "dvdp_gcdl", "eqp0", "eqp_ltrans", "gcdp", "gcdp0", "gcdpC", "last" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_gcdr p q r : q %= r -> gcdp p q %= gcdp p r.
Proof. move=> eqr; rewrite /eqp !(dvdp_gcd, dvdp_gcdl, andbT) /=. by rewrite -(eqp_dvdr _ eqr) dvdp_gcdr (eqp_dvdr _ eqr) dvdp_gcdr. Qed.
Lemma
eqp_gcdr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_gcd", "dvdp_gcdl", "dvdp_gcdr", "eqp", "eqp_dvdr", "gcdp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_gcdl r p q : p %= q -> gcdp p r %= gcdp q r.
Proof. move=> eqr; rewrite /eqp !(dvdp_gcd, dvdp_gcdr, andbT) /=. by rewrite -(eqp_dvdr _ eqr) dvdp_gcdl (eqp_dvdr _ eqr) dvdp_gcdl. Qed.
Lemma
eqp_gcdl
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "dvdp_gcd", "dvdp_gcdl", "dvdp_gcdr", "eqp", "eqp_dvdr", "gcdp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_gcd p1 p2 q1 q2 : p1 %= p2 -> q1 %= q2 -> gcdp p1 q1 %= gcdp p2 q2.
Proof. move=> e1 e2; exact: eqp_trans (eqp_gcdr _ e2) (eqp_gcdl _ e1). Qed.
Lemma
eqp_gcd
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "eqp_gcdl", "eqp_gcdr", "eqp_trans", "gcdp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_rgcd_gcd p q : rgcdp p q %= gcdp p q.
Proof. move: {2}(minn (size p) (size q)) (leqnn (minn (size p) (size q))) => n. elim: n p q => [p q|n ihn p q hs]. rewrite leqn0; case: ltnP => _; rewrite size_poly_eq0; move/eqP->. by rewrite gcd0p rgcd0p eqpxx. by rewrite gcdp0 rgcdp0 eqpxx. have [-> | pn0] := eqVneq p 0; first by rewrite gcd0p rgcd0p eqpxx. ...
Lemma
eqp_rgcd_gcd
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "eqVneq", "eqp_gcdl", "eqp_rmod_mod", "eqp_size", "eqp_trans", "eqpxx", "gcd0p", "gcdp", "gcdp0", "gcdpE", "geq_min", "leq_trans", "leqn0", "leqnn", "ltnP", "ltnS", "ltn_modp", "minn", "rgcd0p", "rgcdp", "rgcdp0", "rgcdpE", "size", "size_poly_eq0", "sp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp_modl m n : gcdp (m %% n) n %= gcdp m n.
Proof. have [/modp_small -> // | lenm] := ltnP (size m) (size n). by rewrite (gcdpE m n) ltnNge lenm. Qed.
Lemma
gcdp_modl
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "gcdp", "gcdpE", "ltnNge", "ltnP", "modp_small", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp_modr m n : gcdp m (n %% m) %= gcdp m n.
Proof. apply: eqp_trans (gcdpC _ _); apply: eqp_trans (gcdp_modl _ _); exact: gcdpC. Qed.
Lemma
gcdp_modr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "eqp_trans", "gcdp", "gcdpC", "gcdp_modl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp_def d m n : d %| m -> d %| n -> (forall d', d' %| m -> d' %| n -> d' %| d) -> gcdp m n %= d.
Proof. move=> dm dn h; rewrite /eqp dvdp_gcd dm dn !andbT. by apply: h; rewrite (dvdp_gcdl, dvdp_gcdr). Qed.
Lemma
gcdp_def
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "apply", "dvdp_gcd", "dvdp_gcdl", "dvdp_gcdr", "eqp", "gcdp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep p q
:= size (gcdp p q) == 1%N.
Definition
coprimep
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "gcdp", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_size_gcd p q : coprimep p q -> size (gcdp p q) = 1.
Proof. by rewrite /coprimep=> /eqP. Qed.
Lemma
coprimep_size_gcd
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "coprimep", "gcdp", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_def p q : coprimep p q = (size (gcdp p q) == 1).
Proof. done. Qed.
Lemma
coprimep_def
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "coprimep", "gcdp", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimepZl c m n : c != 0 -> coprimep (c *: m) n = coprimep m n.
Proof. by move=> ?; rewrite !coprimep_def (eqp_size (gcdp_scalel _ _ _)). Qed.
Lemma
coprimepZl
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "coprimep", "coprimep_def", "eqp_size", "gcdp_scalel" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimepZr c m n: c != 0 -> coprimep m (c *: n) = coprimep m n.
Proof. by move=> ?; rewrite !coprimep_def (eqp_size (gcdp_scaler _ _ _)). Qed.
Lemma
coprimepZr
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "coprimep", "coprimep_def", "eqp_size", "gcdp_scaler" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimepp p : coprimep p p = (size p == 1).
Proof. by rewrite coprimep_def gcdpp. Qed.
Lemma
coprimepp
algebra
algebra/polydiv.v
[ "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "decfield", "poly", "GRing.Theory", "CommonRing", "RingComRreg", "RingMonic", "Ring", "ComRing", "UnitRing", "IdomainD...
[ "coprimep", "coprimep_def", "gcdpp", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d