diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-10-09 14:35:38 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-10-09 14:35:38 +0200 |
commit | 1cf17f44b8389754d99535df800186177b394f0c (patch) | |
tree | 44b14ab0175bc140431320daaf0f7a098412af41 /lib | |
parent | 0372472c17ceac36765c8921548672503115bb04 (diff) | |
download | compcert-kvx-1cf17f44b8389754d99535df800186177b394f0c.tar.gz compcert-kvx-1cf17f44b8389754d99535df800186177b394f0c.zip |
centralize if_same
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Coqlib.v | 6 |
1 files changed, 6 insertions, 0 deletions
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. |