aboutsummaryrefslogtreecommitdiff
path: root/theories/Logic
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2019-03-15 14:19:51 +0100
committerPierre-Marie Pédrot2019-03-15 14:19:51 +0100
commited275fd5eb8b11003f8904010d853d2bd568db79 (patch)
treee27b7778175cb0d9d19bd8bde9c593b335a85125 /theories/Logic
parenta44c4a34202fa6834520fcd6842cc98eecf044ec (diff)
parent1ba29c062e30181bda9d931dffe48e457dfee9d6 (diff)
Merge PR #8817: SProp: the definitionally proof irrelevant universe
Ack-by: JasonGross Ack-by: SkySkimmer Reviewed-by: Zimmi48 Reviewed-by: ejgallego Ack-by: gares Ack-by: mattam82
Diffstat (limited to 'theories/Logic')
-rw-r--r--theories/Logic/StrictProp.v40
1 files changed, 40 insertions, 0 deletions
diff --git a/theories/Logic/StrictProp.v b/theories/Logic/StrictProp.v
new file mode 100644
index 0000000000..99ee54e42f
--- /dev/null
+++ b/theories/Logic/StrictProp.v
@@ -0,0 +1,40 @@
+(************************************************************************)
+(* * The Coq Proof Assistant / The Coq Development Team *)
+(* v * INRIA, CNRS and contributors - Copyright 1999-2018 *)
+(* <O___,, * (see CREDITS file for the list of authors) *)
+(* \VV/ **************************************************************)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(* * (see LICENSE file for the text of the license) *)
+(************************************************************************)
+
+(** Utilities for SProp users. *)
+
+Set Universe Polymorphism.
+Set Polymorphic Inductive Cumulativity.
+
+Record Box (A:SProp) : Prop := box { unbox : A }.
+Arguments box {_} _.
+Arguments unbox {_} _.
+
+Inductive Squash (A:Type) : SProp := squash : A -> Squash A.
+Arguments squash {_} _.
+
+Inductive sEmpty : SProp :=.
+
+Inductive sUnit : SProp := stt.
+Definition sUnit_rect (P:sUnit -> Type) (v:P stt) (u:sUnit) : P u := v.
+Definition sUnit_rec (P:sUnit -> Set) (v:P stt) (u:sUnit) : P u := v.
+Definition sUnit_ind (P:sUnit -> Prop) (v:P stt) (u:sUnit) : P u := v.
+
+Set Primitive Projections.
+Record Ssig {A:Type} (P:A->SProp) := Sexists { Spr1 : A; Spr2 : P Spr1 }.
+Arguments Sexists {_} _ _ _.
+Arguments Spr1 {_ _} _.
+Arguments Spr2 {_ _} _.
+
+Lemma Spr1_inj {A P} {a b : @Ssig A P} (e : Spr1 a = Spr1 b) : a = b.
+Proof.
+ destruct a,b;simpl in e.
+ destruct e. reflexivity.
+Defined.