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 |
|---|---|---|---|---|---|---|---|---|---|---|
a | := p`_2. | Let | a | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
b | := p`_1. | Let | b | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
c | := p`_0. | Let | c | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
pneq0 : p != 0. | Proof. by rewrite -size_poly_gt0 degp. Qed. | Let | pneq0 | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"degp",
"size_poly_gt0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
aneq0 : a != 0. | Proof. by move: pneq0; rewrite -lead_coef_eq0 lead_coefE degp. Qed. | Let | aneq0 | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"degp",
"lead_coefE",
"lead_coef_eq0",
"pneq0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
a2neq0 : 2 * a != 0. | Proof. by rewrite mulf_neq0. Qed. | Let | a2neq0 | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"mulf_neq0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
sqa2neq0 : (2 * a) ^+ 2 != 0. | Proof. exact: expf_neq0. Qed. | Let | sqa2neq0 | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"expf_neq0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
aa4 : 4 * a * a = (2 * a)^+2. | Proof. by rewrite expr2 mulrACA mulrA -natrM. Qed. | Let | aa4 | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"expr2",
"mulrA",
"mulrACA",
"natrM"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
splitr (x : F) : x = x / 2 + x / 2. | Proof. by rewrite -mulr2n -[RHS]mulr_natr divfK. Qed. | Let | splitr | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"divfK",
"mulr2n",
"mulr_natr"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
pE : p = a *: 'X^2 + b *: 'X + c%:P. | Proof.
apply/polyP => + /[!coefE] => -[|[|[|i]]] /=; rewrite !Monoid.simpm//.
by rewrite nth_default// degp.
Qed. | Let | pE | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"apply",
"coefE",
"degp",
"nth_default",
"polyP",
"simpm"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
delta | := b ^+ 2 - 4 * a * c. | Let | delta | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
deg2_poly_canonical :
p = a *: (('X + (b / (2 * a))%:P)^+2 - (delta / (4 * a ^+ 2))%:P). | Proof.
rewrite pE sqrrD -!addrA scalerDr; congr +%R; rewrite addrA scalerDr; congr +%R.
- rewrite -mulrDr -polyCD -!mul_polyC mulrA mulrAC -polyCM.
by rewrite [a * _]mulrC mulrDl invfM -!mulrA mulVf// mulr1 -splitr.
- rewrite [a ^+ 2]expr2 mulrA aa4 -polyC_exp -polyCB expr_div_n -mulrBl subKr.
by rewrite scale_poly... | Lemma | deg2_poly_canonical | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"aa4",
"addrA",
"delta",
"expr2",
"expr_div_n",
"invfM",
"mulVf",
"mul_polyC",
"mulfV",
"mulr1",
"mulrA",
"mulrAC",
"mulrACA",
"mulrBl",
"mulrC",
"mulrCA",
"mulrDl",
"mulrDr",
"pE",
"polyCB",
"polyCD",
"polyCM",
"polyC_exp",
"scale_polyC",
"scalerDr",
"splitr",
"s... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
r_sqrt_delta : r ^+ 2 = delta. | Hypothesis | r_sqrt_delta | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"delta"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | ||
r1 | := (- b - r) / (2 * a). | Let | r1 | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
r2 | := (- b + r) / (2 * a). | Let | r2 | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
deg2_poly_factor : p = a *: ('X - r1%:P) * ('X - r2%:P). | Proof.
rewrite [p]deg2_poly_canonical//= -/a -/b -/c -/delta /r1 /r2.
rewrite ![(- b + _) * _]mulrDl 2!polyCD 2!opprD 2!addrA !mulNr !polyCN !opprK.
rewrite -scalerAl [in RHS]mulrC -subr_sqr -polyC_exp -[4]/(2 * 2)%:R natrM.
by rewrite -expr2 -exprMn [in RHS]exprMn exprVn r_sqrt_delta.
Qed. | Lemma | deg2_poly_factor | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"addrA",
"deg2_poly_canonical",
"delta",
"expr2",
"exprMn",
"exprVn",
"mulNr",
"mulrC",
"mulrDl",
"natrM",
"opprD",
"opprK",
"polyCD",
"polyCN",
"polyC_exp",
"r1",
"r2",
"r_sqrt_delta",
"scalerAl",
"subr_sqr"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
deg2_poly_root1 : root p r1. | Proof.
apply/factor_theorem.
by exists (a *: ('X - r2%:P)); rewrite deg2_poly_factor -!scalerAl mulrC.
Qed. | Lemma | deg2_poly_root1 | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"apply",
"deg2_poly_factor",
"factor_theorem",
"mulrC",
"r1",
"r2",
"root",
"scalerAl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
deg2_poly_root2 : root p r2. | Proof.
apply/factor_theorem.
by exists (a *: ('X - r1%:P)); rewrite deg2_poly_factor -!scalerAl.
Qed. | Lemma | deg2_poly_root2 | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"apply",
"deg2_poly_factor",
"factor_theorem",
"r1",
"r2",
"root",
"scalerAl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
monicp : p \is monic. | Hypothesis | monicp | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"monic"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | ||
a1 : a = 1. | Proof. by move: (monicP monicp); rewrite lead_coefE degp. Qed. | Let | a1 | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"degp",
"lead_coefE",
"monicP",
"monicp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
delta | := b ^+ 2 - 4 * c. | Let | delta | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
deg2_poly_canonical : p = (('X + (b / 2)%:P)^+2 - (delta / 4)%:P). | Proof. by rewrite [p]deg2_poly_canonical// -/a a1 scale1r expr1n !mulr1. Qed. | Lemma | deg2_poly_canonical | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"a1",
"delta",
"expr1n",
"mulr1",
"scale1r"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
r1 | := (- b - r) / 2. | Let | r1 | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
r2 | := (- b + r) / 2. | Let | r2 | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
deg2_poly_factor : p = ('X - r1%:P) * ('X - r2%:P). | Proof.
by rewrite [p](@deg2_poly_factor _ _ _ _ r)// -/a a1 !mulr1 ?scale1r.
Qed. | Lemma | deg2_poly_factor | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"a1",
"mulr1",
"r1",
"r2",
"scale1r"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
deg2_poly_root1 : root p r1. | Proof.
rewrite /r1 -[2]mulr1 -[X in 2 * X]a1.
by apply: deg2_poly_root1; rewrite // -/a a1 mulr1.
Qed. | Lemma | deg2_poly_root1 | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"a1",
"apply",
"mulr1",
"r1",
"root"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
deg2_poly_root2 : root p r2. | Proof.
rewrite /r2 -[2]mulr1 -[X in 2 * X]a1.
by apply: deg2_poly_root2; rewrite // -/a a1 mulr1.
Qed. | Lemma | deg2_poly_root2 | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"a1",
"apply",
"mulr1",
"r2",
"root"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
dec_factor_theorem (p : {poly F}) :
{s : seq F & {q : {poly F} | p = q * \prod_(x <- s) ('X - x%:P)
/\ (q != 0 -> forall x, ~~ root q x)}}. | Proof.
pose polyT (p : seq F) := (foldr (fun c f => f * 'X_0 + c%:T) (0%R)%:T p)%T.
have eval_polyT (q : {poly F}) x : GRing.eval [:: x] (polyT q) = q.[x].
by rewrite /horner; elim: (val q) => //= ? ? ->.
have [n] := ubnP (size p); elim: n => // n IHn in p *.
have /decPcases /= := @satP F [::] ('exists 'X_0, polyT p ... | Lemma | dec_factor_theorem | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"addn2",
"apply",
"big_cat",
"big_nil",
"big_seq1",
"cats1",
"eqVneq",
"eqxx",
"eval",
"factor_theorem",
"foldr",
"horner",
"last",
"monicXsubC",
"mul0r",
"mulr1",
"mulrA",
"poly",
"rcons",
"root",
"rootP",
"satP",
"seq",
"sig_eqW",
"size",
"size_Mmonic",
"size_Xs... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
closedF : GRing.closed_field_axiom F. | Hypothesis | closedF | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"closed_field_axiom"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | ||
closed_rootP p : reflect (exists x, root p x) (size p != 1). | Proof.
have [-> | nz_p] := eqVneq p 0.
by rewrite size_poly0; left; exists 0; rewrite root0.
rewrite neq_ltn [in _ < 1]polySpred //=.
apply: (iffP idP) => [p_gt1 | [a]]; last exact: root_size_gt1.
pose n := (size p).-1; have n_gt0: n > 0 by rewrite -ltnS -polySpred.
have [a Dan] := closedF (fun i => - p`_i / lead_coe... | Lemma | closed_rootP | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"apply",
"big1",
"big_ord_recr",
"big_split",
"closedF",
"eqVneq",
"horner_coef",
"last",
"lead_coef",
"lead_coef_eq0",
"ltnS",
"mulNr",
"mulVKf",
"mulrA",
"mulrCA",
"mulr_sumr",
"n_gt0",
"neq_ltn",
"nz_p",
"p_gt1",
"polySpred",
"root",
"root0",
"rootP",
"root_size_gt... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
closed_nonrootP p : reflect (exists x, ~~ root p x) (p != 0). | Proof.
apply: (iffP idP) => [nz_p | [x]]; last first.
by apply: contraNneq => ->; apply: root0.
have [[x /rootP p1x0]|] := altP (closed_rootP (p - 1)).
by exists x; rewrite -[p](subrK 1) /root hornerD p1x0 add0r hornerC oner_eq0.
rewrite negbK => /size_poly1P[c _ /(canRL (subrK 1)) Dp].
by exists 0; rewrite Dp -rad... | Lemma | closed_nonrootP | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"add0r",
"apply",
"closed_rootP",
"contraNneq",
"hornerC",
"hornerD",
"last",
"nz_p",
"oner_eq0",
"polyC_eq0",
"raddfD",
"root",
"root0",
"rootC",
"rootP",
"size_poly1P",
"subrK"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
closedF | := @solve_monicpoly F. | Let | closedF | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"solve_monicpoly"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
closed_rootP p : reflect (exists x, root p x) (size p != 1). | Proof. exact: PreClosedField.closed_rootP. Qed. | Lemma | closed_rootP | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"root",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
closed_nonrootP p : reflect (exists x, ~~ root p x) (p != 0). | Proof. exact: PreClosedField.closed_nonrootP. Qed. | Lemma | closed_nonrootP | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"root"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
closed_field_poly_normal p :
{r : seq F | p = lead_coef p *: \prod_(z <- r) ('X - z%:P)}. | Proof.
apply: sig_eqW; have [r [q [->]]] /= := dec_factor_theorem p.
have [->|] := eqVneq; first by exists [::]; rewrite mul0r lead_coef0 scale0r.
have [[x rqx ? /(_ isT x) /negP /(_ rqx)] //|] := altP (closed_rootP q).
rewrite negbK => /size_poly1P [c c_neq0-> _ _]; exists r.
rewrite mul_polyC lead_coefZ (monicP _) ?m... | Lemma | closed_field_poly_normal | algebra | algebra/poly.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"bigop",
"finset",
"tuple",
"div",
"binomial",
"nmodule",
"rings_modules_and_algebras",
"divalg",
"decfield",
"countalg",
"GRing.Theory",
"prime"
] | [
"apply",
"closed_rootP",
"dec_factor_theorem",
"eqVneq",
"lead_coef",
"lead_coef0",
"lead_coefZ",
"monicP",
"monicXsubC",
"monic_prod",
"mul0r",
"mul_polyC",
"mulr1",
"scale0r",
"seq",
"sig_eqW",
"size_poly1P"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
redivp_rec (q : {poly R}) | :=
let sq := size q in
let cq := lead_coef q in
fix loop (k : nat) (qq r : {poly R})(n : nat) {struct n} :=
if size r < sq then (k, qq, r) else
let m := (lead_coef r) *: 'X^(size r - sq) in
let qq1 := qq * cq%:P + m in
let r1 := r * cq%:P - m * q in
if n is n1.+1 then loop k.+1 qq1 r1 n1 e... | Definition | redivp_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",
"nat",
"poly",
"r1",
"size",
"sq"
] | Pseudo division, defined on an arbitrary ring | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
redivp_expanded_def p q | :=
if q == 0 then (0, 0, p) else redivp_rec q 0 0 p (size p). | Definition | redivp_expanded_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... | [
"redivp_rec",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
redivp_key : unit. | Proof. by []. Qed. | Fact | redivp_key | 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... | [
"unit"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
redivp : {poly R} -> {poly R} -> nat * {poly R} * {poly R} | :=
locked_with redivp_key redivp_expanded_def. | Definition | redivp | 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... | [
"nat",
"poly",
"redivp_expanded_def",
"redivp_key"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
redivp_unlockable | := [unlockable fun redivp]. | Canonical | redivp_unlockable | 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... | [
"redivp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdivp p q | := ((redivp p q).1).2. | Definition | rdivp | 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... | [
"redivp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rmodp p q | := (redivp p q).2. | Definition | rmodp | 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... | [
"redivp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rscalp p q | := ((redivp p q).1).1. | Definition | rscalp | 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... | [
"redivp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdvdp p q | := rmodp q p == 0. | Definition | rdvdp | 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... | [
"rmodp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
redivp_def p q : redivp p q = (rscalp p q, rdivp p q, rmodp p q). | Proof. by rewrite /rscalp /rdivp /rmodp; case: (redivp p q) => [[]] /=. Qed. | Lemma | redivp_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... | [
"rdivp",
"redivp",
"rmodp",
"rscalp"
] | Definition rmultp := [rel m d | rdvdp d m]. | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
rdiv0p p : rdivp 0 p = 0. | Proof.
rewrite /rdivp unlock; case: ifP => // Hp; rewrite /redivp_rec !size_poly0.
by rewrite polySpred ?Hp.
Qed. | Lemma | rdiv0p | 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... | [
"polySpred",
"rdivp",
"redivp_rec",
"size_poly0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdivp0 p : rdivp p 0 = 0. | Proof. by rewrite /rdivp unlock eqxx. Qed. | Lemma | rdivp0 | 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",
"rdivp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdivp_small p q : size p < size q -> rdivp p q = 0. | Proof.
rewrite /rdivp unlock; have [-> | _ ltpq] := eqP; first by rewrite size_poly0.
by case: (size p) => [|s]; rewrite /= ltpq.
Qed. | Lemma | rdivp_small | 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... | [
"rdivp",
"size",
"size_poly0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
leq_rdivp p q : size (rdivp p q) <= size p. | Proof.
have [/rdivp_small->|] := ltnP (size p) (size q); first by rewrite size_poly0.
rewrite /rdivp /rmodp /rscalp unlock.
have [->|q0] //= := eqVneq q 0.
have: size (0 : {poly R}) <= size p by rewrite size_poly0.
move: {2 3 4 6}(size p) (leqnn (size p)) => A.
elim: (size p) 0%N (0 : {poly R}) {1 3 4}p (leqnn (size p)... | Lemma | leq_rdivp | 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",
"addn0",
"addn1",
"addnA",
"addnS",
"apply",
"coefB",
"coefMC",
"coefXnM",
"coefZ",
"eqVneq",
"geq_max",
"lead_coefE",
"lead_coef_eq0",
"leqLHS",
"leq_add",
"leq_add2r",
"leq_eqVlt",
"leq_ltn_trans",
"leq_psubRL",
"leq_sizeP",
"leq_subLR",
"leq_trans",
"leqnn",... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rmod0p p : rmodp 0 p = 0. | Proof.
rewrite /rmodp unlock; case: ifP => // Hp; rewrite /redivp_rec !size_poly0.
by rewrite polySpred ?Hp.
Qed. | Lemma | rmod0p | 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... | [
"polySpred",
"redivp_rec",
"rmodp",
"size_poly0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rmodp0 p : rmodp p 0 = p. | Proof. by rewrite /rmodp unlock eqxx. Qed. | Lemma | rmodp0 | 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",
"rmodp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rscalp_small p q : size p < size q -> rscalp p q = 0. | Proof.
rewrite /rscalp unlock; case: eqP => _ // spq.
by case sp: (size p) => [| s] /=; rewrite spq.
Qed. | Lemma | rscalp_small | 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... | [
"rscalp",
"size",
"sp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ltn_rmodp p q : (size (rmodp p q) < size q) = (q != 0). | Proof.
rewrite /rdivp /rmodp /rscalp unlock; have [->|q0] := eqVneq q 0.
by rewrite /= size_poly0 ltn0.
elim: (size p) 0%N 0 {1 3}p (leqnn (size p)) => [|n ihn] k q1 r.
move/size_poly_leq0P->.
by rewrite /= size_poly0 size_poly_gt0 q0 size_poly0 size_poly_gt0.
move=> hr /=; case: (ltnP (size r)) => // hsrq; apply... | Lemma | ltn_rmodp | 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",
"apply",
"coefB",
"coefMC",
"coefXnM",
"coefZ",
"eqVneq",
"lead_coefE",
"leq_add",
"leq_add2r",
"leq_addr",
"leq_eqVlt",
"leq_sizeP",
"leq_subRL",
"leq_trans",
"leqnn",
"ltn0",
"ltnNge",
"ltnP",
"ltnS",
"ltn_subRL",
"mul0r",
"mulr0",
"predU1P",
"prednK",
"p... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ltn_rmodpN0 p q : q != 0 -> size (rmodp p q) < size q. | Proof. by rewrite ltn_rmodp. Qed. | Lemma | ltn_rmodpN0 | 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... | [
"ltn_rmodp",
"rmodp",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rmodp1 p : rmodp p 1 = 0. | Proof.
apply/eqP; have := ltn_rmodp p 1.
by rewrite !oner_neq0 -size_poly_eq0 size_poly1 ltnS leqn0.
Qed. | Lemma | rmodp1 | 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",
"leqn0",
"ltnS",
"ltn_rmodp",
"oner_neq0",
"rmodp",
"size_poly1",
"size_poly_eq0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rmodp_small p q : size p < size q -> rmodp p q = p. | Proof.
rewrite /rmodp unlock; have [->|_] := eqP; first by rewrite size_poly0.
by case sp: (size p) => [| s] Hs /=; rewrite sp Hs /=.
Qed. | Lemma | rmodp_small | 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... | [
"rmodp",
"size",
"size_poly0",
"sp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
leq_rmodp m d : size (rmodp m d) <= size m. | Proof.
have [/rmodp_small -> //|h] := ltnP (size m) (size d).
have [->|d0] := eqVneq d 0; first by rewrite rmodp0.
by apply: leq_trans h; apply: ltnW; rewrite ltn_rmodp.
Qed. | Lemma | leq_rmodp | 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",
"leq_trans",
"ltnP",
"ltnW",
"ltn_rmodp",
"rmodp",
"rmodp0",
"rmodp_small",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rmodpC p c : c != 0 -> rmodp p c%:P = 0. | Proof.
move=> Hc; apply/eqP; rewrite -size_poly_leq0 -ltnS.
have -> : 1%N = nat_of_bool (c != 0) by rewrite Hc.
by rewrite -size_polyC ltn_rmodp polyC_eq0.
Qed. | Lemma | rmodpC | 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",
"ltnS",
"ltn_rmodp",
"nat_of_bool",
"polyC_eq0",
"rmodp",
"size_polyC",
"size_poly_leq0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdvdp0 d : rdvdp d 0. | Proof. by rewrite /rdvdp rmod0p. Qed. | Lemma | rdvdp0 | 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... | [
"rdvdp",
"rmod0p"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdvd0p n : rdvdp 0 n = (n == 0). | Proof. by rewrite /rdvdp rmodp0. Qed. | Lemma | rdvd0p | 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... | [
"rdvdp",
"rmodp0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdvd0pP n : reflect (n = 0) (rdvdp 0 n). | Proof. by apply: (iffP idP); rewrite rdvd0p; move/eqP. Qed. | Lemma | rdvd0pP | 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",
"rdvd0p",
"rdvdp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdvdpN0 p q : rdvdp p q -> q != 0 -> p != 0. | Proof. by move=> pq hq; apply: contraTneq pq => ->; rewrite rdvd0p. Qed. | Lemma | rdvdpN0 | 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",
"rdvd0p",
"rdvdp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdvdp1 d : rdvdp d 1 = (size d == 1). | Proof.
rewrite /rdvdp; have [->|] := eqVneq d 0.
by rewrite rmodp0 size_poly0 (negPf (oner_neq0 _)).
rewrite -size_poly_leq0 -ltnS; case: ltngtP => // [|/eqP] hd _.
by rewrite rmodp_small ?size_poly1 // oner_eq0.
have [c cn0 ->] := size_poly1P _ hd.
rewrite /rmodp unlock -size_poly_eq0 size_poly1 /= size_poly1 size... | Lemma | rdvdp1 | 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",
"lead_coefC",
"ltnS",
"ltngtP",
"oner_eq0",
"oner_neq0",
"polyC_eq0",
"rdvdp",
"rmodp",
"rmodp0",
"rmodp_small",
"scale1r",
"size",
"size_poly0",
"size_poly1",
"size_poly1P",
"size_polyC",
"size_poly_eq0",
"size_poly_leq0",
"subrr"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdvd1p m : rdvdp 1 m. | Proof. by rewrite /rdvdp rmodp1. Qed. | Lemma | rdvd1p | 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... | [
"rdvdp",
"rmodp1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Nrdvdp_small (n d : {poly R}) :
n != 0 -> size n < size d -> rdvdp d n = false. | Proof. by move=> nn0 hs; rewrite /rdvdp (rmodp_small hs); apply: negPf. Qed. | Lemma | Nrdvdp_small | 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",
"poly",
"rdvdp",
"rmodp_small",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rmodp_eq0P p q : reflect (rmodp p q = 0) (rdvdp q p). | Proof. exact: (iffP eqP). Qed. | Lemma | rmodp_eq0P | 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... | [
"rdvdp",
"rmodp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rmodp_eq0 p q : rdvdp q p -> rmodp p q = 0. | Proof. exact: rmodp_eq0P. Qed. | Lemma | rmodp_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... | [
"rdvdp",
"rmodp",
"rmodp_eq0P"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdvdp_leq p q : rdvdp p q -> q != 0 -> size p <= size q. | Proof. by move=> dvd_pq; rewrite leqNgt; apply: contra => /rmodp_small <-. Qed. | Lemma | rdvdp_leq | 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",
"leqNgt",
"rdvdp",
"rmodp_small",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgcdp 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 := rmodp 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 | rgcdp | 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... | [
"nat",
"poly",
"rmodp",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgcd0p : left_id 0 rgcdp. | Proof.
move=> p; rewrite /rgcdp size_poly0 size_poly_gt0 if_neg.
case: ifP => /= [_ | nzp]; first by rewrite eqxx.
by rewrite polySpred !(rmodp0, nzp) //; case: _.-1 => [|m]; rewrite rmod0p eqxx.
Qed. | Lemma | rgcd0p | 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",
"polySpred",
"rgcdp",
"rmod0p",
"rmodp0",
"size_poly0",
"size_poly_gt0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgcdp0 : right_id 0 rgcdp. | Proof.
move=> p; have:= rgcd0p p; rewrite /rgcdp size_poly0 size_poly_gt0.
by case: eqVneq => p0; rewrite ?(eqxx, p0) //= eqxx.
Qed. | Lemma | rgcdp0 | 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",
"p0",
"rgcd0p",
"rgcdp",
"size_poly0",
"size_poly_gt0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgcdpE p q :
rgcdp p q = if size p < size q
then rgcdp (rmodp q p) p else rgcdp (rmodp p q) q. | Proof.
pose rgcdp_rec := fix rgcdp_rec (n : nat) (pp qq : {poly R}) {struct n} :=
let rr := rmodp pp qq in
if rr == 0 then qq else
if n is n1.+1 then rgcdp_rec n1 qq rr else rr.
have Irec: forall m n p q, size q <= m -> size q <= n
-> size q < size p -> rgcdp_rec m p q = rgcdp_rec n p q.
+ elim=> [|m H... | Lemma | rgcdpE | 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",
"last",
"leqW",
"leq_trans",
"ltnP",
"ltnS",
"ltnW",
"ltn_rmodp",
"nat",
"poly",
"polySpred",
"rgcd0p",
"rgcdp",
"rgcdp0",
"rmod0p",
"rmodp",
"rmodp0",
"size",
"size_poly0",
"size_poly_gt0",
"size_poly_leq0P"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
comm_redivp_spec m d : nat * {poly R} * {poly R} -> Type | :=
ComEdivnSpec k (q r : {poly R}) of
(GRing.comm d (lead_coef d)%:P -> m * (lead_coef d ^+ k)%:P = q * d + r) &
(d != 0 -> size r < size d) : comm_redivp_spec m d (k, q, r). | Variant | comm_redivp_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... | [
"comm",
"lead_coef",
"nat",
"poly",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
comm_redivpP m d : comm_redivp_spec m d (redivp m d). | Proof.
rewrite unlock; have [->|Hd] := eqVneq d 0.
by constructor; rewrite !(simp, eqxx).
have: GRing.comm d (lead_coef d)%:P -> m * (lead_coef d ^+ 0)%:P = 0 * d + m.
by rewrite !simp.
elim: (size m) 0%N 0 {1 4 6}m (leqnn (size m)) => [|n IHn] k q r Hr /=.
move/size_poly_leq0P: Hr ->.
suff hsd: size (0: {poly ... | Lemma | comm_redivpP | 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",
"addrA",
"addrN",
"apply",
"coefB",
"coefMC",
"coefXnM",
"coefZ",
"comm",
"comm_redivp_spec",
"eqVneq",
"eqxx",
"exprSr",
"last",
"lead_coef",
"leq_add2r",
"leq_eqVlt",
"leq_ltn_trans",
"leq_sizeP",
"leq_sub2r",
"leq_subLR",
"leq_trans",
"leqnn",
"ltnNge",
"l... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rmodpp p : GRing.comm p (lead_coef p)%:P -> rmodp p p = 0. | Proof.
move=> hC; rewrite /rmodp unlock; have [-> //|] := eqVneq.
rewrite -size_poly_eq0 /redivp_rec; case sp: (size p)=> [|n] // _.
rewrite sp ltnn subnn expr0 hC alg_polyC !simp subrr.
by case: n sp => [|n] sp; rewrite size_polyC /= eqxx.
Qed. | Lemma | rmodpp | 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",
"comm",
"eqVneq",
"eqxx",
"expr0",
"lead_coef",
"ltnn",
"redivp_rec",
"rmodp",
"simp",
"size",
"size_polyC",
"size_poly_eq0",
"sp",
"subnn",
"subrr"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rcoprimep (p q : {poly R}) | := size (rgcdp p q) == 1. | Definition | rcoprimep | 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... | [
"poly",
"rgcdp",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgdcop_rec q p n | :=
if n is m.+1 then
if rcoprimep p q then p
else rgdcop_rec q (rdivp p (rgcdp p q)) m
else (q == 0)%:R. | Fixpoint | rgdcop_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... | [
"rcoprimep",
"rdivp",
"rgcdp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgdcop q p | := rgdcop_rec q p (size p). | Definition | rgdcop | 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... | [
"rgdcop_rec",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgdcop0 q : rgdcop q 0 = (q == 0)%:R. | Proof. by rewrite /rgdcop size_poly0. Qed. | Lemma | rgdcop0 | 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... | [
"rgdcop",
"size_poly0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Cdl : GRing.comm d (lead_coef d)%:P. | Hypothesis | Cdl | 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... | [
"comm",
"lead_coef"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | ||
Rreg : GRing.rreg (lead_coef d). | Hypothesis | Rreg | 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",
"rreg"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | ||
redivp_eq q r :
size r < size d ->
let k := (redivp (q * d + r) d).1.1 in
let c := (lead_coef d ^+ k)%:P in
redivp (q * d + r) d = (k, q * c, r * c). | Proof.
move=> lt_rd; case: comm_redivpP=> k q1 r1 /(_ Cdl) Heq.
have dn0: d != 0 by case: (size d) lt_rd (size_poly_eq0 d) => // n _ <-.
move=> /(_ dn0) Hs.
have eC : q * d * (lead_coef d ^+ k)%:P = q * (lead_coef d ^+ k)%:P * d.
by rewrite -mulrA polyC_exp (commrX k Cdl) mulrA.
suff e1 : q1 = q * (lead_coef d ^+ k)%... | Lemma | redivp_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... | [
"Cdl",
"addn0",
"addnS",
"addrACA",
"addrI",
"apply",
"comm_redivpP",
"commrX",
"eC",
"gtn_max",
"last",
"lead_coef",
"leq_ltn_trans",
"mulNr",
"mulrA",
"mulrDl",
"opprB",
"opprD",
"polyC_exp",
"r1",
"redivp",
"rreg_div0",
"size",
"size_polyC",
"size_polyD",
"size_p... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdivp_eq p :
p * (lead_coef d ^+ (rscalp p d))%:P = (rdivp p d) * d + (rmodp p d). | Proof.
by rewrite /rdivp /rmodp /rscalp; case: comm_redivpP=> k q1 r1 Hc _; apply: Hc.
Qed. | Lemma | rdivp_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",
"comm_redivpP",
"lead_coef",
"r1",
"rdivp",
"rmodp",
"rscalp"
] | this is a bad name | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
eq_rdvdp k q1 p:
p * ((lead_coef d)^+ k)%:P = q1 * d -> rdvdp d p. | Proof.
move=> he.
have Hnq0 := rreg_lead0 Rreg; set lq := lead_coef d.
pose v := rscalp p d; pose m := maxn v k.
rewrite /rdvdp -(rreg_polyMC_eq0 _ (@rregX _ _ (m - v) Rreg)).
suff:
((rdivp p d) * (lq ^+ (m - v))%:P - q1 * (lq ^+ (m - k))%:P) * d +
(rmodp p d) * (lq ^+ (m - v))%:P == 0.
rewrite rreg_div0 //; last ... | Lemma | eq_rdvdp | 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... | [
"Cdl",
"Rreg",
"addnC",
"addrAC",
"commrX",
"exprD",
"last",
"lead_coef",
"leq_maxl",
"leq_maxr",
"ltn_rmodp",
"maxn",
"mulNr",
"mulrA",
"mulrDl",
"polyCM",
"polyC_exp",
"rdivp",
"rdivp_eq",
"rdvdp",
"rmodp",
"rregX",
"rreg_div0",
"rreg_lead0",
"rreg_polyMC_eq0",
"r... | section variables impose an inconvenient order on parameters | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
rdvdp_spec p q : {poly R} -> bool -> Type | :=
| Rdvdp k q1 & p * ((lead_coef q)^+ k)%:P = q1 * q : rdvdp_spec p q 0 true
| RdvdpN & rmodp p q != 0 : rdvdp_spec p q (rmodp p q) false. | Variant | rdvdp_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... | [
"lead_coef",
"poly",
"rmodp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdvdp_eqP p : rdvdp_spec p d (rmodp p d) (rdvdp d p). | Proof.
case hdvd: (rdvdp d p); last by apply: RdvdpN; move/rmodp_eq0P/eqP: hdvd.
move/rmodp_eq0P: (hdvd)->; apply: (@Rdvdp _ _ (rscalp p d) (rdivp p d)).
by rewrite rdivp_eq //; move/rmodp_eq0P: (hdvd)->; rewrite addr0.
Qed. | Lemma | rdvdp_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... | [
"addr0",
"apply",
"last",
"rdivp",
"rdivp_eq",
"rdvdp",
"rdvdp_spec",
"rmodp",
"rmodp_eq0P",
"rscalp"
] | Is that version useable ? | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
rdvdp_mull p : rdvdp d (p * d). | Proof. by apply: (@eq_rdvdp 0 p); rewrite expr0 mulr1. Qed. | Lemma | rdvdp_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",
"eq_rdvdp",
"expr0",
"mulr1",
"rdvdp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rmodp_mull p : rmodp (p * d) d = 0. | Proof. exact/eqP/rdvdp_mull. Qed. | Lemma | rmodp_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... | [
"rdvdp_mull",
"rmodp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rmodpp : rmodp d d = 0. | Proof. by rewrite -[d in rmodp d _]mul1r rmodp_mull. Qed. | Lemma | rmodpp | 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... | [
"mul1r",
"rmodp",
"rmodp_mull"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdivpp : rdivp d d = (lead_coef d ^+ rscalp d d)%:P. | Proof.
have dn0 : d != 0 by rewrite -lead_coef_eq0 rreg_neq0.
move: (rdivp_eq d); rewrite rmodpp addr0.
suff ->: GRing.comm d (lead_coef d ^+ rscalp d d)%:P by move/(rreg_lead Rreg)->.
by rewrite polyC_exp; apply: commrX.
Qed. | Lemma | rdivpp | 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... | [
"Rreg",
"addr0",
"apply",
"comm",
"commrX",
"lead_coef",
"lead_coef_eq0",
"polyC_exp",
"rdivp",
"rdivp_eq",
"rmodpp",
"rreg_lead",
"rreg_neq0",
"rscalp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdvdpp : rdvdp d d. | Proof. exact/eqP/rmodpp. Qed. | Lemma | rdvdpp | 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... | [
"rdvdp",
"rmodpp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdivpK p : rdvdp d p ->
rdivp p d * d = p * (lead_coef d ^+ rscalp p d)%:P. | Proof. by rewrite rdivp_eq /rdvdp; move/eqP->; rewrite addr0. Qed. | Lemma | rdivpK | 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",
"lead_coef",
"rdivp",
"rdivp_eq",
"rdvdp",
"rscalp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
mond : d \is monic. | Hypothesis | mond | 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 | ||
redivp_eq q r : size r < size d ->
let k := (redivp (q * d + r) d).1.1 in
redivp (q * d + r) d = (k, q, r). | Proof.
case: (monic_comreg mond)=> Hc Hr /(redivp_eq Hc Hr q).
by rewrite (eqP mond) => -> /=; rewrite expr1n !mulr1.
Qed. | Lemma | redivp_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",
"mond",
"monic_comreg",
"mulr1",
"redivp",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdivp_eq p : p = rdivp p d * d + rmodp p d. | Proof.
rewrite -rdivp_eq (eqP mond); first exact: commr1.
by rewrite expr1n mulr1.
Qed. | Lemma | rdivp_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... | [
"commr1",
"expr1n",
"mond",
"mulr1",
"rdivp",
"rmodp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdivpp : rdivp d d = 1. | Proof.
by case: (monic_comreg mond) => hc hr; rewrite rdivpp // (eqP mond) expr1n.
Qed. | Lemma | rdivpp | 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",
"mond",
"monic_comreg",
"rdivp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdivp_addl_mul_small q r : size r < size d -> rdivp (q * d + r) d = q. | Proof.
by move=> Hd; case: (monic_comreg mond)=> Hc Hr; rewrite /rdivp redivp_eq.
Qed. | Lemma | rdivp_addl_mul_small | 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... | [
"mond",
"monic_comreg",
"rdivp",
"redivp_eq",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdivp_addl_mul q r : rdivp (q * d + r) d = q + rdivp r d. | Proof.
case: (monic_comreg mond)=> Hc Hr; rewrite [r in _ * _ + r]rdivp_eq addrA.
by rewrite -mulrDl rdivp_addl_mul_small // ltn_rmodp monic_neq0.
Qed. | Lemma | rdivp_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... | [
"addrA",
"ltn_rmodp",
"mond",
"monic_comreg",
"monic_neq0",
"mulrDl",
"rdivp",
"rdivp_addl_mul_small",
"rdivp_eq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdivpDl q r : rdvdp d q -> rdivp (q + r) d = rdivp q d + rdivp r d. | Proof.
case: (monic_comreg mond)=> Hc Hr; rewrite [r in q + r]rdivp_eq addrA.
rewrite [q in q + _ + _]rdivp_eq; move/rmodp_eq0P->.
by rewrite addr0 -mulrDl rdivp_addl_mul_small // ltn_rmodp monic_neq0.
Qed. | Lemma | rdivpDl | 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",
"addrA",
"ltn_rmodp",
"mond",
"monic_comreg",
"monic_neq0",
"mulrDl",
"rdivp",
"rdivp_addl_mul_small",
"rdivp_eq",
"rdvdp",
"rmodp_eq0P"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdivpDr q r : rdvdp d r -> rdivp (q + r) d = rdivp q d + rdivp r d. | Proof. by rewrite addrC; move/rdivpDl->; rewrite addrC. Qed. | Lemma | rdivpDr | 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",
"rdivp",
"rdivpDl",
"rdvdp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.