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 |
|---|---|---|---|---|---|---|---|---|---|---|
lcmnAC : right_commutative lcmn. | Proof. by move=> m n p; rewrite -!lcmnA (lcmnC n). Qed. | Lemma | lcmnAC | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"lcmn",
"lcmnA",
"lcmnC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lcmnACA : interchange lcmn lcmn. | Proof. by move=> m n p q; rewrite -!lcmnA (lcmnCA n). Qed. | Lemma | lcmnACA | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"lcmn",
"lcmnA",
"lcmnCA"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
dvdn_lcml d1 d2 : d1 %| lcmn d1 d2. | Proof. by rewrite /lcmn -muln_divA ?dvdn_gcdr ?dvdn_mulr. Qed. | Lemma | dvdn_lcml | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"dvdn_gcdr",
"dvdn_mulr",
"lcmn",
"muln_divA"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
dvdn_lcmr d1 d2 : d2 %| lcmn d1 d2. | Proof. by rewrite lcmnC dvdn_lcml. Qed. | Lemma | dvdn_lcmr | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"dvdn_lcml",
"lcmn",
"lcmnC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
dvdn_lcm d1 d2 m : (lcmn d1 d2 %| m) = (d1 %| m) && (d2 %| m). | Proof.
case: d1 d2 => [|d1] [|d2]; try by case: m => [|m]; rewrite ?lcmn0 ?andbF.
rewrite -(@dvdn_pmul2r (gcdn d1.+1 d2.+1)) ?gcdn_gt0 // muln_lcm_gcd.
by rewrite muln_gcdr dvdn_gcd {1}mulnC andbC !dvdn_pmul2r.
Qed. | Lemma | dvdn_lcm | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"dvdn_gcd",
"dvdn_pmul2r",
"gcdn",
"gcdn_gt0",
"lcmn",
"lcmn0",
"mulnC",
"muln_gcdr",
"muln_lcm_gcd"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lcmnMl m n : lcmn m (m * n) = m * n. | Proof. by case: m => // m; rewrite /lcmn gcdnMr mulKn. Qed. | Lemma | lcmnMl | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"gcdnMr",
"lcmn",
"mulKn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lcmnMr m n : lcmn n (m * n) = m * n. | Proof. by rewrite mulnC lcmnMl. Qed. | Lemma | lcmnMr | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"lcmn",
"lcmnMl",
"mulnC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lcmn_idPr {m n} : reflect (lcmn m n = n) (m %| n). | Proof.
by apply: (iffP idP) => [/dvdnP[q ->] | <-]; rewrite (lcmnMr, dvdn_lcml).
Qed. | Lemma | lcmn_idPr | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"apply",
"dvdnP",
"dvdn_lcml",
"lcmn",
"lcmnMr"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lcmn_idPl {m n} : reflect (lcmn m n = m) (n %| m). | Proof. by rewrite lcmnC; apply: lcmn_idPr. Qed. | Lemma | lcmn_idPl | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"apply",
"lcmn",
"lcmnC",
"lcmn_idPr"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
expn_max e m n : e ^ maxn m n = lcmn (e ^ m) (e ^ n). | Proof. by case: leqP => [|/ltnW] /(dvdn_exp2l e) /lcmn_idPl; rewrite lcmnC. Qed. | Lemma | expn_max | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"dvdn_exp2l",
"lcmn",
"lcmnC",
"lcmn_idPl",
"leqP",
"ltnW",
"maxn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprime m n | := gcdn m n == 1. | Definition | coprime | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"gcdn"
] | Coprime factors | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
coprime1n n : coprime 1 n. | Proof. by rewrite /coprime gcd1n. Qed. | Lemma | coprime1n | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"gcd1n"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprimen1 n : coprime n 1. | Proof. by rewrite /coprime gcdn1. Qed. | Lemma | coprimen1 | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"gcdn1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprime_sym m n : coprime m n = coprime n m. | Proof. by rewrite /coprime gcdnC. Qed. | Lemma | coprime_sym | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"gcdnC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprime_modl m n : coprime (m %% n) n = coprime m n. | Proof. by rewrite /coprime gcdn_modl. Qed. | Lemma | coprime_modl | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"gcdn_modl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprime_modr m n : coprime m (n %% m) = coprime m n. | Proof. by rewrite /coprime gcdn_modr. Qed. | Lemma | coprime_modr | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"gcdn_modr"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprime2n n : coprime 2 n = odd n. | Proof. by rewrite -coprime_modr modn2; case: (odd n). Qed. | Lemma | coprime2n | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"coprime_modr",
"modn2",
"odd"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprimen2 n : coprime n 2 = odd n. | Proof. by rewrite coprime_sym coprime2n. Qed. | Lemma | coprimen2 | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"coprime2n",
"coprime_sym",
"odd"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprimeSn n : coprime n.+1 n. | Proof. by rewrite -coprime_modl (modnDr 1) coprime_modl coprime1n. Qed. | Lemma | coprimeSn | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"coprime1n",
"coprime_modl",
"modnDr"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprimenS n : coprime n n.+1. | Proof. by rewrite coprime_sym coprimeSn. Qed. | Lemma | coprimenS | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"coprimeSn",
"coprime_sym"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprimePn n : n > 0 -> coprime n.-1 n. | Proof. by case: n => // n _; rewrite coprimenS. Qed. | Lemma | coprimePn | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"coprimenS"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprimenP n : n > 0 -> coprime n n.-1. | Proof. by case: n => // n _; rewrite coprimeSn. Qed. | Lemma | coprimenP | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"coprimeSn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprimeP n m :
n > 0 -> reflect (exists u, u.1 * n - u.2 * m = 1) (coprime n m). | Proof.
move=> n_gt0; apply: (iffP eqP) => [<-| [[kn km] /= kn_km_1]].
by have [kn km kg _] := egcdnP m n_gt0; exists (kn, km); rewrite kg addKn.
apply gcdn_def; rewrite ?dvd1n // => d dv_d_n dv_d_m.
by rewrite -kn_km_1 dvdn_subr ?dvdn_mull // ltnW // -subn_gt0 kn_km_1.
Qed. | Lemma | coprimeP | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"addKn",
"apply",
"coprime",
"dvd1n",
"dvdn_mull",
"dvdn_subr",
"egcdnP",
"gcdn_def",
"ltnW",
"n_gt0",
"subn_gt0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
modn_coprime k n : 0 < k -> (exists u, (k * u) %% n = 1) -> coprime k n. | Proof.
move=> k_gt0 [u Hu]; apply/coprimeP=> //.
by exists (u, k * u %/ n); rewrite /= mulnC {1}(divn_eq (k * u) n) addKn.
Qed. | Lemma | modn_coprime | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"addKn",
"apply",
"coprime",
"coprimeP",
"divn_eq",
"mulnC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Gauss_dvd m n p : coprime m n -> (m * n %| p) = (m %| p) && (n %| p). | Proof. by move=> co_mn; rewrite -muln_lcm_gcd (eqnP co_mn) muln1 dvdn_lcm. Qed. | Lemma | Gauss_dvd | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"dvdn_lcm",
"eqnP",
"muln1",
"muln_lcm_gcd"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Gauss_dvdr m n p : coprime m n -> (m %| n * p) = (m %| p). | Proof.
case: n => [|n] co_mn; first by case: m co_mn => [|[]] // _; rewrite !dvd1n.
by symmetry; rewrite mulnC -(@dvdn_pmul2r n.+1) ?Gauss_dvd // andbC dvdn_mull.
Qed. | Lemma | Gauss_dvdr | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"Gauss_dvd",
"coprime",
"dvd1n",
"dvdn_mull",
"dvdn_pmul2r",
"mulnC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Gauss_dvdl m n p : coprime m p -> (m %| n * p) = (m %| n). | Proof. by rewrite mulnC; apply: Gauss_dvdr. Qed. | Lemma | Gauss_dvdl | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"Gauss_dvdr",
"apply",
"coprime",
"mulnC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
dvdn_double_leq m n : m %| n -> odd m -> ~~ odd n -> 0 < n -> m.*2 <= n. | Proof.
move=> m_dv_n odd_m even_n n_gt0.
by rewrite -muln2 dvdn_leq // Gauss_dvd ?coprimen2 ?m_dv_n ?dvdn2.
Qed. | Lemma | dvdn_double_leq | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"Gauss_dvd",
"coprimen2",
"dvdn2",
"dvdn_leq",
"muln2",
"n_gt0",
"odd"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
dvdn_double_ltn m n : m %| n.-1 -> odd m -> odd n -> 1 < n -> m.*2 < n. | Proof. by case: n => //; apply: dvdn_double_leq. Qed. | Lemma | dvdn_double_ltn | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"apply",
"dvdn_double_leq",
"odd"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Gauss_gcdr p m n : coprime p m -> gcdn p (m * n) = gcdn p n. | Proof.
move=> co_pm; apply/eqP; rewrite eqn_dvd !dvdn_gcd !dvdn_gcdl /=.
rewrite andbC dvdn_mull ?dvdn_gcdr //= -(@Gauss_dvdr _ m) ?dvdn_gcdr //.
by rewrite /coprime gcdnAC (eqnP co_pm) gcd1n.
Qed. | Lemma | Gauss_gcdr | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"Gauss_dvdr",
"apply",
"coprime",
"dvdn_gcd",
"dvdn_gcdl",
"dvdn_gcdr",
"dvdn_mull",
"eqnP",
"eqn_dvd",
"gcd1n",
"gcdn",
"gcdnAC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Gauss_gcdl p m n : coprime p n -> gcdn p (m * n) = gcdn p m. | Proof. by move=> co_pn; rewrite mulnC Gauss_gcdr. Qed. | Lemma | Gauss_gcdl | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"Gauss_gcdr",
"coprime",
"gcdn",
"mulnC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprimeMr p m n : coprime p (m * n) = coprime p m && coprime p n. | Proof.
case co_pm: (coprime p m) => /=; first by rewrite /coprime Gauss_gcdr.
apply/eqP=> co_p_mn; case/eqnP: co_pm; apply gcdn_def => // d dv_dp dv_dm.
by rewrite -co_p_mn dvdn_gcd dv_dp dvdn_mulr.
Qed. | Lemma | coprimeMr | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"Gauss_gcdr",
"apply",
"coprime",
"dvdn_gcd",
"dvdn_mulr",
"eqnP",
"gcdn_def"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprimeMl p m n : coprime (m * n) p = coprime m p && coprime n p. | Proof. by rewrite -!(coprime_sym p) coprimeMr. Qed. | Lemma | coprimeMl | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"coprimeMr",
"coprime_sym"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprime_pexpl k m n : 0 < k -> coprime (m ^ k) n = coprime m n. | Proof.
case: k => // k _; elim: k => [|k IHk]; first by rewrite expn1.
by rewrite expnS coprimeMl -IHk; case coprime.
Qed. | Lemma | coprime_pexpl | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"coprimeMl",
"expn1",
"expnS"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprime_pexpr k m n : 0 < k -> coprime m (n ^ k) = coprime m n. | Proof. by move=> k_gt0; rewrite !(coprime_sym m) coprime_pexpl. Qed. | Lemma | coprime_pexpr | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"coprime_pexpl",
"coprime_sym"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprimeXl k m n : coprime m n -> coprime (m ^ k) n. | Proof. by case: k => [|k] co_pm; rewrite ?coprime1n // coprime_pexpl. Qed. | Lemma | coprimeXl | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"coprime1n",
"coprime_pexpl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprimeXr k m n : coprime m n -> coprime m (n ^ k). | Proof. by rewrite !(coprime_sym m); apply: coprimeXl. Qed. | Lemma | coprimeXr | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"apply",
"coprime",
"coprimeXl",
"coprime_sym"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprime_dvdl m n p : m %| n -> coprime n p -> coprime m p. | Proof. by case/dvdnP=> d ->; rewrite coprimeMl => /andP[]. Qed. | Lemma | coprime_dvdl | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime",
"coprimeMl",
"dvdnP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprime_dvdr m n p : m %| n -> coprime p n -> coprime p m. | Proof. by rewrite !(coprime_sym p); apply: coprime_dvdl. Qed. | Lemma | coprime_dvdr | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"apply",
"coprime",
"coprime_dvdl",
"coprime_sym"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
coprime_egcdn n m : n > 0 -> coprime (egcdn n m).1 (egcdn n m).2. | Proof.
move=> n_gt0; case: (egcdnP m n_gt0) => kn km /= /eqP.
have [/dvdnP[u defn] /dvdnP[v defm]] := (dvdn_gcdl n m, dvdn_gcdr n m).
rewrite -[gcdn n m]mul1n {1}defm {1}defn !mulnA -mulnDl addnC.
rewrite eqn_pmul2r ?gcdn_gt0 ?n_gt0 //; case: kn => // kn /eqP def_knu _.
by apply/coprimeP=> //; exists (u, v); rewrite mu... | Lemma | coprime_egcdn | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"addnC",
"addnK",
"apply",
"coprime",
"coprimeP",
"dvdnP",
"dvdn_gcdl",
"dvdn_gcdr",
"egcdn",
"egcdnP",
"eqn_pmul2r",
"gcdn",
"gcdn_gt0",
"mul1n",
"mulnA",
"mulnC",
"mulnDl",
"n_gt0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
dvdn_pexp2r m n k : k > 0 -> (m ^ k %| n ^ k) = (m %| n). | Proof.
move=> k_gt0; apply/idP/idP=> [dv_mn_k|]; last exact: dvdn_exp2r.
have [->|n_gt0] := posnP n; first by rewrite dvdn0.
have [n' def_n] := dvdnP (dvdn_gcdr m n); set d := gcdn m n in def_n.
have [m' def_m] := dvdnP (dvdn_gcdl m n); rewrite -/d in def_m.
have d_gt0: d > 0 by rewrite gcdn_gt0 n_gt0 orbT.
rewrite def... | Lemma | dvdn_pexp2r | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"apply",
"coprime",
"coprime_pexpl",
"coprime_pexpr",
"d_gt0",
"def_n",
"dvdn0",
"dvdnP",
"dvdn_exp2r",
"dvdn_gcdl",
"dvdn_gcdr",
"dvdn_pmul2r",
"eqnP",
"eqn_pmul2r",
"exp1n",
"expIn",
"expnMn",
"expn_gt0",
"gcdn",
"gcdn0",
"gcdn_gt0",
"gcdn_modr",
"inj_eq",
"last",
"... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
co_m12 : coprime m1 m2. | Hypothesis | co_m12 | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"coprime"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | ||
chinese_remainder x y :
(x == y %[mod m1 * m2]) = (x == y %[mod m1]) && (x == y %[mod m2]). | Proof.
wlog le_yx : x y / y <= x; last by rewrite !eqn_mod_dvd // Gauss_dvd.
by have [?|/ltnW ?] := leqP y x; last rewrite !(eq_sym (x %% _)); apply.
Qed. | Lemma | chinese_remainder | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"Gauss_dvd",
"apply",
"eq_sym",
"eqn_mod_dvd",
"last",
"leqP",
"ltnW"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
chinese r1 r2 | :=
r1 * m2 * (egcdn m2 m1).1 + r2 * m1 * (egcdn m1 m2).1. | Definition | chinese | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"egcdn",
"r1",
"r2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
chinese_modl r1 r2 : chinese r1 r2 = r1 %[mod m1]. | Proof.
rewrite /chinese; case: (posnP m2) co_m12 => [-> /eqnP | m2_gt0 _].
by rewrite gcdn0 => ->; rewrite !modn1.
case: egcdnP => // k2 k1 def_m1 _.
rewrite mulnAC -mulnA def_m1 gcdnC (eqnP co_m12) mulnDr mulnA muln1.
by rewrite addnAC (mulnAC _ m1) -mulnDl modnMDl.
Qed. | Lemma | chinese_modl | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"addnAC",
"chinese",
"co_m12",
"egcdnP",
"eqnP",
"gcdn0",
"gcdnC",
"modn1",
"modnMDl",
"muln1",
"mulnA",
"mulnAC",
"mulnDl",
"mulnDr",
"posnP",
"r1",
"r2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
chinese_modr r1 r2 : chinese r1 r2 = r2 %[mod m2]. | Proof.
rewrite /chinese; case: (posnP m1) co_m12 => [-> /eqnP | m1_gt0 _].
by rewrite gcd0n => ->; rewrite !modn1.
case: (egcdnP m2) => // k1 k2 def_m2 _.
rewrite addnC mulnAC -mulnA def_m2 (eqnP co_m12) mulnDr mulnA muln1.
by rewrite addnAC (mulnAC _ m2) -mulnDl modnMDl.
Qed. | Lemma | chinese_modr | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"addnAC",
"addnC",
"chinese",
"co_m12",
"egcdnP",
"eqnP",
"gcd0n",
"modn1",
"modnMDl",
"muln1",
"mulnA",
"mulnAC",
"mulnDl",
"mulnDr",
"posnP",
"r1",
"r2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
chinese_mod x : x = chinese (x %% m1) (x %% m2) %[mod m1 * m2]. | Proof.
apply/eqP; rewrite chinese_remainder //.
by rewrite chinese_modl chinese_modr !modn_mod !eqxx.
Qed. | Lemma | chinese_mod | boot | boot/div.v | [
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq"
] | [
"apply",
"chinese",
"chinese_modl",
"chinese_modr",
"chinese_remainder",
"eqxx",
"modn_mod"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_axiom T (e : rel T) | := forall x y, reflect (x = y) (e x y). | Definition | eq_axiom | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"rel"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eqE (T : eqType) x : eq_op x = hasDecEq.eq_op (Equality.class T) x. | Proof. by []. Qed. | Lemma | eqE | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"class"
] | declared Canonical. | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
"x == y" | := (eq_op x y) (no associativity) : bool_scope. | Notation | x == y | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"x == y :> T" | := ((x : T) == (y : T)) : bool_scope. | Notation | x == y :> T | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"x != y" | := (~~ (x == y)) (no associativity) : bool_scope. | Notation | x != y | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"x != y :> T" | := (~~ (x == y :> T)) : bool_scope. | Notation | x != y :> T | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"x =P y" | := (eqP : reflect (x = y) (x == y))
(at level 70, no associativity) : eq_scope. | Notation | x =P y | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"x =P y :> T" | := (eqP : reflect (x = y :> T) (x == y :> T))
(no associativity) : eq_scope. | Notation | x =P y :> T | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eqbLHS | := (X in (X == _))%pattern. | Notation | eqbLHS | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"pattern"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eqbRHS | := (X in (_ == X))%pattern. | Notation | eqbRHS | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"pattern"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_refl (T : eqType) (x : T) : x == x. | Proof. exact/eqP. Qed. | Lemma | eq_refl | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eqxx | := eq_refl. | Notation | eqxx | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"eq_refl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_sym (T : eqType) (x y : T) : (x == y) = (y == x). | Proof. exact/eqP/eqP. Qed. | Lemma | eq_sym | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_xor_neq (T : eqType) (x y : T) : bool -> bool -> Set | :=
| EqNotNeq of x = y : eq_xor_neq x y true true
| NeqNotEq of x != y : eq_xor_neq x y false false. | Variant | eq_xor_neq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eqVneq (T : eqType) (x y : T) : eq_xor_neq x y (y == x) (x == y). | Proof. by rewrite eq_sym; case: (altP eqP); constructor. Qed. | Lemma | eqVneq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"eq_sym",
"eq_xor_neq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contraTeq b x y : (x != y -> ~~ b) -> b -> x = y. | Proof. by move=> imp hyp; apply/eqP; apply: contraTT hyp. Qed. | Lemma | contraTeq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contraNeq b x y : (x != y -> b) -> ~~ b -> x = y. | Proof. by move=> imp hyp; apply/eqP; apply: contraNT hyp. Qed. | Lemma | contraNeq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contraFeq b x y : (x != y -> b) -> b = false -> x = y. | Proof. by move=> imp /negbT; apply: contraNeq. Qed. | Lemma | contraFeq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply",
"contraNeq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contraPeq P x y : (x != y -> ~ P) -> P -> x = y. | Proof. by move=> imp HP; apply: contraTeq isT => /imp /(_ HP). Qed. | Lemma | contraPeq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply",
"contraTeq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contra_not_eq P x y : (x != y -> P) -> ~ P -> x = y. | Proof. by move=> imp; apply: contraPeq => /imp HP /(_ HP). Qed. | Lemma | contra_not_eq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply",
"contraPeq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contra_not_neq P x y : (x = y -> P) -> ~ P -> x != y. | Proof. by move=> imp; apply: contra_notN => /eqP. Qed. | Lemma | contra_not_neq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contraTneq b x y : (x = y -> ~~ b) -> b -> x != y. | Proof. by move=> imp; apply: contraTN => /eqP. Qed. | Lemma | contraTneq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contraNneq b x y : (x = y -> b) -> ~~ b -> x != y. | Proof. by move=> imp; apply: contraNN => /eqP. Qed. | Lemma | contraNneq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contraFneq b x y : (x = y -> b) -> b = false -> x != y. | Proof. by move=> imp /negbT; apply: contraNneq. Qed. | Lemma | contraFneq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply",
"contraNneq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contraPneq P x y : (x = y -> ~ P) -> P -> x != y. | Proof. by move=> imp; apply: contraPN => /eqP. Qed. | Lemma | contraPneq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contra_eqN b x y : (b -> x != y) -> x = y -> ~~ b. | Proof. by move=> imp /eqP; apply: contraL. Qed. | Lemma | contra_eqN | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contra_eqF b x y : (b -> x != y) -> x = y -> b = false. | Proof. by move=> imp /eqP; apply: contraTF. Qed. | Lemma | contra_eqF | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contra_eqT b x y : (~~ b -> x != y) -> x = y -> b. | Proof. by move=> imp /eqP; apply: contraLR. Qed. | Lemma | contra_eqT | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contra_neqN b x y : (b -> x = y) -> x != y -> ~~ b. | Proof. by move=> imp; apply: contraNN => /imp->. Qed. | Lemma | contra_neqN | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contra_neqF b x y : (b -> x = y) -> x != y -> b = false. | Proof. by move=> imp; apply: contraNF => /imp->. Qed. | Lemma | contra_neqF | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contra_neqT b x y : (~~ b -> x = y) -> x != y -> b. | Proof. by move=> imp; apply: contraNT => /imp->. Qed. | Lemma | contra_neqT | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contra_eq_not P x y : (P -> x != y) -> x = y -> ~ P. | Proof. by move=> imp /eqP; apply: contraTnot. Qed. | Lemma | contra_eq_not | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contra_neq_not P x y : (P -> x = y) -> x != y -> ~ P. | Proof. by move=> imp;apply: contraNnot => /imp->. Qed. | Lemma | contra_neq_not | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contra_eq z1 z2 x1 x2 : (x1 != x2 -> z1 != z2) -> z1 = z2 -> x1 = x2. | Proof. by move=> imp /eqP; apply: contraTeq. Qed. | Lemma | contra_eq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply",
"contraTeq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contra_neq z1 z2 x1 x2 : (x1 = x2 -> z1 = z2) -> z1 != z2 -> x1 != x2. | Proof. by move=> imp; apply: contraNneq => /imp->. Qed. | Lemma | contra_neq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply",
"contraNneq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contra_neq_eq z1 z2 x1 x2 : (x1 != x2 -> z1 = z2) -> z1 != z2 -> x1 = x2. | Proof. by move=> imp; apply: contraNeq => /imp->. Qed. | Lemma | contra_neq_eq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply",
"contraNeq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
contra_eq_neq z1 z2 x1 x2 : (z1 = z2 -> x1 != x2) -> x1 = x2 -> z1 != z2. | Proof. by move=> imp; apply: contra_eqN => /eqP /imp. Qed. | Lemma | contra_eq_neq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply",
"contra_eqN"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
memPn A x : reflect {in A, forall y, y != x} (x \notin A). | Proof.
apply: (iffP idP) => [notDx y | notDx]; first by apply: contraTneq => ->.
exact: contraL (notDx x) _.
Qed. | Lemma | memPn | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply",
"contraTneq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
memPnC A x : reflect {in A, forall y, x != y} (x \notin A). | Proof. by apply: (iffP (memPn A x)) => A'x y /A'x; rewrite eq_sym. Qed. | Lemma | memPnC | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply",
"eq_sym",
"memPn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ifN_eq R x y vT vF : x != y -> (if x == y then vT else vF) = vF :> R. | Proof. exact: ifN. Qed. | Lemma | ifN_eq | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"vT"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ifN_eqC R x y vT vF : x != y -> (if y == x then vT else vF) = vF :> R. | Proof. by rewrite eq_sym; apply: ifN. Qed. | Lemma | ifN_eqC | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply",
"eq_sym",
"vT"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_irrelevance (T : eqType) x y : forall e1 e2 : x = y :> T, e1 = e2. | Proof.
pose proj z e := if x =P z is ReflectT e0 then e0 else e.
suff: injective (proj y) by rewrite /proj => injp e e'; apply: injp; case: eqP.
pose join (e : x = _) := etrans (esym e).
apply: can_inj (join x y (proj x (erefl x))) _.
by case: y /; case: _ / (proj x _).
Qed. | Theorem | eq_irrelevance | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply",
"e'",
"e0",
"join"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_axiomK (T : eqType) (x : T) : all_equal_to (erefl x). | Proof. by move=> eq_x_x; apply: eq_irrelevance. Qed. | Corollary | eq_axiomK | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"apply",
"eq_irrelevance"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
sort : eqType -> predArgType. | Parameter | sort | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | ||
eqmod.sort : eqType >-> predArgType. | Coercion | eqmod | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"sort"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | ||
unit_eqP : Equality.axiom (fun _ _ : unit => true). | Proof. by do 2!case; left. Qed. | Lemma | unit_eqP | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"axiom",
"unit"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eqb b | := addb (~~ b). | Definition | eqb | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [] | This is extensionally equal, but not convertible to Bool.eqb. | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
eqbP : Equality.axiom eqb. | Proof. by do 2!case; constructor. Qed. | Lemma | eqbP | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"axiom",
"eqb"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eqbE : eqb = eq_op. | Proof. by []. Qed. | Lemma | eqbE | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"eqb"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
bool_irrelevance (b : bool) (p1 p2 : b) : p1 = p2. | Proof. exact: eq_irrelevance. Qed. | Lemma | bool_irrelevance | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [
"eq_irrelevance"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
negb_add b1 b2 : ~~ (b1 (+) b2) = (b1 == b2). | Proof. by rewrite -addNb. Qed. | Lemma | negb_add | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
negb_eqb b1 b2 : (b1 != b2) = b1 (+) b2. | Proof. by rewrite -addNb negbK. Qed. | Lemma | negb_eqb | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eqb_id b : (b == true) = b. | Proof. by case: b. Qed. | Lemma | eqb_id | boot | boot/eqtype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.