aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/ssreflect/seq.v
diff options
context:
space:
mode:
authorKazuhiko Sakaguchi2020-11-19 18:12:26 +0900
committerCyril Cohen2020-11-24 02:14:20 +0100
commita18a03452a84e1f54716ce20accca4e16715e382 (patch)
tree08b97c67a789e8a5bc57299a59943d279af7350e /mathcomp/ssreflect/seq.v
parent84dbef80c27392413f96f77d2314a3b34a7a88f8 (diff)
Add `_in` lemmas for `sort`
Diffstat (limited to 'mathcomp/ssreflect/seq.v')
-rw-r--r--mathcomp/ssreflect/seq.v6
1 files changed, 6 insertions, 0 deletions
diff --git a/mathcomp/ssreflect/seq.v b/mathcomp/ssreflect/seq.v
index a0a0548..fab3fa9 100644
--- a/mathcomp/ssreflect/seq.v
+++ b/mathcomp/ssreflect/seq.v
@@ -2385,6 +2385,12 @@ Notation "[ 'seq' E : R | i : T <- s & C ]" :=
Lemma filter_mask T a (s : seq T) : filter a s = mask (map a s) s.
Proof. by elim: s => //= x s <-; case: (a x). Qed.
+Lemma all_sigP T a (s : seq T) : all a s -> {s' : seq (sig a) | map sval s' = s}.
+Proof.
+elim: s => /= [_|x s ihs /andP [ax /ihs [s' <-]]]; first by exists [::].
+by exists (exist a x ax :: s').
+Qed.
+
Section MiscMask.
Lemma leq_count_mask T (P : {pred T}) m s : count P (mask m s) <= count P s.