fact stringlengths 8 1.54k | type stringclasses 19 values | library stringclasses 8 values | imports listlengths 1 10 | filename stringclasses 98 values | symbolic_name stringlengths 1 42 | docstring stringclasses 1 value |
|---|---|---|---|---|---|---|
polyCM: {morph polyC : a b / a * b}.
Proof. by move=> a b; apply/polyP=> [[|i]]; rewrite coefCM !coefC ?simp. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyCM | |
size_poly_exp_leqp n : size (p ^+ n) <= ((size p).-1 * n).+1.
Proof.
elim: n => [|n IHn]; first by rewrite size_poly1.
have [-> | nzp] := poly0Vpos p; first by rewrite exprS mul0r size_poly0.
rewrite exprS (leq_trans (size_polyMleq _ _)) //.
by rewrite -{1}(prednK nzp) mulnS -addnS leq_add2l.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | size_poly_exp_leq | |
polyC_multiplicative:=
(fun g => (g.2, g.1)) polyC_is_monoid_morphism.
HB.instance Definition _ := GRing.isMonoidMorphism.Build R {poly R} polyC
polyC_is_monoid_morphism. | Definition | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyC_multiplicative | |
polyC_expn : {morph polyC : c / c ^+ n}. Proof. exact: rmorphXn. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyC_exp | |
polyC_natrn : n%:R%:P = n%:R :> {poly R}. Proof. exact: rmorph_nat. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyC_natr | |
pchar_poly: [pchar {poly R}] =i [pchar R].
Proof.
move=> p; rewrite !inE; congr (_ && _).
apply/eqP/eqP=> [/(congr1 val) /=|]; last by rewrite -polyC_natr => ->.
by rewrite polyseq0 -polyC_natr polyseqC; case: eqP.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | pchar_poly | |
scale_poly_defa (p : {poly R}) := \poly_(i < size p) (a * p`_i).
Fact scale_poly_key : unit. Proof. by []. Qed. | Definition | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | scale_poly_def | |
scale_poly:= locked_with scale_poly_key scale_poly_def. | Definition | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | scale_poly | |
scale_poly_unlockable:= [unlockable fun scale_poly].
Fact scale_polyE a p : scale_poly a p = a%:P * p.
Proof.
apply/polyP=> n; rewrite unlock coef_poly coefCM.
by case: leqP => // le_p_n; rewrite nth_default ?mulr0.
Qed.
Fact scale_polyA a b p : scale_poly a (scale_poly b p) = scale_poly (a * b) p.
Proof. by rewrite !scale_polyE mulrA polyCM. Qed.
Fact scale_0poly p : scale_poly 0 p = 0.
Proof. by rewrite scale_polyE mul0r. Qed.
Fact scale_1poly : left_id 1 scale_poly.
Proof. by move=> p; rewrite scale_polyE mul1r. Qed.
Fact scale_polyDr a : {morph scale_poly a : p q / p + q}.
Proof. by move=> p q; rewrite !scale_polyE mulrDr. Qed.
Fact scale_polyDl p : {morph scale_poly^~ p : a b / a + b}.
Proof. by move=> a b /=; rewrite !scale_polyE raddfD mulrDl. Qed.
Fact scale_polyAl a p q : scale_poly a (p * q) = scale_poly a p * q.
Proof. by rewrite !scale_polyE mulrA. Qed.
HB.instance Definition _ := GRing.Nmodule_isLSemiModule.Build R (polynomial R)
scale_polyA scale_0poly scale_1poly scale_polyDr scale_polyDl.
HB.instance Definition _ :=
GRing.LSemiModule_isLSemiAlgebra.Build R (polynomial R) scale_polyAl. | Canonical | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | scale_poly_unlockable | |
mul_polyCa p : a%:P * p = a *: p.
Proof. by rewrite -scale_polyE. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | mul_polyC | |
scale_polyCa b : a *: b%:P = (a * b)%:P.
Proof. by rewrite -mul_polyC polyCM. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | scale_polyC | |
alg_polyCa : a%:A = a%:P :> {poly R}.
Proof. by rewrite -mul_polyC mulr1. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | alg_polyC | |
coefZa p i : (a *: p)`_i = a * p`_i.
Proof.
rewrite -[*:%R]/scale_poly unlock coef_poly.
by case: leqP => // le_p_n; rewrite nth_default ?mulr0.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | coefZ | |
size_scale_leqa p : size (a *: p) <= size p.
Proof. by rewrite -[*:%R]/scale_poly unlock size_poly. Qed.
HB.instance Definition _ i := GRing.isScalable.Build R {poly R} R *%R (coefp i)
(fun a => coefZ a ^~ i).
HB.instance Definition _ := GRing.Linear.on (coefp 0). | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | size_scale_leq | |
polyX_def:= Poly [:: 0; 1].
Fact polyX_key : unit. Proof. by []. Qed. | Definition | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyX_def | |
polyX: {poly R} := locked_with polyX_key polyX_def. | Definition | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyX | |
polyX_unlockable:= [unlockable of polyX].
Local Notation "'X" := polyX. | Canonical | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyX_unlockable | |
polyseqX: 'X = [:: 0; 1] :> seq R.
Proof. by rewrite unlock !polyseq_cons nil_poly eqxx /= polyseq1. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyseqX | |
size_polyX: size 'X = 2. Proof. by rewrite polyseqX. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | size_polyX | |
polyX_eq0: ('X == 0) = false.
Proof. by rewrite -size_poly_eq0 size_polyX. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyX_eq0 | |
coefXi : 'X`_i = (i == 1)%:R.
Proof. by case: i => [|[|i]]; rewrite polyseqX //= nth_nil. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | coefX | |
lead_coefX: lead_coef 'X = 1.
Proof. by rewrite /lead_coef polyseqX. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | lead_coefX | |
commr_polyXp : GRing.comm p 'X.
Proof.
apply/polyP=> i; rewrite coefMr coefM.
by apply: eq_bigr => j _; rewrite coefX commr_nat.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | commr_polyX | |
coefMXp i : (p * 'X)`_i = (if (i == 0)%N then 0 else p`_i.-1).
Proof.
rewrite coefMr big_ord_recl coefX ?simp.
case: i => [|i]; rewrite ?big_ord0 //= big_ord_recl polyseqX subn1 /=.
by rewrite big1 ?simp // => j _; rewrite nth_nil !simp.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | coefMX | |
coefXMp i : ('X * p)`_i = (if (i == 0)%N then 0 else p`_i.-1).
Proof. by rewrite -commr_polyX coefMX. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | coefXM | |
cons_poly_defp a : cons_poly a p = p * 'X + a%:P.
Proof.
apply/polyP=> i; rewrite coef_cons coefD coefMX coefC.
by case: ifP; rewrite !simp.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | cons_poly_def | |
poly_ind(K : {poly R} -> Type) :
K 0 -> (forall p c, K p -> K (p * 'X + c%:P)) -> (forall p, K p).
Proof.
move=> K0 Kcons p; rewrite -[p]polyseqK.
by elim: {p}(p : seq R) => //= p c IHp; rewrite cons_poly_def; apply: Kcons.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | poly_ind | |
polyseqXaddCa : 'X + a%:P = [:: a; 1] :> seq R.
Proof. by rewrite -['X]mul1r -cons_poly_def polyseq_cons polyseq1. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyseqXaddC | |
size_XaddCb : size ('X + b%:P) = 2.
Proof. by rewrite polyseqXaddC. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | size_XaddC | |
lead_coefXaddCa : lead_coef ('X + a%:P) = 1.
Proof. by rewrite lead_coefE polyseqXaddC. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | lead_coefXaddC | |
size_MXaddCp c :
size (p * 'X + c%:P) = (if (p == 0) && (c == 0) then 0 else (size p).+1).
Proof. by rewrite -cons_poly_def size_cons_poly nil_poly. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | size_MXaddC | |
polyseqMXp : p != 0 -> p * 'X = 0 :: p :> seq R.
Proof.
by move=> nz_p; rewrite -[p * _]addr0 -cons_poly_def polyseq_cons nil_poly nz_p.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyseqMX | |
size_mulXp : p != 0 -> size (p * 'X) = (size p).+1.
Proof. by move/polyseqMX->. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | size_mulX | |
lead_coefMXp : lead_coef (p * 'X) = lead_coef p.
Proof.
have [-> | nzp] := eqVneq p 0; first by rewrite mul0r.
by rewrite /lead_coef !nth_last polyseqMX.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | lead_coefMX | |
size_XmulCa : a != 0 -> size ('X * a%:P) = 2.
Proof.
by move=> nz_a; rewrite -commr_polyX size_mulX ?polyC_eq0 ?size_polyC nz_a.
Qed.
Local Notation "''X^' n" := ('X ^+ n). | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | size_XmulC | |
coefXnn i : 'X^n`_i = (i == n)%:R.
Proof.
by elim: n i => [|n IHn] [|i]; rewrite ?coef1 // exprS coefXM ?IHn.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | coefXn | |
polyseqXnn : 'X^n = rcons (nseq n 0) 1 :> seq R.
Proof.
elim: n => [|n IHn]; rewrite ?polyseq1 // exprSr.
by rewrite polyseqMX -?size_poly_eq0 IHn ?size_rcons.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyseqXn | |
size_polyXnn : size 'X^n = n.+1.
Proof. by rewrite polyseqXn size_rcons size_nseq. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | size_polyXn | |
commr_polyXnp n : GRing.comm p 'X^n.
Proof. exact/commrX/commr_polyX. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | commr_polyXn | |
lead_coefXnn : lead_coef 'X^n = 1.
Proof. by rewrite /lead_coef nth_last polyseqXn last_rcons. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | lead_coefXn | |
lead_coefXnaddCn c : 0 < n -> lead_coef ('X^n + c%:P) = 1.
Proof.
move=> n_gt0; rewrite lead_coefDl ?lead_coefXn//.
by rewrite size_polyC size_polyXn ltnS (leq_trans (leq_b1 _)).
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | lead_coefXnaddC | |
size_XnaddCn c : 0 < n -> size ('X^n + c%:P) = n.+1.
Proof.
by move=> *; rewrite size_polyDl ?size_polyXn// size_polyC; case: eqP.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | size_XnaddC | |
polyseqMXnn p : p != 0 -> p * 'X^n = ncons n 0 p :> seq R.
Proof.
case: n => [|n] nz_p; first by rewrite mulr1.
elim: n => [|n IHn]; first exact: polyseqMX.
by rewrite exprSr mulrA polyseqMX -?nil_poly IHn.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyseqMXn | |
coefMXnn p i : (p * 'X^n)`_i = if i < n then 0 else p`_(i - n).
Proof.
have [-> | /polyseqMXn->] := eqVneq p 0; last exact: nth_ncons.
by rewrite mul0r !coef0 if_same.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | coefMXn | |
size_mulXnn p : p != 0 -> size (p * 'X^n) = (n + size p)%N.
Proof.
elim: n p => [p p_neq0| n IH p p_neq0]; first by rewrite mulr1.
by rewrite exprS mulrA IH -?size_poly_eq0 size_mulX // addnS.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | size_mulXn | |
coefXnMn p i : ('X^n * p)`_i = if i < n then 0 else p`_(i - n).
Proof. by rewrite -commr_polyXn coefMXn. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | coefXnM | |
coef_sumMXnI (r : seq I) (P : pred I) (p : I -> R) (n : I -> nat) k :
(\sum_(i <- r | P i) p i *: 'X^(n i))`_k =
\sum_(i <- r | P i && (n i == k)) p i.
Proof.
rewrite coef_sum big_mkcondr; apply: eq_bigr => i Pi.
by rewrite coefZ coefXn mulr_natr mulrb eq_sym.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | coef_sumMXn | |
poly_defn E : \poly_(i < n) E i = \sum_(i < n) E i *: 'X^i.
Proof. by apply/polyP => i; rewrite coef_sumMXn coef_poly big_ord1_eq. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | poly_def | |
eq_polyn E1 E2 : (forall i, i < n -> E1 i = E2 i) ->
poly n E1 = poly n E2 :> {poly R}.
Proof. by move=> E; rewrite !poly_def; apply: eq_bigr => i _; rewrite E. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | eq_poly | |
horner_recs x := if s is a :: s' then horner_rec s' x * x + a else 0. | Fixpoint | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | horner_rec | |
hornerp := horner_rec p.
Local Notation "p .[ x ]" := (horner p x) : ring_scope. | Definition | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | horner | |
horner0x : (0 : {poly R}).[x] = 0.
Proof. by rewrite /horner polyseq0. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | horner0 | |
hornerCc x : (c%:P).[x] = c.
Proof. by rewrite /horner polyseqC; case: eqP; rewrite /= ?simp. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | hornerC | |
hornerXx : 'X.[x] = x.
Proof. by rewrite /horner polyseqX /= !simp. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | hornerX | |
horner_consp c x : (cons_poly c p).[x] = p.[x] * x + c.
Proof.
rewrite /horner polyseq_cons; case: nilP => //= ->.
by rewrite !simp -/(_.[x]) hornerC.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | horner_cons | |
horner_coef0p : p.[0] = p`_0.
Proof. by rewrite /horner; case: (p : seq R) => //= c p'; rewrite !simp. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | horner_coef0 | |
hornerMXaddCp c x : (p * 'X + c%:P).[x] = p.[x] * x + c.
Proof. by rewrite -cons_poly_def horner_cons. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | hornerMXaddC | |
hornerMXp x : (p * 'X).[x] = p.[x] * x.
Proof. by rewrite -[p * 'X]addr0 hornerMXaddC addr0. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | hornerMX | |
horner_Polys x : (Poly s).[x] = horner_rec s x.
Proof. by elim: s => [|a s /= <-]; rewrite (horner0, horner_cons). Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | horner_Poly | |
horner_coefp x : p.[x] = \sum_(i < size p) p`_i * x ^+ i.
Proof.
rewrite /horner.
elim: {p}(p : seq R) => /= [|a s ->]; first by rewrite big_ord0.
rewrite big_ord_recl simp addrC big_distrl /=.
by congr (_ + _); apply: eq_bigr => i _; rewrite -mulrA exprSr.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | horner_coef | |
horner_coef_widen p x :
size p <= n -> p.[x] = \sum_(i < n) p`_i * x ^+ i.
Proof.
move=> le_p_n.
rewrite horner_coef (big_ord_widen n (fun i => p`_i * x ^+ i)) // big_mkcond.
by apply: eq_bigr => i _; case: ltnP => // le_p_i; rewrite nth_default ?simp.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | horner_coef_wide | |
horner_polyn E x : (\poly_(i < n) E i).[x] = \sum_(i < n) E i * x ^+ i.
Proof.
rewrite (@horner_coef_wide n) ?size_poly //.
by apply: eq_bigr => i _; rewrite coef_poly ltn_ord.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | horner_poly | |
hornerDp q x : (p + q).[x] = p.[x] + q.[x].
Proof.
rewrite [in LHS]/+%R /= unlock horner_poly; set m := maxn _ _.
rewrite !(@horner_coef_wide m) ?leq_max ?leqnn ?orbT // -big_split /=.
by apply: eq_bigr => i _; rewrite -mulrDl.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | hornerD | |
hornerCMa p x : (a%:P * p).[x] = a * p.[x].
Proof.
elim/poly_ind: p => [|p c IHp]; first by rewrite !(mulr0, horner0).
by rewrite mulrDr mulrA -polyCM !hornerMXaddC IHp mulrDr mulrA.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | hornerCM | |
hornerZc p x : (c *: p).[x] = c * p.[x].
Proof. by rewrite -mul_polyC hornerCM. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | hornerZ | |
horner_eval(x : R) := horner^~ x. | Definition | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | horner_eval | |
horner_evalEx p : horner_eval x p = p.[x]. Proof. by []. Qed.
HB.instance Definition _ x :=
GRing.isSemilinear.Build R {poly R} R _ (horner_eval x)
((fun c p => hornerZ c p x), (fun p q => hornerD p q x)). | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | horner_evalE | |
horner_sumI (r : seq I) (P : pred I) F x :
(\sum_(i <- r | P i) F i).[x] = \sum_(i <- r | P i) (F i).[x].
Proof. exact: (raddf_sum (horner_eval _)). Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | horner_sum | |
hornerMnn p x : (p *+ n).[x] = p.[x] *+ n.
Proof. exact: (raddfMn (horner_eval _)). Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | hornerMn | |
comm_coefp x := forall i, p`_i * x = x * p`_i. | Definition | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | comm_coef | |
comm_polyp x := x * p.[x] = p.[x] * x. | Definition | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | comm_poly | |
comm_coef_polyp x : comm_coef p x -> comm_poly p x.
Proof.
move=> cpx; rewrite /comm_poly !horner_coef big_distrl big_distrr /=.
by apply: eq_bigr => i _; rewrite /= mulrA -cpx -!mulrA commrX.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | comm_coef_poly | |
comm_poly0x : comm_poly 0 x.
Proof. by rewrite /comm_poly !horner0 !simp. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | comm_poly0 | |
comm_poly1x : comm_poly 1 x.
Proof. by rewrite /comm_poly !hornerC !simp. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | comm_poly1 | |
comm_polyXx : comm_poly 'X x.
Proof. by rewrite /comm_poly !hornerX. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | comm_polyX | |
comm_polyDp q x: comm_poly p x -> comm_poly q x -> comm_poly (p + q) x.
Proof. by rewrite /comm_poly hornerD mulrDr mulrDl => -> ->. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | comm_polyD | |
commr_hornera b p : GRing.comm a b -> comm_coef p a -> GRing.comm a p.[b].
Proof.
move=> cab cpa; rewrite horner_coef; apply: commr_sum => i _.
by apply: commrM => //; apply: commrX.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | commr_horner | |
hornerM_commp q x : comm_poly q x -> (p * q).[x] = p.[x] * q.[x].
Proof.
move=> comm_qx.
elim/poly_ind: p => [|p c IHp]; first by rewrite !(simp, horner0).
rewrite mulrDl hornerD hornerCM -mulrA -commr_polyX mulrA hornerMX.
by rewrite {}IHp -mulrA -comm_qx mulrA -mulrDl hornerMXaddC.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | hornerM_comm | |
comm_polyMp q x: comm_poly p x -> comm_poly q x -> comm_poly (p * q) x.
Proof.
by move=> px qx; rewrite /comm_poly hornerM_comm// mulrA px -mulrA qx mulrA.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | comm_polyM | |
horner_exp_commp x n : comm_poly p x -> (p ^+ n).[x] = p.[x] ^+ n.
Proof.
move=> comm_px; elim: n => [|n IHn]; first by rewrite hornerC.
by rewrite !exprSr -IHn hornerM_comm.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | horner_exp_comm | |
comm_poly_expp n x: comm_poly p x -> comm_poly (p ^+ n) x.
Proof. by move=> px; rewrite /comm_poly !horner_exp_comm// commrX. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | comm_poly_exp | |
hornerXnx n : ('X^n).[x] = x ^+ n.
Proof. by rewrite horner_exp_comm /comm_poly hornerX. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | hornerXn | |
polyOver_predS := fun p : {poly R} => all (mem S) p.
Arguments polyOver_pred _ _ /. | Definition | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyOver_pred | |
polyOverS := [qualify a p | polyOver_pred S p]. | Definition | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyOver | |
polyOverS(S1 S2 : {pred R}) :
{subset S1 <= S2} -> {subset polyOver S1 <= polyOver S2}.
Proof.
by move=> sS12 p /(all_nthP 0)S1p; apply/(all_nthP 0)=> i /S1p; apply: sS12.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyOverS | |
polyOver0S : 0 \is a polyOver S.
Proof. by rewrite qualifE /= polyseq0. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyOver0 | |
polyOver_polyS n E :
(forall i, i < n -> E i \in S) -> \poly_(i < n) E i \is a polyOver S.
Proof.
move=> S_E; apply/(all_nthP 0)=> i lt_i_p /=; rewrite coef_poly.
by case: ifP => [/S_E// | /idP[]]; apply: leq_trans lt_i_p (size_poly n E).
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyOver_poly | |
polyOverP{p} : reflect (forall i, p`_i \in S) (p \in polyOver S).
Proof.
apply: (iffP (all_nthP 0)) => [Sp i | Sp i _]; last exact: Sp.
by have [/Sp // | /(nth_default 0)->] := ltnP i (size p); apply: rpred0.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyOverP | |
polyOverCc : (c%:P \in polyOver S) = (c \in S).
Proof.
by rewrite qualifE /= polyseqC; case: eqP => [->|] /=; rewrite ?andbT ?rpred0.
Qed.
Fact polyOver_addr_closed : addr_closed (polyOver S).
Proof.
split=> [|p q Sp Sq]; first exact: polyOver0.
by apply/polyOverP=> i; rewrite coefD rpredD ?(polyOverP _).
Qed.
HB.instance Definition _ := GRing.isAddClosed.Build {poly R} (polyOver_pred S)
polyOver_addr_closed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyOverC | |
polyOver_mulr_2closed: GRing.mulr_2closed (polyOver S).
Proof.
move=> p q /polyOverP Sp /polyOverP Sq; apply/polyOverP=> i.
by rewrite coefM rpred_sum // => j _; rewrite rpredM.
Qed.
HB.instance Definition _ := GRing.isMul2Closed.Build {poly R} (polyOver_pred S)
polyOver_mulr_2closed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyOver_mulr_2closed | |
Definition_ := GRing.isMul1Closed.Build {poly R} (polyOver_pred S)
polyOver_mul1_closed. | HB.instance | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | Definition | |
polyOverZ: {in S & polyOver S, forall c p, c *: p \is a polyOver S}.
Proof.
by move=> c p Sc /polyOverP Sp; apply/polyOverP=> i; rewrite coefZ rpredM ?Sp.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyOverZ | |
polyOverX: 'X \in polyOver S.
Proof. by rewrite qualifE /= polyseqX /= rpred0 rpred1. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyOverX | |
polyOverXnn : 'X^n \in polyOver S.
Proof. by rewrite rpredX// polyOverX. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyOverXn | |
rpred_horner: {in polyOver S & S, forall p x, p.[x] \in S}.
Proof.
move=> p x /polyOverP Sp Sx; rewrite horner_coef rpred_sum // => i _.
by rewrite rpredM ?rpredX.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | rpred_horner | |
derivp := \poly_(i < (size p).-1) (p`_i.+1 *+ i.+1).
Local Notation "a ^` ()" := (deriv a). | Definition | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | deriv | |
coef_derivp i : p^`()`_i = p`_i.+1 *+ i.+1.
Proof.
rewrite coef_poly -subn1 ltn_subRL.
by case: leqP => // /(nth_default 0) ->; rewrite mul0rn.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | coef_deriv | |
polyOver_deriv(ringS : semiringClosed R) :
{in polyOver ringS, forall p, p^`() \is a polyOver ringS}.
Proof.
by move=> p /polyOverP Kp; apply/polyOverP=> i; rewrite coef_deriv rpredMn ?Kp.
Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | polyOver_deriv | |
derivCc : c%:P^`() = 0.
Proof. by apply/polyP=> i; rewrite coef_deriv coef0 coefC mul0rn. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | derivC | |
derivX: ('X)^`() = 1.
Proof. by apply/polyP=> [[|i]]; rewrite coef_deriv coef1 coefX ?mul0rn. Qed. | Lemma | algebra | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice",
"From mathcomp Require Import fintype bigop finset tuple div ssralg",
"From mathcomp Require Import countalg binomial"
] | algebra/poly.v | derivX |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.