From 36c6d93482bae6ad8cb9a48e633a47b2160e75fb Mon Sep 17 00:00:00 2001 From: Ralf Jung <jung@mpi-sws.org> Date: Tue, 18 Jun 2019 10:33:01 +0200 Subject: [PATCH] add unfolding lemma for bool_decide: bool_decide_decide --- theories/decidable.v | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/theories/decidable.v b/theories/decidable.v index 799ab1ba..42b5b615 100644 --- a/theories/decidable.v +++ b/theories/decidable.v @@ -91,6 +91,10 @@ Definition bool_decide (P : Prop) {dec : Decision P} : bool := Lemma bool_decide_reflect P `{dec : Decision P} : reflect P (bool_decide P). Proof. unfold bool_decide. destruct dec; [left|right]; assumption. Qed. +Lemma bool_decide_decide P `{!Decision P} : + bool_decide P = if decide P then true else false. +Proof. reflexivity. Qed. + Tactic Notation "case_bool_decide" "as" ident (Hd) := match goal with | H : context [@bool_decide ?P ?dec] |- _ => -- GitLab