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 |
|---|---|---|---|---|---|---|---|---|---|---|
suffix0s s : suffix [::] s. | Proof. exact: prefix0s. Qed. | Lemma | suffix0s | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"prefix0s",
"suffix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
prefix_rev s1 s2 : prefix (rev s1) (rev s2) = suffix s1 s2. | Proof. by []. Qed. | Lemma | prefix_rev | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"prefix",
"rev",
"s1",
"s2",
"suffix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
prefix_revLR s1 s2 : prefix (rev s1) s2 = suffix s1 (rev s2). | Proof. by rewrite -prefix_rev revK. Qed. | Lemma | prefix_revLR | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"prefix",
"prefix_rev",
"rev",
"revK",
"s1",
"s2",
"suffix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
suffix_rev s1 s2 : suffix (rev s1) (rev s2) = prefix s1 s2. | Proof. by rewrite -prefix_rev !revK. Qed. | Lemma | suffix_rev | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"prefix",
"prefix_rev",
"rev",
"revK",
"s1",
"s2",
"suffix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
suffix_revLR s1 s2 : suffix (rev s1) s2 = prefix s1 (rev s2). | Proof. by rewrite -prefix_rev revK. Qed. | Lemma | suffix_revLR | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"prefix",
"prefix_rev",
"rev",
"revK",
"s1",
"s2",
"suffix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
suffix_suffix s1 s2 : suffix s2 (s1 ++ s2). | Proof. by rewrite /suffix rev_cat prefix_prefix. Qed. | Lemma | suffix_suffix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"prefix_prefix",
"rev_cat",
"s1",
"s2",
"suffix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
suffixP {s1 s2} :
reflect (exists s2' : seq T, s2 = s2' ++ s1) (suffix s1 s2). | Proof.
apply: (iffP prefixP) => [[s2' rev_s2]|[s2' ->]]; exists (rev s2'); last first.
by rewrite rev_cat.
by rewrite -[s2]revK rev_s2 rev_cat revK.
Qed. | Lemma | suffixP | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"last",
"prefixP",
"rev",
"revK",
"rev_cat",
"s1",
"s2",
"seq",
"suffix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
suffix_trans : transitive suffix. | Proof. by move=> _ s2 _ /suffixP[s1 ->] /suffixP[s3 ->]; rewrite catA. Qed. | Lemma | suffix_trans | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"catA",
"s1",
"s2",
"s3",
"suffix",
"suffixP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
suffix_rcons s1 s2 x y :
suffix (rcons s1 x) (rcons s2 y) = (x == y) && suffix s1 s2. | Proof. by rewrite /suffix 2!rev_rcons prefix_cons. Qed. | Lemma | suffix_rcons | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"prefix_cons",
"rcons",
"rev_rcons",
"s1",
"s2",
"suffix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
suffix_catl s1 s2 s3 s3' : size s3 = size s3' ->
suffix (s1 ++ s3) (s2 ++ s3') = (s3 == s3') && suffix s1 s2. | Proof.
by move=> eqs3; rewrite /suffix !rev_cat prefix_catr ?size_rev// (can_eq revK).
Qed. | Lemma | suffix_catl | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"can_eq",
"prefix_catr",
"revK",
"rev_cat",
"s1",
"s2",
"s3",
"size",
"size_rev",
"suffix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
suffix_catr s1 s2 s3 : suffix s1 s2 -> suffix s1 (s3 ++ s2). | Proof. by move=> /suffixP [s2'] ->; rewrite catA suffix_suffix. Qed. | Lemma | suffix_catr | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"catA",
"s1",
"s2",
"s3",
"suffix",
"suffixP",
"suffix_suffix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
catl_suffix s s1 s2 : suffix (s ++ s1) s2 -> suffix s1 s2. | Proof. by move=> /suffixP [s2'] ->; rewrite catA suffix_suffix. Qed. | Lemma | catl_suffix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"catA",
"s1",
"s2",
"suffix",
"suffixP",
"suffix_suffix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
suffix_cons s x : suffix s (x :: s). | Proof. by rewrite /suffix rev_cons prefix_rcons. Qed. | Lemma | suffix_cons | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"prefix_rcons",
"rev_cons",
"suffix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix s1 s2 | :=
if s2 is y :: s2' then prefix s1 s2 || infix s1 s2' else s1 == [::]. | Fixpoint | infix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"prefix",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_index s1 s2 | :=
if prefix s1 s2 then 0
else if s2 is y :: s2' then (infix_index s1 s2').+1 else 1. | Fixpoint | infix_index | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"prefix",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix0s s : infix [::] s. | Proof. by case: s. Qed. | Lemma | infix0s | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infixs0 s : infix s [::] = (s == [::]). | Proof. by case: s. Qed. | Lemma | infixs0 | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_consl s1 y s2 :
infix s1 (y :: s2) = prefix s1 (y :: s2) || infix s1 s2. | Proof. by []. Qed. | Lemma | infix_consl | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix",
"prefix",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_indexss s : infix_index s s = 0. | Proof. by case: s => //= x s; rewrite eqxx prefix_refl. Qed. | Lemma | infix_indexss | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"eqxx",
"infix_index",
"prefix_refl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_index_le s1 s2 : infix_index s1 s2 <= (size s2).+1. | Proof. by elim: s2 => [|x s2'] /=; case: ifP. Qed. | Lemma | infix_index_le | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix_index",
"s1",
"s2",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infixTindex s1 s2 : (infix_index s1 s2 <= size s2) = infix s1 s2. | Proof. by elim: s2 s1 => [|y s2 +] [|x s1]//= => <-; case: ifP. Qed. | Lemma | infixTindex | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix",
"infix_index",
"s1",
"s2",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infixPn s1 s2 :
reflect (infix_index s1 s2 = (size s2).+1) (~~ infix s1 s2). | Proof.
rewrite -infixTindex -ltnNge; apply: (iffP idP) => [s2lt|->//].
by apply/eqP; rewrite eqn_leq s2lt infix_index_le.
Qed. | Lemma | infixPn | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"eqn_leq",
"infix",
"infixTindex",
"infix_index",
"infix_index_le",
"ltnNge",
"s1",
"s2",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_index0s s : infix_index [::] s = 0. | Proof. by case: s. Qed. | Lemma | infix_index0s | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix_index"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_indexs0 s : infix_index s [::] = (s != [::]). | Proof. by case: s. Qed. | Lemma | infix_indexs0 | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix_index"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infixE s1 s2 : infix s1 s2 =
(take (size s1) (drop (infix_index s1 s2) s2) == s1). | Proof.
elim: s2 s1 => [|y s2 +] [|x s1]//= => -> /=.
by case: ifP => // /andP[/eqP-> ps1s2/=]; rewrite eqseq_cons -prefixE eqxx.
Qed. | Lemma | infixE | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"drop",
"eqseq_cons",
"eqxx",
"infix",
"infix_index",
"prefixE",
"s1",
"s2",
"size",
"take"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_refl s : infix s s. | Proof. by rewrite infixE infix_indexss// drop0 take_size. Qed. | Lemma | infix_refl | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"drop0",
"infix",
"infixE",
"infix_indexss",
"take_size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
prefixW s1 s2 : prefix s1 s2 -> infix s1 s2. | Proof. by elim: s2 s1 => [|y s2 IHs2] [|x s1]//=->. Qed. | Lemma | prefixW | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix",
"prefix",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
prefix_infix s1 s2 : infix s1 (s1 ++ s2). | Proof. exact: prefixW. Qed. | Lemma | prefix_infix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix",
"prefixW",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_infix s1 s2 s3 : infix s2 (s1 ++ s2 ++ s3). | Proof. by elim: s1 => //= x s1 ->; rewrite orbT. Qed. | Lemma | infix_infix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix",
"s1",
"s2",
"s3"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
suffix_infix s1 s2 : infix s2 (s1 ++ s2). | Proof. by rewrite -[X in s1 ++ X]cats0. Qed. | Lemma | suffix_infix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"cats0",
"infix",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infixP {s1 s2} :
reflect (exists s s' : seq T, s2 = s ++ s1 ++ s') (infix s1 s2). | Proof.
apply: (iffP idP) => [|[p [s {s2}->]]]//=; rewrite infixE => /eqP<-.
set k := infix_index _ _; exists (take k s2), (drop (size s1 + k) s2).
by rewrite -drop_drop !cat_take_drop.
Qed. | Lemma | infixP | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"cat_take_drop",
"drop",
"drop_drop",
"infix",
"infixE",
"infix_index",
"s1",
"s2",
"seq",
"size",
"take"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_rev s1 s2 : infix (rev s1) (rev s2) = infix s1 s2. | Proof.
gen have sr : s1 s2 / infix s1 s2 -> infix (rev s1) (rev s2); last first.
by apply/idP/idP => /sr; rewrite ?revK.
by move=> /infixP[s [p ->]]; rewrite !rev_cat -catA.
Qed. | Lemma | infix_rev | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"catA",
"gen",
"infix",
"infixP",
"last",
"rev",
"revK",
"rev_cat",
"s1",
"s2",
"sr"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
suffixW s1 s2 : suffix s1 s2 -> infix s1 s2. | Proof. by rewrite -infix_rev; apply: prefixW. Qed. | Lemma | suffixW | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"infix",
"infix_rev",
"prefixW",
"s1",
"s2",
"suffix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_trans : transitive infix. | Proof.
move=> s s1 s2 /infixP[s1p [s1s def_s]] /infixP[sp [ss def_s2]].
by apply/infixP; exists (sp ++ s1p),(s1s ++ ss); rewrite def_s2 def_s -!catA.
Qed. | Lemma | infix_trans | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"catA",
"infix",
"infixP",
"s1",
"s2",
"sp"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_revLR s1 s2 : infix (rev s1) s2 = infix s1 (rev s2). | Proof. by rewrite -infix_rev revK. Qed. | Lemma | infix_revLR | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix",
"infix_rev",
"rev",
"revK",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_rconsl s1 s2 y :
infix s1 (rcons s2 y) = suffix s1 (rcons s2 y) || infix s1 s2. | Proof.
rewrite -infix_rev rev_rcons infix_consl.
by rewrite -rev_rcons prefix_rev infix_rev.
Qed. | Lemma | infix_rconsl | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix",
"infix_consl",
"infix_rev",
"prefix_rev",
"rcons",
"rev_rcons",
"s1",
"s2",
"suffix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_cons s x : infix s (x :: s). | Proof. by rewrite -cat1s suffix_infix. Qed. | Lemma | infix_cons | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"cat1s",
"infix",
"suffix_infix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infixs1 s x : infix s [:: x] = (s == [::]) || (s == [:: x]). | Proof. by rewrite infix_consl prefixs1 orbC orbA orbb. Qed. | Lemma | infixs1 | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix",
"infix_consl",
"prefixs1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
catl_infix s s1 s2 : infix (s ++ s1) s2 -> infix s1 s2. | Proof. apply: infix_trans; exact/suffixW/suffix_suffix. Qed. | Lemma | catl_infix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"infix",
"infix_trans",
"s1",
"s2",
"suffixW",
"suffix_suffix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
catr_infix s s1 s2 : infix (s1 ++ s) s2 -> infix s1 s2. | Proof.
by rewrite -infix_rev rev_cat => /catl_infix; rewrite infix_rev.
Qed. | Lemma | catr_infix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"catl_infix",
"infix",
"infix_rev",
"rev_cat",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
cons2_infix s1 s2 x : infix (x :: s1) (x :: s2) -> infix s1 s2. | Proof.
by rewrite /= eqxx /= -cat1s => /orP[/prefixW//|]; exact: catl_infix.
Qed. | Lemma | cons2_infix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"cat1s",
"catl_infix",
"eqxx",
"infix",
"prefixW",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
rcons2_infix s1 s2 x : infix (rcons s1 x) (rcons s2 x) -> infix s1 s2. | Proof. by rewrite -infix_rev !rev_rcons => /cons2_infix; rewrite infix_rev. Qed. | Lemma | rcons2_infix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"cons2_infix",
"infix",
"infix_rev",
"rcons",
"rev_rcons",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
catr2_infix s s1 s2 : infix (s ++ s1) (s ++ s2) -> infix s1 s2. | Proof. by elim: s => //= x s IHs /cons2_infix. Qed. | Lemma | catr2_infix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"cons2_infix",
"infix",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
catl2_infix s s1 s2 : infix (s1 ++ s) (s2 ++ s) -> infix s1 s2. | Proof. by rewrite -infix_rev !rev_cat => /catr2_infix; rewrite infix_rev. Qed. | Lemma | catl2_infix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"catr2_infix",
"infix",
"infix_rev",
"rev_cat",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_catl s1 s2 s3 : infix s1 s2 -> infix s1 (s3 ++ s2). | Proof. by move=> is12; apply: infix_trans is12 (suffix_infix _ _). Qed. | Lemma | infix_catl | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"infix",
"infix_trans",
"s1",
"s2",
"s3",
"suffix_infix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_catr s1 s2 s3 : infix s1 s2 -> infix s1 (s2 ++ s3). | Proof.
case: s3 => [|x s /infixP [p [sf]] ->]; first by rewrite cats0.
by rewrite -catA; apply: infix_catl; rewrite -catA prefix_infix.
Qed. | Lemma | infix_catr | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"catA",
"cats0",
"infix",
"infixP",
"infix_catl",
"prefix_infix",
"s1",
"s2",
"s3"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
prefix_infix_trans s2 s1 s3 :
prefix s1 s2 -> infix s2 s3 -> infix s1 s3. | Proof. by move=> /prefixW/infix_trans; apply. Qed. | Lemma | prefix_infix_trans | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"infix",
"infix_trans",
"prefix",
"prefixW",
"s1",
"s2",
"s3"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
suffix_infix_trans s2 s1 s3 :
suffix s1 s2 -> infix s2 s3 -> infix s1 s3. | Proof. by move=> /suffixW/infix_trans; apply. Qed. | Lemma | suffix_infix_trans | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"infix",
"infix_trans",
"s1",
"s2",
"s3",
"suffix",
"suffixW"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_prefix_trans s2 s1 s3 :
infix s1 s2 -> prefix s2 s3 -> infix s1 s3. | Proof. by move=> + /prefixW; apply: infix_trans. Qed. | Lemma | infix_prefix_trans | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"infix",
"infix_trans",
"prefix",
"prefixW",
"s1",
"s2",
"s3"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_suffix_trans s2 s1 s3 :
infix s1 s2 -> suffix s2 s3 -> infix s1 s3. | Proof. by move=> + /suffixW; apply: infix_trans. Qed. | Lemma | infix_suffix_trans | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"infix",
"infix_trans",
"s1",
"s2",
"s3",
"suffix",
"suffixW"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
prefix_suffix_trans s2 s1 s3 :
prefix s1 s2 -> suffix s2 s3 -> infix s1 s3. | Proof. by move=> /prefixW + /suffixW +; apply: infix_trans. Qed. | Lemma | prefix_suffix_trans | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"infix",
"infix_trans",
"prefix",
"prefixW",
"s1",
"s2",
"s3",
"suffix",
"suffixW"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
suffix_prefix_trans s2 s1 s3 :
suffix s1 s2 -> prefix s2 s3 -> infix s1 s3. | Proof. by move=> /suffixW + /prefixW +; apply: infix_trans. Qed. | Lemma | suffix_prefix_trans | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"infix",
"infix_trans",
"prefix",
"prefixW",
"s1",
"s2",
"s3",
"suffix",
"suffixW"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infixW s1 s2 : infix s1 s2 -> subseq s1 s2. | Proof.
move=> /infixP[sp [ss ->]].
exact: subseq_trans (prefix_subseq _ _) (suffix_subseq _ _).
Qed. | Lemma | infixW | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix",
"infixP",
"prefix_subseq",
"s1",
"s2",
"sp",
"subseq",
"subseq_trans",
"suffix_subseq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
mem_infix s1 s2 : infix s1 s2 -> {subset s1 <= s2}. | Proof. by move=> /infixW subH; apply: mem_subseq. Qed. | Lemma | mem_infix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"infix",
"infixW",
"mem_subseq",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix1s s x : infix [:: x] s = (x \in s). | Proof. by elim: s => // x' s /= ->; rewrite in_cons prefix0s andbT. Qed. | Lemma | infix1s | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"in_cons",
"infix",
"prefix0s"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
prefix1s s x : prefix [:: x] s -> x \in s. | Proof. by rewrite -infix1s => /prefixW. Qed. | Lemma | prefix1s | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix1s",
"prefix",
"prefixW"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
suffix1s s x : suffix [:: x] s -> x \in s. | Proof. by rewrite -infix1s => /suffixW. Qed. | Lemma | suffix1s | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix1s",
"suffix",
"suffixW"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_rcons s x : infix s (rcons s x). | Proof. by rewrite -cats1 prefix_infix. Qed. | Lemma | infix_rcons | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"cats1",
"infix",
"prefix_infix",
"rcons"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_uniq s1 s2 : infix s1 s2 -> uniq s2 -> uniq s1. | Proof. by move=> /infixW /subseq_uniq subH. Qed. | Lemma | infix_uniq | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix",
"infixW",
"s1",
"s2",
"subseq_uniq",
"uniq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
prefix_uniq s1 s2 : prefix s1 s2 -> uniq s2 -> uniq s1. | Proof. by move=> /prefixW /infix_uniq preH. Qed. | Lemma | prefix_uniq | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix_uniq",
"prefix",
"prefixW",
"s1",
"s2",
"uniq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
suffix_uniq s1 s2 : suffix s1 s2 -> uniq s2 -> uniq s1. | Proof. by move=> /suffixW /infix_uniq preH. Qed. | Lemma | suffix_uniq | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix_uniq",
"s1",
"s2",
"suffix",
"suffixW",
"uniq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
prefix_take s i : prefix (take i s) s. | Proof. by rewrite -{2}[s](cat_take_drop i). Qed. | Lemma | prefix_take | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"cat_take_drop",
"prefix",
"take"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
suffix_drop s i : suffix (drop i s) s. | Proof. by rewrite -{2}[s](cat_take_drop i). Qed. | Lemma | suffix_drop | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"cat_take_drop",
"drop",
"suffix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_take s i : infix (take i s) s. | Proof. by rewrite prefixW // prefix_take. Qed. | Lemma | infix_take | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix",
"prefixW",
"prefix_take",
"take"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
prefix_drop_gt0 s i : ~~ prefix (drop i s) s -> i > 0. | Proof. by case: i => //=; rewrite drop0 ltnn prefix_refl. Qed. | Lemma | prefix_drop_gt0 | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"drop",
"drop0",
"ltnn",
"prefix",
"prefix_refl"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
infix_drop s i : infix (drop i s) s. | Proof. by rewrite -{2}[s](cat_take_drop i). Qed. | Lemma | infix_drop | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"cat_take_drop",
"drop",
"infix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
consr_infix s1 s2 x : infix (x :: s1) s2 -> infix [:: x] s2. | Proof. by rewrite -cat1s => /catr_infix. Qed. | Lemma | consr_infix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"cat1s",
"catr_infix",
"infix",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
consl_infix s1 s2 x : infix (x :: s1) s2 -> infix s1 s2. | Proof. by rewrite -cat1s => /catl_infix. Qed. | Lemma | consl_infix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"cat1s",
"catl_infix",
"infix",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
prefix_index s1 s2 : prefix s1 s2 -> infix_index s1 s2 = 0. | Proof. by case: s1 s2 => [|x s1] [|y s2] //= ->. Qed. | Lemma | prefix_index | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"infix_index",
"prefix",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
size_infix s1 s2 : infix s1 s2 -> size s1 <= size s2. | Proof. by move=> /infixW; apply: size_subseq. Qed. | Lemma | size_infix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"infix",
"infixW",
"s1",
"s2",
"size",
"size_subseq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
size_prefix s1 s2 : prefix s1 s2 -> size s1 <= size s2. | Proof. by move=> /prefixW; apply: size_infix. Qed. | Lemma | size_prefix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"prefix",
"prefixW",
"s1",
"s2",
"size",
"size_infix"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
size_suffix s1 s2 : suffix s1 s2 -> size s1 <= size s2. | Proof. by move=> /suffixW; apply: size_infix. Qed. | Lemma | size_suffix | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"s1",
"s2",
"size",
"size_infix",
"suffix",
"suffixW"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairs_dep f s t | := [seq f x y | x <- s, y <- t x]. | Definition | allpairs_dep | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
size_allpairs_dep f s t :
size [seq f x y | x <- s, y <- t x] = sumn [seq size (t x) | x <- s]. | Proof. by elim: s => //= x s IHs; rewrite size_cat size_map IHs. Qed. | Lemma | size_allpairs_dep | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"seq",
"size",
"size_cat",
"size_map",
"sumn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairs0l f t : [seq f x y | x <- [::], y <- t x] = [::]. | Proof. by []. Qed. | Lemma | allpairs0l | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairs0r f s : [seq f x y | x <- s, y <- [::]] = [::]. | Proof. by elim: s. Qed. | Lemma | allpairs0r | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairs1l f x t :
[seq f x y | x <- [:: x], y <- t x] = [seq f x y | y <- t x]. | Proof. exact: cats0. Qed. | Lemma | allpairs1l | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"cats0",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairs1r f s y :
[seq f x y | x <- s, y <- [:: y x]] = [seq f x (y x) | x <- s]. | Proof. exact: flatten_map1. Qed. | Lemma | allpairs1r | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"flatten_map1",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairs_cons f x s t :
[seq f x y | x <- x :: s, y <- t x] =
[seq f x y | y <- t x] ++ [seq f x y | x <- s, y <- t x]. | Proof. by []. Qed. | Lemma | allpairs_cons | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_allpairs (f1 f2 : forall x, T x -> R) s t :
(forall x, f1 x =1 f2 x) ->
[seq f1 x y | x <- s, y <- t x] = [seq f2 x y | x <- s, y <- t x]. | Proof. by move=> eq_f; under eq_map do under eq_map do rewrite eq_f. Qed. | Lemma | eq_allpairs | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"eq_f",
"eq_map",
"f1",
"f2",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_allpairsr (f : forall x, T x -> R) s t1 t2 : (forall x, t1 x = t2 x) ->
[seq f x y | x <- s, y <- t1 x] = [seq f x y | x <- s, y <- t2 x]. | Proof. by move=> eq_t; under eq_map do rewrite eq_t. Qed. | Lemma | eq_allpairsr | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"eq_map",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairs_cat f s1 s2 t :
[seq f x y | x <- s1 ++ s2, y <- t x] =
[seq f x y | x <- s1, y <- t x] ++ [seq f x y | x <- s2, y <- t x]. | Proof. by rewrite map_cat flatten_cat. Qed. | Lemma | allpairs_cat | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"flatten_cat",
"map_cat",
"s1",
"s2",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairs_rcons f x s t :
[seq f x y | x <- rcons s x, y <- t x] =
[seq f x y | x <- s, y <- t x] ++ [seq f x y | y <- t x]. | Proof. by rewrite -cats1 allpairs_cat allpairs1l. Qed. | Lemma | allpairs_rcons | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"allpairs1l",
"allpairs_cat",
"cats1",
"rcons",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairs_mapl f (g : S' -> S) s t :
[seq f x y | x <- map g s, y <- t x] = [seq f (g x) y | x <- s, y <- t (g x)]. | Proof. by rewrite -map_comp. Qed. | Lemma | allpairs_mapl | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"map",
"map_comp",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairs_mapr f (g : forall x, T' x -> T x) s t :
[seq f x y | x <- s, y <- map (g x) (t x)] =
[seq f x (g x y) | x <- s, y <- t x]. | Proof. by under eq_map do rewrite -map_comp. Qed. | Lemma | allpairs_mapr | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"T'",
"eq_map",
"map",
"map_comp",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
map_allpairs S T R R' (g : R' -> R) f s t :
map g [seq f x y | x : S <- s, y : T x <- t x] =
[seq g (f x y) | x <- s, y <- t x]. | Proof. by rewrite map_flatten allpairs_mapl allpairs_mapr. Qed. | Lemma | map_allpairs | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"allpairs_mapl",
"allpairs_mapr",
"map",
"map_flatten",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairs s t | := [seq f x y | x <- s, y <- t]. | Definition | allpairs | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
size_allpairs s t : size [seq f x y | x <- s, y <- t] = size s * size t. | Proof. by elim: s => //= x s IHs; rewrite size_cat size_map IHs. Qed. | Lemma | size_allpairs | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"seq",
"size",
"size_cat",
"size_map"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairsPdep R (f : forall x, T x -> R) s t (z : R) :
reflect (exists x y, [/\ x \in s, y \in t x & z = f x y])
(z \in [seq f x y | x <- s, y <- t x]). | Proof.
apply: (iffP flatten_mapP); first by case=> x sx /mapP[y ty ->]; exists x, y.
by case=> x [y [sx ty ->]]; exists x; last apply: map_f.
Qed. | Lemma | allpairsPdep | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"flatten_mapP",
"last",
"mapP",
"map_f",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairs_f_dep f s t x y :
x \in s -> y \in t x -> f x y \in [seq f x y | x <- s, y <- t x]. | Proof. by move=> sx ty; apply/allpairsPdep; exists x, y. Qed. | Lemma | allpairs_f_dep | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"allpairsPdep",
"apply",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_in_allpairs_dep f1 f2 s t :
{in s, forall x, {in t x, f1 x =1 f2 x}} <->
[seq f1 x y : R | x <- s, y <- t x] = [seq f2 x y | x <- s, y <- t x]. | Proof.
split=> [eq_f | eq_fst x s_x].
by congr flatten; apply/eq_in_map=> x s_x; apply/eq_in_map/eq_f.
apply/eq_in_map; apply/eq_in_map: x s_x; apply/eq_from_flatten_shape => //.
by rewrite /shape -!map_comp; apply/eq_map=> x /=; rewrite !size_map.
Qed. | Lemma | eq_in_allpairs_dep | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"eq_f",
"eq_from_flatten_shape",
"eq_in_map",
"eq_map",
"f1",
"f2",
"flatten",
"map_comp",
"seq",
"shape",
"size_map",
"split"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
perm_allpairs_dep f s1 t1 s2 t2 :
perm_eq s1 s2 -> {in s1, forall x, perm_eq (t1 x) (t2 x)} ->
perm_eq [seq f x y | x <- s1, y <- t1 x] [seq f x y | x <- s2, y <- t2 x]. | Proof.
elim: s1 s2 t1 t2 => [s2 t1 t2 |a s1 IH s2 t1 t2 perm_s2 perm_t1].
by rewrite perm_sym => /perm_nilP->.
have mem_a : a \in s2 by rewrite -(perm_mem perm_s2) inE eqxx.
rewrite -[s2](cat_take_drop (index a s2)).
rewrite allpairs_cat (drop_nth a) ?index_mem //= nth_index //=.
rewrite perm_sym perm_catC -catA perm... | Lemma | perm_allpairs_dep | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"allpairs_cat",
"apply",
"catA",
"cat_take_drop",
"drop_nth",
"eqxx",
"inE",
"index",
"index_mem",
"last",
"map_cat",
"nth_index",
"perm_cat",
"perm_catC",
"perm_cons",
"perm_eq",
"perm_mem",
"perm_nilP",
"perm_sym",
"perm_to_rem",
"perm_trans",
"remE",
"s1",
"s2",
"s... | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
mem_allpairs_dep f s1 t1 s2 t2 :
s1 =i s2 -> {in s1, forall x, t1 x =i t2 x} ->
[seq f x y | x <- s1, y <- t1 x] =i [seq f x y | x <- s2, y <- t2 x]. | Proof.
move=> eq_s eq_t z; apply/allpairsPdep/allpairsPdep=> -[x [y [sx ty ->]]];
by exists x, y; rewrite -eq_s in sx *; rewrite eq_t in ty *.
Qed. | Lemma | mem_allpairs_dep | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"allpairsPdep",
"apply",
"s1",
"s2",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairs_uniq_dep f s t (st := [seq Tagged T y | x <- s, y <- t x]) :
let g (p : {x : S & T x}) : R := f (tag p) (tagged p) in
uniq s -> {in s, forall x, uniq (t x)} -> {in st &, injective g} ->
uniq [seq f x y | x <- s, y <- t x]. | Proof.
move=> g Us Ut; rewrite -(map_allpairs g (existT T)) => /map_inj_in_uniq->{f g}.
elim: s Us => //= x s IHs /andP[s'x Us] in st Ut *; rewrite {st}cat_uniq.
rewrite {}IHs {Us}// ?andbT => [x1 s_s1|]; first exact/Ut/mem_behead.
have injT: injective (existT T x) by move=> y z /eqP; rewrite eq_Tagged => /eqP.
rewrite... | Lemma | allpairs_uniq_dep | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"allpairsPdep",
"apply",
"cat_uniq",
"eq_Tagged",
"hasP",
"has_map",
"has_sym",
"map_allpairs",
"map_inj_in_uniq",
"mem_behead",
"mem_head",
"seq",
"uniq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
perm_allpairs_catr f s t1 t2 :
perm_eql [seq f x y | x <- s, y <- t1 x ++ t2 x]
([seq f x y | x <- s, y <- t1 x] ++ [seq f x y | x <- s, y <- t2 x]). | Proof.
apply/permPl; rewrite perm_sym; elim: s => //= x s ihs.
by rewrite perm_catACA perm_cat ?map_cat.
Qed. | Lemma | perm_allpairs_catr | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"apply",
"map_cat",
"permPl",
"perm_cat",
"perm_catACA",
"perm_eql",
"perm_sym",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
mem_allpairs_catr f s y0 t :
[seq f x y | x <- s, y <- y0 x ++ t x] =i
[seq f x y | x <- s, y <- y0 x] ++ [seq f x y | x <- s, y <- t x]. | Proof. exact/perm_mem/permPl/perm_allpairs_catr. Qed. | Lemma | mem_allpairs_catr | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"permPl",
"perm_allpairs_catr",
"perm_mem",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
perm_allpairs_consr f s y0 t :
perm_eql [seq f x y | x <- s, y <- y0 x :: t x]
([seq f x (y0 x) | x <- s] ++ [seq f x y | x <- s, y <- t x]). | Proof.
by apply/permPl; rewrite (perm_allpairs_catr _ _ (fun=> [:: _])) allpairs1r.
Qed. | Lemma | perm_allpairs_consr | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"allpairs1r",
"apply",
"permPl",
"perm_allpairs_catr",
"perm_eql",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
mem_allpairs_consr f s t y0 :
[seq f x y | x <- s, y <- y0 x :: t x] =i
[seq f x (y0 x) | x <- s] ++ [seq f x y | x <- s, y <- t x]. | Proof. exact/perm_mem/permPl/perm_allpairs_consr. Qed. | Lemma | mem_allpairs_consr | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"permPl",
"perm_allpairs_consr",
"perm_mem",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
allpairs_rconsr f s y0 t :
perm_eql [seq f x y | x <- s, y <- rcons (t x) (y0 x)]
([seq f x y | x <- s, y <- t x] ++ [seq f x (y0 x) | x <- s]). | Proof.
apply/permPl; rewrite -(eq_allpairsr _ _ (fun=> cats1 _ _)).
by rewrite perm_allpairs_catr allpairs1r.
Qed. | Lemma | allpairs_rconsr | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"allpairs1r",
"apply",
"cats1",
"eq_allpairsr",
"permPl",
"perm_allpairs_catr",
"perm_eql",
"rcons",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
mem_allpairs_rconsr f s t y0 :
[seq f x y | x <- s, y <- rcons (t x) (y0 x)] =i
([seq f x y | x <- s, y <- t x] ++ [seq f x (y0 x) | x <- s]). | Proof. exact/perm_mem/permPl/allpairs_rconsr. Qed. | Lemma | mem_allpairs_rconsr | boot | boot/seq.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"eqtype",
"ssrnat"
] | [
"allpairs_rconsr",
"permPl",
"perm_mem",
"rcons",
"seq"
] | 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.