aboutsummaryrefslogtreecommitdiff
path: root/src/Util/Bool/Reflect.v
diff options
context:
space:
mode:
Diffstat (limited to 'src/Util/Bool/Reflect.v')
-rw-r--r--src/Util/Bool/Reflect.v10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Util/Bool/Reflect.v b/src/Util/Bool/Reflect.v
new file mode 100644
index 000000000..0baefa0e4
--- /dev/null
+++ b/src/Util/Bool/Reflect.v
@@ -0,0 +1,10 @@
+(** * Some lemmas about [Bool.reflect] *)
+Require Import Coq.Bool.Bool.
+
+Lemma reflect_to_dec_iff {P b1 b2} : reflect P b1 -> (b1 = b2) <-> (if b2 then P else ~P).
+Proof.
+ intro H; destruct H, b2; split; intuition congruence.
+Qed.
+
+Lemma reflect_to_dec {P b1 b2} : reflect P b1 -> (b1 = b2) -> (if b2 then P else ~P).
+Proof. intro; apply reflect_to_dec_iff; assumption. Qed.