From 8ccc7f2f597aff2c8590c4e62552fb53406ad0f8 Mon Sep 17 00:00:00 2001 From: xleroy Date: Tue, 10 Nov 2009 14:58:33 +0000 Subject: More realistic treatment of jump tables: show the absence of overflow when accessing the table git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1172 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- lib/Coqlib.v | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/Coqlib.v') diff --git a/lib/Coqlib.v b/lib/Coqlib.v index 7bc4f8b..02fa7ba 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]. *) -- cgit v1.2.3