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
inj_homo_ltn_in: {in D & D', injective f} -> {in D & D', {homo f : m n / m <= n}} -> {in D & D', {homo f : m n / m < n}}. Proof. exact: inj_homo_in. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
inj_homo_ltn_in
inj_nhomo_ltn_in: {in D & D', injective f} -> {in D & D', {homo f : m n /~ m <= n}} -> {in D & D', {homo f : m n /~ m < n}}. Proof. exact: inj_homo_in. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
inj_nhomo_ltn_in
incn_inj_in: {in D &, {mono f : m n / m <= n}} -> {in D &, injective f}. Proof. exact: mono_inj_in. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
incn_inj_in
decn_inj_in: {in D &, {mono f : m n /~ m <= n}} -> {in D &, injective f}. Proof. exact: mono_inj_in. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
decn_inj_in
leqW_mono_in: {in D &, {mono f : m n / m <= n}} -> {in D &, {mono f : m n / m < n}}. Proof. exact: anti_mono_in. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
leqW_mono_in
leqW_nmono_in: {in D &, {mono f : m n /~ m <= n}} -> {in D &, {mono f : m n /~ m < n}}. Proof. exact: anti_mono_in. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
leqW_nmono_in
leq_mono_in: {in D &, {homo f : m n / m < n}} -> {in D &, {mono f : m n / m <= n}}. Proof. exact: total_homo_mono_in. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
leq_mono_in
leq_nmono_in: {in D &, {homo f : m n /~ m < n}} -> {in D &, {mono f : m n /~ m <= n}}. Proof. exact: total_homo_mono_in. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
leq_nmono_in
leq_pfact: {in [pred n | 0 < n] &, {mono factorial : m n / m <= n}}. Proof. by apply: leq_mono_in => n m n0 m0; apply: ltn_fact. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
leq_pfact
leq_fact: {homo factorial : m n / m <= n}. Proof. by move=> [m|m n mn]; rewrite ?fact_gt0// leq_pfact// inE (leq_trans _ mn). Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
leq_fact
ltn_pfact: {in [pred n | 0 < n] &, {mono factorial : m n / m < n}}. Proof. exact/leqW_mono_in/leq_pfact. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
ltn_pfact
addm n := if m is m'.+1 then m' + n.+1 else n where "n + m" := (add n m) : nat_scope.
Fixpoint
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
add
add_mulm n s := if m is m'.+1 then add_mul m' n (n + s) else s.
Fixpoint
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
add_mul
mulm n := if m is m'.+1 then add_mul m' n n else 0.
Definition
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
mul
mul_expm n p := if n is n'.+1 then mul_exp m n' (m * p) else p.
Fixpoint
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
mul_exp
expm n := if n is n'.+1 then mul_exp m n' m else 1.
Definition
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
exp
oddn := if n is n'.+2 then odd n' else eqn n 1. Local Notation doublen := double.
Fixpoint
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
odd
doublen := if n is n'.+1 then n' + n.+1 else 0.
Definition
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
double
addE: add =2 addn. Proof. by elim=> //= n IHn m; rewrite IHn addSnnS. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
addE
doubleE: double =1 doublen. Proof. by case=> // n; rewrite -addnn -addE. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
doubleE
add_mulEn m s : add_mul n m s = addn (muln n m) s. Proof. by elim: n => //= n IHn in m s *; rewrite IHn addE addnCA addnA. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
add_mulE
mulE: mul =2 muln. Proof. by case=> //= n m; rewrite add_mulE addnC. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
mulE
mul_expEm n p : mul_exp m n p = muln (expn m n) p. Proof. by elim: n => [|n IHn] in p *; rewrite ?mul1n //= expnS IHn mulE mulnCA mulnA. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
mul_expE
expE: exp =2 expn. Proof. by move=> m [|n] //=; rewrite mul_expE expnS mulnC. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
expE
oddE: odd =1 oddn. Proof. move=> n; rewrite -[n in LHS]odd_double_half addnC. by elim: n./2 => //=; case (oddn n). Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
oddE
trecE:= (addE, (doubleE, oddE), (mulE, add_mulE, (expE, mul_expE))).
Definition
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
trecE
natTrecE:= NatTrec.trecE.
Notation
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
natTrecE
N_eqbn m := match n, m with | N0, N0 => true | Npos p, Npos q => Pos.eqb p q | _, _ => false end.
Definition
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
N_eqb
eq_binP: Equality.axiom N_eqb. Proof. move=> p q; apply: (iffP idP) => [|<-]; last by case: p => //; elim. by case: q; case: p => //; elim=> [p IHp|p IHp|] [q|q|] //= /IHp [->]. Qed. HB.instance Definition _ := hasDecEq.Build N eq_binP. Arguments N_eqb !n !m.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
eq_binP
nat_of_posp0 := match p0 with | xO p => (nat_of_pos p).*2 | xI p => (nat_of_pos p).*2.+1 | xH => 1 end.
Fixpoint
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
nat_of_pos
nat_of_binb := if b is Npos p then p : nat else 0.
Coercion
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
nat_of_bin
pos_of_natn0 m0 := match n0, m0 with | n.+1, m.+2 => pos_of_nat n m | n.+1, 1 => xO (pos_of_nat n n) | n.+1, 0 => xI (pos_of_nat n n) | 0, _ => xH end.
Fixpoint
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
pos_of_nat
bin_of_natn0 := if n0 is n.+1 then Npos (pos_of_nat n n) else N0.
Definition
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
bin_of_nat
bin_of_natK: cancel bin_of_nat nat_of_bin. Proof. have sub2nn n : n.*2 - n = n by rewrite -addnn addKn. case=> //= n; rewrite -[n in RHS]sub2nn. by elim: n {2 4}n => // m IHm [|[|n]] //=; rewrite IHm // natTrecE sub2nn. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
bin_of_natK
nat_of_binK: cancel nat_of_bin bin_of_nat. Proof. case=> //=; elim=> //= p; case: (nat_of_pos p) => //= n [<-]. by rewrite natTrecE !addnS {2}addnn; elim: {1 3}n. by rewrite natTrecE addnS /= addnS {2}addnn; elim: {1 3}n. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
nat_of_binK
nat_of_succ_posp : Pos.succ p = p.+1 :> nat. Proof. by elim: p => //= p ->; rewrite !natTrecE. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
nat_of_succ_pos
nat_of_add_posp q : Pos.add p q = p + q :> nat. Proof. apply: @fst _ (Pos.add_carry p q = (p + q).+1 :> nat) _. elim: p q => [p IHp|p IHp|] [q|q|] //=; rewrite !natTrecE //; by rewrite ?IHp ?nat_of_succ_pos ?(doubleS, doubleD, addn1, addnS). Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
nat_of_add_pos
nat_of_mul_posp q : Pos.mul p q = p * q :> nat. Proof. elim: p => [p IHp|p IHp|] /=; rewrite ?mul1n //; by rewrite ?nat_of_add_pos /= !natTrecE IHp doubleMl. Qed.
Lemma
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
nat_of_mul_pos
number: Type := Num {bin_of_number :> N}.
Record
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
number
number_subType:= Eval hnf in [isNew for bin_of_number]. HB.instance Definition _ := number_subType. HB.instance Definition _ := [Equality of number by <:].
Definition
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
number_subType
pop_succne := if e is e'.+1 then fun n => pop_succn e' n.+1 else id.
Fixpoint
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
pop_succn
pop_succne := eval lazy beta iota delta [pop_succn] in (pop_succn e 1).
Ltac
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
pop_succn
succn_to_add:= match goal with | |- context G [?e.+1] => let x := fresh "NatLit0" in match pop_succn e with | ?n.+1 => pose x := n.+1; let G' := context G [x] in change G' | _ ?e' ?n => pose x := n; let G' := context G [x + e'] in change G' end; succn_to_add; rewrite {}/x | _ => idtac end.
Ltac
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
succn_to_add
nat_norm:= succn_to_add; rewrite ?add0n ?addn0 -?addnA ?(addSn, addnS, add0n, addn0).
Ltac
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
nat_norm
nat_congr:= first [ apply: (congr1 succn _) | apply: (congr1 predn _) | apply: (congr1 (addn _) _) | apply: (congr1 (subn _) _) | apply: (congr1 (addn^~ _) _) | match goal with |- (?X1 + ?X2 = ?X3) => symmetry; rewrite -1?(addnC X1) -?(addnCA X1); apply: (congr1 (addn X1) _); symmetry end ].
Ltac
boot
[ "From Corelib Require Import PosDef", "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype" ]
boot/ssrnat.v
nat_congr
tuple_of: Type := Tuple {tval :> seq T; _ : size tval == n}. HB.instance Definition _ := [isSub for tval]. Implicit Type t : tuple_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
tuple_of
tsizeof tuple_of := 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
tsize
size_tuplet : size t = n. Proof. exact: (eqP (valP 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
size_tuple
tnth_defaultt : 'I_n -> T. Proof. by rewrite -(size_tuple t); case: (tval 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
tnth_default
tntht i := nth (tnth_default t i) t i.
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
tnth
tnth_nthx t i : tnth t i = nth x t i. Proof. by apply: set_nth_default; 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_nth
tnth_onthx t i : tnth t i = x <-> onth t i = Some x. Proof. rewrite (tnth_nth x) onthE (nth_map x) ?size_tuple//. by split; [move->|case]. 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_onth
map_tnth_enumt : map (tnth t) (enum 'I_n) = t. Proof. case def_t: {-}(val t) => [|x0 t']. by rewrite [enum _]size0nil // -cardE card_ord -(size_tuple t) def_t. apply: (@eq_from_nth _ x0) => [|i]; rewrite size_map. by rewrite -cardE size_tuple card_ord. move=> lt_i_e; have lt_i_n: i < n by rewrite -cardE card_ord in lt_i_e. by rewrite (nth_map (Ordinal lt_i_n)) // (tnth_nth x0) nth_enum_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
map_tnth_enum
eq_from_tntht1 t2 : tnth t1 =1 tnth t2 -> t1 = t2. Proof. by move/eq_map=> eq_t; apply: val_inj; rewrite /= -!map_tnth_enum eq_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
eq_from_tnth
tuplet mkT : tuple_of := mkT (let: Tuple _ tP := t return size t == n in tP).
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
tuple
tupleEt : tuple (fun sP => @Tuple t sP) = t. Proof. by 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
tupleE
nil_tupleT := Tuple (isT : @size T [::] == 0).
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_tuple
cons_tuplen T x (t : n.-tuple T) := Tuple (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_tuple
in_tuple(s : seq T) := Tuple (eqxx (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_tuple
tcastm n (eq_mn : m = n) t := let: erefl in _ = n := eq_mn return n.-tuple T in t.
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
tcast
tcastEm 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
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
tcastE
tcast_idn (eq_nn : n = n) t : tcast eq_nn t = t. 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
tcast_id
tcastKm n (eq_mn : m = n) : cancel (tcast eq_mn) (tcast (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
tcastK
tcastKVm n (eq_mn : m = n) : cancel (tcast (esym eq_mn)) (tcast 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
tcastKV
tcast_transm 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
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
tcast_trans
tvalKn (t : n.-tuple T) : in_tuple t = tcast (esym (size_tuple t)) t. Proof. by apply: val_inj => /=; case: _ / (esym _). 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
tvalK
val_tcastm n (eq_mn : m = n) (t : m.-tuple T) : tcast eq_mn t = t :> seq T. 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
val_tcast
in_tupleEs : in_tuple 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_tupleE
rcons_tuplePt x : size (rcons t x) == n.+1. Proof. by rewrite size_rcons 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
rcons_tupleP
rcons_tuplet x := Tuple (rcons_tupleP t 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_tuple
nseq_tuplePx : @size T (nseq n x) == n. Proof. by rewrite size_nseq. 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
nseq_tupleP
nseq_tuplex := Tuple (nseq_tupleP 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
nseq_tuple
iota_tupleP: size (iota m n) == n. Proof. by rewrite size_iota. 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
iota_tupleP
iota_tuple:= Tuple iota_tupleP.
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
iota_tuple
behead_tuplePt : size (behead t) == n.-1. Proof. by rewrite size_behead 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
behead_tupleP
behead_tuplet := Tuple (behead_tupleP 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
behead_tuple
belast_tuplePx t : size (belast x t) == n. Proof. by rewrite size_belast 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
belast_tupleP
belast_tuplex t := Tuple (belast_tupleP x 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
belast_tuple
cat_tuplePt (u : m.-tuple T) : size (t ++ u) == n + m. Proof. by rewrite size_cat !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
cat_tupleP
cat_tuplet u := Tuple (cat_tupleP t u).
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_tuple
take_tuplePt : size (take m t) == minn m n. Proof. by rewrite size_take size_tuple eqxx. 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_tupleP
take_tuplet := Tuple (take_tupleP 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
take_tuple
drop_tuplePt : size (drop m t) == n - m. Proof. by rewrite size_drop 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
drop_tupleP
drop_tuplet := Tuple (drop_tupleP 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
drop_tuple
rev_tuplePt : size (rev t) == n. Proof. by rewrite size_rev 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
rev_tupleP
rev_tuplet := Tuple (rev_tupleP 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
rev_tuple
rot_tuplePt : size (rot m t) == n. Proof. by rewrite size_rot 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
rot_tupleP
rot_tuplet := Tuple (rot_tupleP 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
rot_tuple
rotr_tuplePt : size (rotr m t) == n. Proof. by rewrite size_rotr 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
rotr_tupleP
rotr_tuplet := Tuple (rotr_tupleP 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
rotr_tuple
map_tuplePf t : @size rT (map f t) == n. Proof. by rewrite size_map 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
map_tupleP
map_tuplef t := Tuple (map_tupleP f 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
map_tuple
scanl_tuplePf x t : @size rT (scanl f x t) == n. Proof. by rewrite size_scanl 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
scanl_tupleP
scanl_tuplef x t := Tuple (scanl_tupleP f x 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
scanl_tuple
pairmap_tuplePf x t : @size rT (pairmap f x t) == n. Proof. by rewrite size_pairmap 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
pairmap_tupleP
pairmap_tuplef x t := Tuple (pairmap_tupleP f x 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
pairmap_tuple
zip_tuplePt (u : n.-tuple U) : size (zip t u) == n. Proof. by rewrite size1_zip !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
zip_tupleP
zip_tuplet u := Tuple (zip_tupleP t u).
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
zip_tuple
allpairs_tuplePf t (u : m.-tuple U) : @size rT (allpairs f t u) == n * m. Proof. by rewrite size_allpairs !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
allpairs_tupleP
allpairs_tuplef t u := Tuple (allpairs_tupleP f t u).
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_tuple