From 4978faed45d1a1d84f79d3ec0456dd55d831b684 Mon Sep 17 00:00:00 2001 From: Robbert Krebbers <mail@robbertkrebbers.nl> Date: Thu, 20 Jun 2019 21:13:24 +0200 Subject: [PATCH] =?UTF-8?q?Add=20`proj1=5Fex`=20and=20`proj2=5Fex`=20when?= =?UTF-8?q?=20=E2=88=83=20over=20`Prop`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- theories/base.v | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/theories/base.v b/theories/base.v index 33ab00c9..0e7d52cc 100644 --- a/theories/base.v +++ b/theories/base.v @@ -753,6 +753,10 @@ Section sig_map. End sig_map. Arguments sig_map _ _ _ _ _ _ !_ / : assert. +Definition proj1_ex {P : Prop} {Q : P → Prop} (p : ∃ x, Q x) : P := + let '(ex_intro _ x _) := p in x. +Definition proj2_ex {P : Prop} {Q : P → Prop} (p : ∃ x, Q x) : Q (proj1_ex p) := + let '(ex_intro _ x H) := p in H. (** * Operations on sets *) (** We define operational type classes for the traditional operations and -- GitLab