Debian Codegraph @

test-suite/bugs/bug_17487_1.v

raw
1 Section Definitions.
2
3 Variable A : Type.
4
5 Fixpoint vector (n:nat) {struct n} : Type :=
6 match n with
7 | 0 => A
8 | S n => (A * (vector n))%type
9 end.
10
11 End Definitions.
12
13 Module Test.
14
15 Parameter A : Type.
16
17 Definition vectorA : nat -> Type.
18 Proof.
19 apply (vector A).
20 Defined.
21
22 (** Check that head normalization of vectorA to an inductive with refolding
23 correctly keeps universe constraints. See also #5645. *)
24 Goal forall dim (v : vectorA (S dim)), True.
25 Proof.
26 intros dim.
27 intros [a v].
28 constructor.
29 Qed. (* The 2nd term has type "Type@{vector.u0}" which should be coercible to "Type@{prod.u1}". *)
30
31
32 End Test.