From 036a8660f11178a2523982d109ba11b99c062a3d Mon Sep 17 00:00:00 2001 From: Gaƫtan Gilbert Date: Fri, 6 Apr 2018 16:30:06 +0200 Subject: Fix #5539: algebraic universe produced by cases. --- test-suite/bugs/closed/5539.v | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test-suite/bugs/closed/5539.v (limited to 'test-suite/bugs') diff --git a/test-suite/bugs/closed/5539.v b/test-suite/bugs/closed/5539.v new file mode 100644 index 000000000..48e5568e9 --- /dev/null +++ b/test-suite/bugs/closed/5539.v @@ -0,0 +1,15 @@ +Set Universe Polymorphism. + +Inductive D : nat -> Type := +| DO : D O +| DS n : D n -> D (S n). + +Fixpoint follow (n : nat) : D n -> Prop := + match n with + | O => fun d => let 'DO := d in True + | S n' => fun d => (let 'DS _ d' := d in fun f => f d') (follow n') + end. + +Definition step (n : nat) (d : D n) (H : follow n d) : + follow (S n) (DS n d) + := H. -- cgit v1.2.3