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 |
|---|---|---|---|---|---|---|---|---|---|---|
inj_leq m n (f : 'I_m -> 'I_n) : injective f -> m <= n. | Proof. by move=> /leq_card; rewrite !card_ord. Qed. | Lemma | inj_leq | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"card_ord",
"leq_card"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_rank_subproof (T : finType) x0 (A : {pred T}) : x0 \in A -> 0 < #|A|. | Proof. by move=> Ax0; rewrite (cardD1 x0) Ax0. Qed. | Lemma | enum_rank_subproof | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"cardD1"
] | bijection between any finType T and the Ordinal finType of its cardinal | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
unlockable_enum_rank_in | := Unlockable enum_rank_in.unlock. | Canonical | unlockable_enum_rank_in | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"enum_rank_in"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_rank x | := @enum_rank_in T x T (erefl true) x. | Definition | enum_rank | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"enum_rank_in"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_default A : 'I_(#|A|) -> T. | Proof. by rewrite cardE; case: (enum A) => [|//] []. Qed. | Lemma | enum_default | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"cardE",
"enum"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_val A i | := nth (@enum_default [eta A] i) (enum A) i. | Definition | enum_val | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"enum",
"enum_default",
"nth"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_valP A i : @enum_val A i \in A. | Proof. by rewrite -mem_enum mem_nth -?cardE. Qed. | Lemma | enum_valP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"cardE",
"enum_val",
"mem_enum",
"mem_nth"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_val_nth A x i : @enum_val A i = nth x (enum A) i. | Proof. by apply: set_nth_default; rewrite cardE in i *; apply: ltn_ord. Qed. | Lemma | enum_val_nth | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"cardE",
"enum",
"enum_val",
"ltn_ord",
"nth",
"set_nth_default"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
nth_image T' y0 (f : T -> T') A (i : 'I_#|A|) :
nth y0 (image f A) i = f (enum_val i). | Proof. by rewrite -(nth_map _ y0) // -cardE. Qed. | Lemma | nth_image | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"T'",
"cardE",
"enum_val",
"image",
"nth",
"nth_map"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
nth_codom T' y0 (f : T -> T') (i : 'I_#|T|) :
nth y0 (codom f) i = f (enum_val i). | Proof. exact: nth_image. Qed. | Lemma | nth_codom | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"T'",
"codom",
"enum_val",
"nth",
"nth_image"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
nth_enum_rank_in x00 x0 A Ax0 :
{in A, cancel (@enum_rank_in T x0 A Ax0) (nth x00 (enum A))}. | Proof.
move=> x Ax; rewrite enum_rank_in.unlock insubdK ?nth_index ?mem_enum //.
by rewrite cardE [_ \in _]index_mem mem_enum.
Qed. | Lemma | nth_enum_rank_in | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"cardE",
"enum",
"enum_rank_in",
"index_mem",
"insubdK",
"mem_enum",
"nth",
"nth_index"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
nth_enum_rank x0 : cancel enum_rank (nth x0 (enum T)). | Proof. by move=> x; apply: nth_enum_rank_in. Qed. | Lemma | nth_enum_rank | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"enum",
"enum_rank",
"nth",
"nth_enum_rank_in"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_rankK_in x0 A Ax0 :
{in A, cancel (@enum_rank_in T x0 A Ax0) enum_val}. | Proof. by move=> x; apply: nth_enum_rank_in. Qed. | Lemma | enum_rankK_in | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"enum_rank_in",
"enum_val",
"nth_enum_rank_in"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_rankK : cancel enum_rank enum_val. | Proof. by move=> x; apply: enum_rankK_in. Qed. | Lemma | enum_rankK | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"enum_rank",
"enum_rankK_in",
"enum_val"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_valK_in x0 A Ax0 : cancel enum_val (@enum_rank_in T x0 A Ax0). | Proof.
move=> x; apply: ord_inj; rewrite enum_rank_in.unlock insubdK.
by rewrite cardE [_ \in _]index_mem mem_nth // -cardE.
by rewrite index_uniq ?enum_uniq // -cardE.
Qed. | Lemma | enum_valK_in | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"cardE",
"enum_rank_in",
"enum_uniq",
"enum_val",
"index_mem",
"index_uniq",
"insubdK",
"mem_nth",
"ord_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_valK : cancel enum_val enum_rank. | Proof. by move=> x; apply: enum_valK_in. Qed. | Lemma | enum_valK | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"enum_rank",
"enum_val",
"enum_valK_in"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_rank_inj : injective enum_rank. | Proof. exact: can_inj enum_rankK. Qed. | Lemma | enum_rank_inj | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"enum_rank",
"enum_rankK"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_val_inj A : injective (@enum_val A). | Proof. by move=> i; apply: can_inj (enum_valK_in (enum_valP i)) (i). Qed. | Lemma | enum_val_inj | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"enum_val",
"enum_valK_in",
"enum_valP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_val_bij_in x0 A : x0 \in A -> {on A, bijective (@enum_val A)}. | Proof.
move=> Ax0; exists (enum_rank_in Ax0) => [i _|]; last exact: enum_rankK_in.
exact: enum_valK_in.
Qed. | Lemma | enum_val_bij_in | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"enum_rankK_in",
"enum_rank_in",
"enum_val",
"enum_valK_in",
"last",
"on"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_enum_rank_in (x0 y0 : T) A (Ax0 : x0 \in A) (Ay0 : y0 \in A) :
{in A, enum_rank_in Ax0 =1 enum_rank_in Ay0}. | Proof. by move=> x xA; apply: enum_val_inj; rewrite !enum_rankK_in. Qed. | Lemma | eq_enum_rank_in | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"enum_rankK_in",
"enum_rank_in",
"enum_val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_rank_in_inj (x0 y0 : T) A (Ax0 : x0 \in A) (Ay0 : y0 \in A) :
{in A &, forall x y, enum_rank_in Ax0 x = enum_rank_in Ay0 y -> x = y}. | Proof. by move=> x y xA yA /(congr1 enum_val); rewrite !enum_rankK_in. Qed. | Lemma | enum_rank_in_inj | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"enum_rankK_in",
"enum_rank_in",
"enum_val"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_rank_bij : bijective enum_rank. | Proof. by move: enum_rankK enum_valK; exists (@enum_val T). Qed. | Lemma | enum_rank_bij | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"enum_rank",
"enum_rankK",
"enum_val",
"enum_valK"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_val_bij : bijective (@enum_val T). | Proof. by move: enum_rankK enum_valK; exists enum_rank. Qed. | Lemma | enum_val_bij | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"enum_rank",
"enum_rankK",
"enum_val",
"enum_valK"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
fin_all_exists U (P : forall x : T, U x -> Prop) :
(forall x, exists u, P x u) -> (exists u, forall x, P x (u x)). | Proof.
move=> ex_u; pose Q m x := enum_rank x < m -> {ux | P x ux}.
suffices: forall m, m <= #|T| -> exists w : forall x, Q m x, True.
case/(_ #|T|)=> // w _; pose u x := sval (w x (ltn_ord _)).
by exists u => x; rewrite {}/u; case: (w x _).
elim=> [|m IHm] ltmX; first by have w x: Q 0 x by []; exists w.
have{IHm} ... | Lemma | fin_all_exists | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"True",
"enum_rank",
"enum_rankK",
"enum_val",
"leq_eqVlt",
"ltnS",
"ltnW",
"ltn_ord",
"val_eqE"
] | this lemma will only be usable in forward chaining style. | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
fin_all_exists2 U (P Q : forall x : T, U x -> Prop) :
(forall x, exists2 u, P x u & Q x u) ->
(exists2 u, forall x, P x (u x) & forall x, Q x (u x)). | Proof.
move=> ex_u; have (x): exists u, P x u /\ Q x u by have [u] := ex_u x; exists u.
by case/fin_all_exists=> u /all_and2[]; exists u.
Qed. | Lemma | fin_all_exists2 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"fin_all_exists"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_rank_ord n i : enum_rank i = cast_ord (esym (card_ord n)) i. | Proof.
apply: val_inj; rewrite /enum_rank enum_rank_in.unlock.
by rewrite insubdK ?index_enum_ord // card_ord [_ \in _]ltn_ord.
Qed. | Lemma | enum_rank_ord | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"card_ord",
"cast_ord",
"enum_rank",
"enum_rank_in",
"index_enum_ord",
"insubdK",
"ltn_ord",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_val_ord n i : enum_val i = cast_ord (card_ord n) i. | Proof.
by apply: canLR (@enum_rankK _) _; apply: val_inj; rewrite enum_rank_ord.
Qed. | Lemma | enum_val_ord | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"card_ord",
"cast_ord",
"enum_rankK",
"enum_rank_ord",
"enum_val",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
bump h i | := (h <= i) + i. | Definition | bump | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [] | The integer bump / unbump operations. | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
unbump h i | := i - (h < i). | Definition | unbump | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
bumpK h : cancel (bump h) (unbump h). | Proof.
rewrite /bump /unbump => i.
have [le_hi | lt_ih] := leqP h i; first by rewrite ltnS le_hi subn1.
by rewrite ltnNge ltnW ?subn0.
Qed. | Lemma | bumpK | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"bump",
"leqP",
"ltnNge",
"ltnS",
"ltnW",
"subn0",
"subn1",
"unbump"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
neq_bump h i : h != bump h i. | Proof.
rewrite /bump eqn_leq; have [le_hi | lt_ih] := leqP h i.
by rewrite ltnNge le_hi andbF.
by rewrite leqNgt lt_ih.
Qed. | Lemma | neq_bump | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"bump",
"eqn_leq",
"leqNgt",
"leqP",
"ltnNge"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
unbumpKcond h i : bump h (unbump h i) = (i == h) + i. | Proof.
rewrite /bump /unbump leqNgt -subSKn.
case: (ltngtP i h) => /= [-> | ltih | ->] //; last by rewrite ltnn.
by rewrite subn1 /= leqNgt !(ltn_predK ltih, ltih, add1n).
Qed. | Lemma | unbumpKcond | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"add1n",
"bump",
"last",
"leqNgt",
"ltn_predK",
"ltngtP",
"ltnn",
"subSKn",
"subn1",
"unbump"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
unbumpK {h} : {in predC1 h, cancel (unbump h) (bump h)}. | Proof. by move=> i /negbTE-neq_h_i; rewrite unbumpKcond neq_h_i. Qed. | Lemma | unbumpK | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"bump",
"predC1",
"unbump",
"unbumpKcond"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
bumpDl h i k : bump (k + h) (k + i) = k + bump h i. | Proof. by rewrite /bump leq_add2l addnCA. Qed. | Lemma | bumpDl | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"addnCA",
"bump",
"leq_add2l"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
bumpS h i : bump h.+1 i.+1 = (bump h i).+1. | Proof. exact: addnS. Qed. | Lemma | bumpS | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"addnS",
"bump"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
unbumpDl h i k : unbump (k + h) (k + i) = k + unbump h i. | Proof.
apply: (can_inj (bumpK (k + h))).
by rewrite bumpDl !unbumpKcond eqn_add2l addnCA.
Qed. | Lemma | unbumpDl | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"addnCA",
"apply",
"bumpDl",
"bumpK",
"eqn_add2l",
"unbump",
"unbumpKcond"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
unbumpS h i : unbump h.+1 i.+1 = (unbump h i).+1. | Proof. exact: unbumpDl 1. Qed. | Lemma | unbumpS | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"unbump",
"unbumpDl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
leq_bump h i j : (i <= bump h j) = (unbump h i <= j). | Proof.
rewrite /bump leq_subLR.
case: (leqP i h) (leqP h j) => [le_i_h | lt_h_i] [le_h_j | lt_j_h] //.
by rewrite leqW (leq_trans le_i_h).
by rewrite !(leqNgt i) ltnW (leq_trans _ lt_h_i).
Qed. | Lemma | leq_bump | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"bump",
"leqNgt",
"leqP",
"leqW",
"leq_subLR",
"leq_trans",
"ltnW",
"unbump"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
leq_bump2 h i j : (bump h i <= bump h j) = (i <= j). | Proof. by rewrite leq_bump bumpK. Qed. | Lemma | leq_bump2 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"bump",
"bumpK",
"leq_bump"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
bumpC h1 h2 i :
bump h1 (bump h2 i) = bump (bump h1 h2) (bump (unbump h2 h1) i). | Proof.
rewrite {1 5}/bump -leq_bump addnCA; congr (_ + (_ + _)).
rewrite 2!leq_bump /unbump /bump; case: (leqP h1 h2) => [le_h12 | lt_h21].
by rewrite subn0 ltnS le_h12 subn1.
by rewrite subn1 (ltn_predK lt_h21) (leqNgt h1) lt_h21 subn0.
Qed. | Lemma | bumpC | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"addnCA",
"bump",
"leqNgt",
"leqP",
"leq_bump",
"ltnS",
"ltn_predK",
"subn0",
"subn1",
"unbump"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lift_subproof n h (i : 'I_n.-1) : bump h i < n. | Proof. by case: n i => [[]|n] //= i; rewrite -addnS (leq_add (leq_b1 _)). Qed. | Lemma | lift_subproof | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"addnS",
"bump",
"leq_add",
"leq_b1"
] | unlift is a partial operation (returns an option). | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
lift n (h : 'I_n) (i : 'I_n.-1) | := Ordinal (lift_subproof h i). | Definition | lift | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"lift_subproof"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
unlift_subproof n (h : 'I_n) (u : {j | j != h}) : unbump h (val u) < n.-1. | Proof.
case: n h u => [|n h] [] //= j ne_jh.
rewrite -(leq_bump2 h.+1) bumpS unbumpK // /bump.
case: (ltngtP n h) => [|_|eq_nh]; rewrite ?(leqNgt _ h) ?ltn_ord //.
by rewrite ltn_neqAle [j <= _](valP j) {2}eq_nh andbT.
Qed. | Lemma | unlift_subproof | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"bump",
"bumpS",
"leqNgt",
"leq_bump2",
"ltn_neqAle",
"ltn_ord",
"ltngtP",
"unbump",
"unbumpK",
"val",
"valP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
unlift n (h i : 'I_n) | :=
omap (fun u : {j | j != h} => Ordinal (unlift_subproof u)) (insub i). | Definition | unlift | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"insub",
"unlift_subproof"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
unlift_spec n h i : option 'I_n.-1 -> Type | :=
| UnliftSome j of i = lift h j : unlift_spec h i (Some j)
| UnliftNone of i = h : unlift_spec h i None. | Variant | unlift_spec | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"lift"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
unliftP n (h i : 'I_n) : unlift_spec h i (unlift h i). | Proof.
rewrite /unlift; case: insubP => [u nhi | ] def_i /=; constructor.
by apply: val_inj; rewrite /= def_i unbumpK.
by rewrite negbK in def_i; apply/eqP.
Qed. | Lemma | unliftP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"insubP",
"unbumpK",
"unlift",
"unlift_spec",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
neq_lift n (h : 'I_n) i : h != lift h i. | Proof. exact: neq_bump. Qed. | Lemma | neq_lift | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"lift",
"neq_bump"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_liftF n (h : 'I_n) i : (h == lift h i) = false. | Proof. exact/negbTE/neq_lift. Qed. | Lemma | eq_liftF | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"lift",
"neq_lift"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lift_eqF n (h : 'I_n) i : (lift h i == h) = false. | Proof. by rewrite eq_sym eq_liftF. Qed. | Lemma | lift_eqF | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"eq_liftF",
"eq_sym",
"lift"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
unlift_none n (h : 'I_n) : unlift h h = None. | Proof. by case: unliftP => // j Dh; case/eqP: (neq_lift h j). Qed. | Lemma | unlift_none | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"neq_lift",
"unlift",
"unliftP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
unlift_some n (h i : 'I_n) :
h != i -> {j | i = lift h j & unlift h i = Some j}. | Proof.
rewrite eq_sym => /eqP neq_ih.
by case Dui: (unlift h i) / (unliftP h i) => [j Dh|//]; exists j.
Qed. | Lemma | unlift_some | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"eq_sym",
"lift",
"unlift",
"unliftP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lift_inj n (h : 'I_n) : injective (lift h). | Proof. by move=> i1 i2 [/(can_inj (bumpK h))/val_inj]. Qed. | Lemma | lift_inj | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"bumpK",
"lift",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
liftK n (h : 'I_n) : pcancel (lift h) (unlift h). | Proof. by move=> i; case: (unlift_some (neq_lift h i)) => j /lift_inj->. Qed. | Lemma | liftK | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"lift",
"lift_inj",
"neq_lift",
"unlift",
"unlift_some"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lshift_subproof m n (i : 'I_m) : i < m + n. | Proof. by apply: leq_trans (valP i) _; apply: leq_addr. Qed. | Lemma | lshift_subproof | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"leq_addr",
"leq_trans",
"valP"
] | Shifting and splitting indices, for cutting and pasting arrays | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
rshift_subproof m n (i : 'I_n) : m + i < m + n. | Proof. by rewrite ltn_add2l. Qed. | Lemma | rshift_subproof | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"ltn_add2l"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lshift m n (i : 'I_m) | := Ordinal (lshift_subproof n i). | Definition | lshift | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"lshift_subproof"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rshift m n (i : 'I_n) | := Ordinal (rshift_subproof m i). | Definition | rshift | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"rshift_subproof"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lshift_inj m n : injective (@lshift m n). | Proof. by move=> ? ? /(f_equal val) /= /val_inj. Qed. | Lemma | lshift_inj | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"lshift",
"val",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rshift_inj m n : injective (@rshift m n). | Proof. by move=> ? ? /(f_equal val) /addnI /val_inj. Qed. | Lemma | rshift_inj | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"addnI",
"rshift",
"val",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_lshift m n i j : (@lshift m n i == @lshift m n j) = (i == j). | Proof. by rewrite (inj_eq (@lshift_inj _ _)). Qed. | Lemma | eq_lshift | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"inj_eq",
"lshift",
"lshift_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_rshift m n i j : (@rshift m n i == @rshift m n j) = (i == j). | Proof. by rewrite (inj_eq (@rshift_inj _ _)). Qed. | Lemma | eq_rshift | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"inj_eq",
"rshift",
"rshift_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_lrshift m n i j : (@lshift m n i == @rshift m n j) = false. | Proof.
apply/eqP=> /(congr1 val)/= def_i; have := ltn_ord i.
by rewrite def_i -ltn_subRL subnn.
Qed. | Lemma | eq_lrshift | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"lshift",
"ltn_ord",
"ltn_subRL",
"rshift",
"subnn",
"val"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_rlshift m n i j : (@rshift m n i == @lshift m n j) = false. | Proof. by rewrite eq_sym eq_lrshift. Qed. | Lemma | eq_rlshift | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"eq_lrshift",
"eq_sym",
"lshift",
"rshift"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_shift | := (eq_lshift, eq_rshift, eq_lrshift, eq_rlshift). | Definition | eq_shift | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"eq_lrshift",
"eq_lshift",
"eq_rlshift",
"eq_rshift"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
split_subproof m n (i : 'I_(m + n)) : i >= m -> i - m < n. | Proof. by move/subSn <-; rewrite leq_subLR. Qed. | Lemma | split_subproof | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"leq_subLR",
"subSn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
split {m n} (i : 'I_(m + n)) : 'I_m + 'I_n | :=
match ltnP (i) m with
| LtnNotGeq lt_i_m => inl _ (Ordinal lt_i_m)
| GeqNotLtn ge_i_m => inr _ (Ordinal (split_subproof ge_i_m))
end. | Definition | split | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"ltnP",
"split_subproof"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
split_spec m n (i : 'I_(m + n)) : 'I_m + 'I_n -> bool -> Type | :=
| SplitLo (j : 'I_m) of i = j :> nat : split_spec i (inl _ j) true
| SplitHi (k : 'I_n) of i = m + k :> nat : split_spec i (inr _ k) false. | Variant | split_spec | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"nat"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
splitP m n (i : 'I_(m + n)) : split_spec i (split i) (i < m). | Proof.
(* We need to prevent the case on ltnP from rewriting the hidden constructor *)
(* argument types of the match branches exposed by unfolding split. If the *)
(* match representation is changed to omit these then this proof could reduce *)
(* to by rewrite /split; case: ltnP; [left | right. rewrite subnKC]. ... | Lemma | splitP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"ltnP",
"split",
"split_spec",
"subnKC"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
split_ord_spec m n (i : 'I_(m + n)) : 'I_m + 'I_n -> bool -> Type | :=
| SplitOrdLo (j : 'I_m) of i = lshift _ j : split_ord_spec i (inl _ j) true
| SplitOrdHi (k : 'I_n) of i = rshift _ k : split_ord_spec i (inr _ k) false. | Variant | split_ord_spec | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"lshift",
"rshift"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
split_ordP m n (i : 'I_(m + n)) : split_ord_spec i (split i) (i < m). | Proof. by case: splitP; [left|right]; apply: val_inj. Qed. | Lemma | split_ordP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"split",
"splitP",
"split_ord_spec",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
unsplit {m n} (jk : 'I_m + 'I_n) | :=
match jk with inl j => lshift n j | inr k => rshift m k end. | Definition | unsplit | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"lshift",
"rshift"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ltn_unsplit m n (jk : 'I_m + 'I_n) : (unsplit jk < m) = jk. | Proof. by case: jk => [j|k]; rewrite /= ?ltn_ord // ltnNge leq_addr. Qed. | Lemma | ltn_unsplit | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"leq_addr",
"ltnNge",
"ltn_ord",
"unsplit"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
splitK {m n} : cancel (@split m n) unsplit. | Proof. by move=> i; case: split_ordP. Qed. | Lemma | splitK | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"split",
"split_ordP",
"unsplit"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
unsplitK {m n} : cancel (@unsplit m n) split. | Proof.
by move=> [j|k]; case: split_ordP => ? /eqP; rewrite eq_shift// => /eqP->.
Qed. | Lemma | unsplitK | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"eq_shift",
"split",
"split_ordP",
"unsplit"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ord0 | := Ordinal (ltn0Sn n'). | Definition | ord0 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"ltn0Sn",
"n'"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ord_max | := Ordinal (ltnSn n'). | Definition | ord_max | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"ltnSn",
"n'"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
leq_ord (i : 'I_n) : i <= n'. | Proof. exact: valP i. Qed. | Lemma | leq_ord | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"n'",
"valP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
sub_ord_proof m : n' - m < n. | Proof. by rewrite ltnS leq_subr. Qed. | Lemma | sub_ord_proof | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"leq_subr",
"ltnS",
"n'"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
sub_ord m | := Ordinal (sub_ord_proof m). | Definition | sub_ord | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"sub_ord_proof"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
sub_ordK (i : 'I_n) : n' - (n' - i) = i. | Proof. by rewrite subKn ?leq_ord. Qed. | Lemma | sub_ordK | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"leq_ord",
"n'",
"subKn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
inord m : 'I_n | := insubd ord0 m. | Definition | inord | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"insubd",
"ord0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
inordK m : m < n -> inord m = m :> nat. | Proof. by move=> lt_m; rewrite val_insubd lt_m. Qed. | Lemma | inordK | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"inord",
"nat",
"val_insubd"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
inord_val (i : 'I_n) : inord i = i. | Proof. by rewrite /inord /insubd valK. Qed. | Lemma | inord_val | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"inord",
"insubd",
"valK"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_ordSl : enum 'I_n = ord0 :: map (lift ord0) (enum 'I_n'). | Proof.
apply: (inj_map val_inj); rewrite val_enum_ord /= -map_comp.
by rewrite (map_comp (addn 1)) val_enum_ord -iotaDl.
Qed. | Lemma | enum_ordSl | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"addn",
"apply",
"enum",
"inj_map",
"iotaDl",
"lift",
"map",
"map_comp",
"ord0",
"val_enum_ord",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_ordSr :
enum 'I_n = rcons (map (widen_ord (leqnSn _)) (enum 'I_n')) ord_max. | Proof.
apply: (inj_map val_inj); rewrite val_enum_ord.
rewrite -[in iota _ _]addn1 iotaD/= cats1 map_rcons; congr (rcons _ _).
by rewrite -map_comp/= (@eq_map _ _ _ val) ?val_enum_ord.
Qed. | Lemma | enum_ordSr | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"addn1",
"apply",
"cats1",
"enum",
"eq_map",
"inj_map",
"iota",
"iotaD",
"leqnSn",
"map",
"map_comp",
"map_rcons",
"ord_max",
"rcons",
"val",
"val_enum_ord",
"val_inj",
"widen_ord"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lift_max (i : 'I_n') : lift ord_max i = i :> nat. | Proof. by rewrite /= /bump leqNgt ltn_ord. Qed. | Lemma | lift_max | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"bump",
"leqNgt",
"lift",
"ltn_ord",
"nat",
"ord_max"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
lift0 (i : 'I_n') : lift ord0 i = i.+1 :> nat. | Proof. by []. Qed. | Lemma | lift0 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"lift",
"nat",
"ord0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ord1 : all_equal_to (ord0 : 'I_1). | Proof. by case=> [[] // ?]; apply: val_inj. Qed. | Lemma | ord1 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"ord0",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
modZp i : i %% p = i. | Proof. by rewrite modn_small ?ltn_ord. Qed. | Lemma | modZp | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"ltn_ord",
"modn_small"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Zp_opp_subproof i : (p - i) %% p < p. | Proof. by case: p i => [[]//|k] i; apply/ltn_pmod. Qed. | Lemma | Zp_opp_subproof | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"ltn_pmod"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Zp_opp i | := Ordinal (Zp_opp_subproof i). | Definition | Zp_opp | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"Zp_opp_subproof"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Zp_add_subproof i j : (i + j) %% p < p. | Proof. by case: p i j => [[]//|k] i j; apply/ltn_pmod. Qed. | Lemma | Zp_add_subproof | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"ltn_pmod"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Zp_add i j | := Ordinal (Zp_add_subproof i j). | Definition | Zp_add | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"Zp_add_subproof"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Zp_mul_subproof i j : (i * j) %% p < p. | Proof. by case: p i j => [[]//|k] i j; apply/ltn_pmod. Qed. | Lemma | Zp_mul_subproof | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"ltn_pmod"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Zp_mul i j | := Ordinal (Zp_mul_subproof i j). | Definition | Zp_mul | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"Zp_mul_subproof"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Zp_inv_subproof i : (egcdn i p).1 %% p < p. | Proof. by case: p i => [[]//|k] i; apply/ltn_pmod. Qed. | Lemma | Zp_inv_subproof | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"egcdn",
"ltn_pmod"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Zp_inv i | := if coprime p i then Ordinal (Zp_inv_subproof i) else i. | Definition | Zp_inv | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"Zp_inv_subproof",
"coprime"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Zp_addA : associative Zp_add. | Proof.
by move=> x y z; apply: val_inj; rewrite /= modnDml modnDmr addnA.
Qed. | Lemma | Zp_addA | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"Zp_add",
"addnA",
"apply",
"modnDml",
"modnDmr",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Zp_addC : commutative Zp_add. | Proof. by move=> x y; apply: val_inj; rewrite /= addnC. Qed. | Lemma | Zp_addC | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"Zp_add",
"addnC",
"apply",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
Zp_mulC : commutative Zp_mul. | Proof. by move=> x y; apply: val_inj; rewrite /= mulnC. Qed. | Lemma | Zp_mulC | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"Zp_mul",
"apply",
"mulnC",
"val_inj"
] | 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.