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
lez_divLR d m n : 0 < d -> (d %| m)%Z -> ((m %/ d)%Z <= n) = (m <= n * d).
Proof. by move=> /ler_pM2r <- /divzK->. Qed.
Lemma
lez_divLR
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "divzK", "ler_pM2r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltz_divRL d m n : 0 < d -> (d %| m)%Z -> (n < m %/ d)%Z = (n * d < m).
Proof. by move=> /ltr_pM2r/(_ n)<- /divzK->. Qed.
Lemma
ltz_divRL
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "divzK", "ltr_pM2r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqz_div d m n : d != 0 -> (d %| m)%Z -> (n == m %/ d)%Z = (n * d == m).
Proof. by move=> /mulIf/inj_eq <- /divzK->. Qed.
Lemma
eqz_div
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "divzK", "inj_eq", "mulIf" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqz_mul d m n : d != 0 -> (d %| m)%Z -> (m == n * d) = (m %/ d == n)%Z.
Proof. by move=> d_gt0 dv_d_m; rewrite eq_sym -eqz_div // eq_sym. Qed.
Lemma
eqz_mul
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "d_gt0", "eq_sym", "eqz_div" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divz_mulAC d m n : (d %| m)%Z -> (m %/ d)%Z * n = (m * n %/ d)%Z.
Proof. have [-> | d_nz] := eqVneq d 0; first by rewrite !divz0 mul0r. by move/divzK=> {2} <-; rewrite mulrAC mulzK. Qed.
Lemma
divz_mulAC
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "divz0", "divzK", "eqVneq", "mul0r", "mulrAC", "mulzK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulz_divA d m n : (d %| n)%Z -> m * (n %/ d)%Z = (m * n %/ d)%Z.
Proof. by move=> dv_d_m; rewrite !(mulrC m) divz_mulAC. Qed.
Lemma
mulz_divA
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "divz_mulAC", "mulrC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulz_divCA d m n : (d %| m)%Z -> (d %| n)%Z -> m * (n %/ d)%Z = n * (m %/ d)%Z.
Proof. by move=> dv_d_m dv_d_n; rewrite mulrC divz_mulAC ?mulz_divA. Qed.
Lemma
mulz_divCA
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "divz_mulAC", "mulrC", "mulz_divA" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divzA m n p : (p %| n -> n %| m * p -> m %/ (n %/ p)%Z = m * p %/ n)%Z.
Proof. move/divzK=> p_dv_n; have [->|] := eqVneq n 0; first by rewrite div0z !divz0. rewrite -{1 2}p_dv_n mulf_eq0 => /norP[pn_nz p_nz] /divzK; rewrite mulrA p_dv_n. by move/mulIf=> {1} <- //; rewrite mulzK. Qed.
Lemma
divzA
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "div0z", "divz0", "divzK", "eqVneq", "mulIf", "mulf_eq0", "mulrA", "mulzK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divzMA m n p : (n * p %| m -> m %/ (n * p) = (m %/ n)%Z %/ p)%Z.
Proof. have [-> | nz_p] := eqVneq p 0; first by rewrite mulr0 !divz0. have [-> | nz_n] := eqVneq n 0; first by rewrite mul0r !divz0 div0z. by move/divzK=> {2} <-; rewrite mulrA mulrAC !mulzK. Qed.
Lemma
divzMA
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "div0z", "divz0", "divzK", "eqVneq", "mul0r", "mulr0", "mulrA", "mulrAC", "mulzK", "nz_p" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divzAC m n p : (n * p %| m -> (m %/ n)%Z %/ p = (m %/ p)%Z %/ n)%Z.
Proof. by move=> np_dv_mn; rewrite -!divzMA // mulrC. Qed.
Lemma
divzAC
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "divzMA", "mulrC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divzMl p m d : p != 0 -> (d %| m -> p * m %/ (p * d) = m %/ d)%Z.
Proof. have [-> | nz_d nz_p] := eqVneq d 0; first by rewrite mulr0 !divz0. by move/divzK=> {1}<-; rewrite mulrCA mulzK ?mulf_neq0. Qed.
Lemma
divzMl
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "divz0", "divzK", "eqVneq", "mulf_neq0", "mulr0", "mulrCA", "mulzK", "nz_p" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divzMr p m d : p != 0 -> (d %| m -> m * p %/ (d * p) = m %/ d)%Z.
Proof. by rewrite -!(mulrC p); apply: divzMl. Qed.
Lemma
divzMr
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "apply", "divzMl", "mulrC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_mul2l p d m : p != 0 -> (p * d %| p * m)%Z = (d %| m)%Z.
Proof. by rewrite !dvdzE -absz_gt0 !abszM; apply: dvdn_pmul2l. Qed.
Lemma
dvdz_mul2l
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "abszM", "absz_gt0", "apply", "dvdn_pmul2l", "dvdzE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_mul2r p d m : p != 0 -> (d * p %| m * p)%Z = (d %| m)%Z.
Proof. by rewrite !dvdzE -absz_gt0 !abszM; apply: dvdn_pmul2r. Qed.
Lemma
dvdz_mul2r
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "abszM", "absz_gt0", "apply", "dvdn_pmul2r", "dvdzE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_exp2l p m n : (m <= n)%N -> (p ^+ m %| p ^+ n)%Z.
Proof. by rewrite dvdzE !abszX; apply: dvdn_exp2l. Qed.
Lemma
dvdz_exp2l
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "abszX", "apply", "dvdn_exp2l", "dvdzE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_Pexp2l p m n : `|p| > 1 -> (p ^+ m %| p ^+ n)%Z = (m <= n)%N.
Proof. by rewrite dvdzE !abszX ltz_nat; apply: dvdn_Pexp2l. Qed.
Lemma
dvdz_Pexp2l
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "abszX", "apply", "dvdn_Pexp2l", "dvdzE", "ltz_nat" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_exp2r m n k : (m %| n -> m ^+ k %| n ^+ k)%Z.
Proof. by rewrite !dvdzE !abszX; apply: dvdn_exp2r. Qed.
Lemma
dvdz_exp2r
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "abszX", "apply", "dvdn_exp2r", "dvdzE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_zmod_closed d : zmod_closed (dvdz d).
Proof. split=> [|_ _ /dvdzP[p ->] /dvdzP[q ->]]; first exact: dvdz0. by rewrite -mulrBl dvdz_mull. Qed.
Fact
dvdz_zmod_closed
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "dvdz", "dvdz0", "dvdzP", "dvdz_mull", "mulrBl", "split", "zmod_closed" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_exp k d m : (0 < k)%N -> (d %| m -> d %| m ^+ k)%Z.
Proof. by case: k => // k _ d_dv_m; rewrite exprS dvdz_mulr. Qed.
Lemma
dvdz_exp
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "dvdz_mulr", "exprS" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqz_mod_dvd d m n : (m == n %[mod d])%Z = (d %| m - n)%Z.
Proof. apply/eqP/dvdz_mod0P=> eq_mn. by rewrite -modzDml eq_mn modzDml subrr mod0z. by rewrite -(subrK n m) -modzDml eq_mn add0r. Qed.
Lemma
eqz_mod_dvd
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "add0r", "apply", "dvdz_mod0P", "mod0z", "modzDml", "subrK", "subrr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divzDl m n d : (d %| m)%Z -> ((m + n) %/ d)%Z = (m %/ d)%Z + (n %/ d)%Z.
Proof. have [-> | d_nz] := eqVneq d 0; first by rewrite !divz0. by move/divzK=> {1}<-; rewrite divzMDl. Qed.
Lemma
divzDl
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "divz0", "divzK", "divzMDl", "eqVneq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divzDr m n d : (d %| n)%Z -> ((m + n) %/ d)%Z = (m %/ d)%Z + (n %/ d)%Z.
Proof. by move=> dv_n; rewrite addrC divzDl // addrC. Qed.
Lemma
divzDr
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "addrC", "divzDl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_pcharf (R : nzRingType) p : p \in [pchar R] -> forall n : int, (p %| n)%Z = (n%:~R == 0 :> R).
Proof. move=> pcharRp [] n; rewrite [LHS](dvdn_pcharf pcharRp)//. by rewrite NegzE abszN rmorphN// oppr_eq0. Qed.
Lemma
dvdz_pcharf
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "NegzE", "abszN", "dvdn_pcharf", "int", "oppr_eq0", "pchar", "pcharRp", "rmorphN" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_charf chRp
:= (dvdz_pcharf chRp).
Notation
dvdz_charf
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "dvdz_pcharf" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdzz m : gcdz m m = `|m|%:Z.
Proof. by rewrite /gcdz gcdnn. Qed.
Lemma
gcdzz
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "gcdnn", "gcdz" ]
Greatest common divisor
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdzC : commutative gcdz.
Proof. by move=> m n; rewrite /gcdz gcdnC. Qed.
Lemma
gcdzC
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "gcdnC", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcd0z m : gcdz 0 m = `|m|%:Z.
Proof. by rewrite /gcdz gcd0n. Qed.
Lemma
gcd0z
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "gcd0n", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdz0 m : gcdz m 0 = `|m|%:Z.
Proof. by rewrite /gcdz gcdn0. Qed.
Lemma
gcdz0
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "gcdn0", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcd1z : left_zero 1 gcdz.
Proof. by move=> m; rewrite /gcdz gcd1n. Qed.
Lemma
gcd1z
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "gcd1n", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdz1 : right_zero 1 gcdz.
Proof. by move=> m; rewrite /gcdz gcdn1. Qed.
Lemma
gcdz1
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "gcdn1", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_gcdr m n : (gcdz m n %| n)%Z.
Proof. exact: dvdn_gcdr. Qed.
Lemma
dvdz_gcdr
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "dvdn_gcdr", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_gcdl m n : (gcdz m n %| m)%Z.
Proof. exact: dvdn_gcdl. Qed.
Lemma
dvdz_gcdl
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "dvdn_gcdl", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdz_eq0 m n : (gcdz m n == 0) = (m == 0) && (n == 0).
Proof. by rewrite -absz_eq0 eqn0Ngt gcdn_gt0 !negb_or -!eqn0Ngt !absz_eq0. Qed.
Lemma
gcdz_eq0
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "absz_eq0", "eqn0Ngt", "gcdn_gt0", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdNz m n : gcdz (- m) n = gcdz m n.
Proof. by rewrite /gcdz abszN. Qed.
Lemma
gcdNz
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "abszN", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdzN m n : gcdz m (- n) = gcdz m n.
Proof. by rewrite /gcdz abszN. Qed.
Lemma
gcdzN
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "abszN", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdz_modr m n : gcdz m (n %% m)%Z = gcdz m n.
Proof. rewrite -modz_abs /gcdz; move/absz: m => m. have [-> | m_gt0] := posnP m; first by rewrite modz0. case: n => n; first by rewrite modz_nat gcdn_modr. rewrite modNz_nat // NegzE abszN {2}(divn_eq n m) -addnS gcdnMDl. rewrite -addrA -opprD -intS /=; set m1 := _.+1. have le_m1m: (m1 <= m)%N by apply: ltn_pmod. by re...
Lemma
gcdz_modr
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "NegzE", "absz", "abszN", "addnS", "addrA", "apply", "divn_eq", "gcdnC", "gcdnDl", "gcdnDr", "gcdnMDl", "gcdn_modr", "gcdz", "intS", "ltn_pmod", "modNz_nat", "modz0", "modz_abs", "modz_nat", "opprD", "posnP", "subnK", "subzn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdz_modl m n : gcdz (m %% n)%Z n = gcdz m n.
Proof. by rewrite -!(gcdzC n) gcdz_modr. Qed.
Lemma
gcdz_modl
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "gcdz", "gcdzC", "gcdz_modr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdzMDl q m n : gcdz m (q * m + n) = gcdz m n.
Proof. by rewrite -gcdz_modr modzMDl gcdz_modr. Qed.
Lemma
gcdzMDl
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "gcdz", "gcdz_modr", "modzMDl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdzDl m n : gcdz m (m + n) = gcdz m n.
Proof. by rewrite -{2}(mul1r m) gcdzMDl. Qed.
Lemma
gcdzDl
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "gcdz", "gcdzMDl", "mul1r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdzDr m n : gcdz m (n + m) = gcdz m n.
Proof. by rewrite addrC gcdzDl. Qed.
Lemma
gcdzDr
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "addrC", "gcdz", "gcdzDl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdzMl n m : gcdz n (m * n) = `|n|%:Z.
Proof. by rewrite -[m * n]addr0 gcdzMDl gcdz0. Qed.
Lemma
gcdzMl
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "addr0", "gcdz", "gcdz0", "gcdzMDl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdzMr n m : gcdz n (n * m) = `|n|%:Z.
Proof. by rewrite mulrC gcdzMl. Qed.
Lemma
gcdzMr
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "gcdz", "gcdzMl", "mulrC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdz_idPl {m n} : reflect (gcdz m n = `|m|%:Z) (m %| n)%Z.
Proof. by apply: (iffP gcdn_idPl) => [<- | []]. Qed.
Lemma
gcdz_idPl
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "apply", "gcdn_idPl", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdz_idPr {m n} : reflect (gcdz m n = `|n|%:Z) (n %| m)%Z.
Proof. by rewrite gcdzC; apply: gcdz_idPl. Qed.
Lemma
gcdz_idPr
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "apply", "gcdz", "gcdzC", "gcdz_idPl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
expz_min e m n : e >= 0 -> e ^+ minn m n = gcdz (e ^+ m) (e ^+ n).
Proof. by case: e => // e _; rewrite /gcdz !abszX -expn_min -natz -natrX !natz. Qed.
Lemma
expz_min
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "abszX", "expn_min", "gcdz", "minn", "natrX", "natz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_gcd p m n : (p %| gcdz m n)%Z = (p %| m)%Z && (p %| n)%Z.
Proof. exact: dvdn_gcd. Qed.
Lemma
dvdz_gcd
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "dvdn_gcd", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdzAC : right_commutative gcdz.
Proof. by move=> m n p; rewrite /gcdz gcdnAC. Qed.
Lemma
gcdzAC
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "gcdnAC", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdzA : associative gcdz.
Proof. by move=> m n p; rewrite /gcdz gcdnA. Qed.
Lemma
gcdzA
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "gcdnA", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdzCA : left_commutative gcdz.
Proof. by move=> m n p; rewrite /gcdz gcdnCA. Qed.
Lemma
gcdzCA
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "gcdnCA", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gcdzACA : interchange gcdz gcdz.
Proof. by move=> m n p q; rewrite /gcdz gcdnACA. Qed.
Lemma
gcdzACA
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "gcdnACA", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulz_gcdr m n p : `|m|%:Z * gcdz n p = gcdz (m * n) (m * p).
Proof. by rewrite -PoszM muln_gcdr -!abszM. Qed.
Lemma
mulz_gcdr
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "PoszM", "abszM", "gcdz", "muln_gcdr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulz_gcdl m n p : gcdz m n * `|p|%:Z = gcdz (m * p) (n * p).
Proof. by rewrite -PoszM muln_gcdl -!abszM. Qed.
Lemma
mulz_gcdl
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "PoszM", "abszM", "gcdz", "muln_gcdl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulz_divCA_gcd n m : n * (m %/ gcdz n m)%Z = m * (n %/ gcdz n m)%Z.
Proof. by rewrite mulz_divCA ?dvdz_gcdl ?dvdz_gcdr. Qed.
Lemma
mulz_divCA_gcd
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "dvdz_gcdl", "dvdz_gcdr", "gcdz", "mulz_divCA" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_lcmr m n : (n %| lcmz m n)%Z.
Proof. exact: dvdn_lcmr. Qed.
Lemma
dvdz_lcmr
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "dvdn_lcmr", "lcmz" ]
Least common multiple
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_lcml m n : (m %| lcmz m n)%Z.
Proof. exact: dvdn_lcml. Qed.
Lemma
dvdz_lcml
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "dvdn_lcml", "lcmz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_lcm d1 d2 m : ((lcmn d1 d2 %| m) = (d1 %| m) && (d2 %| m))%Z.
Proof. exact: dvdn_lcm. Qed.
Lemma
dvdz_lcm
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "dvdn_lcm", "lcmn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lcmzC : commutative lcmz.
Proof. by move=> m n; rewrite /lcmz lcmnC. Qed.
Lemma
lcmzC
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "lcmnC", "lcmz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lcm0z : left_zero 0 lcmz.
Proof. by move=> x; rewrite /lcmz absz0 lcm0n. Qed.
Lemma
lcm0z
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "absz0", "lcm0n", "lcmz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lcmz0 : right_zero 0 lcmz.
Proof. by move=> x; rewrite /lcmz absz0 lcmn0. Qed.
Lemma
lcmz0
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "absz0", "lcmn0", "lcmz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lcmz_ge0 m n : 0 <= lcmz m n.
Proof. by []. Qed.
Lemma
lcmz_ge0
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "lcmz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lcmz_neq0 m n : (lcmz m n != 0) = (m != 0) && (n != 0).
Proof. have [->|m_neq0] := eqVneq m 0; first by rewrite lcm0z. have [->|n_neq0] := eqVneq n 0; first by rewrite lcmz0. by rewrite gt_eqF// [0 < _]lcmn_gt0 !absz_gt0 m_neq0 n_neq0. Qed.
Lemma
lcmz_neq0
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "absz_gt0", "eqVneq", "gt_eqF", "lcm0z", "lcmn_gt0", "lcmz", "lcmz0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimezE m n : coprimez m n = coprime `|m| `|n|.
Proof. by []. Qed.
Lemma
coprimezE
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "coprime", "coprimez" ]
Coprime factors
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimez_sym : symmetric coprimez.
Proof. by move=> m n; apply: coprime_sym. Qed.
Lemma
coprimez_sym
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "apply", "coprime_sym", "coprimez" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimeNz m n : coprimez (- m) n = coprimez m n.
Proof. by rewrite coprimezE abszN. Qed.
Lemma
coprimeNz
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "abszN", "coprimez", "coprimezE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimezN m n : coprimez m (- n) = coprimez m n.
Proof. by rewrite coprimezE abszN. Qed.
Lemma
coprimezN
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "abszN", "coprimez", "coprimezE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
egcdz_spec m n : int * int -> Type
:= EgcdzSpec u v of u * m + v * n = gcdz m n & coprimez u v : egcdz_spec m n (u, v).
Variant
egcdz_spec
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "coprimez", "gcdz", "int" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
egcdzP m n : egcdz_spec m n (egcdz m n).
Proof. rewrite /egcdz; have [-> | m_nz] := eqVneq. by split; [rewrite -abszEsign gcd0z | rewrite coprimezE absz_sign]. have m_gt0 : (`|m| > 0)%N by rewrite absz_gt0. case: egcdnP (coprime_egcdn `|n| m_gt0) => //= u v Duv _ co_uv; split. rewrite !mulNr -!mulrA mulrCA -abszEsg mulrCA -abszEsign. by rewrite -!PoszM ...
Lemma
egcdzP
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "PoszD", "PoszM", "abszEsg", "abszEsign", "abszM", "abszMsign", "abszN", "absz_gt0", "absz_sg", "absz_sign", "addnC", "addrK", "coprime_egcdn", "coprimezE", "egcdnP", "egcdz", "egcdz_spec", "eqVneq", "gcd0z", "mul1n", "mulNr", "mulrA", "mulrCA", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Bezoutz m n : {u : int & {v : int | u * m + v * n = gcdz m n}}.
Proof. by exists (egcdz m n).1, (egcdz m n).2; case: egcdzP. Qed.
Lemma
Bezoutz
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "egcdz", "egcdzP", "gcdz", "int" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimezP m n : reflect (exists uv, uv.1 * m + uv.2 * n = 1) (coprimez m n).
Proof. apply: (iffP eqP) => [<-| [[u v] /= Duv]]. by exists (egcdz m n); case: egcdzP. congr _%:Z; apply: gcdn_def; rewrite ?dvd1n // => d dv_d_n dv_d_m. by rewrite -(dvdzE d 1) -Duv [m]intEsg [n]intEsg rpredD ?dvdz_mull. Qed.
Lemma
coprimezP
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "apply", "coprimez", "dvd1n", "dvdzE", "dvdz_mull", "egcdz", "egcdzP", "gcdn_def", "intEsg", "rpredD" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Gauss_dvdz m n p : coprimez m n -> (m * n %| p)%Z = (m %| p)%Z && (n %| p)%Z.
Proof. by move/Gauss_dvd <-; rewrite -abszM. Qed.
Lemma
Gauss_dvdz
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "Gauss_dvd", "abszM", "coprimez" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Gauss_dvdzr m n p : coprimez m n -> (m %| n * p)%Z = (m %| p)%Z.
Proof. by rewrite dvdzE abszM => /Gauss_dvdr->. Qed.
Lemma
Gauss_dvdzr
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "Gauss_dvdr", "abszM", "coprimez", "dvdzE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Gauss_dvdzl m n p : coprimez m p -> (m %| n * p)%Z = (m %| n)%Z.
Proof. by rewrite mulrC; apply: Gauss_dvdzr. Qed.
Lemma
Gauss_dvdzl
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "Gauss_dvdzr", "apply", "coprimez", "mulrC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Gauss_gcdzr p m n : coprimez p m -> gcdz p (m * n) = gcdz p n.
Proof. by rewrite /gcdz abszM => /Gauss_gcdr->. Qed.
Lemma
Gauss_gcdzr
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "Gauss_gcdr", "abszM", "coprimez", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Gauss_gcdzl p m n : coprimez p n -> gcdz p (m * n) = gcdz p m.
Proof. by move=> co_pn; rewrite mulrC Gauss_gcdzr. Qed.
Lemma
Gauss_gcdzl
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "Gauss_gcdzr", "coprimez", "gcdz", "mulrC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimezMr p m n : coprimez p (m * n) = coprimez p m && coprimez p n.
Proof. by rewrite -coprimeMr -abszM. Qed.
Lemma
coprimezMr
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "abszM", "coprimeMr", "coprimez" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimezMl p m n : coprimez (m * n) p = coprimez m p && coprimez n p.
Proof. by rewrite -coprimeMl -abszM. Qed.
Lemma
coprimezMl
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "abszM", "coprimeMl", "coprimez" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimez_pexpl k m n : (0 < k)%N -> coprimez (m ^+ k) n = coprimez m n.
Proof. by rewrite /coprimez /gcdz abszX; apply: coprime_pexpl. Qed.
Lemma
coprimez_pexpl
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "abszX", "apply", "coprime_pexpl", "coprimez", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimez_pexpr k m n : (0 < k)%N -> coprimez m (n ^+ k) = coprimez m n.
Proof. by move=> k_gt0; rewrite !(coprimez_sym m) coprimez_pexpl. Qed.
Lemma
coprimez_pexpr
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "coprimez", "coprimez_pexpl", "coprimez_sym" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimezXl k m n : coprimez m n -> coprimez (m ^+ k) n.
Proof. by rewrite /coprimez /gcdz abszX; apply: coprimeXl. Qed.
Lemma
coprimezXl
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "abszX", "apply", "coprimeXl", "coprimez", "gcdz" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimezXr k m n : coprimez m n -> coprimez m (n ^+ k).
Proof. by rewrite !(coprimez_sym m); apply: coprimezXl. Qed.
Lemma
coprimezXr
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "apply", "coprimez", "coprimezXl", "coprimez_sym" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimez_dvdl m n p : (m %| n)%N -> coprimez n p -> coprimez m p.
Proof. exact: coprime_dvdl. Qed.
Lemma
coprimez_dvdl
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "coprime_dvdl", "coprimez" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coprimez_dvdr m n p : (m %| n)%N -> coprimez p n -> coprimez p m.
Proof. exact: coprime_dvdr. Qed.
Lemma
coprimez_dvdr
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "coprime_dvdr", "coprimez" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_pexp2r m n k : (k > 0)%N -> (m ^+ k %| n ^+ k)%Z = (m %| n)%Z.
Proof. by rewrite dvdzE !abszX; apply: dvdn_pexp2r. Qed.
Lemma
dvdz_pexp2r
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "abszX", "apply", "dvdn_pexp2r", "dvdzE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
co_m12 : coprimez m1 m2.
Hypothesis
co_m12
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "coprimez" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
zchinese_remainder x y : (x == y %[mod m1 * m2])%Z = (x == y %[mod m1])%Z && (x == y %[mod m2])%Z.
Proof. by rewrite !eqz_mod_dvd Gauss_dvdz. Qed.
Lemma
zchinese_remainder
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "Gauss_dvdz", "eqz_mod_dvd" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
zchinese r1 r2
:= r1 * m2 * (egcdz m1 m2).2 + r2 * m1 * (egcdz m1 m2).1.
Definition
zchinese
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "egcdz", "r1", "r2" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
zchinese_modl r1 r2 : (zchinese r1 r2 = r1 %[mod m1])%Z.
Proof. rewrite /zchinese; have [u v /= Duv _] := egcdzP m1 m2. rewrite -[r1 in RHS]mulr1 -((gcdz _ _ =P 1) co_m12) -Duv. by rewrite mulrDr addrC mulrAC 2!mulrA 2!modzMDl mulrAC. Qed.
Lemma
zchinese_modl
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "addrC", "co_m12", "egcdzP", "gcdz", "modzMDl", "mulr1", "mulrA", "mulrAC", "mulrDr", "r1", "r2", "zchinese" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
zchinese_modr r1 r2 : (zchinese r1 r2 = r2 %[mod m2])%Z.
Proof. rewrite /zchinese; have [u v /= Duv _] := egcdzP m1 m2. rewrite -[r2 in RHS]mulr1 -((gcdz _ _ =P 1) co_m12) -Duv. by rewrite mulrAC modzMDl mulrAC addrC mulrDr !mulrA modzMDl. Qed.
Lemma
zchinese_modr
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "addrC", "co_m12", "egcdzP", "gcdz", "modzMDl", "mulr1", "mulrA", "mulrAC", "mulrDr", "r1", "r2", "zchinese" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
zchinese_mod x : (x = zchinese (x %% m1)%Z (x %% m2)%Z %[mod m1 * m2])%Z.
Proof. apply/eqP; rewrite zchinese_remainder //. by rewrite zchinese_modl zchinese_modr !modz_mod !eqxx. Qed.
Lemma
zchinese_mod
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "apply", "eqxx", "modz_mod", "zchinese", "zchinese_modl", "zchinese_modr", "zchinese_remainder" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
zcontents (p : {poly int}) : int
:= sgz (lead_coef p) * \big[gcdn/0]_(i < size p) `|(p`_i)%R|%N.
Definition
zcontents
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "gcdn", "int", "lead_coef", "poly", "sgz", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
sgz_contents p : sgz (zcontents p) = sgz (lead_coef p).
Proof. rewrite /zcontents mulrC sgzM sgz_id; set d := _%:Z. have [-> | nz_p] := eqVneq p 0; first by rewrite lead_coef0 mulr0. rewrite gtr0_sgz ?mul1r // ltz_nat polySpred ?big_ord_recr //= -lead_coefE. by rewrite gcdn_gt0 orbC absz_gt0 lead_coef_eq0 nz_p. Qed.
Lemma
sgz_contents
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "absz_gt0", "big_ord_recr", "eqVneq", "gcdn_gt0", "gtr0_sgz", "lead_coef", "lead_coef0", "lead_coefE", "lead_coef_eq0", "ltz_nat", "mul1r", "mulr0", "mulrC", "nz_p", "polySpred", "sgz", "sgzM", "sgz_id", "zcontents" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
zcontents_eq0 p : (zcontents p == 0) = (p == 0).
Proof. by rewrite -sgz_eq0 sgz_contents sgz_eq0 lead_coef_eq0. Qed.
Lemma
zcontents_eq0
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "lead_coef_eq0", "sgz_contents", "sgz_eq0", "zcontents" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
zcontents0 : zcontents 0 = 0.
Proof. by apply/eqP; rewrite zcontents_eq0. Qed.
Lemma
zcontents0
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "apply", "zcontents", "zcontents_eq0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
zcontentsZ a p : zcontents (a *: p) = a * zcontents p.
Proof. have [-> | nz_a] := eqVneq a 0; first by rewrite scale0r mul0r zcontents0. rewrite {2}[a]intEsg mulrCA -mulrA -PoszM big_distrr /= mulrCA mulrA -sgzM. rewrite -lead_coefZ; congr (_ * _%:Z); rewrite size_scale //. by apply: eq_bigr => i _; rewrite coefZ abszM. Qed.
Lemma
zcontentsZ
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "PoszM", "abszM", "apply", "big_distrr", "coefZ", "eqVneq", "eq_bigr", "intEsg", "lead_coefZ", "mul0r", "mulrA", "mulrCA", "scale0r", "sgzM", "size_scale", "zcontents", "zcontents0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
zcontents_monic p : p \is monic -> zcontents p = 1.
Proof. move=> mon_p; rewrite /zcontents polySpred ?monic_neq0 //. by rewrite big_ord_recr /= -lead_coefE (monicP mon_p) gcdn1. Qed.
Lemma
zcontents_monic
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "big_ord_recr", "gcdn1", "lead_coefE", "monic", "monicP", "monic_neq0", "polySpred", "zcontents" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dvdz_contents a p : (a %| zcontents p)%Z = (p \is a polyOver (dvdz a)).
Proof. rewrite dvdzE abszM absz_sg lead_coef_eq0. have [-> | nz_p] := eqVneq; first by rewrite mul0n dvdn0 rpred0. rewrite mul1n; apply/dvdn_biggcdP/(all_nthP 0)=> a_dv_p i ltip /=. exact: (a_dv_p (Ordinal ltip)). exact: a_dv_p. Qed.
Lemma
dvdz_contents
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "abszM", "absz_sg", "all_nthP", "apply", "dvdn0", "dvdn_biggcdP", "dvdz", "dvdzE", "eqVneq", "lead_coef_eq0", "mul0n", "mul1n", "nz_p", "polyOver", "rpred0", "zcontents" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
map_poly_divzK {a} p : p \is a polyOver (dvdz a) -> a *: map_poly (divz^~ a) p = p.
Proof. move/polyOverP=> a_dv_p; apply/polyP=> i. by rewrite coefZ coef_map_id0 ?div0z // mulrC divzK. Qed.
Lemma
map_poly_divzK
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "apply", "coefZ", "coef_map_id0", "div0z", "divz", "divzK", "dvdz", "map_poly", "mulrC", "polyOver", "polyOverP", "polyP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
polyOver_dvdzP a p : reflect (exists q, p = a *: q) (p \is a polyOver (dvdz a)).
Proof. apply: (iffP idP) => [/map_poly_divzK | [q ->]]. by exists (map_poly (divz^~ a) p). by apply/polyOverP=> i; rewrite coefZ dvdz_mulr. Qed.
Lemma
polyOver_dvdzP
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "apply", "coefZ", "divz", "dvdz", "dvdz_mulr", "map_poly", "map_poly_divzK", "polyOver", "polyOverP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
zprimitive p
:= map_poly (divz^~ (zcontents p)) p.
Definition
zprimitive
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "divz", "map_poly", "zcontents" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
zpolyEprim p : p = zcontents p *: zprimitive p.
Proof. by rewrite map_poly_divzK // -dvdz_contents. Qed.
Lemma
zpolyEprim
algebra
algebra/intdiv.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "path", "div", "choice", "fintype", "tuple", "bigop", "prime", "nmodule", "order", "perm", "rings_modules_and_algebras", "divalg", "poly", "polydiv", "zmodp", "matrix", "ord...
[ "dvdz_contents", "map_poly_divzK", "zcontents", "zprimitive" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d