aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorMatthieu Sozeau2019-03-15 10:01:16 -0300
committerMatthieu Sozeau2019-03-18 20:19:35 +0100
commit636857d2e77ee26b4b193f3bbefee253c07dfbff (patch)
treef8a5175250d2340aaac6389c7c37ded6c5c93209 /test-suite
parent9ac5483132b42e845a0708491843693b70893eef (diff)
[kernel] Fix compare_head_gen_leq_with to use [leq] on applications
This fixes an incompleteness of subtyping on cumulative inductives, where I@{i} A <= I@{j} A should imply i <= j, i = j or no relation depending on the variance of I's universe.
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/success/cumulativity.v9
1 files changed, 9 insertions, 0 deletions
diff --git a/test-suite/success/cumulativity.v b/test-suite/success/cumulativity.v
index 3d97f27b16..31fed98952 100644
--- a/test-suite/success/cumulativity.v
+++ b/test-suite/success/cumulativity.v
@@ -137,3 +137,12 @@ Module WithIndex.
Monomorphic Constraint i < j.
Definition bar : eq mkfoo@{i} mkfoo@{j} := eq_refl _.
End WithIndex.
+
+Module CumulApp.
+
+ (* i is covariant here, and we have one parameter *)
+ Inductive foo@{i} (A : nat) : Type@{i+1} := mkfoo (B : Type@{i}).
+
+ Definition bar@{i j|i<=j} := fun x : foo@{i} 0 => x : foo@{j} 0.
+
+End CumulApp.