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
mem_npoly_enum p : p \in npoly_enum.
Proof. rewrite /npoly_enum; case: n => [|k] // in p *. case: p => [p sp] /=. by rewrite in_cons -val_eqE /= -size_poly_leq0 [size _ <= _]sp. rewrite mem_pmap_sub; apply/mapP. eexists [ffun i : 'I__ => p`_i]; first by rewrite mem_enum. apply/polyP => i; rewrite coef_poly. have [i_small|i_big] := ltnP; first by rewri...
Lemma
mem_npoly_enum
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "coef_poly", "ffunE", "in_cons", "inordK", "leq_trans", "ltnP", "mapP", "mem_enum", "mem_pmap_sub", "npoly_enum", "nth_default", "polyP", "size", "size_npoly", "size_poly_leq0", "sp", "val_eqE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
card_npoly : #|{poly_n R}| = (#|R| ^ n)%N.
Proof. rewrite -(card_imset _ (can_inj (@npoly_rV_K _ _))) eq_cardT; last first. by rewrite -cardT /= card_mx mul1n. by move=> v; apply/imsetP; exists (rVnpoly v); rewrite ?rVnpolyK //. Qed.
Lemma
card_npoly
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "cardT", "card_imset", "card_mx", "eq_cardT", "imsetP", "last", "mul1n", "npoly_rV_K", "rVnpoly", "rVnpolyK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
irreducibleb
:= ((1 < size p) && [forall q : {poly_((size p).-1) R}, (rdvdp q p)%R ==> (size q <= 1)])%N.
Definition
irreducibleb
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "rdvdp", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
irreducibleP : reflect (irreducible_poly p) irreducibleb.
Proof. rewrite /irreducibleb /irreducible_poly. apply: (iffP idP) => [/andP[sp /'forall_implyP /= Fp]|[sp Fpoly]]. have sp_gt0 : size p > 0 by case: size sp. have p_neq0 : p != 0 by rewrite -size_poly_eq0; case: size sp. split => // q sq_neq1 dvd_qp; rewrite -dvdp_size_eqp // eqn_leq dvdp_leq //=. apply: contra...
Lemma
irreducibleP
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "dvd0p", "dvdpE", "dvdp_leq", "dvdp_size_eqp", "eqn_leq", "eqp_size", "irreducible_poly", "irreducibleb", "leq_eqVlt", "ltnNge", "ltnS", "ltnn", "prednK", "size", "size_npoly", "size_poly_eq0", "size_poly_leq0", "sp", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dim_polyn : \dim (fullv : {vspace {poly_n K}}) = n.
Proof. by rewrite [LHS]mxrank_gen mxrank1. Qed.
Lemma
dim_polyn
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "dim", "fullv", "mxrank1", "mxrank_gen" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
npolyX : n.-tuple {poly_n K}
:= [tuple npolyp n 'X^i | i < n].
Definition
npolyX
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "npolyp", "tuple" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"''nX^' i"
:= (tnth npolyX i).
Notation
''nX^' i
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "npolyX", "tnth" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
npolyXE (i : 'I_n) : 'nX^i = 'X^i :> {poly _}.
Proof. by rewrite tnth_map tnth_ord_tuple npolypK // size_polyXn. Qed.
Lemma
npolyXE
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "npolypK", "poly", "size_polyXn", "tnth_map", "tnth_ord_tuple" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
nth_npolyX (i : 'I_n) : npolyX`_i = 'nX^i.
Proof. by rewrite -tnth_nth. Qed.
Lemma
nth_npolyX
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "npolyX", "tnth_nth" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
npolyX_free : free npolyX.
Proof. apply/freeP=> u /= sum_uX_eq0 i; have /npolyP /(_ i) := sum_uX_eq0. rewrite (@big_morph _ _ _ 0%R +%R) // coef_sum coef0. rewrite (bigD1 i) ?big1 /= ?addr0 ?coefZ ?(nth_map 0%N) ?size_iota //; last by rewrite nth_npolyX npolyXE coefXn eqxx mulr1. move=> j; rewrite -val_eqE /= => neq_ji. by rewrite nth_npolyX n...
Lemma
npolyX_free
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "addr0", "apply", "big1", "bigD1", "big_morph", "coef0", "coefXn", "coefZ", "coef_sum", "eq_sym", "eqxx", "free", "freeP", "last", "mulr0", "mulr1", "npolyP", "npolyX", "npolyXE", "nth_map", "nth_npolyX", "size_iota", "val_eqE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
npolyX_full : basis_of fullv npolyX.
Proof. by rewrite basisEfree npolyX_free subvf size_map size_enum_ord dim_polyn /=. Qed.
Lemma
npolyX_full
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "basisEfree", "basis_of", "dim_polyn", "fullv", "npolyX", "npolyX_free", "size_enum_ord", "size_map", "subvf" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
npolyX_coords (p : {poly_n K}) i : coord npolyX i p = p`_i.
Proof. rewrite [p in RHS](coord_basis npolyX_full) ?memvf // coefn_sum. rewrite (bigD1 i) //= coefZ nth_npolyX npolyXE coefXn eqxx mulr1 big1 ?addr0//. move=> j; rewrite -val_eqE => /= neq_ji. by rewrite coefZ nth_npolyX npolyXE coefXn eq_sym (negPf neq_ji) mulr0. Qed.
Lemma
npolyX_coords
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "addr0", "big1", "bigD1", "coefXn", "coefZ", "coefn_sum", "coord", "coord_basis", "eq_sym", "eqxx", "memvf", "mulr0", "mulr1", "npolyX", "npolyXE", "npolyX_full", "nth_npolyX", "val_eqE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
npolyX_gen (p : {poly K}) : (size p <= n)%N -> p = \sum_(i < n) p`_i *: 'nX^i.
Proof. move=> sp; rewrite -[p](@npolypK _ n) //. rewrite [npolyp _ _ in LHS](coord_basis npolyX_full) ?memvf //. rewrite (@big_morph _ _ _ 0%R +%R) // !raddf_sum. by apply: eq_bigr=> i _; rewrite npolyX_coords //= nth_npolyX npolyXE. Qed.
Lemma
npolyX_gen
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "big_morph", "coord_basis", "eq_bigr", "memvf", "npolyXE", "npolyX_coords", "npolyX_full", "npolyp", "npolypK", "nth_npolyX", "poly", "raddf_sum", "size", "sp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lagrange_def
:= (fun i :'I_n => let k := i in let p := \prod_(j < n | j != k) ('X - (x j)%:P) in (p.[x k]^-1)%:P * p).
Notation
lagrange_def
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lagrange_key : unit.
Proof. exact: tt. Qed.
Fact
lagrange_key
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lagrange
:= locked_with lagrange_key [tuple npolyp n (lagrange_def i) | i < n].
Definition
lagrange
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "lagrange_def", "lagrange_key", "npolyp", "tuple" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lagrange_
:= (tnth lagrange).
Notation
lagrange_
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "lagrange", "tnth" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
n_gt0 : (0 < n)%N.
Hypothesis
n_gt0
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
x_inj : injective x.
Hypothesis
x_inj
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lagrange_def_sample (i j : 'I_n) : (lagrange_def i).[x j] = (i == j)%:R.
Proof. clear n_gt0; rewrite hornerM hornerC; set p := (\prod_(_ < _ | _) _). have [<-|neq_ij] /= := altP eqP. rewrite mulVf // horner_prod; apply/prodf_neq0 => k neq_ki. by rewrite hornerXsubC subr_eq0 inj_eq // eq_sym. rewrite [X in _ * X]horner_prod (bigD1 j) 1?eq_sym //=. by rewrite hornerXsubC subrr mul0r mulr0...
Let
lagrange_def_sample
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "bigD1", "eq_sym", "hornerC", "hornerM", "hornerXsubC", "horner_prod", "inj_eq", "lagrange_def", "mul0r", "mulVf", "mulr0", "n_gt0", "prodf_neq0", "subr_eq0", "subrr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
size_lagrange_def i : size (lagrange_def i) = n.
Proof. rewrite size_Cmul. suff : (lagrange_def i).[x i] != 0. by rewrite hornerE mulf_eq0 => /norP []. by rewrite lagrange_def_sample ?eqxx ?oner_eq0. rewrite size_prod /=. by move=> j neq_ji; rewrite polyXsubC_eq0. rewrite (eq_bigr (fun=> (2 * 1)%N)). by move=> j neq_ji; rewrite size_XsubC. rewrite -big_di...
Let
size_lagrange_def
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "addSn", "addnK", "addnn", "big_distrr", "cardC1", "card_ord", "eq_bigr", "eqxx", "hornerE", "lagrange_def", "lagrange_def_sample", "mul2n", "mulf_eq0", "n_gt0", "oner_eq0", "polyXsubC_eq0", "size", "size_Cmul", "size_XsubC", "size_prod", "sum1_card" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lagrangeE i : lagrange_ i = lagrange_def i :> {poly _}.
Proof. rewrite [lagrange]unlock tnth_map. by rewrite [val _]npolypK tnth_ord_tuple // size_lagrange_def. Qed.
Lemma
lagrangeE
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "lagrange", "lagrange_", "lagrange_def", "npolypK", "poly", "size_lagrange_def", "tnth_map", "tnth_ord_tuple", "val" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
nth_lagrange (i : 'I_n) : lagrange`_i = lagrange_ i.
Proof. by rewrite -tnth_nth. Qed.
Lemma
nth_lagrange
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "lagrange", "lagrange_", "tnth_nth" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
size_lagrange_ i : size (lagrange_ i) = n.
Proof. by rewrite lagrangeE size_lagrange_def. Qed.
Lemma
size_lagrange_
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "lagrangeE", "lagrange_", "size", "size_lagrange_def" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
size_lagrange : size lagrange = n.
Proof. by rewrite size_tuple. Qed.
Lemma
size_lagrange
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "lagrange", "size", "size_tuple" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lagrange_sample (i j : 'I_n) : (lagrange_ i).[x j] = (i == j)%:R.
Proof. by rewrite lagrangeE lagrange_def_sample. Qed.
Lemma
lagrange_sample
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "lagrangeE", "lagrange_", "lagrange_def_sample" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lagrange_free : free lagrange.
Proof. apply/freeP=> lambda eq_l i. have /(congr1 (fun p : {poly__ _} => p.[x i])) := eq_l. rewrite (@big_morph _ _ _ 0%R +%R) // horner_sum horner0. rewrite (bigD1 i) // big1 => [j /= /negPf ji|] /=; by rewrite ?hornerE nth_lagrange lagrange_sample ?eqxx ?ji ?mulr1 ?mulr0. Qed.
Lemma
lagrange_free
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "big1", "bigD1", "big_morph", "eqxx", "free", "freeP", "horner0", "hornerE", "horner_sum", "lagrange", "lagrange_sample", "mulr0", "mulr1", "nth_lagrange" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lagrange_full : basis_of fullv lagrange.
Proof. by rewrite basisEfree lagrange_free subvf size_lagrange dim_polyn /=. Qed.
Lemma
lagrange_full
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "basisEfree", "basis_of", "dim_polyn", "fullv", "lagrange", "lagrange_free", "size_lagrange", "subvf" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lagrange_coords (p : {poly_n K}) i : coord lagrange i p = p.[x i].
Proof. rewrite [p in RHS](coord_basis lagrange_full) ?memvf //. rewrite (@big_morph _ _ _ 0%R +%R) // horner_sum. rewrite (bigD1 i) // big1 => [j /= /negPf ji|] /=; by rewrite ?hornerE nth_lagrange lagrange_sample ?eqxx ?ji ?mulr1 ?mulr0. Qed.
Lemma
lagrange_coords
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "big1", "bigD1", "big_morph", "coord", "coord_basis", "eqxx", "hornerE", "horner_sum", "lagrange", "lagrange_full", "lagrange_sample", "memvf", "mulr0", "mulr1", "nth_lagrange" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lagrange_gen (p : {poly K}) : (size p <= n)%N -> p = \sum_(i < n) p.[x i]%:P * lagrange_ i.
Proof. move=> sp; rewrite -[p](@npolypK _ n) //. rewrite [npolyp _ _ in LHS](coord_basis lagrange_full) ?memvf //. rewrite (@big_morph _ _ _ 0%R +%R) //; apply: eq_bigr=> i _. by rewrite lagrange_coords mul_polyC nth_lagrange. Qed.
Lemma
lagrange_gen
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "big_morph", "coord_basis", "eq_bigr", "lagrange_", "lagrange_coords", "lagrange_full", "memvf", "mul_polyC", "npolyp", "npolypK", "nth_lagrange", "poly", "size", "sp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"''nX^' i"
:= (tnth (npolyX _) i) : ring_scope.
Notation
''nX^' i
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "npolyX", "tnth" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"x .-lagrange"
:= (lagrange x) : ring_scope.
Notation
x .-lagrange
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "lagrange" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"x .-lagrange_"
:= (tnth x.-lagrange) : ring_scope.
Notation
x .-lagrange_
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "lagrange", "tnth" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mk_monic
:= if (1 < size h)%N && (h \is monic) then h else 'X.
Definition
mk_monic
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "monic", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly
:= {poly_(size mk_monic).-1 R}.
Definition
qpoly
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "mk_monic", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"{ 'poly' '%/' p }"
:= (qpoly p) : type_scope.
Notation
{ 'poly' '%/' p }
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "qpoly" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
monic_mk_monic : (mk_monic h) \is monic.
Proof. rewrite /mk_monic; case: leqP=> [_|/=]; first by apply: monicX. by case E : (h \is monic) => [->//|] => _; apply: monicX. Qed.
Lemma
monic_mk_monic
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "leqP", "mk_monic", "monic", "monicX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
size_mk_monic_gt1 : (1 < size (mk_monic h))%N.
Proof. by rewrite !fun_if size_polyX; case: leqP => //=; rewrite if_same. Qed.
Lemma
size_mk_monic_gt1
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "leqP", "mk_monic", "size", "size_polyX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
size_mk_monic_gt0 : (0 < size (mk_monic h))%N.
Proof. by rewrite (leq_trans _ size_mk_monic_gt1). Qed.
Lemma
size_mk_monic_gt0
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "leq_trans", "mk_monic", "size", "size_mk_monic_gt1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mk_monic_neq0 : mk_monic h != 0.
Proof. by rewrite -size_poly_gt0 size_mk_monic_gt0. Qed.
Lemma
mk_monic_neq0
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "mk_monic", "size_mk_monic_gt0", "size_poly_gt0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
size_mk_monic (p : {poly %/ h}) : size p < size (mk_monic h).
Proof. have: (p : {poly R}) \is a poly_of_size (size (mk_monic h)).-1 by case: p. by rewrite qualifE/= -ltnS prednK // size_mk_monic_gt0. Qed.
Lemma
size_mk_monic
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "ltnS", "mk_monic", "poly", "poly_of_size", "prednK", "size", "size_mk_monic_gt0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
poly_of_size_mod p : rmodp p (mk_monic h) \is a poly_of_size (size (mk_monic h)).-1.
Proof. rewrite qualifE/= -ltnS prednK ?size_mk_monic_gt0 //. by apply: ltn_rmodpN0; rewrite mk_monic_neq0. Qed.
Lemma
poly_of_size_mod
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "ltnS", "ltn_rmodpN0", "mk_monic", "mk_monic_neq0", "poly_of_size", "prednK", "rmodp", "size", "size_mk_monic_gt0" ]
standard inject
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
in_qpoly p : {poly %/ h}
:= NPoly (poly_of_size_mod p).
Definition
in_qpoly
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "poly", "poly_of_size_mod" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
in_qpoly_small (p : {poly R}) : size p < size (mk_monic h) -> in_qpoly p = p :> {poly R}.
Proof. exact: rmodp_small. Qed.
Lemma
in_qpoly_small
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "in_qpoly", "mk_monic", "poly", "rmodp_small", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
in_qpoly0 : in_qpoly 0 = 0.
Proof. by apply/val_eqP; rewrite /= rmod0p. Qed.
Lemma
in_qpoly0
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "in_qpoly", "rmod0p", "val_eqP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
in_qpolyD p q : in_qpoly (p + q) = in_qpoly p + in_qpoly q.
Proof. by apply/val_eqP=> /=; rewrite rmodpD ?monic_mk_monic. Qed.
Lemma
in_qpolyD
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "in_qpoly", "monic_mk_monic", "rmodpD", "val_eqP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
in_qpolyZ a p : in_qpoly (a *: p) = a *: in_qpoly p.
Proof. apply/val_eqP=> /=; rewrite rmodpZ ?monic_mk_monic //. Qed.
Lemma
in_qpolyZ
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "in_qpoly", "monic_mk_monic", "rmodpZ", "val_eqP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
in_qpoly_is_linear : linear in_qpoly.
Proof. by move=> k p q; rewrite in_qpolyD in_qpolyZ. Qed.
Fact
in_qpoly_is_linear
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "in_qpoly", "in_qpolyD", "in_qpolyZ", "linear" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpolyC_proof k : (k%:P : {poly R}) \is a poly_of_size (size (mk_monic h)).-1.
Proof. rewrite qualifE/= -ltnS size_polyC prednK ?size_mk_monic_gt0 //. by rewrite (leq_ltn_trans _ size_mk_monic_gt1) //; case: eqP. Qed.
Lemma
qpolyC_proof
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "leq_ltn_trans", "ltnS", "mk_monic", "poly", "poly_of_size", "prednK", "size", "size_mk_monic_gt0", "size_mk_monic_gt1", "size_polyC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpolyC k : {poly %/ h}
:= NPoly (qpolyC_proof k).
Definition
qpolyC
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "poly", "qpolyC_proof" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpolyCE k : qpolyC k = k%:P :> {poly R}.
Proof. by []. Qed.
Lemma
qpolyCE
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "poly", "qpolyC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpolyC0 : qpolyC 0 = 0.
Proof. by apply/val_eqP/eqP. Qed.
Lemma
qpolyC0
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "qpolyC", "val_eqP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly1
:= qpolyC 1.
Definition
qpoly1
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "qpolyC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_mul (q1 q2 : {poly %/ h}) : {poly %/ h}
:= in_qpoly ((q1 : {poly R}) * q2).
Definition
qpoly_mul
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "in_qpoly", "poly" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_mul1z : left_id qpoly1 qpoly_mul.
Proof. by move=> x; apply: val_inj; rewrite /= mul1r rmodp_small // size_mk_monic. Qed.
Lemma
qpoly_mul1z
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "mul1r", "qpoly1", "qpoly_mul", "rmodp_small", "size_mk_monic", "val_inj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_mulz1 : right_id qpoly1 qpoly_mul.
Proof. by move=> x; apply: val_inj; rewrite /= mulr1 rmodp_small // size_mk_monic. Qed.
Lemma
qpoly_mulz1
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "mulr1", "qpoly1", "qpoly_mul", "rmodp_small", "size_mk_monic", "val_inj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_nontrivial : qpoly1 != 0.
Proof. by apply/eqP/val_eqP; rewrite /= oner_eq0. Qed.
Lemma
qpoly_nontrivial
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "oner_eq0", "qpoly1", "val_eqP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpolyX
:= in_qpoly 'X.
Definition
qpolyX
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "in_qpoly" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"'qX"
:= qpolyX.
Notation
'qX
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "qpolyX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpolyXE : 2 < size h -> h \is monic -> 'qX = 'X :> {poly R}.
Proof. move=> sh_gt2 h_mo. by rewrite in_qpoly_small // size_polyX /mk_monic ifT // (ltn_trans _ sh_gt2). Qed.
Lemma
qpolyXE
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "in_qpoly_small", "ltn_trans", "mk_monic", "monic", "poly", "sh_gt2", "size", "size_polyX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"'qX"
:= (qpolyX _) : ring_scope.
Notation
'qX
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "qpolyX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mk_monic_X (R : nzSemiRingType) : mk_monic 'X = 'X :> {poly R}.
Proof. by rewrite /mk_monic size_polyX monicX. Qed.
Lemma
mk_monic_X
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "mk_monic", "monicX", "poly", "size_polyX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mk_monic_Xn (R : nzSemiRingType) n : mk_monic 'X^n = 'X^(n.-1.+1) :> {poly R}.
Proof. by case: n => [|n]; rewrite /mk_monic size_polyXn monicXn /= ?expr1. Qed.
Lemma
mk_monic_Xn
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "expr1", "mk_monic", "monicXn", "poly", "size_polyXn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
card_qpoly (R : finNzSemiRingType) (h : {poly R}): #|{poly %/ h}| = #|R| ^ (size (mk_monic h)).-1.
Proof. by rewrite card_npoly. Qed.
Lemma
card_qpoly
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "card_npoly", "mk_monic", "poly", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
card_monic_qpoly (R : finNzSemiRingType) (h : {poly R}): 1 < size h -> h \is monic -> #|{poly %/ h}| = #|R| ^ (size h).-1.
Proof. by move=> sh_gt1 hM; rewrite card_qpoly /mk_monic sh_gt1 hM. Qed.
Lemma
card_monic_qpoly
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "card_qpoly", "mk_monic", "monic", "poly", "sh_gt1", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_mulC : commutative (@qpoly_mul A h).
Proof. by move=> p q; apply: val_inj; rewrite /= mulrC. Qed.
Lemma
qpoly_mulC
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "mulrC", "qpoly_mul", "val_inj" ]
Ring operations
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_mulA : associative (@qpoly_mul A h).
Proof. have rPM := monic_mk_monic h; move=> p q r; apply: val_inj. by rewrite /= rmodp_mulml // rmodp_mulmr // mulrA. Qed.
Lemma
qpoly_mulA
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "monic_mk_monic", "mulrA", "qpoly_mul", "rmodp_mulml", "rmodp_mulmr", "val_inj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_mul_addr : right_distributive (@qpoly_mul A h) +%R.
Proof. have rPM := monic_mk_monic h; move=> p q r; apply: val_inj. by rewrite /= !(mulrDr, rmodp_mulmr, rmodpD). Qed.
Lemma
qpoly_mul_addr
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "monic_mk_monic", "mulrDr", "qpoly_mul", "rmodpD", "rmodp_mulmr", "val_inj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_mul_addl : left_distributive (@qpoly_mul A h) +%R.
Proof. by move=> p q r; rewrite -!(qpoly_mulC r) qpoly_mul_addr. Qed.
Lemma
qpoly_mul_addl
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "qpoly_mul", "qpoly_mulC", "qpoly_mul_addr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
in_qpoly1 : in_qpoly h 1 = 1.
Proof. apply/val_eqP/eqP/in_qpoly_small. by rewrite size_polyC oner_eq0 /= size_mk_monic_gt1. Qed.
Lemma
in_qpoly1
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "in_qpoly", "in_qpoly_small", "oner_eq0", "size_mk_monic_gt1", "size_polyC", "val_eqP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
in_qpolyM q1 q2 : in_qpoly h (q1 * q2) = in_qpoly h q1 * in_qpoly h q2.
Proof. apply/val_eqP => /=. by rewrite rmodp_mulml ?rmodp_mulmr // monic_mk_monic. Qed.
Lemma
in_qpolyM
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "in_qpoly", "monic_mk_monic", "rmodp_mulml", "rmodp_mulmr", "val_eqP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
in_qpoly_monoid_morphism : monoid_morphism (in_qpoly h).
Proof. by split; [ apply: in_qpoly1 | apply: in_qpolyM]. Qed.
Fact
in_qpoly_monoid_morphism
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "in_qpoly", "in_qpoly1", "in_qpolyM", "monoid_morphism", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
in_qpoly_is_multiplicative
:= (fun g => (g.2,g.1)) in_qpoly_monoid_morphism.
Definition
in_qpoly_is_multiplicative
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "in_qpoly_monoid_morphism" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
poly_of_qpoly_sum I (r : seq I) (P1 : pred I) (F : I -> {poly %/ h}) : ((\sum_(i <- r | P1 i) F i) = \sum_(p <- r | P1 p) ((F p) : {poly A}) :> {poly A})%R.
Proof. exact: raddf_sum. Qed.
Lemma
poly_of_qpoly_sum
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "P1", "poly", "raddf_sum", "seq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
poly_of_qpolyD (p q : {poly %/ h}) : p + q= (p : {poly A}) + q :> {poly A}.
Proof. by []. Qed.
Lemma
poly_of_qpolyD
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "poly" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpolyC_natr p : (p%:R : {poly %/ h}) = p%:R :> {poly A}.
Proof. by elim: p => //= p IH; rewrite !mulrS poly_of_qpolyD IH. Qed.
Lemma
qpolyC_natr
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "mulrS", "poly", "poly_of_qpolyD" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
pchar_qpoly : [pchar {poly %/ h}] =i [pchar A].
Proof. move=> p; rewrite !inE; congr (_ && _). apply/eqP/eqP=> [/(congr1 val) /=|pE]; last first. by apply: val_inj => //=; rewrite qpolyC_natr /= -polyC_natr pE. rewrite !qpolyC_natr -!polyC_natr => /(congr1 val) /=. by rewrite polyseqC polyseq0; case: eqP. Qed.
Lemma
pchar_qpoly
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "inE", "last", "pE", "pchar", "poly", "polyC_natr", "polyseq0", "polyseqC", "qpolyC_natr", "val", "val_inj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
poly_of_qpolyM (p q : {poly %/ h}) : p * q = rmodp ((p : {poly A}) * q) (mk_monic h) :> {poly A}.
Proof. by []. Qed.
Lemma
poly_of_qpolyM
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "mk_monic", "poly", "rmodp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
poly_of_qpolyX (p : {poly %/ h}) n : p ^+ n = rmodp ((p : {poly A}) ^+ n) (mk_monic h) :> {poly A}.
Proof. have HhQ := monic_mk_monic h. elim: n => //= [|n IH]. rewrite rmodp_small // size_polyC ?(leq_ltn_trans _ (size_mk_monic_gt1 _)) //. by case: eqP. by rewrite exprS /= IH // rmodp_mulmr // -exprS. Qed.
Lemma
poly_of_qpolyX
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "exprS", "leq_ltn_trans", "mk_monic", "monic_mk_monic", "poly", "rmodp", "rmodp_mulmr", "rmodp_small", "size_mk_monic_gt1", "size_polyC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpolyCN (a : A) : qpolyC h (- a) = -(qpolyC h a).
Proof. by apply: val_inj; rewrite /= raddfN //= raddfN. Qed.
Lemma
qpolyCN
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "qpolyC", "raddfN", "val_inj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpolyCD : {morph (qpolyC h) : a b / a + b >-> a + b}%R.
Proof. by move=> a b; apply/val_eqP/eqP=> /=; rewrite -!raddfD. Qed.
Lemma
qpolyCD
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "qpolyC", "raddfD", "val_eqP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpolyCM : {morph (qpolyC h) : a b / a * b >-> a * b}%R.
Proof. move=> a b; apply/val_eqP/eqP=> /=; rewrite -polyCM rmodp_small //=. have := qpolyC_proof h (a * b). by rewrite qualifE/= -ltnS prednK // size_mk_monic_gt0. Qed.
Lemma
qpolyCM
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "ltnS", "polyCM", "prednK", "qpolyC", "qpolyC_proof", "rmodp_small", "size_mk_monic_gt0", "val_eqP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpolyC_is_zmod_morphism : zmod_morphism (qpolyC h).
Proof. by move=> x y; rewrite qpolyCD qpolyCN. Qed.
Lemma
qpolyC_is_zmod_morphism
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "qpolyC", "qpolyCD", "qpolyCN", "zmod_morphism" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpolyC_is_additive
:= qpolyC_is_zmod_morphism.
Definition
qpolyC_is_additive
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "qpolyC_is_zmod_morphism" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpolyC_is_monoid_morphism : monoid_morphism (qpolyC h).
Proof. by split=> // x y; rewrite qpolyCM. Qed.
Lemma
qpolyC_is_monoid_morphism
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "monoid_morphism", "qpolyC", "qpolyCM", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpolyC_is_multiplicative
:= (fun g => (g.2,g.1)) qpolyC_is_monoid_morphism.
Definition
qpolyC_is_multiplicative
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "qpolyC_is_monoid_morphism" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_scale k (p : {poly %/ h}) : {poly %/ h}
:= (k *: p)%R.
Definition
qpoly_scale
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "poly" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_scaleA a b p : qpoly_scale a (qpoly_scale b p) = qpoly_scale (a * b) p.
Proof. by apply/val_eqP; rewrite /= scalerA. Qed.
Fact
qpoly_scaleA
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "qpoly_scale", "scalerA", "val_eqP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_scale1l : left_id 1%R qpoly_scale.
Proof. by move=> p; apply/val_eqP; rewrite /= scale1r. Qed.
Fact
qpoly_scale1l
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "qpoly_scale", "scale1r", "val_eqP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_scaleDr a : {morph qpoly_scale a : p q / (p + q)%R}.
Proof. by move=> p q; apply/val_eqP; rewrite /= scalerDr. Qed.
Fact
qpoly_scaleDr
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "qpoly_scale", "scalerDr", "val_eqP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_scaleDl p : {morph qpoly_scale^~ p : a b / a + b}%R.
Proof. by move=> a b; apply/val_eqP; rewrite /= scalerDl. Qed.
Fact
qpoly_scaleDl
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "qpoly_scale", "scalerDl", "val_eqP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_scaleAl a p q : qpoly_scale a (p * q) = (qpoly_scale a p * q).
Proof. by apply/val_eqP; rewrite /= -scalerAl rmodpZ // monic_mk_monic. Qed.
Fact
qpoly_scaleAl
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "monic_mk_monic", "qpoly_scale", "rmodpZ", "scalerAl", "val_eqP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_scaleAr a p q : qpoly_scale a (p * q) = p * (qpoly_scale a q).
Proof. by apply/val_eqP; rewrite /= -scalerAr rmodpZ // monic_mk_monic. Qed.
Fact
qpoly_scaleAr
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "apply", "monic_mk_monic", "qpoly_scale", "rmodpZ", "scalerAr", "val_eqP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
poly_of_qpolyZ (p : {poly %/ h}) a : a *: p = a *: (p : {poly A}) :> {poly A}.
Proof. by []. Qed.
Lemma
poly_of_qpolyZ
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "poly" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
char_qpoly
:= (pchar_qpoly) (only parsing).
Notation
char_qpoly
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "pchar_qpoly" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
hQ
:= (mk_monic h).
Notation
hQ
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "mk_monic" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_inv (p : {poly %/ h})
:= if coprimep hQ p then let v : {poly %/ h} := in_qpoly h (egcdp hQ p).2 in ((lead_coef (v * p)) ^-1 *: v) else p.
Definition
qpoly_inv
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "coprimep", "egcdp", "hQ", "in_qpoly", "lead_coef", "poly" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_mulVz (p : {poly %/ h}) : coprimep hQ p -> (qpoly_inv p * p = 1)%R.
Proof. have hQM := monic_mk_monic h. move=> hCp; apply: val_inj; rewrite /qpoly_inv /in_qpoly hCp /=. have p_neq0 : p != 0%R. apply/eqP=> pZ; move: hCp; rewrite pZ. rewrite coprimep0 -size_poly_eq1. by case: size (size_mk_monic_gt1 h) => [|[]]. have F : (egcdp hQ p).1 * hQ + (egcdp hQ p).2 * p %= 1. apply: eqp_...
Lemma
qpoly_mulVz
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "add0r", "alg_polyC", "apply", "coprimep", "coprimep0", "divr1", "egcdp", "egcdpP", "eq_sym", "eqp_modpl", "eqp_sym", "eqp_trans", "eqpfP", "eqxx", "gcdp", "hQ", "in_qpoly", "lead_coefC", "lead_coef_eq0", "mk_monic_neq0", "modpD", "modpE", "modp_mull", "modp_small", "...
Ugly
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_mulzV (p : {poly %/ h}) : coprimep hQ p -> (p * (qpoly_inv p) = 1)%R.
Proof. by move=> hCp; rewrite /= mulrC qpoly_mulVz. Qed.
Lemma
qpoly_mulzV
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "coprimep", "hQ", "mulrC", "poly", "qpoly_inv", "qpoly_mulVz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qpoly_intro_unit (p q : {poly %/ h}) : (q * p = 1)%R -> coprimep hQ p.
Proof. have hQM := monic_mk_monic h. case; rewrite -[rmodp]/rmodp -!Pdiv.IdomainMonic.modpE // => qp1. have:= coprimep1 hQ. rewrite -coprimep_modr -[1%R]qp1 !coprimep_modr coprimepMr; by case/andP. Qed.
Lemma
qpoly_intro_unit
algebra
algebra/qpoly.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "tuple", "finfun", "bigop", "finset", "nmodule", "rings_modules_and_algebras", "divalg", "countalg", "finalg", "poly", "polydiv", "matrix", "mxalgebra", "...
[ "coprimep", "coprimep1", "coprimepMr", "coprimep_modr", "hQ", "modpE", "monic_mk_monic", "poly", "rmodp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d