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 |
|---|---|---|---|---|---|---|---|---|---|---|
"[ 'tuple' ]" | := [tuple of [::]] (format "[ 'tuple' ]") : form_scope. | Notation | [ 'tuple' ] | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
in_tuple (s : seq T) | := Tuple (eqxx (size s)). | Definition | in_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"eqxx",
"seq",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tcast m n (eq_mn : m = n) t | :=
let: erefl in _ = n := eq_mn return n.-tuple T in t. | Definition | tcast | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tcastE m n (eq_mn : m = n) t i :
tnth (tcast eq_mn t) i = tnth t (cast_ord (esym eq_mn) i). | Proof. by case: n / eq_mn in i *; rewrite cast_ord_id. Qed. | Lemma | tcastE | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"cast_ord",
"cast_ord_id",
"tcast",
"tnth"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tcast_id n (eq_nn : n = n) t : tcast eq_nn t = t. | Proof. by rewrite (eq_axiomK eq_nn). Qed. | Lemma | tcast_id | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"eq_axiomK",
"tcast"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tcastK m n (eq_mn : m = n) : cancel (tcast eq_mn) (tcast (esym eq_mn)). | Proof. by case: n / eq_mn. Qed. | Lemma | tcastK | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"tcast"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tcastKV m n (eq_mn : m = n) : cancel (tcast (esym eq_mn)) (tcast eq_mn). | Proof. by case: n / eq_mn. Qed. | Lemma | tcastKV | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"tcast"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tcast_trans m n p (eq_mn : m = n) (eq_np : n = p) t:
tcast (etrans eq_mn eq_np) t = tcast eq_np (tcast eq_mn t). | Proof. by case: n / eq_mn eq_np; case: p /. Qed. | Lemma | tcast_trans | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"tcast"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tvalK n (t : n.-tuple T) : in_tuple t = tcast (esym (size_tuple t)) t. | Proof. by apply: val_inj => /=; case: _ / (esym _). Qed. | Lemma | tvalK | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"apply",
"in_tuple",
"size_tuple",
"tcast",
"tuple",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
val_tcast m n (eq_mn : m = n) (t : m.-tuple T) :
tcast eq_mn t = t :> seq T. | Proof. by case: n / eq_mn. Qed. | Lemma | val_tcast | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"seq",
"tcast",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
in_tupleE s : in_tuple s = s :> seq T. | Proof. by []. Qed. | Lemma | in_tupleE | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"in_tuple",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tnth_in_tuple n (t : n.-tuple T) i :
tnth (in_tuple t) i = tnth t (cast_ord (size_tuple _) i). | Proof. exact/set_nth_default. Qed. | Lemma | tnth_in_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"cast_ord",
"in_tuple",
"set_nth_default",
"size_tuple",
"tnth",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
in_tuple_tuple n (t : n.-tuple T) :
in_tuple t = tcast (esym (size_tuple _)) t. | Proof. by apply/eq_from_tnth=> i; rewrite tnth_in_tuple/= tcastE esymK. Qed. | Lemma | in_tuple_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"apply",
"eq_from_tnth",
"in_tuple",
"size_tuple",
"tcast",
"tcastE",
"tnth_in_tuple",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
in_tuple_cons x s : in_tuple (x :: s) = x :: in_tuple s. | Proof. exact/val_inj/(@eq_from_nth _ x). Qed. | Lemma | in_tuple_cons | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"eq_from_nth",
"in_tuple",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
in_tupleP (P : list T -> Type) : (forall n (t : n.-tuple T), P t) -> forall l, P l. | Proof. by move=> + l => /(_ _ (in_tuple l)). Qed. | Lemma | in_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"in_tuple",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rcons_tupleP t x : size (rcons t x) == n.+1. | Proof. by rewrite size_rcons size_tuple. Qed. | Lemma | rcons_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"rcons",
"size",
"size_rcons",
"size_tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rcons_tuple t x | := Tuple (rcons_tupleP t x). | Canonical | rcons_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"rcons_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
nseq_tupleP x : @size T (nseq n x) == n. | Proof. by rewrite size_nseq. Qed. | Lemma | nseq_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"nseq",
"size",
"size_nseq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
nseq_tuple x | := Tuple (nseq_tupleP x). | Canonical | nseq_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"nseq_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iota_tupleP : size (iota m n) == n. | Proof. by rewrite size_iota. Qed. | Lemma | iota_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"iota",
"size",
"size_iota"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iota_tuple | := Tuple iota_tupleP. | Canonical | iota_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"iota_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
behead_tupleP t : size (behead t) == n.-1. | Proof. by rewrite size_behead size_tuple. Qed. | Lemma | behead_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"behead",
"size",
"size_behead",
"size_tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
behead_tuple t | := Tuple (behead_tupleP t). | Canonical | behead_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"behead_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
belast_tupleP x t : size (belast x t) == n. | Proof. by rewrite size_belast size_tuple. Qed. | Lemma | belast_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"belast",
"size",
"size_belast",
"size_tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
belast_tuple x t | := Tuple (belast_tupleP x t). | Canonical | belast_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"belast_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
cat_tupleP t (u : m.-tuple T) : size (t ++ u) == n + m. | Proof. by rewrite size_cat !size_tuple. Qed. | Lemma | cat_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"size",
"size_cat",
"size_tuple",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
cat_tuple t u | := Tuple (cat_tupleP t u). | Canonical | cat_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"cat_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
take_tupleP t : size (take m t) == minn m n. | Proof. by rewrite size_take size_tuple eqxx. Qed. | Lemma | take_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"eqxx",
"minn",
"size",
"size_take",
"size_tuple",
"take"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
take_tuple t | := Tuple (take_tupleP t). | Canonical | take_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"take_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
drop_tupleP t : size (drop m t) == n - m. | Proof. by rewrite size_drop size_tuple. Qed. | Lemma | drop_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"drop",
"size",
"size_drop",
"size_tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
drop_tuple t | := Tuple (drop_tupleP t). | Canonical | drop_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"drop_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rev_tupleP t : size (rev t) == n. | Proof. by rewrite size_rev size_tuple. Qed. | Lemma | rev_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"rev",
"size",
"size_rev",
"size_tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rev_tuple t | := Tuple (rev_tupleP t). | Canonical | rev_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"rev_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rot_tupleP t : size (rot m t) == n. | Proof. by rewrite size_rot size_tuple. Qed. | Lemma | rot_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"rot",
"size",
"size_rot",
"size_tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rot_tuple t | := Tuple (rot_tupleP t). | Canonical | rot_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"rot_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rotr_tupleP t : size (rotr m t) == n. | Proof. by rewrite size_rotr size_tuple. Qed. | Lemma | rotr_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"rotr",
"size",
"size_rotr",
"size_tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rotr_tuple t | := Tuple (rotr_tupleP t). | Canonical | rotr_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"rotr_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
map_tupleP f t : @size rT (map f t) == n. | Proof. by rewrite size_map size_tuple. Qed. | Lemma | map_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"map",
"size",
"size_map",
"size_tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
map_tuple f t | := Tuple (map_tupleP f t). | Canonical | map_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"map_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
scanl_tupleP f x t : @size rT (scanl f x t) == n. | Proof. by rewrite size_scanl size_tuple. Qed. | Lemma | scanl_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"scanl",
"size",
"size_scanl",
"size_tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
scanl_tuple f x t | := Tuple (scanl_tupleP f x t). | Canonical | scanl_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"scanl_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
pairmap_tupleP f x t : @size rT (pairmap f x t) == n. | Proof. by rewrite size_pairmap size_tuple. Qed. | Lemma | pairmap_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"pairmap",
"size",
"size_pairmap",
"size_tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
pairmap_tuple f x t | := Tuple (pairmap_tupleP f x t). | Canonical | pairmap_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"pairmap_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
zip_tupleP t (u : n.-tuple U) : size (zip t u) == n. | Proof. by rewrite size1_zip !size_tuple. Qed. | Lemma | zip_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"size",
"size1_zip",
"size_tuple",
"tuple",
"zip"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
zip_tuple t u | := Tuple (zip_tupleP t u). | Canonical | zip_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"zip_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairs_tupleP f t (u : m.-tuple U) : @size rT (allpairs f t u) == n * m. | Proof. by rewrite size_allpairs !size_tuple. Qed. | Lemma | allpairs_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"allpairs",
"size",
"size_allpairs",
"size_tuple",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairs_tuple f t u | := Tuple (allpairs_tupleP f t u). | Canonical | allpairs_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"allpairs_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
sort_tupleP r t : size (sort r t) == n. | Proof. by rewrite size_sort size_tuple. Qed. | Lemma | sort_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"size",
"size_sort",
"size_tuple",
"sort"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
sort_tuple r t | := Tuple (sort_tupleP r t). | Canonical | sort_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"sort_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
thead (u : n.+1.-tuple T) | := tnth u ord0. | Definition | thead | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"ord0",
"tnth",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tnth0 x t : tnth [tuple of x :: t] ord0 = x. | Proof. by []. Qed. | Lemma | tnth0 | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"ord0",
"tnth",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tnthS x t i : tnth [tuple of x :: t] (lift ord0 i) = tnth t i. | Proof. by rewrite (tnth_nth (tnth_default t i)). Qed. | Lemma | tnthS | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"lift",
"ord0",
"tnth",
"tnth_default",
"tnth_nth",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
theadE x t : thead [tuple of x :: t] = x. | Proof. by []. Qed. | Lemma | theadE | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"thead",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tuple0 : all_equal_to ([tuple] : 0.-tuple T). | Proof. by move=> t; apply: val_inj; case: t => [[]]. Qed. | Lemma | tuple0 | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"apply",
"tuple",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tuple1_spec : n.+1.-tuple T -> Type | :=
Tuple1spec x t : tuple1_spec [tuple of x :: t]. | Variant | tuple1_spec | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tupleP u : tuple1_spec u. | Proof.
case: u => [[|x s] //= sz_s]; pose t := @Tuple n _ s sz_s.
by rewrite (_ : Tuple _ = [tuple of x :: t]) //; apply: val_inj.
Qed. | Lemma | tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"apply",
"tuple",
"tuple1_spec",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tnth_map f t i : tnth [tuple of map f t] i = f (tnth t i) :> rT. | Proof. by apply: nth_map; rewrite size_tuple. Qed. | Lemma | tnth_map | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"apply",
"map",
"nth_map",
"size_tuple",
"tnth",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tnth_nseq x i : tnth [tuple of nseq n x] i = x. | Proof.
by rewrite !(tnth_nth (tnth_default (nseq_tuple x) i)) nth_nseq ltn_ord.
Qed. | Lemma | tnth_nseq | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"ltn_ord",
"nseq",
"nseq_tuple",
"nth_nseq",
"tnth",
"tnth_default",
"tnth_nth",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tnth_behead n T (t : n.+1.-tuple T) i :
tnth [tuple of behead t] i = tnth t (inord i.+1). | Proof. by case/tupleP: t => x t; rewrite !(tnth_nth x) inordK ?ltnS. Qed. | Lemma | tnth_behead | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"behead",
"inord",
"inordK",
"ltnS",
"tnth",
"tnth_nth",
"tuple",
"tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tuple_eta n T (t : n.+1.-tuple T) : t = [tuple of thead t :: behead t]. | Proof. by case/tupleP: t => x t; apply: val_inj. Qed. | Lemma | tuple_eta | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"apply",
"behead",
"thead",
"tuple",
"tupleP",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tnth_lshift i : tnth [tuple of t1 ++ t2] (lshift n2 i) = tnth t1 i. | Proof.
have x0 := tnth_default t1 i; rewrite !(tnth_nth x0).
by rewrite nth_cat size_tuple /= ltn_ord.
Qed. | Lemma | tnth_lshift | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"lshift",
"ltn_ord",
"nth_cat",
"size_tuple",
"tnth",
"tnth_default",
"tnth_nth",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tnth_rshift j : tnth [tuple of t1 ++ t2] (rshift n1 j) = tnth t2 j. | Proof.
have x0 := tnth_default t2 j; rewrite !(tnth_nth x0).
by rewrite nth_cat size_tuple ltnNge leq_addr /= addKn.
Qed. | Lemma | tnth_rshift | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"addKn",
"leq_addr",
"ltnNge",
"nth_cat",
"rshift",
"size_tuple",
"tnth",
"tnth_default",
"tnth_nth",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
forallb_tnth a t : [forall i, a (tnth t i)] = all a t. | Proof.
apply: negb_inj; rewrite -has_predC -has_map negb_forall.
apply/existsP/(has_nthP true) => [[i a_t_i] | [i lt_i_n a_t_i]].
by exists i; rewrite ?size_tuple // -tnth_nth tnth_map.
rewrite size_tuple in lt_i_n; exists (Ordinal lt_i_n).
by rewrite -tnth_map (tnth_nth true).
Qed. | Lemma | forallb_tnth | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"all",
"apply",
"existsP",
"has_map",
"has_nthP",
"has_predC",
"negb_forall",
"size_tuple",
"tnth",
"tnth_map",
"tnth_nth"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
existsb_tnth a t : [exists i, a (tnth t i)] = has a t. | Proof. by apply: negb_inj; rewrite negb_exists -all_predC -forallb_tnth. Qed. | Lemma | existsb_tnth | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"all_predC",
"apply",
"forallb_tnth",
"has",
"negb_exists",
"tnth"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
all_tnthP a t : reflect (forall i, a (tnth t i)) (all a t). | Proof. by rewrite -forallb_tnth; apply: forallP. Qed. | Lemma | all_tnthP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"all",
"apply",
"forallP",
"forallb_tnth",
"tnth"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
has_tnthP a t : reflect (exists i, a (tnth t i)) (has a t). | Proof. by rewrite -existsb_tnth; apply: existsP. Qed. | Lemma | has_tnthP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"apply",
"existsP",
"existsb_tnth",
"has",
"tnth"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tuple_predType | := PredType (pred_of_seq : n.-tuple T -> pred T). | Canonical | tuple_predType | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"pred_of_seq",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eqEtuple (t1 t2 : n.-tuple T) :
(t1 == t2) = [forall i, tnth t1 i == tnth t2 i]. | Proof. by apply/eqP/'forall_eqP => [->|/eq_from_tnth]. Qed. | Lemma | eqEtuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"apply",
"eq_from_tnth",
"tnth",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
memtE (t : n.-tuple T) : mem t = mem (tval t). | Proof. by []. Qed. | Lemma | memtE | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
mem_tnth i (t : n.-tuple T) : tnth t i \in t. | Proof. by rewrite mem_nth ?size_tuple. Qed. | Lemma | mem_tnth | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"mem_nth",
"size_tuple",
"tnth",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
memt_nth x0 (t : n.-tuple T) i : i < n -> nth x0 t i \in t. | Proof. by move=> i_lt_n; rewrite mem_nth ?size_tuple. Qed. | Lemma | memt_nth | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"mem_nth",
"nth",
"size_tuple",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tnthP (t : n.-tuple T) x : reflect (exists i, x = tnth t i) (x \in t). | Proof.
apply: (iffP idP) => [/(nthP x)[i ltin <-] | [i ->]]; last exact: mem_tnth.
by rewrite size_tuple in ltin; exists (Ordinal ltin); rewrite (tnth_nth x).
Qed. | Lemma | tnthP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"apply",
"last",
"mem_tnth",
"nthP",
"size_tuple",
"tnth",
"tnth_nth",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
seq_tnthP (s : seq T) x : x \in s -> {i | x = tnth (in_tuple s) i}. | Proof.
move=> s_x; pose i := index x s; have lt_i: i < size s by rewrite index_mem.
by exists (Ordinal lt_i); rewrite (tnth_nth x) nth_index.
Qed. | Lemma | seq_tnthP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"in_tuple",
"index",
"index_mem",
"nth_index",
"seq",
"size",
"tnth",
"tnth_nth"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tuple_uniqP (t : n.-tuple T) : reflect (injective (tnth t)) (uniq t). | Proof.
case: {+}n => [|m] in t *; first by rewrite tuple0; constructor => -[].
pose x0 := tnth t ord0; apply/(equivP (uniqP x0)); split=> tinj i j.
by rewrite !(tnth_nth x0) => /tinj/val_inj; apply; rewrite size_tuple inE.
rewrite !size_tuple !inE => im jm; have := tinj (Ordinal im) (Ordinal jm).
by rewrite !(tnth_nt... | Lemma | tuple_uniqP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"apply",
"inE",
"ord0",
"size_tuple",
"split",
"tnth",
"tnth_nth",
"tuple",
"tuple0",
"uniq",
"uniqP",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum : seq (n.-tuple T). | Parameter | enum | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"seq",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | ||
enumP : Finite.axiom enum. | Axiom | enumP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"axiom",
"enum"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | ||
size_enum : size enum = #|T| ^ n. | Axiom | size_enum | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"enum",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | ||
enum : seq (n.-tuple T) | :=
let extend e := flatten (codom (fun x => map (cons x) e)) in
pmap insub (iter n extend [::[::]]). | Definition | enum | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"codom",
"flatten",
"insub",
"iter",
"map",
"pmap",
"seq",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enumP : Finite.axiom enum. | Proof.
case=> /= t t_n; rewrite -(count_map _ (pred1 t)) (pmap_filter (insubK _)).
rewrite count_filter -(@eq_count _ (pred1 t)) => [s /=|].
by rewrite isSome_insub; case: eqP=> // ->.
elim: n t t_n => [|m IHm] [|x t] //= {}/IHm; move: (iter m _ _) => em IHm.
transitivity (x \in T : nat); rewrite // -mem_enum codomE.... | Lemma | enumP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"axiom",
"codomE",
"count_cat",
"count_filter",
"count_map",
"count_pred0",
"enum",
"enum_uniq",
"eq_count",
"eq_sym",
"inE",
"insubK",
"isSome_insub",
"iter",
"mem_enum",
"nat",
"pmap_filter",
"pred1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
size_enum : size enum = #|T| ^ n. | Proof.
rewrite /= cardE size_pmap_sub; elim: n => //= m IHm.
rewrite expnS /codom /image_mem; elim: {2 3}(fintype.enum T) => //= x e IHe.
by rewrite count_cat {}IHe count_map IHm.
Qed. | Lemma | size_enum | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"cardE",
"codom",
"count_cat",
"count_map",
"enum",
"expnS",
"image_mem",
"size",
"size_pmap_sub"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card_tuple : #|{:n.-tuple T}| = #|T| ^ n. | Proof. by rewrite [#|_|]cardT enumT unlock FinTuple.size_enum. Qed. | Lemma | card_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"cardT",
"enumT",
"size_enum",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_tupleP (A : {pred T}) : size (enum A) == #|A|. | Proof. by rewrite -cardE. Qed. | Lemma | enum_tupleP | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"cardE",
"enum",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
enum_tuple A | := Tuple (enum_tupleP A). | Canonical | enum_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"enum_tupleP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
ord_tuple : n.-tuple 'I_n | := Tuple (introT eqP (size_enum_ord n)). | Definition | ord_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"size_enum_ord",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
val_ord_tuple : val ord_tuple = enum 'I_n. | Proof. by []. Qed. | Lemma | val_ord_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"enum",
"ord_tuple",
"val"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tuple_map_ord U (t : n.-tuple U) : t = [tuple of map (tnth t) ord_tuple]. | Proof. by apply: val_inj => /=; rewrite map_tnth_enum. Qed. | Lemma | tuple_map_ord | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"apply",
"map",
"map_tnth_enum",
"ord_tuple",
"tnth",
"tuple",
"val_inj"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tnth_ord_tuple i : tnth ord_tuple i = i. | Proof. by rewrite (tnth_nth i) val_ord_tuple nth_ord_enum. Qed. | Lemma | tnth_ord_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"nth_ord_enum",
"ord_tuple",
"tnth",
"tnth_nth",
"val_ord_tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
image_tuple : #|A|.-tuple T' | := [tuple of image f A]. | Canonical | image_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"T'",
"image",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
codom_tuple : #|T|.-tuple T' | := [tuple of codom f]. | Canonical | codom_tuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"T'",
"codom",
"tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
mktuple | := map_tuple f ord_tuple. | Definition | mktuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"map_tuple",
"ord_tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
tnth_mktuple i : tnth mktuple i = f i. | Proof. by rewrite tnth_map tnth_ord_tuple. Qed. | Lemma | tnth_mktuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"mktuple",
"tnth",
"tnth_map",
"tnth_ord_tuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
nth_mktuple x0 (i : 'I_n) : nth x0 mktuple i = f i. | Proof. by rewrite -tnth_nth tnth_mktuple. Qed. | Lemma | nth_mktuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"mktuple",
"nth",
"tnth_mktuple",
"tnth_nth"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_mktuple T' (f1 f2 : 'I_n -> T') :
f1 =1 f2 -> mktuple f1 = mktuple f2. | Proof. by move=> eq_f; apply eq_from_tnth=> i; rewrite !tnth_map eq_f. Qed. | Lemma | eq_mktuple | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"T'",
"apply",
"eq_f",
"eq_from_tnth",
"f1",
"f2",
"mktuple",
"tnth_map"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"[ 'tuple' F | i < n ]" | := (mktuple (fun i : 'I_n => F))
(i at level 0,
format "[ '[hv' 'tuple' F '/' | i < n ] ']'") : form_scope. | Notation | [ 'tuple' F | i < n ] | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"mktuple"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
bseq_of : Type | := Bseq {bseqval :> seq T; _ : size bseqval <= n}. | Structure | bseq_of | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"seq",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
size_bseq bs : size bs <= n. | Proof. by case: bs. Qed. | Lemma | size_bseq | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
bseq bs mkB : bseq_of | :=
mkB (let: Bseq _ bsP := bs return size bs <= n in bsP). | Definition | bseq | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"bseq_of",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
bseqE bs : bseq (fun sP => @Bseq bs sP) = bs. | Proof. by case: bs. Qed. | Lemma | bseqE | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"bseq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
nil_bseq n T | := Bseq (isT : @size T [::] <= n). | Canonical | nil_bseq | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
cons_bseq n T x (t : bseq_of n T) | :=
Bseq (valP t : size (x :: t) <= n.+1). | Canonical | cons_bseq | boot | boot/tuple.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat",
"seq",
"choice",
"fintype",
"path"
] | [
"bseq_of",
"size",
"valP"
] | 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.