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
oddD m n : odd (m + n) = odd m (+) odd n.
Proof. by elim: m => [|m IHn] //=; rewrite -addTb IHn addbA addTb. Qed.
Lemma
oddD
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "odd" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
oddB m n : n <= m -> odd (m - n) = odd m (+) odd n.
Proof. by move=> le_nm; apply: (@canRL bool) (addbK _) _; rewrite -oddD subnK. Qed.
Lemma
oddB
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "odd", "oddD", "subnK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
oddN i m : odd m = false -> i <= m -> odd (m - i) = odd i.
Proof. by move=> oddm /oddB ->; rewrite oddm. Qed.
Lemma
oddN
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "odd", "oddB" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
oddM m n : odd (m * n) = odd m && odd n.
Proof. by elim: m => //= m IHm; rewrite oddD -addTb andb_addl -IHm. Qed.
Lemma
oddM
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "odd", "oddD" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
oddX m n : odd (m ^ n) = (n == 0) || odd m.
Proof. by elim: n => // n IHn; rewrite expnS oddM {}IHn orbC; case odd. Qed.
Lemma
oddX
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "expnS", "odd", "oddM" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
double n
:= if n is n'.+1 then (double n').+2 else 0.
Fixpoint
double
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "n'" ]
Doubling.
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
double_rec
:= double.
Definition
double_rec
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "double" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"n .*2"
:= (double n) : nat_scope.
Notation
n .*2
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "double" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
doubleE n : double n = if n is n'.+1 then (double n').+2 else 0.
Proof. by case: n. Qed.
Lemma
doubleE
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "double", "n'" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
double0 : 0.*2 = 0.
Proof. by []. Qed.
Lemma
double0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
doubleS n : n.+1.*2 = n.*2.+2.
Proof. by []. Qed.
Lemma
doubleS
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
double_pred n : n.-1.*2 = n.*2.-2.
Proof. by case: n. Qed.
Lemma
double_pred
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
predn_doubleS n : n.+1.*2.-1 = n.*2.+1.
Proof. by []. Qed.
Lemma
predn_doubleS
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
addnn n : n + n = n.*2.
Proof. by apply: eqP; elim: n => // n IHn; rewrite addnS. Qed.
Lemma
addnn
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addnS", "apply" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mul2n m : 2 * m = m.*2.
Proof. by rewrite mulSn mul1n addnn. Qed.
Lemma
mul2n
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addnn", "mul1n", "mulSn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
muln2 m : m * 2 = m.*2.
Proof. by rewrite mulnC mul2n. Qed.
Lemma
muln2
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "mul2n", "mulnC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
doubleD m n : (m + n).*2 = m.*2 + n.*2.
Proof. by rewrite -!mul2n mulnDr. Qed.
Lemma
doubleD
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "mul2n", "mulnDr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
doubleB m n : (m - n).*2 = m.*2 - n.*2.
Proof. by elim: m n => [|m IHm] []. Qed.
Lemma
doubleB
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_double m n : (m.*2 <= n.*2) = (m <= n).
Proof. by rewrite /leq -doubleB; case (m - n). Qed.
Lemma
leq_double
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "doubleB", "leq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_double m n : (m.*2 < n.*2) = (m < n).
Proof. by rewrite 2!ltnNge leq_double. Qed.
Lemma
ltn_double
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leq_double", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_Sdouble m n : (m.*2.+1 < n.*2) = (m < n).
Proof. by rewrite -doubleS leq_double. Qed.
Lemma
ltn_Sdouble
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "doubleS", "leq_double" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_Sdouble m n : (m.*2 <= n.*2.+1) = (m <= n).
Proof. by rewrite leqNgt ltn_Sdouble -leqNgt. Qed.
Lemma
leq_Sdouble
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leqNgt", "ltn_Sdouble" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
odd_double n : odd n.*2 = false.
Proof. by rewrite -addnn oddD addbb. Qed.
Lemma
odd_double
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addnn", "odd", "oddD" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
double_gt0 n : (0 < n.*2) = (0 < n).
Proof. by case: n. Qed.
Lemma
double_gt0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
double_eq0 n : (n.*2 == 0) = (n == 0).
Proof. by case: n. Qed.
Lemma
double_eq0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
doubleMl m n : (m * n).*2 = m.*2 * n.
Proof. by rewrite -!mul2n mulnA. Qed.
Lemma
doubleMl
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "mul2n", "mulnA" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
doubleMr m n : (m * n).*2 = m * n.*2.
Proof. by rewrite -!muln2 mulnA. Qed.
Lemma
doubleMr
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "muln2", "mulnA" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
neq_doubleS_double n m : (n.*2.+1 == m.*2) = false.
Proof. case: (leqP m n) => mn; apply/negbTE; rewrite neq_ltn ?ltn_Sdouble ?mn//. by rewrite ltnS leq_double mn orbT. Qed.
Lemma
neq_doubleS_double
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "leqP", "leq_double", "ltnS", "ltn_Sdouble", "neq_ltn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
half (n : nat) : nat
:= if n is n'.+1 then uphalf n' else n with uphalf (n : nat) : nat := if n is n'.+1 then n'./2.+1 else n where "n ./2" := (half n) : nat_scope.
Fixpoint
half
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "n'", "nat" ]
Halving.
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
uphalfE n : uphalf n = n.+1./2.
Proof. by []. Qed.
Lemma
uphalfE
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
doubleK : cancel double half.
Proof. by elim=> //= n ->. Qed.
Lemma
doubleK
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "double", "half" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
half_double
:= doubleK.
Definition
half_double
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "doubleK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
double_inj
:= can_inj doubleK.
Definition
double_inj
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "doubleK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
uphalf_double n : uphalf n.*2 = n.
Proof. by elim: n => //= n ->. Qed.
Lemma
uphalf_double
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
uphalf_half n : uphalf n = odd n + n./2.
Proof. by elim: n => //= n ->; rewrite addnA addn_negb. Qed.
Lemma
uphalf_half
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addnA", "addn_negb", "odd" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
odd_double_half n : odd n + n./2.*2 = n.
Proof. by elim: n => //= n {3}<-; rewrite uphalf_half doubleD; case (odd n). Qed.
Lemma
odd_double_half
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "doubleD", "odd", "uphalf_half" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
halfK n : n./2.*2 = n - odd n.
Proof. by rewrite -[n in n - _]odd_double_half addnC addnK. Qed.
Lemma
halfK
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addnC", "addnK", "odd", "odd_double_half" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
uphalfK n : (uphalf n).*2 = odd n + n.
Proof. by rewrite uphalfE halfK/=; case: odd; rewrite ?subn1. Qed.
Lemma
uphalfK
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "halfK", "odd", "subn1", "uphalfE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
odd_halfK n : odd n -> n./2.*2 = n.-1.
Proof. by rewrite halfK => ->; rewrite subn1. Qed.
Lemma
odd_halfK
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "halfK", "odd", "subn1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
even_halfK n : ~~ odd n -> n./2.*2 = n.
Proof. by rewrite halfK => /negbTE->; rewrite subn0. Qed.
Lemma
even_halfK
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "halfK", "odd", "subn0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
odd_uphalfK n : odd n -> (uphalf n).*2 = n.+1.
Proof. by rewrite uphalfK => ->. Qed.
Lemma
odd_uphalfK
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "odd", "uphalfK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
even_uphalfK n : ~~ odd n -> (uphalf n).*2 = n.
Proof. by rewrite uphalfK => /negbTE->. Qed.
Lemma
even_uphalfK
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "odd", "uphalfK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
half_bit_double n (b : bool) : (b + n.*2)./2 = n.
Proof. by case: b; rewrite /= (half_double, uphalf_double). Qed.
Lemma
half_bit_double
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "half_double", "uphalf_double" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
halfD m n : (m + n)./2 = (odd m && odd n) + (m./2 + n./2).
Proof. rewrite -[n in LHS]odd_double_half addnCA. rewrite -[m in LHS]odd_double_half -addnA -doubleD. by do 2!case: odd; rewrite /= ?add0n ?half_double ?uphalf_double. Qed.
Lemma
halfD
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "add0n", "addnA", "addnCA", "doubleD", "half_double", "odd", "odd_double_half", "uphalf_double" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
half_leq m n : m <= n -> m./2 <= n./2.
Proof. by move/subnK <-; rewrite halfD addnA leq_addl. Qed.
Lemma
half_leq
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addnA", "halfD", "leq_addl", "subnK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
geq_half_double m n : (m <= n./2) = (m.*2 <= n).
Proof. rewrite -[X in _.*2 <= X]odd_double_half. case: odd; last by rewrite leq_double. by case: m => // m; rewrite doubleS ltnS ltn_double. Qed.
Lemma
geq_half_double
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "doubleS", "last", "leq_double", "ltnS", "ltn_double", "odd", "odd_double_half" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_half_double m n : (m./2 < n) = (m < n.*2).
Proof. by rewrite ltnNge geq_half_double -ltnNge. Qed.
Lemma
ltn_half_double
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "geq_half_double", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_half_double m n : (m./2 <= n) = (m <= n.*2.+1).
Proof. by case: m => [|[|m]] //; rewrite ltnS ltn_half_double. Qed.
Lemma
leq_half_double
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "ltnS", "ltn_half_double" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gtn_half_double m n : (n < m./2) = (n.*2.+1 < m).
Proof. by rewrite ltnNge leq_half_double -ltnNge. Qed.
Lemma
gtn_half_double
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leq_half_double", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
half_gt0 n : (0 < n./2) = (1 < n).
Proof. by case: n => [|[]]. Qed.
Lemma
half_gt0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
uphalf_leq m n : m <= n -> uphalf m <= uphalf n.
Proof. move/subnK <-; rewrite !uphalf_half oddD halfD !addnA. by do 2 case: odd; apply: leq_addl. Qed.
Lemma
uphalf_leq
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addnA", "apply", "halfD", "leq_addl", "odd", "oddD", "subnK", "uphalf_half" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_uphalf_double m n : (uphalf m <= n) = (m <= n.*2).
Proof. by rewrite uphalfE leq_half_double. Qed.
Lemma
leq_uphalf_double
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leq_half_double", "uphalfE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
geq_uphalf_double m n : (m <= uphalf n) = (m.*2 <= n.+1).
Proof. by rewrite uphalfE geq_half_double. Qed.
Lemma
geq_uphalf_double
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "geq_half_double", "uphalfE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
gtn_uphalf_double m n : (n < uphalf m) = (n.*2 < m).
Proof. by rewrite uphalfE gtn_half_double. Qed.
Lemma
gtn_uphalf_double
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "gtn_half_double", "uphalfE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_uphalf_double m n : (uphalf m < n) = (m.+1 < n.*2).
Proof. by rewrite uphalfE ltn_half_double. Qed.
Lemma
ltn_uphalf_double
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "ltn_half_double", "uphalfE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
uphalf_gt0 n : (0 < uphalf n) = (0 < n).
Proof. by case: n. Qed.
Lemma
uphalf_gt0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
odd_geq m n : odd n -> (m <= n) = (m./2.*2 <= n).
Proof. move=> odd_n; rewrite -[m in LHS]odd_double_half -[n]odd_double_half odd_n. by case: (odd m); rewrite // leq_Sdouble ltnS leq_double. Qed.
Lemma
odd_geq
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leq_Sdouble", "leq_double", "ltnS", "odd", "odd_double_half" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
odd_ltn m n : odd n -> (n < m) = (n < m./2.*2).
Proof. by move=> odd_n; rewrite !ltnNge odd_geq. Qed.
Lemma
odd_ltn
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "ltnNge", "odd", "odd_geq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
odd_gt0 n : odd n -> n > 0.
Proof. by case: n. Qed.
Lemma
odd_gt0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "odd" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
odd_gt2 n : odd n -> n > 1 -> n > 2.
Proof. by move=> odd_n n_gt1; rewrite odd_geq. Qed.
Lemma
odd_gt2
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "odd", "odd_geq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulnn m : m * m = m ^ 2.
Proof. by rewrite !expnS muln1. Qed.
Lemma
mulnn
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "expnS", "muln1" ]
Squares and square identities.
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
sqrnD m n : (m + n) ^ 2 = m ^ 2 + n ^ 2 + 2 * (m * n).
Proof. rewrite -!mulnn mul2n mulnDr !mulnDl (mulnC n) -!addnA. by congr (_ + _); rewrite addnA addnn addnC. Qed.
Lemma
sqrnD
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addnA", "addnC", "addnn", "mul2n", "mulnC", "mulnDl", "mulnDr", "mulnn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
sqrnB m n : n <= m -> (m - n) ^ 2 = m ^ 2 + n ^ 2 - 2 * (m * n).
Proof. move/subnK <-; rewrite addnK sqrnD -addnA -addnACA -addnA. by rewrite addnn -mul2n -mulnDr -mulnDl addnK. Qed.
Lemma
sqrnB
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addnA", "addnACA", "addnK", "addnn", "mul2n", "mulnDl", "mulnDr", "sqrnD", "subnK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
sqrnD_sub m n : n <= m -> (m + n) ^ 2 - 4 * (m * n) = (m - n) ^ 2.
Proof. move=> le_nm; rewrite -[4]/(2 * 2) -mulnA mul2n -addnn subnDA. by rewrite sqrnD addnK sqrnB. Qed.
Lemma
sqrnD_sub
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addnK", "addnn", "mul2n", "mulnA", "sqrnB", "sqrnD", "subnDA" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
subn_sqr m n : m ^ 2 - n ^ 2 = (m - n) * (m + n).
Proof. by rewrite mulnBl !mulnDr addnC (mulnC m) subnDl. Qed.
Lemma
subn_sqr
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addnC", "mulnBl", "mulnC", "mulnDr", "subnDl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_sqr m n : (m ^ 2 < n ^ 2) = (m < n).
Proof. by rewrite ltn_exp2r. Qed.
Lemma
ltn_sqr
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "ltn_exp2r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_sqr m n : (m ^ 2 <= n ^ 2) = (m <= n).
Proof. by rewrite leq_exp2r. Qed.
Lemma
leq_sqr
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leq_exp2r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
sqrn_gt0 n : (0 < n ^ 2) = (0 < n).
Proof. exact: (ltn_sqr 0). Qed.
Lemma
sqrn_gt0
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "ltn_sqr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqn_sqr m n : (m ^ 2 == n ^ 2) = (m == n).
Proof. by rewrite eqn_exp2r. Qed.
Lemma
eqn_sqr
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "eqn_exp2r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
sqrn_inj : injective (expn ^~ 2).
Proof. exact: expIn. Qed.
Lemma
sqrn_inj
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "expIn", "expn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leqif m n C
:= ((m <= n) * ((m == n) = C))%type.
Definition
leqif
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "type" ]
non-strict one.
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"m <= n ?= 'iff' C"
:= (leqif m n C) : nat_scope.
Notation
m <= n ?= 'iff' C
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leqif" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leq_of_leqif m n C (H : m <= n ?= iff C)
:= H.1 : m <= n.
Coercion
leq_of_leqif
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leqifP m n C : reflect (m <= n ?= iff C) (if C then m == n else m < n).
Proof. rewrite ltn_neqAle; apply: (iffP idP) => [|lte]; last by rewrite !lte; case C. by case C => [/eqP-> | /andP[/negPf]]; split=> //; apply: eqxx. Qed.
Lemma
leqifP
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "eqxx", "last", "ltn_neqAle", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leqif_refl m C : reflect (m <= m ?= iff C) C.
Proof. by apply: (iffP idP) => [-> | <-] //; split; rewrite ?eqxx. Qed.
Lemma
leqif_refl
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "eqxx", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leqif_trans m1 m2 m3 C12 C23 : m1 <= m2 ?= iff C12 -> m2 <= m3 ?= iff C23 -> m1 <= m3 ?= iff C12 && C23.
Proof. move=> ltm12 ltm23; apply/leqifP; rewrite -ltm12. have [->|eqm12] := eqVneq; first by rewrite ltn_neqAle !ltm23 andbT; case C23. by rewrite (@leq_trans m2) ?ltm23 // ltn_neqAle eqm12 ltm12. Qed.
Lemma
leqif_trans
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "eqVneq", "leq_trans", "leqifP", "ltn_neqAle" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mono_leqif f : {mono f : m n / m <= n} -> forall m n C, (f m <= f n ?= iff C) = (m <= n ?= iff C).
Proof. by move=> f_mono m n C; rewrite /leqif !eqn_leq !f_mono. Qed.
Lemma
mono_leqif
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "eqn_leq", "f_mono", "leqif" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leqif_geq m n : m <= n -> m <= n ?= iff (m >= n).
Proof. by move=> lemn; split=> //; rewrite eqn_leq lemn. Qed.
Lemma
leqif_geq
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "eqn_leq", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leqif_eq m n : m <= n -> m <= n ?= iff (m == n).
Proof. by []. Qed.
Lemma
leqif_eq
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
geq_leqif a b C : a <= b ?= iff C -> (b <= a) = C.
Proof. by case=> le_ab; rewrite eqn_leq le_ab. Qed.
Lemma
geq_leqif
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "eqn_leq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_leqif a b C : a <= b ?= iff C -> (a < b) = ~~ C.
Proof. by move=> le_ab; rewrite ltnNge (geq_leqif le_ab). Qed.
Lemma
ltn_leqif
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "geq_leqif", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltnNleqif x y C : x <= y ?= iff ~~ C -> (x < y) = C.
Proof. by move=> /ltn_leqif; rewrite negbK. Qed.
Lemma
ltnNleqif
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "ltn_leqif" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eq_leqif x y C : x <= y ?= iff C -> (x == y) = C.
Proof. by move=> /leqifP; case: C ltngtP => [] []. Qed.
Lemma
eq_leqif
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leqifP", "ltngtP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqTleqif x y C : x <= y ?= iff C -> C -> x = y.
Proof. by move=> /eq_leqif<-/eqP. Qed.
Lemma
eqTleqif
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "eq_leqif" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leqif_add m1 n1 C1 m2 n2 C2 : m1 <= n1 ?= iff C1 -> m2 <= n2 ?= iff C2 -> m1 + m2 <= n1 + n2 ?= iff C1 && C2.
Proof. rewrite -(mono_leqif (leq_add2r m2)) -(mono_leqif (leq_add2l n1) m2). exact: leqif_trans. Qed.
Lemma
leqif_add
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "leq_add2l", "leq_add2r", "leqif_trans", "mono_leqif" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
leqif_mul m1 n1 C1 m2 n2 C2 : m1 <= n1 ?= iff C1 -> m2 <= n2 ?= iff C2 -> m1 * m2 <= n1 * n2 ?= iff (n1 * n2 == 0) || (C1 && C2).
Proof. case: n1 => [|n1] le1; first by case: m1 le1 => [|m1] [_ <-] //. case: n2 m2 => [|n2] [|m2] /=; try by case=> // _ <-; rewrite !muln0 ?andbF. have /leq_pmul2l-/mono_leqif<-: 0 < n1.+1 by []. by apply: leqif_trans; have /leq_pmul2r-/mono_leqif->: 0 < m2.+1. Qed.
Lemma
leqif_mul
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "le1", "leq_pmul2l", "leq_pmul2r", "leqif_trans", "mono_leqif", "muln0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
nat_Cauchy m n : 2 * (m * n) <= m ^ 2 + n ^ 2 ?= iff (m == n).
Proof. without loss le_nm: m n / n <= m. by have [?|/ltnW ?] := leqP n m; last rewrite eq_sym addnC (mulnC m); apply. apply/leqifP; have [-> | ne_mn] := eqVneq; first by rewrite addnn mul2n. by rewrite -subn_gt0 -sqrnB // sqrn_gt0 subn_gt0 ltn_neqAle eq_sym ne_mn. Qed.
Lemma
nat_Cauchy
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addnC", "addnn", "apply", "eqVneq", "eq_sym", "last", "leqP", "leqifP", "ltnW", "ltn_neqAle", "mul2n", "mulnC", "sqrnB", "sqrn_gt0", "subn_gt0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
nat_AGM2 m n : 4 * (m * n) <= (m + n) ^ 2 ?= iff (m == n).
Proof. rewrite -[4]/(2 * 2) -mulnA mul2n -addnn sqrnD; apply/leqifP. by rewrite ltn_add2r eqn_add2r ltn_neqAle !nat_Cauchy; case: eqVneq. Qed.
Lemma
nat_AGM2
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "addnn", "apply", "eqVneq", "eqn_add2r", "leqifP", "ltn_add2r", "ltn_neqAle", "mul2n", "mulnA", "nat_Cauchy", "sqrnD" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
contraTleq b m n : (n < m -> ~~ b) -> (b -> m <= n).
Proof. by rewrite ltnNge; apply: contraTT. Qed.
Lemma
contraTleq
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
contraTltn b m n : (n <= m -> ~~ b) -> (b -> m < n).
Proof. by rewrite ltnNge; apply: contraTN. Qed.
Lemma
contraTltn
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
contraPleq P m n : (n < m -> ~ P) -> (P -> m <= n).
Proof. by rewrite ltnNge; apply: contraPT. Qed.
Lemma
contraPleq
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
contraPltn P m n : (n <= m -> ~ P) -> (P -> m < n).
Proof. by rewrite ltnNge; apply: contraPN. Qed.
Lemma
contraPltn
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
contraNleq b m n : (n < m -> b) -> (~~ b -> m <= n).
Proof. by rewrite ltnNge; apply: contraNT. Qed.
Lemma
contraNleq
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
contraNltn b m n : (n <= m -> b) -> (~~ b -> m < n).
Proof. by rewrite ltnNge; apply: contraNN. Qed.
Lemma
contraNltn
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
contra_not_leq P m n : (n < m -> P) -> (~ P -> m <= n).
Proof. by rewrite ltnNge; apply: contra_notT. Qed.
Lemma
contra_not_leq
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
contra_not_ltn P m n : (n <= m -> P) -> (~ P -> m < n).
Proof. by rewrite ltnNge; apply: contra_notN. Qed.
Lemma
contra_not_ltn
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
contraFleq b m n : (n < m -> b) -> (b = false -> m <= n).
Proof. by rewrite ltnNge; apply: contraFT. Qed.
Lemma
contraFleq
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
contraFltn b m n : (n <= m -> b) -> (b = false -> m < n).
Proof. by rewrite ltnNge; apply: contraFN. Qed.
Lemma
contraFltn
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
contra_leqT b m n : (~~ b -> m < n) -> (n <= m -> b).
Proof. by rewrite ltnNge; apply: contraTT. Qed.
Lemma
contra_leqT
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
contra_ltnT b m n : (~~ b -> m <= n) -> (n < m -> b).
Proof. by rewrite ltnNge; apply: contraNT. Qed.
Lemma
contra_ltnT
boot
boot/ssrnat.v
[ "Corelib", "PosDef", "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "NatTrec" ]
[ "apply", "ltnNge" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d