aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-10-09 14:35:38 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-10-09 14:35:38 +0200
commit1cf17f44b8389754d99535df800186177b394f0c (patch)
tree44b14ab0175bc140431320daaf0f7a098412af41
parent0372472c17ceac36765c8921548672503115bb04 (diff)
downloadcompcert-kvx-1cf17f44b8389754d99535df800186177b394f0c.tar.gz
compcert-kvx-1cf17f44b8389754d99535df800186177b394f0c.zip
centralize if_same
-rw-r--r--backend/CSE3proof.v6
-rw-r--r--kvx/SelectOpproof.v6
-rw-r--r--lib/Coqlib.v6
3 files changed, 6 insertions, 12 deletions
diff --git a/backend/CSE3proof.v b/backend/CSE3proof.v
index 6e489066..3fbc9912 100644
--- a/backend/CSE3proof.v
+++ b/backend/CSE3proof.v
@@ -443,12 +443,6 @@ Ltac IND_STEP :=
idtac mpc mpc' fn minstr *)
end.
-Lemma if_same : forall {T : Type} (b : bool) (x : T),
- (if b then x else x) = x.
-Proof.
- destruct b; trivial.
-Qed.
-
Lemma step_simulation:
forall S1 t S2, RTL.step ge S1 t S2 ->
forall S1', match_states S1 S1' ->
diff --git a/kvx/SelectOpproof.v b/kvx/SelectOpproof.v
index 0de9f51f..8c834de5 100644
--- a/kvx/SelectOpproof.v
+++ b/kvx/SelectOpproof.v
@@ -1533,12 +1533,6 @@ Proof.
apply Val.swap_cmplu_bool.
Qed.
-Lemma if_same : forall {T : Type} (b : bool) (x : T),
- (if b then x else x) = x.
-Proof.
- destruct b; trivial.
-Qed.
-
Theorem eval_select:
forall le ty cond al vl a1 v1 a2 v2 a b,
select ty cond al a1 a2 = Some a ->
diff --git a/lib/Coqlib.v b/lib/Coqlib.v
index 02c5d07f..16d880fa 100644
--- a/lib/Coqlib.v
+++ b/lib/Coqlib.v
@@ -1325,3 +1325,9 @@ Lemma nlist_forall2_imply:
Proof.
induction 1; simpl; intros; constructor; auto.
Qed.
+
+Lemma if_same : forall {T : Type} (b : bool) (x : T),
+ (if b then x else x) = x.
+Proof.
+ destruct b; trivial.
+Qed.