fact
stringlengths
8
1.54k
type
stringclasses
19 values
library
stringclasses
8 values
imports
listlengths
1
10
filename
stringclasses
98 values
symbolic_name
stringlengths
1
42
docstring
stringclasses
1 value
sort_tuplePr t : size (sort r t) == n. Proof. by rewrite size_sort size_tuple. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
sort_tupleP
sort_tupler t := Tuple (sort_tupleP r t).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
sort_tuple
thead(u : n.+1.-tuple T) := tnth u ord0.
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
thead
tnth0x t : tnth [tuple of x :: t] ord0 = x. Proof. by []. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tnth0
tnthSx t i : tnth [tuple of x :: t] (lift ord0 i) = tnth t i. Proof. by rewrite (tnth_nth (tnth_default t i)). Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tnthS
theadEx t : thead [tuple of x :: t] = x. Proof. by []. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
theadE
tuple0: all_equal_to ([tuple] : 0.-tuple T). Proof. by move=> t; apply: val_inj; case: t => [[]]. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tuple0
tuple1_spec: n.+1.-tuple T -> Type := Tuple1spec x t : tuple1_spec [tuple of x :: t].
Variant
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tuple1_spec
tuplePu : 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
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tupleP
tnth_mapf t i : tnth [tuple of map f t] i = f (tnth t i) :> rT. Proof. by apply: nth_map; rewrite size_tuple. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tnth_map
tnth_nseqx 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
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tnth_nseq
tnth_beheadn 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
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tnth_behead
tuple_etan 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
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tuple_eta
tnth_lshifti : 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
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tnth_lshift
tnth_rshiftj : 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
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tnth_rshift
forallb_tntha 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
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
forallb_tnth
existsb_tntha t : [exists i, a (tnth t i)] = has a t. Proof. by apply: negb_inj; rewrite negb_exists -all_predC -forallb_tnth. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
existsb_tnth
all_tnthPa t : reflect (forall i, a (tnth t i)) (all a t). Proof. by rewrite -forallb_tnth; apply: forallP. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
all_tnthP
has_tnthPa t : reflect (exists i, a (tnth t i)) (has a t). Proof. by rewrite -existsb_tnth; apply: existsP. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
has_tnthP
Definition_ : hasDecEq (n.-tuple T) := [Equality of n.-tuple T by <:].
HB.instance
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
Definition
tuple_predType:= PredType (pred_of_seq : n.-tuple T -> pred T).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tuple_predType
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
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
eqEtuple
memtE(t : n.-tuple T) : mem t = mem (tval t). Proof. by []. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
memtE
mem_tnthi (t : n.-tuple T) : tnth t i \in t. Proof. by rewrite mem_nth ?size_tuple. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
mem_tnth
memt_nthx0 (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
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
memt_nth
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
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tnthP
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
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
seq_tnthP
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_nth x0) => /[apply]-[]. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tuple_uniqP
Definition_ n (T : choiceType) := [Choice of n.-tuple T by <:]. HB.instance Definition _ n (T : countType) := [Countable of n.-tuple T by <:].
HB.instance
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
Definition
enum: seq (n.-tuple T).
Parameter
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
enum
enumP: Finite.axiom enum.
Axiom
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
enumP
size_enum: size enum = #|T| ^ n.
Axiom
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
size_enum
enum: seq (n.-tuple T) := let extend e := flatten (codom (fun x => map (cons x) e)) in pmap insub (iter n extend [::[::]]).
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
enum
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 /=]; last first. 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. elim: (fintype.enum T) (enum_uniq T) => //= y e IHe /andP[/negPf ney]. rewrite count_cat count_map inE /preim /= [in LHS]/eq_op /= eq_sym => /IHe->. by case: eqP => [->|_]; rewrite ?(ney, count_pred0, IHm). Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
enumP
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
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
size_enum
Definition_ := isFinite.Build (n.-tuple T) (@FinTuple.enumP n T).
HB.instance
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
Definition
card_tuple: #|{:n.-tuple T}| = #|T| ^ n. Proof. by rewrite [#|_|]cardT enumT unlock FinTuple.size_enum. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
card_tuple
enum_tupleP(A : {pred T}) : size (enum A) == #|A|. Proof. by rewrite -cardE. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
enum_tupleP
enum_tupleA := Tuple (enum_tupleP A).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
enum_tuple
ord_tuple: n.-tuple 'I_n := Tuple (introT eqP (size_enum_ord n)).
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
ord_tuple
val_ord_tuple: val ord_tuple = enum 'I_n. Proof. by []. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
val_ord_tuple
tuple_map_ordU (t : n.-tuple U) : t = [tuple of map (tnth t) ord_tuple]. Proof. by apply: val_inj => /=; rewrite map_tnth_enum. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tuple_map_ord
tnth_ord_tuplei : tnth ord_tuple i = i. Proof. by rewrite (tnth_nth i) val_ord_tuple nth_ord_enum. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tnth_ord_tuple
image_tuple: #|A|.-tuple T' := [tuple of image f A].
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
image_tuple
codom_tuple: #|T|.-tuple T' := [tuple of codom f].
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
codom_tuple
mktuple:= map_tuple f ord_tuple.
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
mktuple
tnth_mktuplei : tnth mktuple i = f i. Proof. by rewrite tnth_map tnth_ord_tuple. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
tnth_mktuple
nth_mktuplex0 (i : 'I_n) : nth x0 mktuple i = f i. Proof. by rewrite -tnth_nth tnth_mktuple. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
nth_mktuple
eq_mktupleT' (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
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
eq_mktuple
bseq_of: Type := Bseq {bseqval :> seq T; _ : size bseqval <= n}. HB.instance Definition _ := [isSub for bseqval]. Implicit Type bs : bseq_of.
Structure
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
bseq_of
size_bseqbs : size bs <= n. Proof. by case: bs. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
size_bseq
bseqbs mkB : bseq_of := mkB (let: Bseq _ bsP := bs return size bs <= n in bsP).
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
bseq
bseqEbs : bseq (fun sP => @Bseq bs sP) = bs. Proof. by case: bs. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
bseqE
nil_bseqn T := Bseq (isT : @size T [::] <= n).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
nil_bseq
cons_bseqn T x (t : bseq_of n T) := Bseq (valP t : size (x :: t) <= n.+1).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
cons_bseq
bseq_of_tuplen T (t : n.-tuple T) : n.-bseq T := Bseq (eq_leq (size_tuple t)).
Coercion
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
bseq_of_tuple
insub_bseqn T (s : seq T) : n.-bseq T := insubd [bseq] s.
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
insub_bseq
size_insub_bseqn T (s : seq T) : size (insub_bseq n s) <= size s. Proof. by rewrite /insub_bseq /insubd; case: insubP => // ? ? ->. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
size_insub_bseq
in_bseq(s : seq T) : (size s).-bseq T := Bseq (leqnn (size s)).
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
in_bseq
cast_bseqm n (eq_mn : m = n) bs := let: erefl in _ = n := eq_mn return n.-bseq T in bs.
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
cast_bseq
widen_bseqm n (lemn : m <= n) (bs : m.-bseq T) : n.-bseq T := @Bseq n T bs (leq_trans (size_bseq bs) lemn).
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
widen_bseq
cast_bseq_idn (eq_nn : n = n) bs : cast_bseq eq_nn bs = bs. Proof. by rewrite (eq_axiomK eq_nn). Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
cast_bseq_id
cast_bseqKm n (eq_mn : m = n) : cancel (cast_bseq eq_mn) (cast_bseq (esym eq_mn)). Proof. by case: n / eq_mn. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
cast_bseqK
cast_bseqKVm n (eq_mn : m = n) : cancel (cast_bseq (esym eq_mn)) (cast_bseq eq_mn). Proof. by case: n / eq_mn. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
cast_bseqKV
cast_bseq_transm n p (eq_mn : m = n) (eq_np : n = p) bs : cast_bseq (etrans eq_mn eq_np) bs = cast_bseq eq_np (cast_bseq eq_mn bs). Proof. by case: n / eq_mn eq_np; case: p /. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
cast_bseq_trans
size_cast_bseqm n (eq_mn : m = n) (bs : m.-bseq T) : size (cast_bseq eq_mn bs) = size bs. Proof. by case: n / eq_mn. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
size_cast_bseq
widen_bseq_idn (lenn : n <= n) (bs : n.-bseq T) : widen_bseq lenn bs = bs. Proof. exact: val_inj. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
widen_bseq_id
cast_bseqEwidenm n (eq_mn : m = n) (bs : m.-bseq T) : cast_bseq eq_mn bs = widen_bseq (eq_leq eq_mn) bs. Proof. by case: n / eq_mn; rewrite widen_bseq_id. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
cast_bseqEwiden
widen_bseqKm n (lemn : m <= n) (lenm : n <= m) : cancel (@widen_bseq m n lemn) (widen_bseq lenm). Proof. by move=> t; apply: val_inj. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
widen_bseqK
widen_bseq_transm n p (lemn : m <= n) (lenp : n <= p) (bs : m.-bseq T) : widen_bseq (leq_trans lemn lenp) bs = widen_bseq lenp (widen_bseq lemn bs). Proof. exact/val_inj. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
widen_bseq_trans
size_widen_bseqm n (lemn : m <= n) (bs : m.-bseq T) : size (widen_bseq lemn bs) = size bs. Proof. by []. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
size_widen_bseq
in_bseqEs : in_bseq s = s :> seq T. Proof. by []. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
in_bseqE
widen_bseq_in_bseqn (bs : n.-bseq T) : widen_bseq (size_bseq bs) (in_bseq bs) = bs. Proof. exact: val_inj. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
widen_bseq_in_bseq
rcons_bseqPs x : size (rcons s x) <= n.+1. Proof. by rewrite size_rcons ltnS size_bseq. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
rcons_bseqP
rcons_bseqs x := Bseq (rcons_bseqP s x).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
rcons_bseq
behead_bseqPs : size (behead s) <= n.-1. Proof. rewrite size_behead -!subn1; apply/leq_sub2r/size_bseq. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
behead_bseqP
behead_bseqs := Bseq (behead_bseqP s).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
behead_bseq
belast_bseqPx s : size (belast x s) <= n. Proof. by rewrite size_belast; apply/size_bseq. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
belast_bseqP
belast_bseqx s := Bseq (belast_bseqP x s).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
belast_bseq
cat_bseqPs (s' : m.-bseq T) : size (s ++ s') <= n + m. Proof. by rewrite size_cat; apply/leq_add/size_bseq/size_bseq. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
cat_bseqP
cat_bseqs (s' : m.-bseq T) := Bseq (cat_bseqP s s').
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
cat_bseq
take_bseqPs : size (take m s) <= n. Proof. by rewrite size_take_min (leq_trans _ (size_bseq s)) // geq_minr. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
take_bseqP
take_bseqs := Bseq (take_bseqP s).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
take_bseq
drop_bseqPs : size (drop m s) <= n - m. Proof. by rewrite size_drop; apply/leq_sub2r/size_bseq. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
drop_bseqP
drop_bseqs := Bseq (drop_bseqP s).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
drop_bseq
rev_bseqPs : size (rev s) <= n. Proof. by rewrite size_rev size_bseq. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
rev_bseqP
rev_bseqs := Bseq (rev_bseqP s).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
rev_bseq
rot_bseqPs : size (rot m s) <= n. Proof. by rewrite size_rot size_bseq. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
rot_bseqP
rot_bseqs := Bseq (rot_bseqP s).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
rot_bseq
rotr_bseqPs : size (rotr m s) <= n. Proof. by rewrite size_rotr size_bseq. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
rotr_bseqP
rotr_bseqs := Bseq (rotr_bseqP s).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
rotr_bseq
map_bseqPf s : @size rT (map f s) <= n. Proof. by rewrite size_map size_bseq. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
map_bseqP
map_bseqf s := Bseq (map_bseqP f s).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
map_bseq
scanl_bseqPf x s : @size rT (scanl f x s) <= n. Proof. by rewrite size_scanl size_bseq. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
scanl_bseqP
scanl_bseqf x s := Bseq (scanl_bseqP f x s).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
scanl_bseq
pairmap_bseqPf x s : @size rT (pairmap f x s) <= n. Proof. by rewrite size_pairmap size_bseq. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
pairmap_bseqP
pairmap_bseqf x s := Bseq (pairmap_bseqP f x s).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
pairmap_bseq
allpairs_bseqPf s (s' : m.-bseq U) : @size rT (allpairs f s s') <= n * m. Proof. by rewrite size_allpairs; apply/leq_mul/size_bseq/size_bseq. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
allpairs_bseqP
allpairs_bseqf s (s' : m.-bseq U) := Bseq (allpairs_bseqP f s s').
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
allpairs_bseq
sort_bseqPr s : size (sort r s) <= n. Proof. by rewrite size_sort size_bseq. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat", "From mathcomp Require Import seq choice fintype path" ]
boot/tuple.v
sort_bseqP