aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_CoqProject1
-rw-r--r--src/Util/Logic/ExistsEqAnd.v26
2 files changed, 27 insertions, 0 deletions
diff --git a/_CoqProject b/_CoqProject
index 54f1cd4f7..659c23407 100644
--- a/_CoqProject
+++ b/_CoqProject
@@ -6546,6 +6546,7 @@ src/Util/ListUtil/FoldBool.v
src/Util/ListUtil/Forall.v
src/Util/ListUtil/ForallIn.v
src/Util/ListUtil/SetoidList.v
+src/Util/Logic/ExistsEqAnd.v
src/Util/Logic/ImplAnd.v
src/Util/Logic/ProdForall.v
src/Util/MSetPositive/Equality.v
diff --git a/src/Util/Logic/ExistsEqAnd.v b/src/Util/Logic/ExistsEqAnd.v
new file mode 100644
index 000000000..27f08eb89
--- /dev/null
+++ b/src/Util/Logic/ExistsEqAnd.v
@@ -0,0 +1,26 @@
+Require Import Crypto.Util.FixCoqMistakes.
+Require Import Crypto.Util.Tactics.DestructHead.
+
+Local Ltac t :=
+ repeat first [ progress destruct_head'_ex
+ | progress destruct_head'_and
+ | progress intros
+ | progress subst
+ | assumption
+ | progress repeat esplit ].
+
+Lemma ex_and_eq_l_iff {A P x}
+ : (exists y : A, y = x /\ P y) <-> P x.
+Proof. t. Qed.
+
+Lemma ex_and_eq_r_iff {A P x}
+ : (exists y : A, x = y /\ P y) <-> P x.
+Proof. t. Qed.
+
+Lemma ex_eq_and_l_iff {A P x}
+ : (exists y : A, P y /\ y = x) <-> P x.
+Proof. t. Qed.
+
+Lemma ex_eq_and_r_iff {A P x}
+ : (exists y : A, P y /\ x = y) <-> P x.
+Proof. t. Qed.