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 |
|---|---|---|---|---|---|---|---|---|---|---|
lt_sizeT (p q : polyF) : cps bool | :=
'let n <- sizeT p; 'let m <- sizeT q; ret (n < m). | Definition | lt_sizeT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"cps",
"polyF",
"ret",
"sizeT"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lift (p : {poly F}) | := map GRing.Const p. | Definition | lift | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"map",
"poly"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eval_lift (e : seq F) (p : {poly F}) : eval_poly e (lift p) = p. | Proof.
elim/poly_ind: p => [|p c]; first by rewrite /lift polyseq0.
rewrite -cons_poly_def /lift polyseq_cons /nilp.
case pn0: (_ == _) => /=; last by move->; rewrite -cons_poly_def.
move=> _; rewrite polyseqC.
case c0: (_==_)=> /=.
move: pn0; rewrite (eqP c0) size_poly_eq0; move/eqP->.
by apply: val_inj=> /=; rewr... | Lemma | eval_lift | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"add0r",
"apply",
"c0",
"cons_poly_def",
"eval_poly",
"last",
"lift",
"mul0r",
"nilp",
"poly",
"poly_ind",
"polyseq0",
"polyseqC",
"polyseq_cons",
"seq",
"size_poly_eq0",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lead_coefT p : cps tF | :=
if p is c :: q then
'let l <- lead_coefT q; 'if (l == 0) then c else l
else ret 0%T. | Fixpoint | lead_coefT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"cps",
"ret",
"tF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lead_coefTP (k : tF -> fF) :
(forall x e, qf_eval e (k x) = qf_eval e (k (eval e x)%:T%T)) ->
forall (p : polyF) (e : seq F),
qf_eval e (lead_coefT p k) = qf_eval e (k (lead_coef (eval_poly e p))%:T%T). | Proof.
move=> kP p e; elim: p => [|a p IHp]/= in k kP e *.
by rewrite lead_coef0 kP.
rewrite IHp; first by move=> *; rewrite //= -kP.
rewrite GRing.eval_If /= lead_coef_eq0.
case p'0: (_ == _); first by rewrite (eqP p'0) mul0r add0r lead_coefC -kP.
rewrite lead_coefDl ?lead_coefMX // polyseqC size_mul ?p'0 //.
by r... | Lemma | lead_coefTP | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"add0r",
"addnC",
"eval",
"eval_If",
"eval_poly",
"fF",
"lead_coef",
"lead_coef0",
"lead_coefC",
"lead_coefDl",
"lead_coefMX",
"lead_coefT",
"lead_coef_eq0",
"lt0n",
"ltnS",
"mul0r",
"polyF",
"polyseqC",
"qf_eval",
"seq",
"size_mul",
"size_polyX",
"size_poly_eq0",
"tF"
... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lead_coefT_qf (p : polyF) : rpoly p -> qf_cps (@rterm _) (lead_coefT p). | Proof.
elim: p => [_|c q ihp //= /andP[rc rq]]; first by apply: qf_cps_ret.
apply: qf_cps_bind => [|y ty]; first exact: ihp.
by apply: qf_cps_if; rewrite //= ty.
Qed. | Lemma | lead_coefT_qf | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"apply",
"lead_coefT",
"polyF",
"qf_cps",
"qf_cps_bind",
"qf_cps_if",
"qf_cps_ret",
"rpoly",
"rterm"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
amulXnT (a : tF) (n : nat) : polyF | :=
if n is n'.+1 then 0%T :: (amulXnT a n') else [:: a]. | Fixpoint | amulXnT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"n'",
"nat",
"polyF",
"tF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eval_amulXnT (a : tF) (n : nat) (e : seq F) :
eval_poly e (amulXnT a n) = (eval e a)%:P * 'X^n. | Proof.
elim: n=> [|n] /=; first by rewrite expr0 mulr1 mul0r add0r.
by move->; rewrite addr0 -mulrA -exprSr.
Qed. | Lemma | eval_amulXnT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"add0r",
"addr0",
"amulXnT",
"eval",
"eval_poly",
"expr0",
"exprSr",
"mul0r",
"mulr1",
"mulrA",
"nat",
"seq",
"tF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ramulXnT: forall a n, rterm a -> rpoly (amulXnT a n). | Proof. by move=> a n; elim: n a=> [a /= -> //|n ihn a ra]; apply: ihn. Qed. | Lemma | ramulXnT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"amulXnT",
"apply",
"rpoly",
"rterm"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
sumpT (p q : polyF) | :=
match p, q with a :: p, b :: q => (a + b)%T :: sumpT p q
| [::], q => q | p, [::] => p end. | Fixpoint | sumpT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"polyF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eval_sumpT (p q : polyF) (e : seq F) :
eval_poly e (sumpT p q) = (eval_poly e p) + (eval_poly e q). | Proof.
elim: p q => [|a p Hp] q /=; first by rewrite add0r.
case: q => [|b q] /=; first by rewrite addr0.
rewrite Hp mulrDl -!addrA; congr (_ + _); rewrite polyCD addrC -addrA.
by congr (_ + _); rewrite addrC.
Qed. | Lemma | eval_sumpT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"add0r",
"addr0",
"addrA",
"addrC",
"eval_poly",
"mulrDl",
"polyCD",
"polyF",
"seq",
"sumpT"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rsumpT (p q : polyF) : rpoly p -> rpoly q -> rpoly (sumpT p q). | Proof.
elim: p q=> [|a p ihp] q rp rq //; move: rp; case/andP=> ra rp.
case: q rq => [|b q]; rewrite /= ?ra ?rp //=.
by case/andP=> -> rq //=; apply: ihp.
Qed. | Lemma | rsumpT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"apply",
"polyF",
"rpoly",
"sumpT"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
mulpT (p q : polyF) | :=
if p isn't a :: p then [::]
else sumpT [seq (a * x)%T | x <- q] (0%T :: mulpT p q). | Fixpoint | mulpT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"polyF",
"seq",
"sumpT"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eval_mulpT (p q : polyF) (e : seq F) :
eval_poly e (mulpT p q) = (eval_poly e p) * (eval_poly e q). | Proof.
elim: p q=> [|a p Hp] q /=; first by rewrite mul0r.
rewrite eval_sumpT /= Hp addr0 mulrDl addrC mulrAC; congr (_ + _).
by elim: q=> [|b q Hq] /=; rewrite ?mulr0 // Hq polyCM mulrDr mulrA.
Qed. | Lemma | eval_mulpT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"addr0",
"addrC",
"eval_poly",
"eval_sumpT",
"mul0r",
"mulpT",
"mulr0",
"mulrA",
"mulrAC",
"mulrDl",
"mulrDr",
"polyCM",
"polyF",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rpoly_map_mul (t : tF) (p : polyF) (rt : rterm t) :
rpoly [seq (t * x)%T | x <- p] = rpoly p. | Proof. by rewrite /rpoly all_map; apply/eq_all => x; rewrite /= rt. Qed. | Lemma | rpoly_map_mul | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"all_map",
"apply",
"eq_all",
"polyF",
"rpoly",
"rterm",
"seq",
"tF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rmulpT (p q : polyF) : rpoly p -> rpoly q -> rpoly (mulpT p q). | Proof.
elim: p q=> [|a p ihp] q rp rq //=; move: rp; case/andP=> ra rp /=.
apply: rsumpT; last exact: ihp.
by rewrite rpoly_map_mul.
Qed. | Lemma | rmulpT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"apply",
"last",
"mulpT",
"polyF",
"rpoly",
"rpoly_map_mul",
"rsumpT"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
opppT : polyF -> polyF | := map (GRing.Mul (- 1%T)%T). | Definition | opppT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"map",
"polyF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eval_opppT (p : polyF) (e : seq F) :
eval_poly e (opppT p) = - eval_poly e p. | Proof.
by elim: p; rewrite /= ?oppr0 // => ? ? ->; rewrite !mulNr opprD polyCN mul1r.
Qed. | Lemma | eval_opppT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"eval_poly",
"mul1r",
"mulNr",
"opppT",
"oppr0",
"opprD",
"polyCN",
"polyF",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
natmulpT n : polyF -> polyF | := map (GRing.Mul n%:R%T). | Definition | natmulpT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"map",
"polyF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eval_natmulpT (p : polyF) (n : nat) (e : seq F) :
eval_poly e (natmulpT n p) = (eval_poly e p) *+ n. | Proof.
elim: p; rewrite //= ?mul0rn // => c p ->.
rewrite mulrnDl mulr_natl polyCMn; congr (_ + _).
by rewrite -mulr_natl mulrAC -mulrA mulr_natl mulrC.
Qed. | Lemma | eval_natmulpT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"eval_poly",
"mul0rn",
"mulrA",
"mulrAC",
"mulrC",
"mulr_natl",
"mulrnDl",
"nat",
"natmulpT",
"polyCMn",
"polyF",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
redivp_rec_loopT (q : polyF) sq cq (c : nat) (qq r : polyF)
(n : nat) {struct n} : cps (nat * polyF * polyF) | :=
'let sr <- sizeT r;
if sr < sq then ret (c, qq, r) else
'let lr <- lead_coefT r;
let m := amulXnT lr (sr - sq) in
let qq1 := sumpT (mulpT qq [::cq]) m in
let r1 := sumpT (mulpT r ([::cq])) (opppT (mulpT m q)) in
if n is n1.+1 then redivp_rec_loopT q sq cq c.+1 qq1 r1 n1
else ret (c.+1, qq1, r1). | Fixpoint | redivp_rec_loopT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"amulXnT",
"cps",
"lead_coefT",
"mulpT",
"nat",
"opppT",
"polyF",
"r1",
"ret",
"sizeT",
"sq",
"sr",
"sumpT"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
redivp_rec_loop (q : {poly F}) sq cq
(k : nat) (qq r : {poly F}) (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 redivp_rec_loop q sq cq k.+1 qq1 r1 n1 else
(k.+1, qq1, r1). | Fixpoint | redivp_rec_loop | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"lead_coef",
"nat",
"poly",
"r1",
"size",
"sq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
redivp_rec_loopTP (k : nat * polyF * polyF -> fF) :
(forall c qq r e, qf_eval e (k (c,qq,r))
= qf_eval e (k (c, lift (eval_poly e qq), lift (eval_poly e r))))
-> forall q sq cq c qq r n e
(d := redivp_rec_loop (eval_poly e q) sq (eval e cq)
c (eval_poly e qq) (eval_poly e r) n),
qf_eval e (redivp... | Proof.
move=> Pk q sq cq c qq r n e /=.
elim: n c qq r k Pk e => [|n Pn] c qq r k Pk e; rewrite sizeTP.
case ltrq : (_ < _); first by rewrite /= ltrq /= -Pk.
rewrite lead_coefTP => [a p|]; rewrite [in LHS]Pk; [symmetry|].
by rewrite [in LHS]Pk ?(eval_mulpT,eval_amulXnT,eval_sumpT, eval_opppT).
rewrite ?(eval_... | Lemma | redivp_rec_loopTP | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"add0r",
"e'",
"eval",
"eval_amulXnT",
"eval_lift",
"eval_mulpT",
"eval_opppT",
"eval_poly",
"eval_sumpT",
"fF",
"last",
"lead_coefTP",
"lift",
"ltrq",
"mul0r",
"mul_polyC",
"nat",
"polyF",
"qf_eval",
"redivp_rec_loop",
"redivp_rec_loopT",
"scale0r",
"sizeTP",
"sq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
redivp_rec_loopT_qf (q : polyF) (sq : nat) (cq : tF)
(c : nat) (qq r : polyF) (n : nat) :
rpoly q -> rterm cq -> rpoly qq -> rpoly r ->
qf_cps (fun x => [&& rpoly x.1.2 & rpoly x.2])
(redivp_rec_loopT q sq cq c qq r n). | Proof.
do ![move=>x/(pair x){x}] => rw; elim: n => [|n IHn]//= in q sq cq c qq r rw *;
apply: qf_cps_bind; do ?[by apply: sizeT_qf; rewrite !rw] => sr _;
case: ifPn => // _; do ?[by apply: qf_cps_ret; rewrite //= ?rw];
apply: qf_cps_bind; do ?[by apply: lead_coefT_qf; rewrite !rw] => lr /= rlr;
[apply: qf_cps_ret|apply... | Lemma | redivp_rec_loopT_qf | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"apply",
"lead_coefT_qf",
"nat",
"polyF",
"qf_cps",
"qf_cps_bind",
"qf_cps_ret",
"ramulXnT",
"redivp_rec_loopT",
"rmulpT",
"rpoly",
"rpoly_map_mul",
"rsumpT",
"rterm",
"sizeT_qf",
"sq",
"sr",
"tF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
redivpT (p : polyF) (q : polyF) : cps (nat * polyF * polyF) | :=
'let b <- isnull q;
if b then ret (0, [::0%T], p) else
'let sq <- sizeT q; 'let sp <- sizeT p;
'let lq <- lead_coefT q;
redivp_rec_loopT q sq lq 0 [::0%T] p sp. | Definition | redivpT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"cps",
"isnull",
"lead_coefT",
"nat",
"polyF",
"redivp_rec_loopT",
"ret",
"sizeT",
"sp",
"sq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
redivp_rec_loopP (q : {poly F}) (c : nat) (qq r : {poly F}) (n : nat) :
redivp_rec q c qq r n = redivp_rec_loop q (size q) (lead_coef q) c qq r n. | Proof. by elim: n c qq r => [| n Pn] c qq r //=; rewrite Pn. Qed. | Lemma | redivp_rec_loopP | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"lead_coef",
"nat",
"poly",
"redivp_rec",
"redivp_rec_loop",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
redivpTP (k : nat * polyF * polyF -> fF) :
(forall c qq r e,
qf_eval e (k (c,qq,r)) =
qf_eval e (k (c, lift (eval_poly e qq), lift (eval_poly e r)))) ->
forall p q e (d := redivp (eval_poly e p) (eval_poly e q)),
qf_eval e (redivpT p q k) = qf_eval e (k (d.1.1, lift d.1.2, lift d.2)). | Proof.
move=> Pk p q e /=; rewrite isnullP unlock /=.
case q0 : (eval_poly e q == 0) => /=; first by rewrite Pk /= mul0r add0r polyC0.
rewrite !sizeTP lead_coefTP /=; first by move=> *; rewrite !redivp_rec_loopTP.
rewrite redivp_rec_loopTP /=; first by move=> *; rewrite Pk.
by rewrite mul0r add0r polyC0 redivp_rec_loop... | Lemma | redivpTP | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"add0r",
"eval_poly",
"fF",
"isnullP",
"lead_coefTP",
"lift",
"mul0r",
"nat",
"polyC0",
"polyF",
"qf_eval",
"redivp",
"redivpT",
"redivp_rec_loopP",
"redivp_rec_loopTP",
"sizeTP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
redivpT_qf (p : polyF) (q : polyF) : rpoly p -> rpoly q ->
qf_cps (fun x => [&& rpoly x.1.2 & rpoly x.2]) (redivpT p q). | Proof.
move=> rp rq; apply: qf_cps_bind => [|[] _]; first exact: isnull_qf.
by apply: qf_cps_ret.
apply: qf_cps_bind => [|sp _]; first exact: sizeT_qf.
apply: qf_cps_bind => [|sq _]; first exact: sizeT_qf.
apply: qf_cps_bind => [|lq rlq]; first exact: lead_coefT_qf.
by apply: redivp_rec_loopT_qf => //=.
Qed. | Lemma | redivpT_qf | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"apply",
"isnull_qf",
"lead_coefT_qf",
"polyF",
"qf_cps",
"qf_cps_bind",
"qf_cps_ret",
"redivpT",
"redivp_rec_loopT_qf",
"rpoly",
"sizeT_qf",
"sp",
"sq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rmodpT (p : polyF) (q : polyF) : cps polyF | :=
'let d <- redivpT p q; ret d.2. | Definition | rmodpT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"cps",
"polyF",
"redivpT",
"ret"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdivpT (p : polyF) (q : polyF) : cps polyF | :=
'let d <- redivpT p q; ret d.1.2. | Definition | rdivpT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"cps",
"polyF",
"redivpT",
"ret"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rscalpT (p : polyF) (q : polyF) : cps nat | :=
'let d <- redivpT p q; ret d.1.1. | Definition | rscalpT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"cps",
"nat",
"polyF",
"redivpT",
"ret"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rdvdpT (p : polyF) (q : polyF) : cps bool | :=
'let d <- rmodpT p q; isnull d. | Definition | rdvdpT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"cps",
"isnull",
"polyF",
"rmodpT"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgcdp_loop n (pp qq : {poly F}) {struct n} | :=
let rr := rmodp pp qq in if rr == 0 then qq
else if n is n1.+1 then rgcdp_loop n1 qq rr else rr. | Fixpoint | rgcdp_loop | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"poly",
"rmodp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgcdp_loopT n (pp : polyF) (qq : polyF) : cps polyF | :=
'let rr <- rmodpT pp qq; 'let nrr <- isnull rr; if nrr then ret qq
else if n is n1.+1 then rgcdp_loopT n1 qq rr else ret rr. | Fixpoint | rgcdp_loopT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"cps",
"isnull",
"polyF",
"ret",
"rmodpT"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgcdp_loopP (k : polyF -> fF) :
(forall p e, qf_eval e (k p) = qf_eval e (k (lift (eval_poly e p)))) ->
forall n p q e,
qf_eval e (rgcdp_loopT n p q k) =
qf_eval e (k (lift (rgcdp_loop n (eval_poly e p) (eval_poly e q)))). | Proof.
move=> Pk n p q e; elim: n => /= [| m IHm] in p q e *;
rewrite redivpTP /==> *; rewrite ?isnullP ?eval_lift -/(rmodp _ _);
by case: (_ == _); do ?by rewrite -?Pk ?IHm ?eval_lift.
Qed. | Lemma | rgcdp_loopP | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"eval_lift",
"eval_poly",
"fF",
"isnullP",
"lift",
"polyF",
"qf_eval",
"redivpTP",
"rgcdp_loop",
"rgcdp_loopT",
"rmodp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgcdp_loopT_qf (n : nat) (p : polyF) (q : polyF) :
rpoly p -> rpoly q -> qf_cps rpoly (rgcdp_loopT n p q). | Proof.
elim: n => [|n IHn] in p q * => rp rq /=;
(apply: qf_cps_bind=> [|rr rrr]; [
apply: qf_cps_bind => [|[[a u] v]]; do ?exact: redivpT_qf;
by move=> /andP[/= ??]; apply: (@qf_cps_ret _ rpoly)|
apply: qf_cps_bind => [|[] _];
by [apply: isnull_qf|apply: qf_cps_ret|apply: IHn]]).
Qed. | Lemma | rgcdp_loopT_qf | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"apply",
"isnull_qf",
"nat",
"polyF",
"qf_cps",
"qf_cps_bind",
"qf_cps_ret",
"redivpT_qf",
"rgcdp_loopT",
"rpoly"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgcdpT (p : polyF) (q : polyF) : cps polyF | :=
let aux p1 q1 : cps polyF :=
'let b <- isnull p1; if b then ret q1
else 'let n <- sizeT p1; rgcdp_loopT n p1 q1 in
'let b <- lt_sizeT p q; if b then aux q p else aux p q. | Definition | rgcdpT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"cps",
"isnull",
"lt_sizeT",
"polyF",
"ret",
"rgcdp_loopT",
"sizeT"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgcdpTP (k : polyF -> fF) :
(forall p e, qf_eval e (k p) = qf_eval e (k (lift (eval_poly e p)))) ->
forall p q e, qf_eval e (rgcdpT p q k) =
qf_eval e (k (lift (rgcdp (eval_poly e p) (eval_poly e q)))). | Proof.
move=> Pk p q e; rewrite /rgcdpT /rgcdp !sizeTP /=.
case: (_ < _); rewrite !isnullP /=; case: (_ == _); rewrite -?Pk ?sizeTP;
by rewrite ?rgcdp_loopP.
Qed. | Lemma | rgcdpTP | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"eval_poly",
"fF",
"isnullP",
"lift",
"polyF",
"qf_eval",
"rgcdp",
"rgcdpT",
"rgcdp_loopP",
"sizeTP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgcdpT_qf (p : polyF) (q : polyF) :
rpoly p -> rpoly q -> qf_cps rpoly (rgcdpT p q). | Proof.
move=> rp rq k kP; rewrite /rgcdpT /=; do ![rewrite sizeT_qf => // ? _].
case: (_ < _); rewrite ?isnull_qf // => -[]; rewrite ?kP // => _;
by rewrite sizeT_qf => // ? _; rewrite rgcdp_loopT_qf.
Qed. | Lemma | rgcdpT_qf | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"isnull_qf",
"polyF",
"qf_cps",
"rgcdpT",
"rgcdp_loopT_qf",
"rpoly",
"sizeT_qf"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgcdpTs (ps : seq polyF) : cps polyF | :=
if ps is p :: pr then 'let pr <- rgcdpTs pr; rgcdpT p pr else ret [::0%T]. | Fixpoint | rgcdpTs | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"cps",
"polyF",
"ret",
"rgcdpT",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgcdpTsP (k : polyF -> fF) :
(forall p e, qf_eval e (k p) = qf_eval e (k (lift (eval_poly e p)))) ->
forall ps e,
qf_eval e (rgcdpTs ps k) =
qf_eval e (k (lift (\big[@rgcdp _/0%:P]_(i <- ps)(eval_poly e i)))). | Proof.
move=> Pk ps e; elim: ps k Pk => [|p ps Pps] /= k Pk.
by rewrite /= big_nil Pk /= mul0r add0r.
by rewrite big_cons Pps => *; rewrite !rgcdpTP // !eval_lift -?Pk.
Qed. | Lemma | rgcdpTsP | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"add0r",
"big_cons",
"big_nil",
"eval_lift",
"eval_poly",
"fF",
"lift",
"mul0r",
"polyF",
"qf_eval",
"rgcdp",
"rgcdpTP",
"rgcdpTs"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgcdpTs_qf (ps : seq polyF) :
all rpoly ps -> qf_cps rpoly (rgcdpTs ps). | Proof.
elim: ps => [_|c p ihp /andP[rc rp]] //=; first exact: qf_cps_ret.
by apply: qf_cps_bind => [|r rr]; [apply: ihp|apply: rgcdpT_qf].
Qed. | Lemma | rgcdpTs_qf | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"all",
"apply",
"polyF",
"qf_cps",
"qf_cps_bind",
"qf_cps_ret",
"rgcdpT_qf",
"rgcdpTs",
"rpoly",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgdcop_recT n (q : polyF) (p : polyF) | :=
if n is m.+1 then
'let g <- rgcdpT p q; 'let sg <- sizeT g;
if sg == 1 then ret p
else 'let r <- rdivpT p g;
rgdcop_recT m q r
else 'let b <- isnull q; ret [::b%:R%T]. | Fixpoint | rgdcop_recT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"isnull",
"polyF",
"rdivpT",
"ret",
"rgcdpT",
"sg",
"sizeT"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgdcop_recTP (k : polyF -> fF) :
(forall p e, qf_eval e (k p) = qf_eval e (k (lift (eval_poly e p))))
-> forall p q n e, qf_eval e (rgdcop_recT n p q k)
= qf_eval e (k (lift (rgdcop_rec (eval_poly e p) (eval_poly e q) n))). | Proof.
move=> Pk p q n e; elim: n => [|n Pn] /= in k Pk p q e *.
rewrite isnullP /=.
by case: (_ == _); rewrite Pk /= mul0r add0r ?(polyC0, polyC1).
rewrite /rcoprimep rgcdpTP ?sizeTP ?eval_lift => * /=; last first.
case: (_ == _);
by do ?[rewrite /= ?(=^~Pk, redivpTP, rgcdpTP, sizeTP, Pn, eval_lift) //==> *].
... | Lemma | rgdcop_recTP | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"add0r",
"eval_lift",
"eval_poly",
"fF",
"isnullP",
"last",
"lift",
"mul0r",
"polyC0",
"polyC1",
"polyF",
"qf_eval",
"rcoprimep",
"redivpTP",
"rgcdpTP",
"rgdcop_rec",
"rgdcop_recT",
"sizeTP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgdcop_recT_qf (n : nat) (p : polyF) (q : polyF) :
rpoly p -> rpoly q -> qf_cps rpoly (rgdcop_recT n p q). | Proof.
elim: n => [|n ihn] in p q * => k kP rp rq /=.
by rewrite isnull_qf => //*; rewrite rq.
rewrite rgcdpT_qf=> //*; rewrite sizeT_qf=> //*.
case: (_ == _); rewrite ?kP ?rq //= redivpT_qf=> //= ? /andP[??].
by rewrite ihn.
Qed. | Lemma | rgdcop_recT_qf | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"isnull_qf",
"nat",
"polyF",
"qf_cps",
"redivpT_qf",
"rgcdpT_qf",
"rgdcop_recT",
"rpoly",
"sizeT_qf"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgdcopT q p | := 'let sp <- sizeT p; rgdcop_recT sp q p. | Definition | rgdcopT | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"rgdcop_recT",
"sizeT",
"sp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgdcopTP (k : polyF -> fF) :
(forall p e, qf_eval e (k p) = qf_eval e (k (lift (eval_poly e p)))) ->
forall p q e, qf_eval e (rgdcopT p q k) =
qf_eval e (k (lift (rgdcop (eval_poly e p) (eval_poly e q)))). | Proof. by move=> *; rewrite sizeTP rgdcop_recTP 1?Pk. Qed. | Lemma | rgdcopTP | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"eval_poly",
"fF",
"lift",
"polyF",
"qf_eval",
"rgdcop",
"rgdcopT",
"rgdcop_recTP",
"sizeTP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rgdcopT_qf (p : polyF) (q : polyF) :
rpoly p -> rpoly q -> qf_cps rpoly (rgdcopT p q). | Proof.
by move=> rp rq k kP; rewrite sizeT_qf => //*; rewrite rgdcop_recT_qf.
Qed. | Lemma | rgdcopT_qf | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"polyF",
"qf_cps",
"rgdcopT",
"rgdcop_recT_qf",
"rpoly",
"sizeT_qf"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ex_elim_seq (ps : seq polyF) (q : polyF) : fF | :=
('let g <- rgcdpTs ps; 'let d <- rgdcopT q g;
'let n <- sizeT d; ret (n != 1)) GRing.Bool. | Definition | ex_elim_seq | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"Bool",
"fF",
"polyF",
"ret",
"rgcdpTs",
"rgdcopT",
"seq",
"sizeT"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ex_elim_seqP (ps : seq polyF) (q : polyF) (e : seq F) :
let gp := (\big[@rgcdp _/0%:P]_(p <- ps)(eval_poly e p)) in
qf_eval e (ex_elim_seq ps q) = (size (rgdcop (eval_poly e q) gp) != 1). | Proof.
by do ![rewrite (rgcdpTsP,rgdcopTP,sizeTP,eval_lift) //= | move=> * //=].
Qed. | Lemma | ex_elim_seqP | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"eval_lift",
"eval_poly",
"ex_elim_seq",
"polyF",
"qf_eval",
"rgcdp",
"rgcdpTsP",
"rgdcop",
"rgdcopTP",
"seq",
"size",
"sizeTP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ex_elim_seq_qf (ps : seq polyF) (q : polyF) :
all rpoly ps -> rpoly q -> qf (ex_elim_seq ps q). | Proof.
move=> rps rq; apply: rgcdpTs_qf=> // g rg; apply: rgdcopT_qf=> // d rd.
exact : sizeT_qf.
Qed. | Lemma | ex_elim_seq_qf | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"all",
"apply",
"ex_elim_seq",
"polyF",
"qf",
"rgcdpTs_qf",
"rgdcopT_qf",
"rpoly",
"seq",
"sizeT_qf"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
abstrX (i : nat) (t : tF) | :=
match t with
| 'X_n => if n == i then [::0; 1] else [::t]
| - x => opppT (abstrX i x)
| x + y => sumpT (abstrX i x) (abstrX i y)
| x * y => mulpT (abstrX i x) (abstrX i y)
| x *+ n => natmulpT n (abstrX i x)
| x ^+ n => let ax := (abstrX i x) in iter n (mulpT ax) [::1]
| _ => [::t]
en... | Fixpoint | abstrX | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"iter",
"mulpT",
"nat",
"natmulpT",
"opppT",
"sumpT",
"tF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
abstrXP (i : nat) (t : tF) (e : seq F) (x : F) :
rterm t -> (eval_poly e (abstrX i t)).[x] = eval (set_nth 0 e i x) t. | Proof.
elim: t => [n | r | n | t tP s sP | t tP | t tP n | t tP s sP | t tP | t tP n] h.
- move=> /=; case ni: (_ == _);
rewrite //= ?(mul0r,add0r,addr0,polyC1,mul1r,hornerX,hornerC);
by rewrite // nth_set_nth /= ni.
- by rewrite /= mul0r add0r hornerC.
- by rewrite /= mul0r add0r hornerC.
- by case/andP: h => ... | Lemma | abstrXP | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"abstrX",
"add0r",
"addr0",
"eval",
"eval_mulpT",
"eval_natmulpT",
"eval_opppT",
"eval_poly",
"eval_sumpT",
"expr0",
"exprSr",
"hornerC",
"hornerD",
"hornerM",
"hornerMn",
"hornerN",
"hornerX",
"mul0r",
"mul1r",
"mulrC",
"nat",
"nth_set_nth",
"polyC1",
"rterm",
"seq",... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rabstrX (i : nat) (t : tF) : rterm t -> rpoly (abstrX i t). | Proof.
elim: t; do ?[ by move=> * //=; do ?case: (_ == _)].
- move=> t irt s irs /=; case/andP=> rt rs.
by apply: rsumpT; rewrite ?irt ?irs //.
- by move=> t irt /= rt; rewrite rpoly_map_mul ?irt //.
- by move=> t irt /= n rt; rewrite rpoly_map_mul ?irt //.
- move=> t irt s irs /=; case/andP=> rt rs.
by apply: rmul... | Lemma | rabstrX | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"abstrX",
"apply",
"nat",
"rmulpT",
"rpoly",
"rpoly_map_mul",
"rsumpT",
"rterm",
"tF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
abstrX_mulM (i : nat) : {morph abstrX i : x y / x * y >-> mulpT x y}%T. | Proof. by []. Qed. | Lemma | abstrX_mulM | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"abstrX",
"mulpT",
"nat"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
abstrX1 (i : nat) : abstrX i 1%T = [::1%T]. | Proof. done. Qed. | Lemma | abstrX1 | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"abstrX",
"nat"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eval_poly_mulM e : {morph eval_poly e : x y / mulpT x y >-> x * y}. | Proof. by move=> x y; rewrite eval_mulpT. Qed. | Lemma | eval_poly_mulM | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"eval_mulpT",
"eval_poly",
"mulpT"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eval_poly1 e : eval_poly e [::1%T] = 1. | Proof. by rewrite /= mul0r add0r. Qed. | Lemma | eval_poly1 | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"add0r",
"eval_poly",
"mul0r"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
abstrX_bigmul | := (big_morph _ (abstrX_mulM _) (abstrX1 _)). | Notation | abstrX_bigmul | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"abstrX1",
"abstrX_mulM",
"big_morph"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eval_bigmul | := (big_morph _ (eval_poly_mulM _) (eval_poly1 _)). | Notation | eval_bigmul | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"big_morph",
"eval_poly1",
"eval_poly_mulM"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
bigmap_id | := (big_map _ (fun _ => true) id). | Notation | bigmap_id | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"big_map",
"id"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rseq_poly_map (x : nat) (ts : seq tF) :
all (@rterm _) ts -> all rpoly (map (abstrX x) ts). | Proof.
by elim: ts => //= t ts iht; case/andP=> rt rts; rewrite rabstrX // iht.
Qed. | Lemma | rseq_poly_map | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"abstrX",
"all",
"map",
"nat",
"rabstrX",
"rpoly",
"rterm",
"seq",
"tF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ex_elim (x : nat) (pqs : seq tF * seq tF) | :=
ex_elim_seq (map (abstrX x) pqs.1)
(abstrX x (\big[GRing.Mul/1%T]_(q <- pqs.2) q)). | Definition | ex_elim | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"abstrX",
"ex_elim_seq",
"map",
"nat",
"seq",
"tF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ex_elim_qf (x : nat) (pqs : seq tF * seq tF) :
GRing.dnf_rterm pqs -> qf (ex_elim x pqs). | case: pqs => ps qs; case/andP=> /= rps rqs.
apply: ex_elim_seq_qf; first exact: rseq_poly_map.
apply: rabstrX=> /=.
elim: qs rqs=> [|t ts iht] //=; first by rewrite big_nil.
by case/andP=> rt rts; rewrite big_cons /= rt /= iht.
Qed. | Lemma | ex_elim_qf | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"apply",
"big_cons",
"big_nil",
"dnf_rterm",
"ex_elim",
"ex_elim_seq_qf",
"nat",
"qf",
"rabstrX",
"rseq_poly_map",
"seq",
"tF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
holds_conj : forall e i x ps, all (@rterm _) ps ->
(GRing.holds (set_nth 0 e i x)
(foldr (fun t : tF => GRing.And (t == 0)) GRing.True%T ps)
<-> all ((@root _)^~ x) (map (eval_poly e \o abstrX i) ps)). | Proof.
move=> e i x; elim=> [|p ps ihps] //=.
case/andP=> rp rps; rewrite rootE abstrXP //.
constructor; first by case=> -> hps; rewrite eqxx /=; apply/ihps.
by case/andP; move/eqP=> -> psr; split=> //; apply/ihps.
Qed. | Lemma | holds_conj | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"And",
"True",
"abstrX",
"abstrXP",
"all",
"apply",
"eqxx",
"eval_poly",
"foldr",
"holds",
"map",
"root",
"rootE",
"rterm",
"set_nth",
"split",
"tF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
holds_conjn (e : seq F) (i : nat) (x : F) (ps : seq tF) :
all (@rterm _) ps ->
(GRing.holds (set_nth 0 e i x)
(foldr (fun t : tF => GRing.And (t != 0)) GRing.True ps) <->
all (fun p => ~~root p x) (map (eval_poly e \o abstrX i) ps)). | Proof.
elim: ps => [|p ps ihps] //=.
case/andP=> rp rps; rewrite rootE abstrXP //.
constructor; first by case=> /eqP-> hps /=; apply/ihps.
by case/andP=> pr psr; split; first apply/eqP=> //; apply/ihps.
Qed. | Lemma | holds_conjn | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"And",
"True",
"abstrX",
"abstrXP",
"all",
"apply",
"eval_poly",
"foldr",
"holds",
"map",
"nat",
"root",
"rootE",
"rterm",
"seq",
"set_nth",
"split",
"tF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
holds_ex_elim: GRing.valid_QE_proj ex_elim. | Proof.
move=> i [ps qs] /= e; case/andP=> /= rps rqs.
rewrite ex_elim_seqP big_map.
have -> : \big[@rgcdp _/0%:P]_(j <- ps) eval_poly e (abstrX i j) =
\big[@rgcdp _/0%:P]_(j <- (map (eval_poly e) (map (abstrX i) (ps)))) j.
by rewrite !big_map.
rewrite -!map_comp.
have aux I (l : seq I) (P : I -> {poly F})... | Lemma | holds_ex_elim | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"Px",
"abstrX",
"abstrX_bigmul",
"apply",
"big_cons",
"big_map",
"big_nil",
"bigmap_id",
"closed_nonrootP",
"closed_rootP",
"eqp_gcdr",
"eqp_rgcd_gcd",
"eqp_rgdco_gdco",
"eqp_root",
"eqp_sym",
"eqp_trans",
"eqpxx",
"eval_bigmul",
"eval_poly",
"ex_elim",
"ex_elim_seqP",
"gcd... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
wf_ex_elim : GRing.wf_QE_proj ex_elim. | Proof. by move=> i bc /= rbc; apply: ex_elim_qf. Qed. | Lemma | wf_ex_elim | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"apply",
"ex_elim",
"ex_elim_qf",
"wf_QE_proj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
countable_field_extension (F : countFieldType) (p : {poly F}) :
size p > 1 ->
{E : countFieldType & {FtoE : {rmorphism F -> E} &
{w : E | root (map_poly FtoE p) w
& forall u : E, exists q, u = (map_poly FtoE q).[w]}}}. | Proof.
pose fix d i :=
if i is i1.+1 then
let d1 := oapp (gcdp (d i1)) 0 (unpickle i1) in
if size d1 > 1 then d1 else d i1
else p.
move=> p_gt1; have sz_d i: size (d i) > 1 by elim: i => //= i IHi; case: ifP.
have dv_d i j: i <= j -> d j %| d i.
move/subnK <-; elim: {j}(j - i)%N => //= j IHj; case: ifP =>... | Lemma | countable_field_extension | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"Bezout_eq1_coprimepP",
"Build",
"addNKr",
"addr0",
"apply",
"comp_polyXr",
"coprimep",
"coprimep_dvdl",
"coprimep_sym",
"dvdp0",
"dvdp1",
"dvdp_add",
"dvdp_gcd_idr",
"dvdp_gcdl",
"dvdp_gcdr",
"dvdp_mull",
"dvdp_trans",
"eqp_size",
"equivE",
"gcdp",
"gcdp_eq0",
"horner_map"... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
countable_algebraic_closure (F : countFieldType) :
{K : countClosedFieldType & {FtoK : {rmorphism F -> K} | integralRange FtoK}}. | Proof.
pose minXp (R : nzRingType) (p : {poly R}) := if size p > 1 then p else 'X.
have minXp_gt1 R p: size (minXp R p) > 1.
by rewrite /minXp; case: ifP => // _; rewrite size_polyX.
have minXpE (R : nzRingType) (p : {poly R}) : size p > 1 -> minXp R p = p.
by rewrite /minXp => ->.
have ext1 p := countable_field_ex... | Lemma | countable_algebraic_closure | field | field/closed_field.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"choice",
"ssrnat",
"seq",
"fintype",
"generic_quotient",
"bigop",
"ssralg",
"poly",
"polydiv",
"matrix",
"mxpoly",
"countalg",
"ring_quotient",
"GRing.Theory",
"Pdiv.Ring",
"PreClosedField",
"C... | [
"Build",
"E_",
"EquivRel",
"add0r",
"addNr",
"addnK",
"addrA",
"addrC",
"allP",
"apply",
"bigmax_sup",
"bool_irrelevance",
"closed_field_axiom",
"code",
"codeK",
"coef_map",
"coef_rVpoly",
"countable_field_extension",
"decode",
"eq_axiomK",
"eq_bigr",
"eq_map_poly",
"eq_s... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
cyclotomic (z : R) n | :=
\prod_(k < n | coprime k n) ('X - (z ^+ k)%:P). | Definition | cyclotomic | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"coprime"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
cyclotomic_monic z n : cyclotomic z n \is monic. | Proof. exact: monic_prod_XsubC. Qed. | Lemma | cyclotomic_monic | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"cyclotomic",
"monic",
"monic_prod_XsubC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
size_cyclotomic z n : size (cyclotomic z n) = (totient n).+1. | Proof.
rewrite /cyclotomic -big_filter size_prod_XsubC; congr _.+1.
case: big_enumP => _ _ _ [_ ->].
rewrite totient_count_coprime -big_mkcond big_mkord -sum1_card.
by apply: eq_bigl => k; rewrite coprime_sym.
Qed. | Lemma | size_cyclotomic | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"apply",
"big_enumP",
"big_filter",
"big_mkcond",
"big_mkord",
"coprime_sym",
"cyclotomic",
"eq_bigl",
"size",
"size_prod_XsubC",
"sum1_card",
"totient",
"totient_count_coprime"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
separable_Xn_sub_1 (R : idomainType) n :
n%:R != 0 :> R -> @separable_poly R ('X^n - 1). | Proof.
case: n => [/eqP// | n nz_n]; rewrite unlock linearB /= derivC subr0.
rewrite derivXn -scaler_nat coprimepZr //= exprS -scaleN1r coprimep_sym.
by rewrite coprimep_addl_mul coprimepZr ?coprimep1 // (signr_eq0 _ 1).
Qed. | Lemma | separable_Xn_sub_1 | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"coprimep1",
"coprimepZr",
"coprimep_addl_mul",
"coprimep_sym",
"derivC",
"derivXn",
"exprS",
"linearB",
"scaleN1r",
"scaler_nat",
"signr_eq0",
"subr0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
root_cyclotomic x : root (cyclotomic z n) x = n.-primitive_root x. | Proof.
transitivity (x \in [seq z ^+ i | i : 'I_n in [pred i : 'I_n | coprime i n]]).
by rewrite -root_prod_XsubC big_image.
apply/imageP/idP=> [[k co_k_n ->] | prim_x].
by rewrite prim_root_exp_coprime.
have [k Dx] := prim_rootP prim_z (prim_expr_order prim_x).
exists (Ordinal (ltn_pmod k n_gt0)) => /=; last by re... | Lemma | root_cyclotomic | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"Dx",
"apply",
"big_image",
"coprime",
"coprime_modl",
"cyclotomic",
"imageP",
"inE",
"last",
"ltn_pmod",
"n_gt0",
"prim_expr_mod",
"prim_expr_order",
"prim_rootP",
"prim_root_exp_coprime",
"prim_z",
"root",
"root_prod_XsubC",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
prod_cyclotomic :
'X^n - 1 = \prod_(d <- divisors n) cyclotomic (z ^+ (n %/ d)) d. | Proof.
have in_d d: (d %| n)%N -> val (@inord n d) = d by move/dvdn_leq/inordK=> /= ->.
have dv_n k: (n %/ gcdn k n %| n)%N.
by rewrite -{3}(divnK (dvdn_gcdr k n)) dvdn_mulr.
have [uDn _ inDn] := divisors_correct n_gt0.
have defDn: divisors n = map val (map (@inord n) (divisors n)).
by rewrite -map_comp map_id_in /... | Lemma | prod_cyclotomic | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"apply",
"big_map",
"big_mkord",
"big_uniq",
"cyclotomic",
"d_gt0",
"divisors",
"divisors_correct",
"divnA",
"divnK",
"divn_mulAC",
"divnn",
"dvdn",
"dvdn_gcdl",
"dvdn_gcdr",
"dvdn_leq",
"dvdn_mulr",
"eq_big",
"eq_sym",
"eqnP",
"eqn_mul",
"exprM",
"fP",
"factor_Xn_sub_1... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
algC_intr_inj | := @intr_inj algC. | Definition | algC_intr_inj | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"algC",
"intr_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
intCK | := (@intrKfloor algC). | Notation | intCK | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"algC",
"intrKfloor"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
C_prim_root_exists n : (n > 0)%N -> {z : algC | n.-primitive_root z}. | Proof.
pose p : {poly algC} := 'X^n - 1; have [r Dp] := closed_field_poly_normal p.
move=> n_gt0; apply/sigW; rewrite (monicP _) ?monicXnsubC // scale1r in Dp.
have rn1: all n.-unity_root r by apply/allP=> z; rewrite -root_prod_XsubC -Dp.
have sz_r: (n < (size r).+1)%N.
by rewrite -(size_prod_XsubC r id) -Dp size_Xns... | Lemma | C_prim_root_exists | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"algC",
"all",
"allP",
"apply",
"closed_field_poly_normal",
"hasP",
"has_prim_root",
"id",
"last",
"lt0n",
"monicP",
"monicXnsubC",
"n_gt0",
"pnatr_eq0",
"poly",
"root_prod_XsubC",
"scale1r",
"separable_Xn_sub_1",
"separable_prod_XsubC",
"sigW",
"size",
"size_XnsubC",
"si... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Cyclotomic n : {poly int} | :=
let: exist z _ := C_prim_root_exists (ltn0Sn n.-1) in
map_poly Num.floor (cyclotomic z n). | Definition | Cyclotomic | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"C_prim_root_exists",
"cyclotomic",
"floor",
"int",
"ltn0Sn",
"map_poly",
"poly"
] | (Integral) Cyclotomic polynomials. | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
"''Phi_' n" | := (Cyclotomic n)
(at level 8, n at level 2, format "''Phi_' n"). | Notation | ''Phi_' n | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"Cyclotomic"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Cyclotomic_monic n : 'Phi_n \is monic. | Proof.
rewrite /'Phi_n; case: (C_prim_root_exists _) => z /= _.
rewrite monicE lead_coefE coef_map_id0 ?(int_algC_K 0) ?floor0 //.
by rewrite size_poly_eq -lead_coefE (monicP (cyclotomic_monic _ _)) (intCK 1).
Qed. | Lemma | Cyclotomic_monic | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"C_prim_root_exists",
"coef_map_id0",
"cyclotomic_monic",
"floor0",
"intCK",
"lead_coefE",
"monic",
"monicE",
"monicP",
"size_poly_eq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Cintr_Cyclotomic n z :
n.-primitive_root z -> pZtoC 'Phi_n = cyclotomic z n. | Proof.
elim/ltn_ind: n z => n IHn z0 prim_z0.
rewrite /'Phi_n; case: (C_prim_root_exists _) => z /=.
have n_gt0 := prim_order_gt0 prim_z0; rewrite prednK // => prim_z.
have [uDn _ inDn] := divisors_correct n_gt0.
pose q := \prod_(d <- rem n (divisors n)) 'Phi_d.
have mon_q: q \is monic by apply: monic_prod => d _; appl... | Lemma | Cintr_Cyclotomic | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"C_prim_root_exists",
"Cyclotomic_monic",
"QtoC",
"R1",
"R2",
"ZtoC",
"ZtoQ",
"algC",
"apply",
"big_rem",
"chinese_modr",
"coef_map",
"coprime",
"coprimeMl",
"coprime_modl",
"cyclotomic",
"divisors",
"divisors_correct",
"divnn",
"dvdn_leq",
"dvdn_prim_root",
"dvdpP",
"dvd... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
prod_Cyclotomic n :
(n > 0)%N -> \prod_(d <- divisors n) 'Phi_d = 'X^n - 1. | Proof.
move=> n_gt0; have [z prim_z] := C_prim_root_exists n_gt0.
apply: (map_inj_poly (intr_inj : injective ZtoC)) => //.
rewrite rmorphB rmorph1 rmorph_prod /= map_polyXn (prod_cyclotomic prim_z).
apply: eq_big_seq => d; rewrite -dvdn_divisors // => d_dv_n.
by rewrite -Cintr_Cyclotomic ?dvdn_prim_root.
Qed. | Lemma | prod_Cyclotomic | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"C_prim_root_exists",
"Cintr_Cyclotomic",
"ZtoC",
"apply",
"divisors",
"dvdn_divisors",
"dvdn_prim_root",
"eq_big_seq",
"intr_inj",
"map_inj_poly",
"map_polyXn",
"n_gt0",
"prim_z",
"prod_cyclotomic",
"rmorph1",
"rmorphB",
"rmorph_prod"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Cyclotomic0 : 'Phi_0 = 1. | Proof.
rewrite /'Phi_0; case: (C_prim_root_exists _) => z /= _.
by rewrite -[1]polyseqK /cyclotomic big_ord0 map_polyE !polyseq1 /= (intCK 1).
Qed. | Lemma | Cyclotomic0 | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"C_prim_root_exists",
"big_ord0",
"cyclotomic",
"intCK",
"map_polyE",
"polyseq1",
"polyseqK"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
size_Cyclotomic n : size 'Phi_n = (totient n).+1. | Proof.
have [-> | n_gt0] := posnP n; first by rewrite Cyclotomic0 polyseq1.
have [z prim_z] := C_prim_root_exists n_gt0.
rewrite -(size_map_inj_poly (can_inj intCK)) //.
by rewrite (Cintr_Cyclotomic prim_z) size_cyclotomic.
Qed. | Lemma | size_Cyclotomic | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"C_prim_root_exists",
"Cintr_Cyclotomic",
"Cyclotomic0",
"intCK",
"n_gt0",
"polyseq1",
"posnP",
"prim_z",
"size",
"size_cyclotomic",
"size_map_inj_poly",
"totient"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
minCpoly_cyclotomic n z :
n.-primitive_root z -> minCpoly z = cyclotomic z n. | Proof.
move=> prim_z; have n_gt0 := prim_order_gt0 prim_z.
have Dpz := Cintr_Cyclotomic prim_z; set pz := cyclotomic z n in Dpz *.
have mon_pz: pz \is monic by apply: cyclotomic_monic.
have pz0: root pz z by rewrite root_cyclotomic.
have [pf [Dpf mon_pf] dv_pf] := minCpolyP z.
have /dvdpP_rat_int[f [af nz_af Df] [g /es... | Lemma | minCpoly_cyclotomic | field | field/cyclotomic.v | [
"mathcomp",
"ssreflect",
"ssrbool",
"ssrfun",
"eqtype",
"ssrnat",
"seq",
"path",
"div",
"choice",
"fintype",
"tuple",
"finfun",
"bigop",
"prime",
"ssralg",
"poly",
"finset",
"fingroup",
"finalg",
"zmodp",
"cyclic",
"ssrnum",
"ssrint",
"archimedean",
"polydiv",
"in... | [
"Bezout_coprimepP",
"Cintr_Cyclotomic",
"Cyclotomic_monic",
"absz",
"abszM",
"absz_eq0",
"add0r",
"addnS",
"apply",
"big1",
"big_image",
"big_ord_recr",
"big_rem",
"closed_field_poly_normal",
"coefXn",
"coefZ",
"coef_sum",
"comp_polyE",
"comp_polyXr",
"coprime",
"coprimeMl",
... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"\dim_ E V" | := (divn (\dim V) (\dim E))
(at level 10, E at level 2, V at level 8, format "\dim_ E V") : nat_scope. | Notation | \dim_ E V | field | field/falgebra.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"path",
"choice",
"fintype",
"div",
"tuple",
"finfun",
"bigop",
"ssralg",
"finalg",
"zmodp",
"matrix",
"vector",
"poly",
"GRing.Theory",
"VectorInternalTheory",
"FalgLfun"
] | [
"dim",
"divn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
FalgType | := falgType. | Notation | FalgType | field | field/falgebra.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"path",
"choice",
"fintype",
"div",
"tuple",
"finfun",
"bigop",
"ssralg",
"finalg",
"zmodp",
"matrix",
"vector",
"poly",
"GRing.Theory",
"VectorInternalTheory",
"FalgLfun"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
dim_gt0 : dim A > 0. | Proof.
rewrite lt0n; apply: contraNneq (oner_neq0 A) => aT0; apply/eqP/v2r_inj.
by do 2!move: (v2r _); rewrite aT0 => u v; rewrite !thinmx0.
Qed. | Lemma | dim_gt0 | field | field/falgebra.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"path",
"choice",
"fintype",
"div",
"tuple",
"finfun",
"bigop",
"ssralg",
"finalg",
"zmodp",
"matrix",
"vector",
"poly",
"GRing.Theory",
"VectorInternalTheory",
"FalgLfun"
] | [
"apply",
"contraNneq",
"dim",
"lt0n",
"oner_neq0",
"thinmx0",
"v2r",
"v2r_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
vA : Vector.type K | := A. | Let | vA | field | field/falgebra.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"path",
"choice",
"fintype",
"div",
"tuple",
"finfun",
"bigop",
"ssralg",
"finalg",
"zmodp",
"matrix",
"vector",
"poly",
"GRing.Theory",
"VectorInternalTheory",
"FalgLfun"
] | [
"type"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
am u | := linfun (u \o* idfun : vA -> vA). | Let | am | field | field/falgebra.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"path",
"choice",
"fintype",
"div",
"tuple",
"finfun",
"bigop",
"ssralg",
"finalg",
"zmodp",
"matrix",
"vector",
"poly",
"GRing.Theory",
"VectorInternalTheory",
"FalgLfun"
] | [
"linfun",
"vA"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
uam | := [pred u | lker (am u) == 0%VS]. | Let | uam | field | field/falgebra.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"path",
"choice",
"fintype",
"div",
"tuple",
"finfun",
"bigop",
"ssralg",
"finalg",
"zmodp",
"matrix",
"vector",
"poly",
"GRing.Theory",
"VectorInternalTheory",
"FalgLfun"
] | [
"am",
"lker"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
vam | := [fun u => if u \in uam then (am u)^-1%VF 1 else u]. | Let | vam | field | field/falgebra.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"path",
"choice",
"fintype",
"div",
"tuple",
"finfun",
"bigop",
"ssralg",
"finalg",
"zmodp",
"matrix",
"vector",
"poly",
"GRing.Theory",
"VectorInternalTheory",
"FalgLfun"
] | [
"am",
"uam"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
amE u v : am u v = v * u. | Proof. by rewrite lfunE. Qed. | Lemma | amE | field | field/falgebra.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"path",
"choice",
"fintype",
"div",
"tuple",
"finfun",
"bigop",
"ssralg",
"finalg",
"zmodp",
"matrix",
"vector",
"poly",
"GRing.Theory",
"VectorInternalTheory",
"FalgLfun"
] | [
"am",
"lfunE"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
mulVr : {in uam, left_inverse 1 vam *%R}. | Proof. by move=> u Uu; rewrite /= Uu -amE lker0_lfunVK. Qed. | Lemma | mulVr | field | field/falgebra.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"path",
"choice",
"fintype",
"div",
"tuple",
"finfun",
"bigop",
"ssralg",
"finalg",
"zmodp",
"matrix",
"vector",
"poly",
"GRing.Theory",
"VectorInternalTheory",
"FalgLfun"
] | [
"Uu",
"amE",
"lker0_lfunVK",
"uam",
"vam"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
divrr : {in uam, right_inverse 1 vam *%R}. | Proof.
by move=> u Uu; apply/(lker0P Uu); rewrite !amE -mulrA mulVr // mul1r mulr1.
Qed. | Lemma | divrr | field | field/falgebra.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"path",
"choice",
"fintype",
"div",
"tuple",
"finfun",
"bigop",
"ssralg",
"finalg",
"zmodp",
"matrix",
"vector",
"poly",
"GRing.Theory",
"VectorInternalTheory",
"FalgLfun"
] | [
"Uu",
"amE",
"apply",
"lker0P",
"mul1r",
"mulVr",
"mulr1",
"mulrA",
"uam",
"vam"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
unitrP : forall x y, y * x = 1 /\ x * y = 1 -> uam x. | Proof.
move=> u v [_ uv1].
by apply/lker0P=> w1 w2 /(congr1 (am v)); rewrite !amE -!mulrA uv1 !mulr1.
Qed. | Lemma | unitrP | field | field/falgebra.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"path",
"choice",
"fintype",
"div",
"tuple",
"finfun",
"bigop",
"ssralg",
"finalg",
"zmodp",
"matrix",
"vector",
"poly",
"GRing.Theory",
"VectorInternalTheory",
"FalgLfun"
] | [
"am",
"amE",
"apply",
"lker0P",
"mulr1",
"mulrA",
"uam"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
invr_out : {in [predC uam], vam =1 id}. | Proof. by move=> u /negbTE/= ->. Qed. | Lemma | invr_out | field | field/falgebra.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"path",
"choice",
"fintype",
"div",
"tuple",
"finfun",
"bigop",
"ssralg",
"finalg",
"zmodp",
"matrix",
"vector",
"poly",
"GRing.Theory",
"VectorInternalTheory",
"FalgLfun"
] | [
"id",
"uam",
"vam"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"1" | := (vline 1) : vspace_scope. | Notation | 1 | field | field/falgebra.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"path",
"choice",
"fintype",
"div",
"tuple",
"finfun",
"bigop",
"ssralg",
"finalg",
"zmodp",
"matrix",
"vector",
"poly",
"GRing.Theory",
"VectorInternalTheory",
"FalgLfun"
] | [
"vline"
] | 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.