diff options
Diffstat (limited to 'lib/Coqlib.v')
-rw-r--r-- | lib/Coqlib.v | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Coqlib.v b/lib/Coqlib.v index 7bc4f8bf..02fa7bab 100644 --- a/lib/Coqlib.v +++ b/lib/Coqlib.v @@ -648,6 +648,13 @@ Proof. rewrite list_length_z_cons. omega. Qed. +Lemma list_length_z_map: + forall (A B: Type) (f: A -> B) (l: list A), + list_length_z (map f l) = list_length_z l. +Proof. + induction l. reflexivity. simpl. repeat rewrite list_length_z_cons. congruence. +Qed. + (** Extract the n-th element of a list, as [List.nth_error] does, but the index [n] is of type [Z]. *) |