diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-11-25 11:28:46 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-11-25 11:28:46 +0100 |
commit | 38f279e628912cc22de232acf639a527e9c04432 (patch) | |
tree | fb467767f8dc7980bdd0b2836505e24e1b67a59a /common | |
parent | 2a579bf4ea76b49db979b2331f4557571d231412 (diff) | |
download | compcert-kvx-38f279e628912cc22de232acf639a527e9c04432.tar.gz compcert-kvx-38f279e628912cc22de232acf639a527e9c04432.zip |
missing lemmas
Diffstat (limited to 'common')
-rw-r--r-- | common/Values.v | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/common/Values.v b/common/Values.v index 6401ba52..41138e8e 100644 --- a/common/Values.v +++ b/common/Values.v @@ -2706,3 +2706,24 @@ Proof. unfold compose_meminj; rewrite H1; rewrite H3; eauto. rewrite Ptrofs.add_assoc. decEq. unfold Ptrofs.add. apply Ptrofs.eqm_samerepr. auto with ints. Qed. + + +(** Particular cases of extensionality lemma *) + +Lemma cmpu_bool_valid_pointer_eq vptr1 vptr2 c v1 v2: + (forall (b : block) (z : Z), vptr1 b z = vptr2 b z) -> + Val.cmpu_bool vptr1 c v1 v2 = Val.cmpu_bool vptr2 c v1 v2. +Proof. + intros EQ; unfold Val.cmpu_bool; destruct v1; try congruence; + destruct v2; try congruence; + rewrite !EQ; auto. +Qed. + +Lemma cmplu_bool_valid_pointer_eq vptr1 vptr2 c v1 v2: + (forall (b : block) (z : Z), vptr1 b z = vptr2 b z) -> + Val.cmplu_bool vptr1 c v1 v2 = Val.cmplu_bool vptr2 c v1 v2. +Proof. + intros EQ; unfold Val.cmplu_bool; destruct v1; try congruence; + destruct v2; try congruence; + rewrite !EQ; auto. +Qed. |