aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorMaxime Dénès2017-08-16 09:34:15 +0200
committerMaxime Dénès2017-08-16 09:34:15 +0200
commitf0b4757d291ce3e07c8ccfcd4217d204fd2059ba (patch)
tree3a2a3db40ab962e91366fca5223b6f25c390a276 /test-suite
parent83e506e9a4b8140320e8f505b9ef6e4da05d710c (diff)
parent2f0e71c7e25eb193f252b6848dadff771dbc270d (diff)
Merge PR #864: Some cleanups after cumulativity for inductive types
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/coqchk/cumulativity.v2
-rw-r--r--test-suite/success/cumulativity.v39
2 files changed, 38 insertions, 3 deletions
diff --git a/test-suite/coqchk/cumulativity.v b/test-suite/coqchk/cumulativity.v
index a978f6b901..7906a5b15e 100644
--- a/test-suite/coqchk/cumulativity.v
+++ b/test-suite/coqchk/cumulativity.v
@@ -1,5 +1,5 @@
Set Universe Polymorphism.
-Set Inductive Cumulativity.
+Set Polymorphic Inductive Cumulativity.
Set Printing Universes.
Inductive List (A: Type) := nil | cons : A -> List A -> List A.
diff --git a/test-suite/success/cumulativity.v b/test-suite/success/cumulativity.v
index ebf817cfc5..0ee85712e2 100644
--- a/test-suite/success/cumulativity.v
+++ b/test-suite/success/cumulativity.v
@@ -1,5 +1,11 @@
+Polymorphic Cumulative Inductive T1 := t1 : T1.
+Fail Monomorphic Cumulative Inductive T2 := t2 : T2.
+
+Polymorphic Cumulative Record R1 := { r1 : T1 }.
+Fail Monomorphic Cumulative Inductive R2 := {r2 : T1}.
+
Set Universe Polymorphism.
-Set Inductive Cumulativity.
+Set Polymorphic Inductive Cumulativity.
Set Printing Universes.
Inductive List (A: Type) := nil | cons : A -> List A -> List A.
@@ -62,4 +68,33 @@ End subtyping_test.
Record A : Type := { a :> Type; }.
-Record B (X : A) : Type := { b : X; }. \ No newline at end of file
+Record B (X : A) : Type := { b : X; }.
+
+NonCumulative Inductive NCList (A: Type)
+ := ncnil | nccons : A -> NCList A -> NCList A.
+
+Section NCListLift.
+ Universe i j.
+
+ Constraint i < j.
+
+ Fail Definition LiftNCL {A} : NCList@{i} A -> NCList@{j} A := fun x => x.
+
+End NCListLift.
+
+Inductive eq@{i} {A : Type@{i}} (x : A) : A -> Type@{i} := eq_refl : eq x x.
+
+Definition funext_type@{a b e} (A : Type@{a}) (B : A -> Type@{b})
+ := forall f g : (forall a, B a),
+ (forall x, eq@{e} (f x) (g x))
+ -> eq@{e} f g.
+
+Section down.
+ Universes a b e e'.
+ Constraint e' < e.
+ Lemma funext_down {A B}
+ : @funext_type@{a b e} A B -> @funext_type@{a b e'} A B.
+ Proof.
+ intros H f g Hfg. exact (H f g Hfg).
+ Defined.
+End down.