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
mulnE : muln = mult.
Proof. by []. Qed.
Lemma
mulnE
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "muln" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mul0n : left_zero 0 muln.
Proof. by []. Qed.
Lemma
mul0n
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "muln" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
muln0 : right_zero 0 muln.
Proof. by elim. Qed.
Lemma
muln0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "muln" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mul1n : left_id 1 muln.
Proof. exact: addn0. Qed.
Lemma
mul1n
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addn0", "muln" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulSn m n : m.+1 * n = n + m * n.
Proof. by []. Qed.
Lemma
mulSn
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulSnr m n : m.+1 * n = m * n + n.
Proof. exact: addnC. Qed.
Lemma
mulSnr
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addnC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulnS m n : m * n.+1 = m + m * n.
Proof. by elim: m => // m; rewrite !mulSn !addSn addnCA => ->. Qed.
Lemma
mulnS
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addSn", "addnCA", "mulSn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulnSr m n : m * n.+1 = m * n + m.
Proof. by rewrite addnC mulnS. Qed.
Lemma
mulnSr
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addnC", "mulnS" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
iter_addn m n p : iter n (addn m) p = m * n + p.
Proof. by elim: n => /= [|n ->]; rewrite ?muln0 // mulnS addnA. Qed.
Lemma
iter_addn
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addn", "addnA", "iter", "muln0", "mulnS" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
iter_addn_0 m n : iter n (addn m) 0 = m * n.
Proof. by rewrite iter_addn addn0. Qed.
Lemma
iter_addn_0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addn", "addn0", "iter", "iter_addn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
muln1 : right_id 1 muln.
Proof. by move=> n; rewrite mulnSr muln0. Qed.
Lemma
muln1
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "muln", "muln0", "mulnSr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulnC : commutative muln.
Proof. by move=> m n; elim: m => [|m]; rewrite (muln0, mulnS) // mulSn => ->. Qed.
Lemma
mulnC
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "mulSn", "muln", "muln0", "mulnS" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulnDl : left_distributive muln addn.
Proof. by move=> m1 m2 n; elim: m1 => //= m1 IHm; rewrite -addnA -IHm. Qed.
Lemma
mulnDl
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addn", "addnA", "muln" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulnDr : right_distributive muln addn.
Proof. by move=> m n1 n2; rewrite !(mulnC m) mulnDl. Qed.
Lemma
mulnDr
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addn", "muln", "mulnC", "mulnDl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulnBl : left_distributive muln subn.
Proof. move=> m n [|p]; first by rewrite !muln0. by elim: m n => // [m IHm] [|n] //; rewrite mulSn subnDl -IHm. Qed.
Lemma
mulnBl
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "mulSn", "muln", "muln0", "subn", "subnDl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulnBr : right_distributive muln subn.
Proof. by move=> m n p; rewrite !(mulnC m) mulnBl. Qed.
Lemma
mulnBr
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "muln", "mulnBl", "mulnC", "subn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulnA : associative muln.
Proof. by move=> m n p; elim: m => //= m; rewrite mulSn mulnDl => ->. Qed.
Lemma
mulnA
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "mulSn", "muln", "mulnDl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulnCA : left_commutative muln.
Proof. by move=> m n1 n2; rewrite !mulnA (mulnC m). Qed.
Lemma
mulnCA
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "muln", "mulnA", "mulnC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulnAC : right_commutative muln.
Proof. by move=> m n p; rewrite -!mulnA (mulnC n). Qed.
Lemma
mulnAC
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "muln", "mulnA", "mulnC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulnACA : interchange muln muln.
Proof. by move=> m n p q; rewrite -!mulnA (mulnCA n). Qed.
Lemma
mulnACA
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "muln", "mulnA", "mulnCA" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
muln_eq0 m n : (m * n == 0) = (m == 0) || (n == 0).
Proof. by case: m n => // m [|n] //=; rewrite muln0. Qed.
Lemma
muln_eq0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "muln0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
muln_eq1 m n : (m * n == 1) = (m == 1) && (n == 1).
Proof. by case: m n => [|[|m]] [|[|n]] //; rewrite muln0. Qed.
Lemma
muln_eq1
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "muln0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
muln_gt0 m n : (0 < m * n) = (0 < m) && (0 < n).
Proof. by case: m n => // m [|n] //=; rewrite muln0. Qed.
Lemma
muln_gt0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "muln0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_pmull m n : n > 0 -> m <= n * m.
Proof. by move/prednK <-; apply: leq_addr. Qed.
Lemma
leq_pmull
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "leq_addr", "prednK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_pmulr m n : n > 0 -> m <= m * n.
Proof. by move/leq_pmull; rewrite mulnC. Qed.
Lemma
leq_pmulr
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leq_pmull", "mulnC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_mul2l m n1 n2 : (m * n1 <= m * n2) = (m == 0) || (n1 <= n2).
Proof. by rewrite [LHS]/leq -mulnBr muln_eq0. Qed.
Lemma
leq_mul2l
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leq", "mulnBr", "muln_eq0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_mul2r m n1 n2 : (n1 * m <= n2 * m) = (m == 0) || (n1 <= n2).
Proof. by rewrite -!(mulnC m) leq_mul2l. Qed.
Lemma
leq_mul2r
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leq_mul2l", "mulnC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_mul m1 m2 n1 n2 : m1 <= n1 -> m2 <= n2 -> m1 * m2 <= n1 * n2.
Proof. move=> le_mn1 le_mn2; apply (@leq_trans (m1 * n2)). by rewrite leq_mul2l le_mn2 orbT. by rewrite leq_mul2r le_mn1 orbT. Qed.
Lemma
leq_mul
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "leq_mul2l", "leq_mul2r", "leq_trans" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqn_mul2l m n1 n2 : (m * n1 == m * n2) = (m == 0) || (n1 == n2).
Proof. by rewrite eqn_leq !leq_mul2l -orb_andr -eqn_leq. Qed.
Lemma
eqn_mul2l
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "eqn_leq", "leq_mul2l" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqn_mul2r m n1 n2 : (n1 * m == n2 * m) = (m == 0) || (n1 == n2).
Proof. by rewrite eqn_leq !leq_mul2r -orb_andr -eqn_leq. Qed.
Lemma
eqn_mul2r
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "eqn_leq", "leq_mul2r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_pmul2l m n1 n2 : 0 < m -> (m * n1 <= m * n2) = (n1 <= n2).
Proof. by move/prednK=> <-; rewrite leq_mul2l. Qed.
Lemma
leq_pmul2l
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leq_mul2l", "prednK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_pmul2r m n1 n2 : 0 < m -> (n1 * m <= n2 * m) = (n1 <= n2).
Proof. by move/prednK <-; rewrite leq_mul2r. Qed.
Lemma
leq_pmul2r
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leq_mul2r", "prednK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqn_pmul2l m n1 n2 : 0 < m -> (m * n1 == m * n2) = (n1 == n2).
Proof. by move/prednK <-; rewrite eqn_mul2l. Qed.
Lemma
eqn_pmul2l
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "eqn_mul2l", "prednK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqn_pmul2r m n1 n2 : 0 < m -> (n1 * m == n2 * m) = (n1 == n2).
Proof. by move/prednK <-; rewrite eqn_mul2r. Qed.
Lemma
eqn_pmul2r
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "eqn_mul2r", "prednK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_mul2l m n1 n2 : (m * n1 < m * n2) = (0 < m) && (n1 < n2).
Proof. by rewrite lt0n !ltnNge leq_mul2l negb_or. Qed.
Lemma
ltn_mul2l
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leq_mul2l", "lt0n", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_mul2r m n1 n2 : (n1 * m < n2 * m) = (0 < m) && (n1 < n2).
Proof. by rewrite lt0n !ltnNge leq_mul2r negb_or. Qed.
Lemma
ltn_mul2r
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leq_mul2r", "lt0n", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_pmul2l m n1 n2 : 0 < m -> (m * n1 < m * n2) = (n1 < n2).
Proof. by move/prednK <-; rewrite ltn_mul2l. Qed.
Lemma
ltn_pmul2l
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "ltn_mul2l", "prednK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_pmul2r m n1 n2 : 0 < m -> (n1 * m < n2 * m) = (n1 < n2).
Proof. by move/prednK <-; rewrite ltn_mul2r. Qed.
Lemma
ltn_pmul2r
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "ltn_mul2r", "prednK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_Pmull m n : 1 < n -> 0 < m -> m < n * m.
Proof. by move=> lt1n m_gt0; rewrite -[ltnLHS]mul1n ltn_pmul2r. Qed.
Lemma
ltn_Pmull
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "ltnLHS", "ltn_pmul2r", "mul1n" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_Pmulr m n : 1 < n -> 0 < m -> m < m * n.
Proof. by move=> lt1n m_gt0; rewrite mulnC ltn_Pmull. Qed.
Lemma
ltn_Pmulr
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "ltn_Pmull", "mulnC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_mull m1 m2 n1 n2 : 0 < n2 -> m1 < n1 -> m2 <= n2 -> m1 * m2 < n1 * n2.
Proof. move=> n20 lt_mn1 le_mn2. rewrite (@leq_ltn_trans (m1 * n2)) ?leq_mul2l ?le_mn2 ?orbT//. by rewrite ltn_mul2r lt_mn1 n20. Qed.
Lemma
ltn_mull
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leq_ltn_trans", "leq_mul2l", "ltn_mul2r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_mulr m1 m2 n1 n2 : 0 < n1 -> m1 <= n1 -> m2 < n2 -> m1 * m2 < n1 * n2.
Proof. by move=> ? ? ?; rewrite mulnC [ltnRHS]mulnC ltn_mull. Qed.
Lemma
ltn_mulr
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "ltnRHS", "ltn_mull", "mulnC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_mul m1 m2 n1 n2 : m1 < n1 -> m2 < n2 -> m1 * m2 < n1 * n2.
Proof. by move=> ? lt2; rewrite ltn_mull ?(leq_ltn_trans _ lt2)// ltnW. Qed.
Lemma
ltn_mul
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leq_ltn_trans", "ltnW", "ltn_mull" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
maxnMr : right_distributive muln maxn.
Proof. by case=> // m n1 n2; rewrite /maxn (fun_if (muln _)) ltn_pmul2l. Qed.
Lemma
maxnMr
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "ltn_pmul2l", "maxn", "muln" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
maxnMl : left_distributive muln maxn.
Proof. by move=> m1 m2 n; rewrite -!(mulnC n) maxnMr. Qed.
Lemma
maxnMl
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "maxn", "maxnMr", "muln", "mulnC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
minnMr : right_distributive muln minn.
Proof. by case=> // m n1 n2; rewrite /minn (fun_if (muln _)) ltn_pmul2l. Qed.
Lemma
minnMr
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "ltn_pmul2l", "minn", "muln" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
minnMl : left_distributive muln minn.
Proof. by move=> m1 m2 n; rewrite -!(mulnC n) minnMr. Qed.
Lemma
minnMl
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "minn", "minnMr", "muln", "mulnC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
iterM (T : Type) (n m : nat) (f : T -> T) : iter (n * m) f =1 iter n (iter m f).
Proof. by move=> x; elim: n => //= n <-; rewrite mulSn iterD. Qed.
Lemma
iterM
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "iter", "iterD", "mulSn", "nat" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
expn m n
:= iterop n muln m 1.
Definition
expn
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "iterop", "muln" ]
Exponentiation.
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
expn_rec
:= expn.
Definition
expn_rec
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "expn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"m ^ n"
:= (expn m n) : nat_scope.
Notation
m ^ n
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "expn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
expnE n m : expn m n = iterop n muln m 1.
Proof. by []. Qed.
Lemma
expnE
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "expn", "iterop", "muln" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
expn0 m : m ^ 0 = 1.
Proof. by []. Qed.
Lemma
expn0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
expn1 m : m ^ 1 = m.
Proof. by []. Qed.
Lemma
expn1
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
expnS m n : m ^ n.+1 = m * m ^ n.
Proof. by case: n; rewrite ?muln1. Qed.
Lemma
expnS
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "muln1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
expnSr m n : m ^ n.+1 = m ^ n * m.
Proof. by rewrite mulnC expnS. Qed.
Lemma
expnSr
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "expnS", "mulnC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
iter_muln m n p : iter n (muln m) p = m ^ n * p.
Proof. by elim: n => /= [|n ->]; rewrite ?mul1n // expnS mulnA. Qed.
Lemma
iter_muln
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "expnS", "iter", "mul1n", "muln", "mulnA" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
iter_muln_1 m n : iter n (muln m) 1 = m ^ n.
Proof. by rewrite iter_muln muln1. Qed.
Lemma
iter_muln_1
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "iter", "iter_muln", "muln", "muln1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
exp0n n : 0 < n -> 0 ^ n = 0.
Proof. by case: n => [|[]]. Qed.
Lemma
exp0n
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
exp1n n : 1 ^ n = 1.
Proof. by elim: n => // n; rewrite expnS mul1n. Qed.
Lemma
exp1n
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "expnS", "mul1n" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
expnD m n1 n2 : m ^ (n1 + n2) = m ^ n1 * m ^ n2.
Proof. by elim: n1 => [|n1 IHn]; rewrite !(mul1n, expnS) // IHn mulnA. Qed.
Lemma
expnD
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "expnS", "mul1n", "mulnA" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
expnMn m1 m2 n : (m1 * m2) ^ n = m1 ^ n * m2 ^ n.
Proof. by elim: n => // n IHn; rewrite !expnS IHn -!mulnA (mulnCA m2). Qed.
Lemma
expnMn
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "expnS", "mulnA", "mulnCA" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
expnM m n1 n2 : m ^ (n1 * n2) = (m ^ n1) ^ n2.
Proof. elim: n1 => [|n1 IHn]; first by rewrite exp1n. by rewrite expnD expnS expnMn IHn. Qed.
Lemma
expnM
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "exp1n", "expnD", "expnMn", "expnS" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
expnAC m n1 n2 : (m ^ n1) ^ n2 = (m ^ n2) ^ n1.
Proof. by rewrite -!expnM mulnC. Qed.
Lemma
expnAC
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "expnM", "mulnC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
expn_gt0 m n : (0 < m ^ n) = (0 < m) || (n == 0).
Proof. by case: m => [|m]; elim: n => //= n IHn; rewrite expnS // addn_gt0 IHn. Qed.
Lemma
expn_gt0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addn_gt0", "expnS" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
expn_eq0 m e : (m ^ e == 0) = (m == 0) && (e > 0).
Proof. by rewrite !eqn0Ngt expn_gt0 negb_or -lt0n. Qed.
Lemma
expn_eq0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "eqn0Ngt", "expn_gt0", "lt0n" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_expl m n : 1 < m -> n < m ^ n.
Proof. move=> m_gt1; elim: n => //= n; rewrite -(leq_pmul2l (ltnW m_gt1)) expnS. by apply: leq_trans; apply: ltn_Pmull. Qed.
Lemma
ltn_expl
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "expnS", "leq_pmul2l", "leq_trans", "ltnW", "ltn_Pmull" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_exp2l m n1 n2 : 1 < m -> (m ^ n1 <= m ^ n2) = (n1 <= n2).
Proof. move=> m_gt1; elim: n1 n2 => [|n1 IHn] [|n2] //; last 1 first. - by rewrite !expnS leq_pmul2l ?IHn // ltnW. - by rewrite expn_gt0 ltnW. by rewrite leqNgt (leq_trans m_gt1) // expnS leq_pmulr // expn_gt0 ltnW. Qed.
Lemma
leq_exp2l
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "expnS", "expn_gt0", "last", "leqNgt", "leq_pmul2l", "leq_pmulr", "leq_trans", "ltnW" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_exp2l m n1 n2 : 1 < m -> (m ^ n1 < m ^ n2) = (n1 < n2).
Proof. by move=> m_gt1; rewrite !ltnNge leq_exp2l. Qed.
Lemma
ltn_exp2l
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leq_exp2l", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqn_exp2l m n1 n2 : 1 < m -> (m ^ n1 == m ^ n2) = (n1 == n2).
Proof. by move=> m_gt1; rewrite !eqn_leq !leq_exp2l. Qed.
Lemma
eqn_exp2l
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "eqn_leq", "leq_exp2l" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
expnI m : 1 < m -> injective (expn m).
Proof. by move=> m_gt1 e1 e2 /eqP; rewrite eqn_exp2l // => /eqP. Qed.
Lemma
expnI
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "eqn_exp2l", "expn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_pexp2l m n1 n2 : 0 < m -> n1 <= n2 -> m ^ n1 <= m ^ n2.
Proof. by case: m => [|[|m]] // _; [rewrite !exp1n | rewrite leq_exp2l]. Qed.
Lemma
leq_pexp2l
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "exp1n", "leq_exp2l" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_pexp2l m n1 n2 : 0 < m -> m ^ n1 < m ^ n2 -> n1 < n2.
Proof. by case: m => [|[|m]] // _; [rewrite !exp1n | rewrite ltn_exp2l]. Qed.
Lemma
ltn_pexp2l
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "exp1n", "ltn_exp2l" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_exp2r m n e : e > 0 -> (m ^ e < n ^ e) = (m < n).
Proof. move=> e_gt0; apply/idP/idP=> [|ltmn]. rewrite !ltnNge; apply: contra => lemn. by elim: e {e_gt0} => // e IHe; rewrite !expnS leq_mul. by elim: e e_gt0 => // [[|e] IHe] _; rewrite ?expn1 // ltn_mul // IHe. Qed.
Lemma
ltn_exp2r
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "expn1", "expnS", "leq_mul", "ltnNge", "ltn_mul" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_exp2r m n e : e > 0 -> (m ^ e <= n ^ e) = (m <= n).
Proof. by move=> e_gt0; rewrite leqNgt ltn_exp2r // -leqNgt. Qed.
Lemma
leq_exp2r
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leqNgt", "ltn_exp2r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqn_exp2r m n e : e > 0 -> (m ^ e == n ^ e) = (m == n).
Proof. by move=> e_gt0; rewrite !eqn_leq !leq_exp2r. Qed.
Lemma
eqn_exp2r
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "eqn_leq", "leq_exp2r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
expIn e : e > 0 -> injective (expn^~ e).
Proof. by move=> e_gt1 m n /eqP; rewrite eqn_exp2r // => /eqP. Qed.
Lemma
expIn
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "eqn_exp2r", "expn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
iterX (T : Type) (n m : nat) (f : T -> T) : iter (n ^ m) f =1 iter m (iter n) f.
Proof. elim: m => //= m ihm x; rewrite expnS iterM; exact/eq_iter. Qed.
Lemma
iterX
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "eq_iter", "expnS", "iter", "iterM", "nat" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
factorial n
:= if n is n'.+1 then n * factorial n' else 1.
Fixpoint
factorial
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "n'" ]
Factorial.
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
fact_rec
:= factorial.
Definition
fact_rec
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "factorial" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"n `!"
:= (factorial n) (at level 1, format "n `!") : nat_scope.
Notation
n `!
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "factorial" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
factE n : factorial n = if n is n'.+1 then n * factorial n' else 1.
Proof. by case: n. Qed.
Lemma
factE
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "factorial", "n'" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
fact0 : 0`! = 1.
Proof. by []. Qed.
Lemma
fact0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
factS n : (n.+1)`! = n.+1 * n`!.
Proof. by []. Qed.
Lemma
factS
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
fact_gt0 n : n`! > 0.
Proof. by elim: n => //= n IHn; rewrite muln_gt0. Qed.
Lemma
fact_gt0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "muln_gt0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
fact_geq n : n <= n`!.
Proof. by case: n => // n; rewrite factS -(addn1 n) leq_pmulr ?fact_gt0. Qed.
Lemma
fact_geq
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addn1", "factS", "fact_gt0", "leq_pmulr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_fact m n : 0 < m -> m < n -> m`! < n`!.
Proof. case: m n => // m n _; elim: n m => // n ih [|m] ?; last by rewrite ltn_mul ?ih. by rewrite -[_.+1]muln1 leq_mul ?fact_gt0. Qed.
Lemma
ltn_fact
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "fact_gt0", "last", "leq_mul", "ltn_mul", "muln1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
nat_of_bool (b : bool)
:= if b then 1 else 0.
Coercion
nat_of_bool
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
Parity and bits.
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_b1 (b : bool) : b <= 1.
Proof. by case: b. Qed.
Lemma
leq_b1
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
addn_negb (b : bool) : ~~ b + b = 1.
Proof. by case: b. Qed.
Lemma
addn_negb
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqb0 (b : bool) : (b == 0 :> nat) = ~~ b.
Proof. by case: b. Qed.
Lemma
eqb0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "nat" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqb1 (b : bool) : (b == 1 :> nat) = b.
Proof. by case: b. Qed.
Lemma
eqb1
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "nat" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
lt0b (b : bool) : (b > 0) = b.
Proof. by case: b. Qed.
Lemma
lt0b
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
sub1b (b : bool) : 1 - b = ~~ b.
Proof. by case: b. Qed.
Lemma
sub1b
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulnb (b1 b2 : bool) : b1 * b2 = b1 && b2.
Proof. by case: b1; case: b2. Qed.
Lemma
mulnb
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulnbl (b : bool) n : b * n = (if b then n else 0).
Proof. by case: b; rewrite ?mul1n. Qed.
Lemma
mulnbl
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "mul1n" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulnbr (b : bool) n : n * b = (if b then n else 0).
Proof. by rewrite mulnC mulnbl. Qed.
Lemma
mulnbr
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "mulnC", "mulnbl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
odd n
:= if n is n'.+1 then ~~ odd n' else false.
Fixpoint
odd
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "n'" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
oddS n : odd n.+1 = ~~ odd n.
Proof. by []. Qed.
Lemma
oddS
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "odd" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
oddb (b : bool) : odd b = b.
Proof. by case: b. Qed.
Lemma
oddb
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "odd" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d