aboutsummaryrefslogtreecommitdiff
path: root/src/Util/Bool.v
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2016-11-05 14:20:49 -0400
committerGravatar Jason Gross <jgross@mit.edu>2016-11-05 14:20:49 -0400
commit44b17c0317ea5afcb554149310a0356cadcc09fc (patch)
tree311c6460aa4f11141c40629859b8b68325887b12 /src/Util/Bool.v
parentcc2cd1b8b2ab71ab9cc2de0e3a2eb73d00a904e3 (diff)
Add reflect_iff_gen to Bool.v
Diffstat (limited to 'src/Util/Bool.v')
-rw-r--r--src/Util/Bool.v6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Util/Bool.v b/src/Util/Bool.v
index 7b94c503e..a59cf53f0 100644
--- a/src/Util/Bool.v
+++ b/src/Util/Bool.v
@@ -51,3 +51,9 @@ Definition pull_bool_if_dep {A B} (f : forall b : bool, A b -> B b) (b : bool) (
Definition pull_bool_if {A B} (f : A -> B) (b : bool) (x : A) (y : A)
: (if b then f x else f y) = f (if b then x else y)
:= @pull_bool_if_dep (fun _ => A) (fun _ => B) (fun _ => f) b x y.
+
+Definition reflect_iff_gen {P b} : reflect P b -> forall b' : bool, (if b' then P else ~P) <-> b = b'.
+Proof.
+ intros H; apply reflect_iff in H; intro b'; destruct b, b';
+ intuition congruence.
+Qed.