From 0f5087bea45be49e105727d6cee4194598474fee Mon Sep 17 00:00:00 2001 From: xleroy Date: Tue, 5 Jul 2011 04:13:33 +0000 Subject: Back from Oregon commit. powerpc/*: better compilation of some comparisons; revised asmgenproof1. common/*: added Mem.storebytes; used to give semantics to memcpy builtin. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1679 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- lib/Coqlib.v | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/Coqlib.v') diff --git a/lib/Coqlib.v b/lib/Coqlib.v index 4fc922b1..f4d50e82 100644 --- a/lib/Coqlib.v +++ b/lib/Coqlib.v @@ -606,6 +606,13 @@ Definition nat_of_Z (z: Z) : nat := | Zneg p => O end. +Lemma nat_of_Z_of_nat: + forall n, nat_of_Z (Z_of_nat n) = n. +Proof. + intros. unfold Z_of_nat. destruct n. auto. + simpl. rewrite nat_of_P_o_P_of_succ_nat_eq_succ. auto. +Qed. + Lemma nat_of_Z_max: forall z, Z_of_nat (nat_of_Z z) = Zmax z 0. Proof. @@ -1133,6 +1140,13 @@ Proof. induction 1; intros; simpl. auto. constructor; auto. Qed. +Lemma list_forall2_length: + forall l1 l2, + list_forall2 l1 l2 -> length l1 = length l2. +Proof. + induction 1; simpl; congruence. +Qed. + End FORALL2. Lemma list_forall2_imply: -- cgit