aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2020-12-15 11:10:41 +0100
committerXavier Leroy <xavierleroy@users.noreply.github.com>2021-01-13 14:45:05 +0100
commitdd191041123aa9ef77bd794502d097fffcbcf06b (patch)
tree3e1ecc16fb30fd3657e99f34415a4e28c1a0b387 /lib
parente81d015e3cc2cb0c352792d0cac12f1594281bc2 (diff)
downloadcompcert-kvx-dd191041123aa9ef77bd794502d097fffcbcf06b.tar.gz
compcert-kvx-dd191041123aa9ef77bd794502d097fffcbcf06b.zip
Add lemma list_norepet_rev
Diffstat (limited to 'lib')
-rw-r--r--lib/Coqlib.v8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Coqlib.v b/lib/Coqlib.v
index 948f128e..ae9dceec 100644
--- a/lib/Coqlib.v
+++ b/lib/Coqlib.v
@@ -1011,6 +1011,14 @@ Proof.
generalize list_norepet_app; firstorder.
Qed.
+Lemma list_norepet_rev:
+ forall (A: Type) (l: list A), list_norepet l -> list_norepet (List.rev l).
+Proof.
+ induction 1; simpl.
+- constructor.
+- apply list_norepet_append_commut. simpl. constructor; auto. rewrite <- List.in_rev; auto.
+Qed.
+
(** [is_tail l1 l2] holds iff [l2] is of the form [l ++ l1] for some [l]. *)
Inductive is_tail (A: Type): list A -> list A -> Prop :=