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
gcdp_eqp1 p q : (gcdp p q %= 1) = coprimep p q.
Proof. by rewrite coprimep_def size_poly_eq1. Qed.
Lemma
gcdp_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...
[ "coprimep", "coprimep_def", "gcdp", "size_poly_eq1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_sym p q : coprimep p q = coprimep q p.
Proof. by rewrite -!gcdp_eqp1; apply: eqp_ltrans; rewrite gcdpC. Qed.
Lemma
coprimep_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...
[ "apply", "coprimep", "eqp_ltrans", "gcdpC", "gcdp_eqp1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprime1p p : coprimep 1 p.
Proof. by rewrite /coprimep -[1%N](size_poly1 R); exact/eqP/eqp_size/gcd1p. Qed.
Lemma
coprime1p
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", "eqp_size", "gcd1p", "size_poly1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep1 p : coprimep p 1.
Proof. by rewrite coprimep_sym; apply: coprime1p. Qed.
Lemma
coprimep1
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", "coprime1p", "coprimep", "coprimep_sym" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep0 p : coprimep p 0 = (p %= 1).
Proof. by rewrite /coprimep gcdp0 size_poly_eq1. Qed.
Lemma
coprimep0
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", "gcdp0", "size_poly_eq1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprime0p p : coprimep 0 p = (p %= 1).
Proof. by rewrite coprimep_sym coprimep0. Qed.
Lemma
coprime0p
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", "coprimep0", "coprimep_sym" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimepP p q : reflect (forall d, d %| p -> d %| q -> d %= 1) (coprimep p q).
Proof. rewrite /coprimep; apply: (iffP idP) => [/eqP hs d dvddp dvddq | h]. have/dvdp_eqp1: d %| gcdp p q by rewrite dvdp_gcd dvddp dvddq. by rewrite -size_poly_eq1 hs; exact. by rewrite size_poly_eq1; case/andP: (dvdp_gcdlr p q); apply: h. 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...
[ "apply", "coprimep", "dvdp_eqp1", "dvdp_gcd", "dvdp_gcdlr", "gcdp", "size_poly_eq1" ]
This is different from coprimeP in div. shall we keep this?
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimepPn p q : p != 0 -> reflect (exists d, (d %| gcdp p q) && ~~ (d %= 1)) (~~ coprimep p q).
Proof. move=> p0; apply: (iffP idP). by rewrite -gcdp_eqp1=> ng1; exists (gcdp p q); rewrite dvdpp /=. case=> d /andP [dg]; apply: contra; rewrite -gcdp_eqp1=> g1. by move: dg; rewrite (eqp_dvdr _ g1) dvdp1 size_poly_eq1. Qed.
Lemma
coprimepPn
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", "coprimep", "dvdp1", "dvdpp", "eqp_dvdr", "gcdp", "gcdp_eqp1", "p0", "size_poly_eq1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_dvdl q p r : r %| q -> coprimep p q -> coprimep p r.
Proof. move=> rp /coprimepP cpq'; apply/coprimepP => d dp dr. exact/cpq'/(dvdp_trans dr). Qed.
Lemma
coprimep_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", "coprimep", "coprimepP", "dvdp_trans" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_dvdr p q r : r %| p -> coprimep p q -> coprimep r q.
Proof. by move=> rp; rewrite ![coprimep _ q]coprimep_sym; apply/coprimep_dvdl. Qed.
Lemma
coprimep_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", "coprimep", "coprimep_dvdl", "coprimep_sym" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_modl p q : coprimep (p %% q) q = coprimep p q.
Proof. rewrite !coprimep_def [in RHS]gcdpE. by case: ltnP => // hpq; rewrite modp_small // gcdpE hpq. Qed.
Lemma
coprimep_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...
[ "coprimep", "coprimep_def", "gcdpE", "ltnP", "modp_small" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_modr q p : coprimep q (p %% q) = coprimep q p.
Proof. by rewrite ![coprimep q _]coprimep_sym coprimep_modl. Qed.
Lemma
coprimep_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...
[ "coprimep", "coprimep_modl", "coprimep_sym" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
rcoprimep_coprimep q p : rcoprimep q p = coprimep q p.
Proof. by rewrite /coprimep /rcoprimep (eqp_size (eqp_rgcd_gcd _ _)). Qed.
Lemma
rcoprimep_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...
[ "coprimep", "eqp_rgcd_gcd", "eqp_size", "rcoprimep" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_coprimepr p q r : q %= r -> coprimep p q = coprimep p r.
Proof. by rewrite -!gcdp_eqp1; move/(eqp_gcdr p)/eqp_ltrans. Qed.
Lemma
eqp_coprimepr
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", "eqp_gcdr", "eqp_ltrans", "gcdp_eqp1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_coprimepl p q r : q %= r -> coprimep q p = coprimep r p.
Proof. by rewrite !(coprimep_sym _ p); apply: eqp_coprimepr. Qed.
Lemma
eqp_coprimepl
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", "coprimep", "coprimep_sym", "eqp_coprimepr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
egcdp_rec p q k {struct k} : {poly R} * {poly R}
:= if k is k'.+1 then if q == 0 then (1, 0) else let: (u, v) := egcdp_rec q (p %% q) k' in (lead_coef q ^+ scalp p q *: v, (u - v * (p %/ q))) else (1, 0).
Fixpoint
egcdp_rec
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...
[ "lead_coef", "poly", "scalp" ]
This should be implemented with an extended remainder sequence
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
egcdp p q
:= if size q <= size p then egcdp_rec p q (size q) else let e := egcdp_rec q p (size p) in (e.2, e.1).
Definition
egcdp
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...
[ "egcdp_rec", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
egcdp0 p : egcdp p 0 = (1, 0).
Proof. by rewrite /egcdp size_poly0. Qed.
Lemma
egcdp0
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...
[ "egcdp", "size_poly0" ]
No provable egcd0p
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
egcdp_recP : forall k p q, q != 0 -> size q <= k -> size q <= size p -> let e := (egcdp_rec p q k) in [/\ size e.1 <= size q, size e.2 <= size p & gcdp p q %= e.1 * p + e.2 * q].
Proof. elim=> [|k ihk] p q /= qn0; first by rewrite size_poly_leq0 (negPf qn0). move=> sqSn qsp; rewrite (negPf qn0). have sp : size p > 0 by apply: leq_trans qsp; rewrite size_poly_gt0. have [r0 | rn0] /= := eqVneq (p %%q) 0. rewrite r0 /egcdp_rec; case: k ihk sqSn => [|n] ihn sqSn /=. rewrite !scaler0 !mul0r su...
Lemma
egcdp_recP
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...
[ "add0r", "addKn", "addSn", "addnBA", "addrC", "addrCA", "addrK", "apply", "divp_eq", "dvdp", "dvdp_gcd_idr", "egcdp_rec", "eqVneq", "eqp_ltrans", "eqp_trans", "eqxx", "gcdp", "gcdpC", "gcdpE", "geq_max", "last", "lc_expn_scalp_neq0", "leq_modp", "leq_pred", "leq_trans...
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
egcdpP p q : p != 0 -> q != 0 -> forall (e := egcdp p q), [/\ size e.1 <= size q, size e.2 <= size p & gcdp p q %= e.1 * p + e.2 * q].
Proof. rewrite /egcdp => pn0 qn0; case: (leqP (size q) (size p)) => /= [|/ltnW] hp. exact: egcdp_recP. case: (egcdp_recP pn0 (leqnn (size p)) hp) => h1 h2 h3; split => //. by rewrite (eqp_ltrans (gcdpC _ _)) addrC. Qed.
Lemma
egcdpP
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", "egcdp", "egcdp_recP", "eqp_ltrans", "gcdp", "gcdpC", "leqP", "leqnn", "ltnW", "size", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
egcdpE p q (e := egcdp p q) : gcdp p q %= e.1 * p + e.2 * q.
Proof. rewrite {}/e; have [-> /= | qn0] := eqVneq q 0. by rewrite gcdp0 egcdp0 mul1r mulr0 addr0. have [-> | pn0] := eqVneq p 0; last by case: (egcdpP pn0 qn0). by rewrite gcd0p /egcdp size_poly0 size_poly_leq0 (negPf qn0) /= !simp. Qed.
Lemma
egcdpE
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...
[ "addr0", "egcdp", "egcdp0", "egcdpP", "eqVneq", "gcd0p", "gcdp", "gcdp0", "last", "mul1r", "mulr0", "simp", "size_poly0", "size_poly_leq0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Bezoutp p q : exists u, u.1 * p + u.2 * q %= (gcdp p q).
Proof. have [-> | pn0] := eqVneq p 0. by rewrite gcd0p; exists (0, 1); rewrite mul0r mul1r add0r. have [-> | qn0] := eqVneq q 0. by rewrite gcdp0; exists (1, 0); rewrite mul0r mul1r addr0. pose e := egcdp p q; exists e; rewrite eqp_sym. by case: (egcdpP pn0 qn0). Qed.
Lemma
Bezoutp
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...
[ "add0r", "addr0", "egcdp", "egcdpP", "eqVneq", "eqp_sym", "gcd0p", "gcdp", "gcdp0", "mul0r", "mul1r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Bezout_coprimepP p q : reflect (exists u, u.1 * p + u.2 * q %= 1) (coprimep p q).
Proof. rewrite -gcdp_eqp1; apply: (iffP idP)=> [g1|]. by case: (Bezoutp p q) => [[u v] Puv]; exists (u, v); apply: eqp_trans g1. case=> [[u v]]; rewrite eqp_sym=> Puv; rewrite /eqp (eqp_dvdr _ Puv). by rewrite dvdp_addr dvdp_mull ?dvdp_gcdl ?dvdp_gcdr //= dvd1p. Qed.
Lemma
Bezout_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...
[ "Bezoutp", "apply", "coprimep", "dvd1p", "dvdp_addr", "dvdp_gcdl", "dvdp_gcdr", "dvdp_mull", "eqp", "eqp_dvdr", "eqp_sym", "eqp_trans", "gcdp_eqp1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_root p q x : coprimep p q -> root p x -> q.[x] != 0.
Proof. case/Bezout_coprimepP=> [[u v] euv] px0. move/eqpP: euv => [[c1 c2]] /andP /= [c1n0 c2n0 e]. suffices: c1 * (v.[x] * q.[x]) != 0. by rewrite !mulf_eq0 !negb_or c1n0 /=; case/andP. have := f_equal (horner^~ x) e; rewrite /= !hornerZ hornerD. by rewrite !hornerM (eqP px0) mulr0 add0r hornerC mulr1; move->. Qed.
Lemma
coprimep_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...
[ "Bezout_coprimepP", "add0r", "c1", "c2", "coprimep", "eqpP", "horner", "hornerC", "hornerD", "hornerM", "hornerZ", "mulf_eq0", "mulr0", "mulr1", "root" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Gauss_dvdpl p q d: coprimep d q -> (d %| p * q) = (d %| p).
Proof. move/Bezout_coprimepP=>[[u v] Puv]; apply/idP/idP; last exact: dvdp_mulr. move/(eqp_mull p): Puv; rewrite mulr1 mulrDr eqp_sym=> peq dpq. rewrite (eqp_dvdr _ peq) dvdp_addr; last by rewrite mulrA mulrAC dvdp_mulr. by rewrite mulrA dvdp_mull ?dvdpp. Qed.
Lemma
Gauss_dvdpl
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...
[ "Bezout_coprimepP", "apply", "coprimep", "dvdp_addr", "dvdp_mull", "dvdp_mulr", "dvdpp", "eqp_dvdr", "eqp_mull", "eqp_sym", "last", "mulr1", "mulrA", "mulrAC", "mulrDr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Gauss_dvdpr p q d: coprimep d q -> (d %| q * p) = (d %| p).
Proof. by rewrite mulrC; apply: Gauss_dvdpl. Qed.
Lemma
Gauss_dvdpr
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...
[ "Gauss_dvdpl", "apply", "coprimep", "mulrC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Gauss_dvdp m n p : coprimep m n -> (m * n %| p) = (m %| p) && (n %| p).
Proof. have [-> | mn0] := eqVneq m 0. by rewrite coprime0p => /eqp_dvdl->; rewrite !mul0r dvd0p dvd1p andbT. have [-> | nn0] := eqVneq n 0. by rewrite coprimep0 => /eqp_dvdl->; rewrite !mulr0 dvd1p. move=> hc; apply/idP/idP => [mnmp | /andP [dmp dnp]]. move/Gauss_dvdpl: hc => <-; move: (dvdp_mull m mnmp); rewrite...
Lemma
Gauss_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...
[ "Gauss_dvdpl", "apply", "c2", "c3", "coprime0p", "coprimep", "coprimep0", "dvd0p", "dvd1p", "dvdp_eq", "dvdp_mul2l", "dvdp_mul2r", "dvdp_mull", "dvdp_mulr", "eqVneq", "eq_dvdp", "eqp_dvdl", "expf_neq0", "lead_coef_eq0", "mul0r", "mul_polyC", "mulf_neq0", "mulr0", "mulrA...
This could be simplified with the introduction of lcmp
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Gauss_gcdpr p m n : coprimep p m -> gcdp p (m * n) %= gcdp p n.
Proof. move=> co_pm; apply/eqP; rewrite /eqp !dvdp_gcd !dvdp_gcdl /= andbC. rewrite dvdp_mull ?dvdp_gcdr // -(@Gauss_dvdpl _ m); last first. by rewrite mulrC dvdp_gcdr. apply/coprimepP=> d; rewrite dvdp_gcd; case/andP=> hdp _ hdm. by move/coprimepP: co_pm; apply. Qed.
Lemma
Gauss_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...
[ "Gauss_dvdpl", "apply", "coprimep", "coprimepP", "dvdp_gcd", "dvdp_gcdl", "dvdp_gcdr", "dvdp_mull", "eqp", "gcdp", "last", "mulrC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Gauss_gcdpl p m n : coprimep p n -> gcdp p (m * n) %= gcdp p m.
Proof. by move=> co_pn; rewrite mulrC Gauss_gcdpr. Qed.
Lemma
Gauss_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...
[ "Gauss_gcdpr", "coprimep", "gcdp", "mulrC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimepMr p q r : coprimep p (q * r) = (coprimep p q && coprimep p r).
Proof. apply/coprimepP/andP=> [hp | [/coprimepP-hq hr]]. by split; apply/coprimepP=> d dp dq; rewrite hp //; [apply/dvdp_mulr | apply/dvdp_mull]. move=> d dp dqr; move/(_ _ dp) in hq. rewrite Gauss_dvdpl in dqr; last exact: hq. by move/coprimep_dvdr: hr; apply. Qed.
Lemma
coprimepMr
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...
[ "Gauss_dvdpl", "apply", "coprimep", "coprimepP", "coprimep_dvdr", "dvdp_mull", "dvdp_mulr", "last", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimepMl p q r: coprimep (q * r) p = (coprimep q p && coprimep r p).
Proof. by rewrite ![coprimep _ p]coprimep_sym coprimepMr. Qed.
Lemma
coprimepMl
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", "coprimepMr", "coprimep_sym" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
modp_coprime k u n : k != 0 -> (k * u) %% n %= 1 -> coprimep k n.
Proof. move=> kn0 hmod; apply/Bezout_coprimepP. exists (((lead_coef n)^+(scalp (k * u) n) *: u), (- (k * u %/ n))). by rewrite -scalerAl mulrC (divp_eq (u * k) n) mulNr addrC addKr mulrC. Qed.
Lemma
modp_coprime
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...
[ "Bezout_coprimepP", "addKr", "addrC", "apply", "coprimep", "divp_eq", "lead_coef", "mulNr", "mulrC", "scalerAl", "scalp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_pexpl k m n : 0 < k -> coprimep (m ^+ k) n = coprimep m n.
Proof. case: k => // k _; elim: k => [|k IHk]; first by rewrite expr1. by rewrite exprS coprimepMl -IHk andbb. Qed.
Lemma
coprimep_pexpl
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", "coprimepMl", "expr1", "exprS" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_pexpr k m n : 0 < k -> coprimep m (n ^+ k) = coprimep m n.
Proof. by move=> k_gt0; rewrite !(coprimep_sym m) coprimep_pexpl. Qed.
Lemma
coprimep_pexpr
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_pexpl", "coprimep_sym" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_expl k m n : coprimep m n -> coprimep (m ^+ k) n.
Proof. by case: k => [|k] co_pm; rewrite ?coprime1p // coprimep_pexpl. Qed.
Lemma
coprimep_expl
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...
[ "coprime1p", "coprimep", "coprimep_pexpl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_expr k m n : coprimep m n -> coprimep m (n ^+ k).
Proof. by rewrite !(coprimep_sym m); apply: coprimep_expl. Qed.
Lemma
coprimep_expr
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", "coprimep", "coprimep_expl", "coprimep_sym" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp_mul2l p q r : gcdp (p * q) (p * r) %= (p * gcdp q r).
Proof. have [->|hp] := eqVneq p 0; first by rewrite !mul0r gcdp0 eqpxx. rewrite /eqp !dvdp_gcd !dvdp_mul2l // dvdp_gcdr dvdp_gcdl !andbT. move: (Bezoutp q r) => [[u v]] huv. rewrite eqp_sym in huv; rewrite (eqp_dvdr _ (eqp_mull _ huv)). rewrite mulrDr ![p * (_ * _)]mulrCA. by apply: dvdp_add; rewrite dvdp_mull// (dvdp_...
Lemma
gcdp_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...
[ "Bezoutp", "apply", "dvdp_add", "dvdp_gcd", "dvdp_gcdl", "dvdp_gcdr", "dvdp_mul2l", "dvdp_mull", "eqVneq", "eqp", "eqp_dvdr", "eqp_mull", "eqp_sym", "eqpxx", "gcdp", "gcdp0", "mul0r", "mulrCA", "mulrDr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp_mul2r q r p : gcdp (q * p) (r * p) %= gcdp q r * p.
Proof. by rewrite ![_ * p]mulrC gcdp_mul2l. Qed.
Lemma
gcdp_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...
[ "gcdp", "gcdp_mul2l", "mulrC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulp_gcdr p q r : r * (gcdp p q) %= gcdp (r * p) (r * q).
Proof. by rewrite eqp_sym gcdp_mul2l. Qed.
Lemma
mulp_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...
[ "eqp_sym", "gcdp", "gcdp_mul2l" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulp_gcdl p q r : (gcdp p q) * r %= gcdp (p * r) (q * r).
Proof. by rewrite eqp_sym gcdp_mul2r. Qed.
Lemma
mulp_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...
[ "eqp_sym", "gcdp", "gcdp_mul2r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_div_gcd p q : (p != 0) || (q != 0) -> coprimep (p %/ (gcdp p q)) (q %/ gcdp p q).
Proof. rewrite -negb_and -gcdp_eq0 -gcdp_eqp1 => gpq0. rewrite -(@eqp_mul2r (gcdp p q)) // mul1r (eqp_ltrans (mulp_gcdl _ _ _)). have: gcdp p q %| p by rewrite dvdp_gcdl. have: gcdp p q %| q by rewrite dvdp_gcdr. rewrite !dvdp_eq => /eqP <- /eqP <-. have lcn0 k : (lead_coef (gcdp p q)) ^+ k != 0. by rewrite expf_neq0...
Lemma
coprimep_div_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", "coprimep", "dvdp_eq", "dvdp_gcdl", "dvdp_gcdr", "eqp_gcd", "eqp_ltrans", "eqp_mul2r", "eqp_scale", "expf_neq0", "gcdp", "gcdp_eq0", "gcdp_eqp1", "lcn0", "lead_coef", "lead_coef_eq0", "mul1r", "mulp_gcdl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divp_eq0 p q : (p %/ q == 0) = [|| p == 0, q ==0 | size p < size q].
Proof. apply/eqP/idP=> [d0|]; last first. case/or3P; [by move/eqP->; rewrite div0p| by move/eqP->; rewrite divp0|]. by move/divp_small. case: eqVneq => // _; case: eqVneq => // qn0. move: (divp_eq p q); rewrite d0 mul0r add0r. move/(f_equal (fun x : {poly R} => size x)). by rewrite size_scale ?lc_expn_scalp_neq0 //...
Lemma
divp_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...
[ "add0r", "apply", "div0p", "divp0", "divp_eq", "divp_small", "eqVneq", "last", "lc_expn_scalp_neq0", "ltn_modp", "mul0r", "poly", "size", "size_scale" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_div_eq0 p q : q %| p -> (p %/ q == 0) = (p == 0).
Proof. move=> dvdp_qp; have [->|p_neq0] := eqVneq p 0; first by rewrite div0p eqxx. rewrite divp_eq0 ltnNge dvdp_leq // (negPf p_neq0) orbF /=. by apply: contraTF dvdp_qp=> /eqP ->; rewrite dvd0p. Qed.
Lemma
dvdp_div_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", "div0p", "divp_eq0", "dvd0p", "dvdp_leq", "eqVneq", "eqxx", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Bezout_coprimepPn p q : p != 0 -> q != 0 -> reflect (exists2 uv : {poly R} * {poly R}, (0 < size uv.1 < size q) && (0 < size uv.2 < size p) & uv.1 * p = uv.2 * q) (~~ (coprimep p q)).
Proof. move=> pn0 qn0; apply: (iffP idP); last first. case=> [[u v] /= /andP [/andP [ps1 s1] /andP [ps2 s2]] e]. have: ~~(size (q * p) <= size (u * p)). rewrite -ltnNge !size_mul // -?size_poly_gt0 // (polySpred pn0) !addnS. by rewrite ltn_add2r. apply: contra => ?; apply: dvdp_leq; rewrite ?mulf_neq0 // ...
Lemma
Bezout_coprimepPn
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...
[ "Gauss_dvdp", "addn1", "addnS", "apply", "c1", "c2", "coprimep", "coprimep_def", "divp_eq0", "dvdp_eq", "dvdp_gcdl", "dvdp_gcdr", "dvdp_leq", "dvdp_mull", "gcdp", "gcdp_eq0", "last", "lc_expn_scalp_neq0", "leqNgt", "leq_add2l", "leq_gcdpl", "leq_gcdpr", "ltnNge", "ltnS"...
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_pexp2r m n k : k > 0 -> (m ^+ k %| n ^+ k) = (m %| n).
Proof. move=> k_gt0; apply/idP/idP; last exact: dvdp_exp2r. have [-> // | nn0] := eqVneq n 0; have [-> | mn0] := eqVneq m 0. move/prednK: k_gt0=> {1}<-; rewrite exprS mul0r //= !dvd0p expf_eq0. by case/andP=> _ ->. set d := gcdp m n; have := dvdp_gcdr m n; rewrite -/d dvdp_eq. set c1 := _ ^+ _; set n' := _ %/ _; mo...
Lemma
dvdp_pexp2r
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", "coprimep", "coprimepP", "coprimep_div_gcd", "coprimep_pexpl", "coprimep_pexpr", "def_n", "dvd0p", "dvdpZl", "dvdpZr", "dvdp_eq", "dvdp_exp2r", "dvdp_gcdl", "dvdp_gcdr", "dvdp_mul2r", "dvdp_mull", "dvdpp", "eqSS", "eqVneq", "eqn0Ngt", "expf_eq0", "e...
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
root_gcd p q x : root (gcdp p q) x = root p x && root q x.
Proof. rewrite /= !root_factor_theorem; apply/idP/andP=> [dg| [dp dq]]. by split; apply: dvdp_trans dg _; rewrite ?(dvdp_gcdl, dvdp_gcdr). have:= Bezoutp p q => [[[u v]]]; rewrite eqp_sym=> e. by rewrite (eqp_dvdr _ e) dvdp_addl dvdp_mull. Qed.
Lemma
root_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...
[ "Bezoutp", "apply", "dvdp_addl", "dvdp_gcdl", "dvdp_gcdr", "dvdp_mull", "dvdp_trans", "eqp_dvdr", "eqp_sym", "gcdp", "root", "root_factor_theorem", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
root_biggcd x (ps : seq {poly R}) : root (\big[gcdp/0]_(p <- ps) p) x = all (fun p => root p x) ps.
Proof. elim: ps => [|p ps ihp]; first by rewrite big_nil root0. by rewrite big_cons /= root_gcd ihp. Qed.
Lemma
root_biggcd
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", "gcdp", "poly", "root", "root0", "root_gcd", "seq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gdcop_rec q p k
:= if k is m.+1 then if coprimep p q then p else gdcop_rec q (divp p (gcdp p q)) m else (q == 0)%:R.
Fixpoint
gdcop_rec
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", "divp", "gcdp" ]
if P null, we pose that gdcop returns 1 if Q null, 0 otherwise
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gdcop q p
:= gdcop_rec q p (size p).
Definition
gdcop
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...
[ "gdcop_rec", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gdcop_spec q p : {poly R} -> Type
:= GdcopSpec r of (dvdp r p) & ((coprimep r q) || (p == 0)) & (forall d, dvdp d p -> coprimep d q -> dvdp d r) : gdcop_spec q p r.
Variant
gdcop_spec
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", "dvdp", "poly" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gdcop0 q : gdcop q 0 = (q == 0)%:R.
Proof. by rewrite /gdcop size_poly0. Qed.
Lemma
gdcop0
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...
[ "gdcop", "size_poly0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gdcop_recP q p k : size p <= k -> gdcop_spec q p (gdcop_rec q p k).
Proof. elim: k p => [p | k ihk p] /=. move/size_poly_leq0P->. have [->|q0] := eqVneq; split; rewrite ?coprime1p // ?eqxx ?orbT //. by move=> d _; rewrite coprimep0 dvdp1 size_poly_eq1. move=> hs; case cop : (coprimep _ _); first by split; rewrite ?dvdpp ?cop. have [-> | p0] := eqVneq p 0. by rewrite div0p; appl...
Lemma
gdcop_recP
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...
[ "Gauss_dvdpl", "add1n", "apply", "contraNneq", "coprime1p", "coprimep", "coprimep0", "coprimepPn", "coprimep_dvdl", "div0p", "divp_dvd", "divpp", "dvd0p", "dvd1p", "dvdUp", "dvdp1", "dvdpN0", "dvdp_eq", "dvdp_gcd", "dvdp_gcdl", "dvdp_gcdr", "dvdp_leq", "dvdp_mulIl", "dv...
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gdcopP q p : gdcop_spec q p (gdcop q p).
Proof. by rewrite /gdcop; apply: gdcop_recP. Qed.
Lemma
gdcopP
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", "gdcop", "gdcop_recP", "gdcop_spec" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_gdco p q : (q != 0)%B -> coprimep (gdcop p q) p.
Proof. by move=> q_neq0; case: gdcopP=> d; rewrite (negPf q_neq0) orbF. Qed.
Lemma
coprimep_gdco
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", "gdcop", "gdcopP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
size2_dvdp_gdco p q d : p != 0 -> size d = 2 -> (d %| (gdcop q p)) = (d %| p) && ~~(d %| q).
Proof. have [-> | dn0] := eqVneq d 0; first by rewrite size_poly0. move=> p0 sd; apply/idP/idP. case: gdcopP=> r rp crq maxr dr; move/negPf: (p0)=> p0f. rewrite (dvdp_trans dr) //=. apply: contraL crq => dq; rewrite p0f orbF; apply/coprimepPn. by apply: contraNneq p0 => r0; move: rp; rewrite r0 dvd0p. by ex...
Lemma
size2_dvdp_gdco
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", "contraNneq", "coprimepP", "coprimepPn", "dvd0p", "dvdp_gcd", "dvdp_leq", "dvdp_size_eqp", "dvdp_trans", "eqVneq", "eqp_dvdl", "gdcop", "gdcopP", "last", "leq_eqVlt", "ltnS", "maxr", "p0", "predU1P", "size", "size_poly0", "size_poly_eq1", "size_poly_leq0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_gdco p q : (gdcop p q) %| q.
Proof. by case: gdcopP. Qed.
Lemma
dvdp_gdco
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...
[ "gdcop", "gdcopP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
root_gdco p q x : p != 0 -> root (gdcop q p) x = root p x && ~~(root q x).
Proof. move=> p0 /=; rewrite !root_factor_theorem. apply: size2_dvdp_gdco; rewrite ?p0 //. by rewrite size_polyDl size_polyX // size_polyN size_polyC ltnS; case: (x != 0). Qed.
Lemma
root_gdco
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", "gdcop", "ltnS", "p0", "root", "root_factor_theorem", "size2_dvdp_gdco", "size_polyC", "size_polyDl", "size_polyN", "size_polyX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_comp_poly r p q : (p %| q) -> (p \Po r) %| (q \Po r).
Proof. have [-> | pn0] := eqVneq p 0. by rewrite comp_poly0 !dvd0p; move/eqP->; rewrite comp_poly0. rewrite dvdp_eq; set c := _ ^+ _; set s := _ %/ _; move/eqP=> Hq. apply: (@eq_dvdp c (s \Po r)); first by rewrite expf_neq0 // lead_coef_eq0. by rewrite -comp_polyZ Hq comp_polyM. Qed.
Lemma
dvdp_comp_poly
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", "comp_poly0", "comp_polyM", "comp_polyZ", "dvd0p", "dvdp_eq", "eqVneq", "eq_dvdp", "expf_neq0", "lead_coef_eq0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdp_comp_poly r p q : gcdp p q \Po r %= gcdp (p \Po r) (q \Po r).
Proof. apply/andP; split. by rewrite dvdp_gcd !dvdp_comp_poly ?dvdp_gcdl ?dvdp_gcdr. case: (Bezoutp p q) => [[u v]] /andP []. move/(dvdp_comp_poly r) => Huv _. rewrite (dvdp_trans _ Huv) // comp_polyD !comp_polyM. by rewrite dvdp_add // dvdp_mull //; [ exact: dvdp_gcdl | exact: dvdp_gcdr]. Qed.
Lemma
gcdp_comp_poly
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...
[ "Bezoutp", "apply", "comp_polyD", "comp_polyM", "dvdp_add", "dvdp_comp_poly", "dvdp_gcd", "dvdp_gcdl", "dvdp_gcdr", "dvdp_mull", "dvdp_trans", "gcdp", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_comp_poly r p q : coprimep p q -> coprimep (p \Po r) (q \Po r).
Proof. rewrite -!gcdp_eqp1 -!size_poly_eq1 -!dvdp1; move/(dvdp_comp_poly r). rewrite comp_polyC => Hgcd. by apply: dvdp_trans Hgcd; case/andP: (gcdp_comp_poly r p q). Qed.
Lemma
coprimep_comp_poly
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", "comp_polyC", "coprimep", "dvdp1", "dvdp_comp_poly", "dvdp_trans", "gcdp_comp_poly", "gcdp_eqp1", "size_poly_eq1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_addl_mul p q r : coprimep r (p * r + q) = coprimep r q.
Proof. by rewrite !coprimep_def (eqp_size (gcdp_addl_mul _ _ _)). Qed.
Lemma
coprimep_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...
[ "coprimep", "coprimep_def", "eqp_size", "gcdp_addl_mul" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
irreducible_poly p
:= (size p > 1) * (forall q, size q != 1 -> q %| p -> q %= p) : Prop.
Definition
irreducible_poly
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" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
irredp_neq0 p : irreducible_poly p -> p != 0.
Proof. by rewrite -size_poly_gt0 => [[/ltnW]]. Qed.
Lemma
irredp_neq0
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...
[ "irreducible_poly", "ltnW", "size_poly_gt0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
apply_irredp p (irr_p : irreducible_poly p)
:= irr_p.2.
Definition
apply_irredp
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...
[ "irr_p", "irreducible_poly" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
apply_irredp : irreducible_poly >-> Funclass.
Coercion
apply_irredp
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...
[ "irreducible_poly" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
modp_XsubC p c : p %% ('X - c%:P) = p.[c]%:P.
Proof. have/factor_theorem [q /(canRL (subrK _)) Dp]: root (p - p.[c]%:P) c. by rewrite /root !hornerE subrr. rewrite modpE /= lead_coefXsubC unitr1 expr1n invr1 scale1r [in LHS]Dp. rewrite RingMonic.rmodp_addl_mul_small // ?monicXsubC// size_XsubC size_polyC. by case: (p.[c] == 0). Qed.
Lemma
modp_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...
[ "expr1n", "factor_theorem", "hornerE", "invr1", "lead_coefXsubC", "modpE", "monicXsubC", "rmodp_addl_mul_small", "root", "scale1r", "size_XsubC", "size_polyC", "subrK", "subrr", "unitr1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_XsubC p c : coprimep p ('X - c%:P) = ~~ root p c.
Proof. rewrite -coprimep_modl modp_XsubC /root -alg_polyC. have [-> | /coprimepZl->] := eqVneq; last exact: coprime1p. by rewrite scale0r /coprimep gcd0p size_XsubC. Qed.
Lemma
coprimep_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...
[ "alg_polyC", "coprime1p", "coprimep", "coprimepZl", "coprimep_modl", "eqVneq", "gcd0p", "last", "modp_XsubC", "root", "scale0r", "size_XsubC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimep_XsubC2 (a b : R) : b - a != 0 -> coprimep ('X - a%:P) ('X - b%:P).
Proof. by move=> bBa_neq0; rewrite coprimep_XsubC rootE hornerXsubC. Qed.
Lemma
coprimep_XsubC2
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_XsubC", "hornerXsubC", "rootE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimepX p : coprimep p 'X = ~~ root p 0.
Proof. by rewrite -['X]subr0 coprimep_XsubC. Qed.
Lemma
coprimepX
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_XsubC", "root", "subr0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_monic : {in monic &, forall p q, (p %= q) = (p == q)}.
Proof. move=> p q monic_p monic_q; apply/idP/eqP=> [|-> //]. case/eqpP=> [[a b] /= /andP[a_neq0 _] eq_pq]. apply: (@mulfI _ a%:P); first by rewrite polyC_eq0. rewrite !mul_polyC eq_pq; congr (_ *: q); apply: (mulIf (oner_neq0 _)). by rewrite -[in LHS](monicP monic_q) -(monicP monic_p) -!lead_coefZ eq_pq. Qed.
Lemma
eqp_monic
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", "eqpP", "lead_coefZ", "monic", "monicP", "mulIf", "mul_polyC", "mulfI", "oner_neq0", "polyC_eq0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_mul_XsubC p q c : (p %| ('X - c%:P) * q) = ((if root p c then p %/ ('X - c%:P) else p) %| q).
Proof. case: ifPn => [| not_pc0]; last by rewrite Gauss_dvdpr ?coprimep_XsubC. rewrite root_factor_theorem -eqp_div_XsubC mulrC => /eqP{1}->. by rewrite dvdp_mul2l ?polyXsubC_eq0. Qed.
Lemma
dvdp_mul_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...
[ "Gauss_dvdpr", "coprimep_XsubC", "dvdp_mul2l", "eqp_div_XsubC", "last", "mulrC", "polyXsubC_eq0", "root", "root_factor_theorem" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_prod_XsubC (I : Type) (r : seq I) (F : I -> R) p : p %| \prod_(i <- r) ('X - (F i)%:P) -> {m | p %= \prod_(i <- mask m r) ('X - (F i)%:P)}.
Proof. elim: r => [|i r IHr] in p *. by rewrite big_nil dvdp1; exists nil; rewrite // big_nil -size_poly_eq1. rewrite big_cons dvdp_mul_XsubC root_factor_theorem -eqp_div_XsubC. case: eqP => [{2}-> | _] /IHr[m Dp]; last by exists (false :: m). by exists (true :: m); rewrite /= mulrC big_cons eqp_mul2l ?polyXsubC_eq0....
Lemma
dvdp_prod_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...
[ "big_cons", "big_nil", "dvdp1", "dvdp_mul_XsubC", "eqp_div_XsubC", "eqp_mul2l", "last", "mask", "mulrC", "polyXsubC_eq0", "root_factor_theorem", "seq", "size_poly_eq1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
irredp_XsubC (x : R) : irreducible_poly ('X - x%:P).
Proof. split=> [|d size_d d_dv_Xx]; first by rewrite size_XsubC. have: ~ d %= 1 by apply/negP; rewrite -size_poly_eq1. have [|m /=] := @dvdp_prod_XsubC _ [:: x] id d; first by rewrite big_seq1. by case: m => [|[] [|_ _] /=]; rewrite (big_nil, big_seq1). Qed.
Lemma
irredp_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...
[ "apply", "big_nil", "big_seq1", "dvdp_prod_XsubC", "id", "irreducible_poly", "size_XsubC", "size_poly_eq1", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
irredp_XaddC (x : R) : irreducible_poly ('X + x%:P).
Proof. by rewrite -[x]opprK rmorphN; apply: irredp_XsubC. Qed.
Lemma
irredp_XaddC
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", "irredp_XsubC", "irreducible_poly", "opprK", "rmorphN" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
irredp_XsubCP d p : irreducible_poly p -> d %| p -> {d %= 1} + {d %= p}.
Proof. move=> irred_p dvd_dp; have [] := boolP (_ %= 1); first by left. by rewrite -size_poly_eq1=> /irred_p /(_ dvd_dp); right. Qed.
Lemma
irredp_XsubCP
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...
[ "irreducible_poly", "size_poly_eq1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_exp_XsubCP (p : {poly R}) (c : R) (n : nat) : reflect (exists2 k, (k <= n)%N & p %= ('X - c%:P) ^+ k) (p %| ('X - c%:P) ^+ n).
Proof. apply: (iffP idP) => [|[k lkn /eqp_dvdl->]]; last by rewrite dvdp_exp2l. move=> /Pdiv.WeakIdomain.dvdpP[[/= a q] a_neq0]. have [m [r]] := multiplicity_XsubC p c; have [->|pN0]/= := eqVneq p 0. rewrite mulr0 => _ _ /eqP; rewrite scale_poly_eq0 (negPf a_neq0)/=. by rewrite expf_eq0/= andbC polyXsubC_eq0. move...
Lemma
dvdp_exp_XsubCP
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", "coprimepP", "coprimep_XsubC", "coprimep_expr", "dvdpP", "dvdp_Pexp2l", "dvdp_exp2l", "dvdp_mull", "dvdpp", "eqVneq", "eqp_dvdl", "eqp_dvdr", "eqp_mulr", "eqp_scale", "eqp_trans", "eqpxx", "expf_eq0", "last", "mul1r", "mulr0", "mulrA", "mulrAC", "multiplicity_Xsu...
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
monq : q \is monic.
Hypothesis
monq
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...
[ "monic" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divpE p : p %/ q = rdivp p q.
Proof. by rewrite divpE (eqP monq) unitr1 expr1n invr1 scale1r. Qed.
Lemma
divpE
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...
[ "expr1n", "invr1", "monq", "rdivp", "scale1r", "unitr1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
modpE p : p %% q = rmodp p q.
Proof. by rewrite modpE (eqP monq) unitr1 expr1n invr1 scale1r. Qed.
Lemma
modpE
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...
[ "expr1n", "invr1", "monq", "rmodp", "scale1r", "unitr1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
scalpE p : scalp p q = 0.
Proof. by rewrite scalpE (eqP monq) unitr1. Qed.
Lemma
scalpE
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...
[ "monq", "scalp", "unitr1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divp_eq p : p = (p %/ q) * q + (p %% q).
Proof. by rewrite -divp_eq (eqP monq) expr1n scale1r. Qed.
Lemma
divp_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...
[ "expr1n", "monq", "scale1r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divpp p : q %/ q = 1.
Proof. by rewrite divpp ?monic_neq0 // (eqP monq) expr1n. Qed.
Lemma
divpp
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...
[ "expr1n", "monic_neq0", "monq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_eq p : (q %| p) = (p == (p %/ q) * q).
Proof. by rewrite dvdp_eq (eqP monq) expr1n scale1r. Qed.
Lemma
dvdp_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...
[ "expr1n", "monq", "scale1r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdpP p : reflect (exists qq, p = qq * q) (q %| p).
Proof. apply: (iffP idP); first by rewrite dvdp_eq; move/eqP=> e; exists (p %/ q). by case=> qq ->; rewrite dvdp_mull // dvdpp. Qed.
Lemma
dvdpP
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_eq", "dvdp_mull", "dvdpp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulpK p : p * q %/ q = p.
Proof. by rewrite mulpK ?monic_neq0 // (eqP monq) expr1n scale1r. Qed.
Lemma
mulpK
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...
[ "expr1n", "monic_neq0", "monq", "scale1r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulKp p : q * p %/ q = p.
Proof. by rewrite mulrC mulpK. Qed.
Lemma
mulKp
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...
[ "mulpK", "mulrC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
drop_poly_divp n p : drop_poly n p = p %/ 'X^n.
Proof. by rewrite RingMonic.drop_poly_rdivp divpE // monicXn. Qed.
Lemma
drop_poly_divp
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...
[ "divpE", "drop_poly", "drop_poly_rdivp", "monicXn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
take_poly_modp n p : take_poly n p = p %% 'X^n.
Proof. by rewrite RingMonic.take_poly_rmodp modpE // monicXn. Qed.
Lemma
take_poly_modp
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...
[ "modpE", "monicXn", "take_poly", "take_poly_rmodp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ulcd : lead_coef d \in GRing.unit.
Hypothesis
ulcd
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...
[ "lead_coef", "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divp_eq p : p = (p %/ d) * d + (p %% d).
Proof. by have := divp_eq p d; rewrite scalpE ulcd expr0 scale1r. Qed.
Lemma
divp_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...
[ "expr0", "scale1r", "scalpE", "ulcd" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
edivpP p q r : p = q * d + r -> size r < size d -> q = (p %/ d) /\ r = p %% d.
Proof. move=> ep srd; have := divp_eq p; rewrite [LHS]ep. move/eqP; rewrite -subr_eq -addrA addrC eq_sym -subr_eq -mulrBl; move/eqP. have lcdn0 : lead_coef d != 0 by apply: contraTneq ulcd => ->; rewrite unitr0. have [-> /esym /eqP|abs] := eqVneq (p %/ d) q. by rewrite subrr mul0r subr_eq0 => /eqP<-. have hleq : size...
Lemma
edivpP
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...
[ "addSn", "addrA", "addrC", "apply", "contraTneq", "divp_eq", "eqVneq", "eq_sym", "gtn_max", "lead_coef", "lead_coef_eq0", "leq_addl", "leq_ltn_trans", "leq_trans", "ltn_modp", "ltnn", "mul0r", "mulf_eq0", "mulrBl", "polySpred", "size", "size_polyD", "size_polyN", "size_...
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divpP p q r : p = q * d + r -> size r < size d -> q = (p %/ d).
Proof. by move/edivpP=> h; case/h. Qed.
Lemma
divpP
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...
[ "edivpP", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
modpP p q r : p = q * d + r -> size r < size d -> r = (p %% d).
Proof. by move/edivpP=> h; case/h. Qed.
Lemma
modpP
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...
[ "edivpP", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ulc_eqpP p q : lead_coef q \is a GRing.unit -> reflect (exists2 c : R, c != 0 & p = c *: q) (p %= q).
Proof. have [->|] := eqVneq (lead_coef q) 0; first by rewrite unitr0. rewrite lead_coef_eq0 => nz_q ulcq; apply: (iffP idP). have [->|nz_p] := eqVneq p 0; first by rewrite eqp_sym eqp0 (negPf nz_q). move/eqp_eq=> eq; exists (lead_coef p / lead_coef q). by rewrite mulf_neq0 // ?invr_eq0 lead_coef_eq0. by apply...
Lemma
ulc_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", "divrr", "eqVneq", "eqp0", "eqpP", "eqp_eq", "eqp_sym", "invr_eq0", "lead_coef", "lead_coef_eq0", "mulf_neq0", "mulr1", "mulrCA", "nz_p", "oner_eq0", "scale1r", "scalerA", "scaler_injl", "unit", "unitr0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdp_eq p : (d %| p) = (p == p %/ d * d).
Proof. apply/eqP/eqP=> [modp0 | ->]; last exact: modp_mull. by rewrite [p in LHS]divp_eq modp0 addr0. Qed.
Lemma
dvdp_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...
[ "addr0", "apply", "divp_eq", "last", "modp0", "modp_mull" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ucl_eqp_eq p q : lead_coef q \is a GRing.unit -> p %= q -> p = (lead_coef p / lead_coef q) *: q.
Proof. move=> ulcq /eqp_eq; move/(congr1 ( *:%R (lead_coef q)^-1 )). by rewrite !scalerA mulrC divrr // scale1r mulrC. Qed.
Lemma
ucl_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...
[ "divrr", "eqp_eq", "lead_coef", "mulrC", "scale1r", "scalerA", "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
modpZl c p : (c *: p) %% d = c *: (p %% d).
Proof. have [-> | cn0] := eqVneq c 0; first by rewrite !scale0r mod0p. have e : (c *: p) = (c *: (p %/ d)) * d + c *: (p %% d). by rewrite -scalerAl -scalerDr -divp_eq. suff s: size (c *: (p %% d)) < size d by case: (edivpP e s) => _ ->. rewrite -mul_polyC; apply: leq_ltn_trans (size_polyMleq _ _) _. rewrite size_pol...
Lemma
modpZl
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", "contraTneq", "divp_eq", "edivpP", "eqVneq", "lead_coef_eq0", "leq_ltn_trans", "ltn_modp", "mod0p", "mul_polyC", "scale0r", "scalerAl", "scalerDr", "size", "size_polyC", "size_polyMleq", "ulcd", "unitr0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divpZl c p : (c *: p) %/ d = c *: (p %/ d).
Proof. have [-> | cn0] := eqVneq c 0; first by rewrite !scale0r div0p. have e : (c *: p) = (c *: (p %/ d)) * d + c *: (p %% d). by rewrite -scalerAl -scalerDr -divp_eq. suff s: size (c *: (p %% d)) < size d by case: (edivpP e s) => ->. rewrite -mul_polyC; apply: leq_ltn_trans (size_polyMleq _ _) _. rewrite size_polyC...
Lemma
divpZl
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", "contraTneq", "div0p", "divp_eq", "edivpP", "eqVneq", "lead_coef_eq0", "leq_ltn_trans", "ltn_modp", "mul_polyC", "scale0r", "scalerAl", "scalerDr", "size", "size_polyC", "size_polyMleq", "ulcd", "unitr0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_modpl p q : p %= q -> (p %% d) %= (q %% d).
Proof. case/eqpP=> [[c1 c2]] /andP /= [c1n0 c2n0 e]. by apply/eqpP; exists (c1, c2); rewrite ?c1n0 //= -!modpZl e. Qed.
Lemma
eqp_modpl
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", "eqpP", "modpZl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqp_divl p q : p %= q -> (p %/ d) %= (q %/ d).
Proof. case/eqpP=> [[c1 c2]] /andP /= [c1n0 c2n0 e]. by apply/eqpP; exists (c1, c2); rewrite ?c1n0 // -!divpZl e. Qed.
Lemma
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", "c1", "c2", "divpZl", "eqpP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d