aboutsummaryrefslogtreecommitdiff
path: root/test-suite/output
diff options
context:
space:
mode:
authorGaëtan Gilbert2019-06-13 15:39:43 +0200
committerGaëtan Gilbert2020-07-01 13:06:22 +0200
commit2ded4c25e532c5dfca0483c211653768ebed01a7 (patch)
treea04b2f787490c8971590e6bdf7dd1ec4220e0290 /test-suite/output
parentb017e302f69f20fc4fc3d4088a305194f6c387fa (diff)
UIP in SProp
Diffstat (limited to 'test-suite/output')
-rw-r--r--test-suite/output/PrintAssumptions.out2
-rw-r--r--test-suite/output/PrintAssumptions.v26
2 files changed, 28 insertions, 0 deletions
diff --git a/test-suite/output/PrintAssumptions.out b/test-suite/output/PrintAssumptions.out
index ca4858d7a7..ba316ceb64 100644
--- a/test-suite/output/PrintAssumptions.out
+++ b/test-suite/output/PrintAssumptions.out
@@ -7,6 +7,8 @@ bli : Type
Axioms:
bli : Type
Axioms:
+@seq relies on definitional UIP.
+Axioms:
extensionality
: forall (P Q : Type) (f g : P -> Q), (forall x : P, f x = g x) -> f = g
Axioms:
diff --git a/test-suite/output/PrintAssumptions.v b/test-suite/output/PrintAssumptions.v
index 4c980fddba..71e642519c 100644
--- a/test-suite/output/PrintAssumptions.v
+++ b/test-suite/output/PrintAssumptions.v
@@ -45,6 +45,32 @@ Module Poly.
End Poly.
+Module UIP.
+ Set Definitional UIP.
+
+ Inductive seq {A} (a:A) : A -> SProp :=
+ srefl : seq a a.
+ Arguments srefl {_ _}.
+
+ Definition eq_to_seq {A x y} (e:x = y :> A) : seq x y
+ := match e with eq_refl => srefl end.
+ Definition seq_to_eq {A x y} (e:seq x y) : x = y :> A
+ := match e with srefl => eq_refl end.
+
+ Definition norm {A x y} (e:x = y :> A) : x = y
+ := seq_to_eq (eq_to_seq e).
+
+ Definition norm_id {A x y} (e:x = y :> A) : norm e = e
+ := match e with eq_refl => eq_refl end.
+
+ Theorem UIP {A x y} (e e':x = y :> A) : e = e'.
+ Proof.
+ rewrite <-(norm_id e), <-(norm_id e').
+ reflexivity.
+ Defined.
+
+ Print Assumptions UIP.
+End UIP.
(* The original test-case of the bug-report *)