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 |
|---|---|---|---|---|---|---|---|---|---|---|
eqn_sub2rE p m n : p <= m -> p <= n -> (m - p == n - p) = (m == n). | Proof. by move=> pm pn; rewrite !eqn_leq !leq_sub2rE. Qed. | Lemma | eqn_sub2rE | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"eqn_leq",
"leq_sub2rE"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eqn_sub2lE m n p : p <= m -> n <= m -> (m - p == m - n) = (p == n). | Proof. by move=> pm nm; rewrite !eqn_leq !leq_sub2lE // -!eqn_leq eq_sym. Qed. | Lemma | eqn_sub2lE | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"eq_sym",
"eqn_leq",
"leq_sub2lE"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
maxn m n | := if m < n then n else m. | Definition | maxn | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [] | Max and min. | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
minn m n | := if m < n then m else n. | Definition | minn | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
max0n : left_id 0 maxn. | Proof. by case. Qed. | Lemma | max0n | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"maxn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
maxn0 : right_id 0 maxn. | Proof. by []. Qed. | Lemma | maxn0 | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"maxn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
maxnC : commutative maxn. | Proof. by rewrite /maxn; elim=> [|m ih] [] // n; rewrite !ltnS -!fun_if ih. Qed. | Lemma | maxnC | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"ltnS",
"maxn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
maxnE m n : maxn m n = m + (n - m). | Proof.
rewrite /maxn; elim: m n => [|m ih] [|n]; rewrite ?addn0 //.
by rewrite ltnS subSS addSn -ih; case: leq.
Qed. | Lemma | maxnE | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"addSn",
"addn0",
"leq",
"ltnS",
"maxn",
"subSS"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
maxnAC : right_commutative maxn. | Proof. by move=> m n p; rewrite !maxnE -!addnA !subnDA -!maxnE maxnC. Qed. | Lemma | maxnAC | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"addnA",
"maxn",
"maxnC",
"maxnE",
"subnDA"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
maxnA : associative maxn. | Proof. by move=> m n p; rewrite !(maxnC m) maxnAC. Qed. | Lemma | maxnA | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"maxn",
"maxnAC",
"maxnC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
maxnCA : left_commutative maxn. | Proof. by move=> m n p; rewrite !maxnA (maxnC m). Qed. | Lemma | maxnCA | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"maxn",
"maxnA",
"maxnC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
maxnACA : interchange maxn maxn. | Proof. by move=> m n p q; rewrite -!maxnA (maxnCA n). Qed. | Lemma | maxnACA | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"maxn",
"maxnA",
"maxnCA"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
maxn_idPl {m n} : reflect (maxn m n = m) (m >= n). | Proof. by rewrite -subn_eq0 -(eqn_add2l m) addn0 -maxnE; apply: eqP. Qed. | Lemma | maxn_idPl | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"addn0",
"apply",
"eqn_add2l",
"maxn",
"maxnE",
"subn_eq0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
maxn_idPr {m n} : reflect (maxn m n = n) (m <= n). | Proof. by rewrite maxnC; apply: maxn_idPl. Qed. | Lemma | maxn_idPr | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"apply",
"maxn",
"maxnC",
"maxn_idPl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
maxnn : idempotent_op maxn. | Proof. by move=> n; apply/maxn_idPl. Qed. | Lemma | maxnn | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"apply",
"idempotent_op",
"maxn",
"maxn_idPl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
leq_max m n1 n2 : (m <= maxn n1 n2) = (m <= n1) || (m <= n2). | Proof.
without loss le_n21: n1 n2 / n2 <= n1.
by case/orP: (leq_total n2 n1) => le_n12; last rewrite maxnC orbC; apply.
by rewrite (maxn_idPl le_n21) orb_idr // => /leq_trans->.
Qed. | Lemma | leq_max | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"apply",
"last",
"leq_total",
"leq_trans",
"maxn",
"maxnC",
"maxn_idPl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
leq_maxl m n : m <= maxn m n. | Proof. by rewrite leq_max leqnn. Qed. | Lemma | leq_maxl | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"leq_max",
"leqnn",
"maxn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
leq_maxr m n : n <= maxn m n. | Proof. by rewrite maxnC leq_maxl. Qed. | Lemma | leq_maxr | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"leq_maxl",
"maxn",
"maxnC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
gtn_max m n1 n2 : (m > maxn n1 n2) = (m > n1) && (m > n2). | Proof. by rewrite !ltnNge leq_max negb_or. Qed. | Lemma | gtn_max | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"leq_max",
"ltnNge",
"maxn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
geq_max m n1 n2 : (m >= maxn n1 n2) = (m >= n1) && (m >= n2). | Proof. by rewrite -ltnS gtn_max. Qed. | Lemma | geq_max | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"gtn_max",
"ltnS",
"maxn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
maxnSS m n : maxn m.+1 n.+1 = (maxn m n).+1. | Proof. by rewrite !maxnE. Qed. | Lemma | maxnSS | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"maxn",
"maxnE"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
addn_maxl : left_distributive addn maxn. | Proof. by move=> m1 m2 n; rewrite !maxnE subnDr addnAC. Qed. | Lemma | addn_maxl | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"addn",
"addnAC",
"maxn",
"maxnE",
"subnDr"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
addn_maxr : right_distributive addn maxn. | Proof. by move=> m n1 n2; rewrite !(addnC m) addn_maxl. Qed. | Lemma | addn_maxr | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"addn",
"addnC",
"addn_maxl",
"maxn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subn_maxl : left_distributive subn maxn. | Proof.
move=> m n p; apply/eqP.
rewrite eqn_leq !geq_max !leq_sub2r leq_max ?leqnn ?andbT ?orbT // /maxn.
by case: (_ < _); rewrite leqnn // orbT.
Qed. | Lemma | subn_maxl | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"apply",
"eqn_leq",
"geq_max",
"leq_max",
"leq_sub2r",
"leqnn",
"maxn",
"subn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
min0n : left_zero 0 minn. | Proof. by case. Qed. | Lemma | min0n | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
minn0 : right_zero 0 minn. | Proof. by []. Qed. | Lemma | minn0 | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
minnC : commutative minn. | Proof. by rewrite /minn; elim=> [|m ih] [] // n; rewrite !ltnS -!fun_if ih. Qed. | Lemma | minnC | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"ltnS",
"minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
addn_min_max m n : minn m n + maxn m n = m + n. | Proof. by rewrite /minn /maxn; case: (m < n) => //; exact: addnC. Qed. | Lemma | addn_min_max | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"addnC",
"maxn",
"minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
minnE m n : minn m n = m - (m - n). | Proof. by rewrite -(subnDl n) -maxnE -addn_min_max addnK minnC. Qed. | Lemma | minnE | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"addnK",
"addn_min_max",
"maxnE",
"minn",
"minnC",
"subnDl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
minnAC : right_commutative minn. | Proof.
by move=> m n p; rewrite !minnE -subnDA subnAC -maxnE maxnC maxnE subnAC subnDA.
Qed. | Lemma | minnAC | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"maxnC",
"maxnE",
"minn",
"minnE",
"subnAC",
"subnDA"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
minnA : associative minn. | Proof. by move=> m n p; rewrite minnC minnAC (minnC n). Qed. | Lemma | minnA | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"minn",
"minnAC",
"minnC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
minnCA : left_commutative minn. | Proof. by move=> m n p; rewrite !minnA (minnC n). Qed. | Lemma | minnCA | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"minn",
"minnA",
"minnC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
minnACA : interchange minn minn. | Proof. by move=> m n p q; rewrite -!minnA (minnCA n). Qed. | Lemma | minnACA | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"minn",
"minnA",
"minnCA"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
minn_idPl {m n} : reflect (minn m n = m) (m <= n). | Proof.
rewrite (sameP maxn_idPr eqP) -(eqn_add2l m) eq_sym -addn_min_max eqn_add2r.
exact: eqP.
Qed. | Lemma | minn_idPl | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"addn_min_max",
"eq_sym",
"eqn_add2l",
"eqn_add2r",
"maxn_idPr",
"minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
minn_idPr {m n} : reflect (minn m n = n) (m >= n). | Proof. by rewrite minnC; apply: minn_idPl. Qed. | Lemma | minn_idPr | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"apply",
"minn",
"minnC",
"minn_idPl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
minnn : idempotent_op minn. | Proof. by move=> n; apply/minn_idPl. Qed. | Lemma | minnn | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"apply",
"idempotent_op",
"minn",
"minn_idPl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
leq_min m n1 n2 : (m <= minn n1 n2) = (m <= n1) && (m <= n2). | Proof.
wlog le_n21: n1 n2 / n2 <= n1.
by case/orP: (leq_total n2 n1) => ?; last rewrite minnC andbC; apply.
rewrite /minn ltnNge le_n21 /=; case le_m_n1: (m <= n1) => //=.
apply/contraFF: le_m_n1 => /leq_trans; exact.
Qed. | Lemma | leq_min | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"apply",
"last",
"leq_total",
"leq_trans",
"ltnNge",
"minn",
"minnC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
gtn_min m n1 n2 : (m > minn n1 n2) = (m > n1) || (m > n2). | Proof. by rewrite !ltnNge leq_min negb_and. Qed. | Lemma | gtn_min | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"leq_min",
"ltnNge",
"minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
geq_min m n1 n2 : (m >= minn n1 n2) = (m >= n1) || (m >= n2). | Proof. by rewrite -ltnS gtn_min. Qed. | Lemma | geq_min | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"gtn_min",
"ltnS",
"minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ltn_min m n1 n2 : (m < minn n1 n2) = (m < n1) && (m < n2). | Proof. exact: leq_min. Qed. | Lemma | ltn_min | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"leq_min",
"minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
geq_minl m n : minn m n <= m. | Proof. by rewrite geq_min leqnn. Qed. | Lemma | geq_minl | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"geq_min",
"leqnn",
"minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
geq_minr m n : minn m n <= n. | Proof. by rewrite minnC geq_minl. Qed. | Lemma | geq_minr | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"geq_minl",
"minn",
"minnC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
addn_minr : right_distributive addn minn. | Proof. by move=> m1 m2 n; rewrite !minnE subnDl addnBA ?leq_subr. Qed. | Lemma | addn_minr | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"addn",
"addnBA",
"leq_subr",
"minn",
"minnE",
"subnDl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
addn_minl : left_distributive addn minn. | Proof. by move=> m1 m2 n; rewrite -!(addnC n) addn_minr. Qed. | Lemma | addn_minl | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"addn",
"addnC",
"addn_minr",
"minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subn_minl : left_distributive subn minn. | Proof.
move=> m n p; apply/eqP.
rewrite eqn_leq !leq_min !leq_sub2r geq_min ?leqnn ?orbT //= /minn.
by case: (_ < _); rewrite leqnn // orbT.
Qed. | Lemma | subn_minl | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"apply",
"eqn_leq",
"geq_min",
"leq_min",
"leq_sub2r",
"leqnn",
"minn",
"subn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
minnSS m n : minn m.+1 n.+1 = (minn m n).+1. | Proof. by rewrite -(addn_minr 1). Qed. | Lemma | minnSS | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"addn_minr",
"minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
maxnK m n : minn (maxn m n) m = m. | Proof. exact/minn_idPr/leq_maxl. Qed. | Lemma | maxnK | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"leq_maxl",
"maxn",
"minn",
"minn_idPr"
] | Quasi-cancellation (really, absorption) lemmas | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
maxKn m n : minn n (maxn m n) = n. | Proof. exact/minn_idPl/leq_maxr. Qed. | Lemma | maxKn | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"leq_maxr",
"maxn",
"minn",
"minn_idPl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
minnK m n : maxn (minn m n) m = m. | Proof. exact/maxn_idPr/geq_minl. Qed. | Lemma | minnK | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"geq_minl",
"maxn",
"maxn_idPr",
"minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
minKn m n : maxn n (minn m n) = n. | Proof. exact/maxn_idPl/geq_minr. Qed. | Lemma | minKn | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"geq_minr",
"maxn",
"maxn_idPl",
"minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
maxn_minl : left_distributive maxn minn. | Proof.
move=> m1 m2 n; wlog le_m21: m1 m2 / m2 <= m1.
move=> IH; case/orP: (leq_total m2 m1) => /IH //.
by rewrite minnC [in R in _ = R]minnC.
rewrite (minn_idPr le_m21); apply/esym/minn_idPr.
by rewrite geq_max leq_maxr leq_max le_m21.
Qed. | Lemma | maxn_minl | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"apply",
"geq_max",
"leq_max",
"leq_maxr",
"leq_total",
"maxn",
"minn",
"minnC",
"minn_idPr"
] | Distributivity. | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
maxn_minr : right_distributive maxn minn. | Proof. by move=> m n1 n2; rewrite !(maxnC m) maxn_minl. Qed. | Lemma | maxn_minr | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"maxn",
"maxnC",
"maxn_minl",
"minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
minn_maxl : left_distributive minn maxn. | Proof.
by move=> m1 m2 n; rewrite maxn_minr !maxn_minl -minnA maxnn (maxnC _ n) !maxnK.
Qed. | Lemma | minn_maxl | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"maxn",
"maxnC",
"maxnK",
"maxn_minl",
"maxn_minr",
"maxnn",
"minn",
"minnA"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
minn_maxr : right_distributive minn maxn. | Proof. by move=> m n1 n2; rewrite !(minnC m) minn_maxl. Qed. | Lemma | minn_maxr | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"maxn",
"minn",
"minnC",
"minn_maxl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
leq_xor_gtn m n : nat -> nat -> nat -> nat -> bool -> bool -> Set | :=
| LeqNotGtn of m <= n : leq_xor_gtn m n m m n n true false
| GtnNotLeq of n < m : leq_xor_gtn m n n n m m false true. | Variant | leq_xor_gtn | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"nat"
] | Comparison predicates. | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
leqP m n : leq_xor_gtn m n (minn n m) (minn m n) (maxn n m) (maxn m n)
(m <= n) (n < m). | Proof.
rewrite (minnC m) /minn (maxnC m) /maxn ltnNge.
by case le_mn: (m <= n); constructor; rewrite //= ltnNge le_mn.
Qed. | Lemma | leqP | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"leq_xor_gtn",
"ltnNge",
"maxn",
"maxnC",
"minn",
"minnC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ltn_xor_geq m n : nat -> nat -> nat -> nat -> bool -> bool -> Set | :=
| LtnNotGeq of m < n : ltn_xor_geq m n m m n n false true
| GeqNotLtn of n <= m : ltn_xor_geq m n n n m m true false. | Variant | ltn_xor_geq | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"nat"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ltnP m n : ltn_xor_geq m n (minn n m) (minn m n) (maxn n m) (maxn m n)
(n <= m) (m < n). | Proof. by case: leqP; constructor. Qed. | Lemma | ltnP | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"leqP",
"ltn_xor_geq",
"maxn",
"minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eqn0_xor_gt0 n : bool -> bool -> Set | :=
| Eq0NotPos of n = 0 : eqn0_xor_gt0 n true false
| PosNotEq0 of n > 0 : eqn0_xor_gt0 n false true. | Variant | eqn0_xor_gt0 | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
posnP n : eqn0_xor_gt0 n (n == 0) (0 < n). | Proof. by case: n; constructor. Qed. | Lemma | posnP | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"eqn0_xor_gt0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
compare_nat m n : nat -> nat -> nat -> nat ->
bool -> bool -> bool -> bool -> bool -> bool -> Set | :=
| CompareNatLt of m < n :
compare_nat m n m m n n false false false true false true
| CompareNatGt of m > n :
compare_nat m n n n m m false false true false true false
| CompareNatEq of m = n :
compare_nat m n m m m m true true true true false false. | Variant | compare_nat | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"nat"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ltngtP m n :
compare_nat m n (minn n m) (minn m n) (maxn n m) (maxn m n)
(n == m) (m == n) (n <= m) (m <= n) (n < m) (m < n). | Proof.
rewrite !ltn_neqAle [_ == n]eq_sym; have [mn|] := ltnP m n.
by rewrite ltnW // gtn_eqF //; constructor.
rewrite leq_eqVlt; case: ltnP; rewrite ?(orbT, orbF) => //= lt_nm eq_nm.
by rewrite ltn_eqF //; constructor.
by rewrite eq_nm (eqP eq_nm); constructor.
Qed. | Lemma | ltngtP | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"compare_nat",
"eq_sym",
"gtn_eqF",
"leq_eqVlt",
"ltnP",
"ltnW",
"ltn_eqF",
"ltn_neqAle",
"maxn",
"minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subn_if_gt T m n F (E : T) :
(if m.+1 - n is m'.+1 then F m' else E) = (if n <= m then F (m - n) else E). | Proof.
by have [le_nm|/eqnP-> //] := leqP; rewrite -{1}(subnK le_nm) -addSn addnK.
Qed. | Lemma | subn_if_gt | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"addSn",
"addnK",
"eqnP",
"leqP",
"subnK"
] | Eliminating the idiom for structurally decreasing compare and subtract. | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
leqLHS | := (X in (X <= _)%N)%pattern. | Notation | leqLHS | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"pattern"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
leqRHS | := (X in (_ <= X)%N)%pattern. | Notation | leqRHS | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"pattern"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ltnLHS | := (X in (X < _)%N)%pattern. | Notation | ltnLHS | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"pattern"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ltnRHS | := (X in (_ < X)%N)%pattern. | Notation | ltnRHS | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"pattern"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
exP : exists n, P n. | Hypothesis | exP | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | ||
acc_nat i : Prop | := AccNat0 of P i | AccNatS of acc_nat i.+1. | Inductive | acc_nat | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
find_ex_minn : {m | P m & forall n, P n -> n >= m}. | Proof.
have: forall n, P n -> n >= 0 by [].
have: acc_nat 0.
case exP => n; rewrite -(addn0 n); elim: n 0 => [|n IHn] j; first by left.
by rewrite addSnnS; right; apply: IHn.
move: 0; fix find_ex_minn 2 => m IHm m_lb; case Pm: (P m); first by exists m.
apply: find_ex_minn m.+1 _ _ => [|n Pn]; first by case: IHm; re... | Lemma | find_ex_minn | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"acc_nat",
"addSnnS",
"addn0",
"apply",
"exP",
"ltn_neqAle"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ex_minn | := s2val find_ex_minn. | Definition | ex_minn | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"find_ex_minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ex_minn_spec : nat -> Type | :=
ExMinnSpec m of P m & (forall n, P n -> n >= m) : ex_minn_spec m. | Inductive | ex_minn_spec | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"nat"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ex_minnP : ex_minn_spec ex_minn. | Proof. by rewrite /ex_minn; case: find_ex_minn. Qed. | Lemma | ex_minnP | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"ex_minn",
"ex_minn_spec",
"find_ex_minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
(exP : exists i, P i) (ubP : forall i, P i -> i <= m). | Hypotheses | exP | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | ||
ex_maxn_subproof : exists i, P (m - i). | Proof. by case: exP => i Pi; exists (m - i); rewrite subKn ?ubP. Qed. | Lemma | ex_maxn_subproof | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"exP",
"subKn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ex_maxn | := m - ex_minn ex_maxn_subproof. | Definition | ex_maxn | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"ex_maxn_subproof",
"ex_minn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ex_maxn_spec : nat -> Type | :=
ExMaxnSpec i of P i & (forall j, P j -> j <= i) : ex_maxn_spec i. | Variant | ex_maxn_spec | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"nat"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ex_maxnP : ex_maxn_spec ex_maxn. | Proof.
rewrite /ex_maxn; case: ex_minnP => i Pmi min_i; split=> // j Pj.
have le_i_mj: i <= m - j by rewrite min_i // subKn // ubP.
rewrite -subn_eq0 subnBA ?(leq_trans le_i_mj) ?leq_subr //.
by rewrite addnC -subnBA ?ubP.
Qed. | Lemma | ex_maxnP | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"addnC",
"ex_maxn",
"ex_maxn_spec",
"ex_minnP",
"leq_subr",
"leq_trans",
"split",
"subKn",
"subnBA",
"subn_eq0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_ex_minn P Q exP exQ : P =1 Q -> @ex_minn P exP = @ex_minn Q exQ. | Proof.
move=> eqPQ; case: ex_minnP => m1 Pm1 m1_lb; case: ex_minnP => m2 Pm2 m2_lb.
by apply/eqP; rewrite eqn_leq m1_lb (m2_lb, eqPQ) // -eqPQ.
Qed. | Lemma | eq_ex_minn | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"apply",
"eqn_leq",
"exP",
"ex_minn",
"ex_minnP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_ex_maxn (P Q : pred nat) m n exP ubP exQ ubQ :
P =1 Q -> @ex_maxn P m exP ubP = @ex_maxn Q n exQ ubQ. | Proof.
move=> eqPQ; case: ex_maxnP => i Pi max_i; case: ex_maxnP => j Pj max_j.
by apply/eqP; rewrite eqn_leq max_i ?eqPQ // max_j -?eqPQ.
Qed. | Lemma | eq_ex_maxn | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"apply",
"eqn_leq",
"exP",
"ex_maxn",
"ex_maxnP",
"nat"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iter n f x | :=
let fix loop m := if m is i.+1 then f (loop i) else x in loop n. | Definition | iter | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iteri n f x | :=
let fix loop m := if m is i.+1 then f i (loop i) else x in loop n. | Definition | iteri | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iterop n op x | :=
let f i y := if i is 0 then x else op x y in iteri n f. | Definition | iterop | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"iteri"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iterSr n f x : iter n.+1 f x = iter n f (f x). | Proof. by elim: n => //= n <-. Qed. | Lemma | iterSr | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"iter"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iterS n f x : iter n.+1 f x = f (iter n f x). | Proof. by []. Qed. | Lemma | iterS | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"iter"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iterD n m f x : iter (n + m) f x = iter n f (iter m f x). | Proof. by elim: n => //= n ->. Qed. | Lemma | iterD | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"iter"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iteriS n f x : iteri n.+1 f x = f n (iteri n f x). | Proof. by []. Qed. | Lemma | iteriS | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"iteri"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iteropS idx n op x : iterop n.+1 op x idx = iter n (op x) x. | Proof. by elim: n => //= n ->. Qed. | Lemma | iteropS | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"iter",
"iterop"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_iter f f' : f =1 f' -> forall n, iter n f =1 iter n f'. | Proof. by move=> eq_f n x; elim: n => //= n ->; rewrite eq_f. Qed. | Lemma | eq_iter | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"eq_f",
"iter"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iter_fix n f x : f x = x -> iter n f x = x. | Proof. by move=> fixf; elim: n => //= n ->. Qed. | Lemma | iter_fix | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"iter"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_iteri f f' : f =2 f' -> forall n, iteri n f =1 iteri n f'. | Proof. by move=> eq_f n x; elim: n => //= n ->; rewrite eq_f. Qed. | Lemma | eq_iteri | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"eq_f",
"iteri"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_iterop n op op' : op =2 op' -> iterop n op =2 iterop n op'. | Proof. by move=> eq_op x; apply: eq_iteri; case. Qed. | Lemma | eq_iterop | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"apply",
"eq_iteri",
"iterop"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iter_in f S i : {homo f : x / x \in S} -> {homo iter i f : x / x \in S}. | Proof. by move=> f_in x xS; elim: i => [|i /f_in]. Qed. | Lemma | iter_in | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"f_in",
"iter"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iter_succn m n : iter n succn m = m + n. | Proof. by rewrite addnC; elim: n => //= n ->. Qed. | Lemma | iter_succn | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"addnC",
"iter",
"succn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iter_succn_0 n : iter n succn 0 = n. | Proof. exact: iter_succn. Qed. | Lemma | iter_succn_0 | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"iter",
"iter_succn",
"succn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iter_predn m n : iter n predn m = m - n. | Proof. by elim: n m => /= [|n IHn] m; rewrite ?subn0 // IHn subnS. Qed. | Lemma | iter_predn | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"iter",
"predn",
"subn0",
"subnS"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
muln | := mult. | Definition | muln | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [] | Multiplication. | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
muln_rec | := muln. | Definition | muln_rec | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"muln"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"m * n" | := (muln m n) : nat_scope. | Notation | m * n | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"muln"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
multE : mult = muln. | Proof. by []. Qed. | Lemma | multE | boot | boot/ssrnat.v | [
"Corelib",
"PosDef",
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"NatTrec"
] | [
"muln"
] | 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.