Debian Codegraph @

test-suite/bugs/HoTT_coq_068.v

raw
1 Generalizable All Variables.
2
3 Inductive paths {A : Type} (a : A) : A -> Type :=
4 idpath : paths a a.
5
6 Notation "x = y :> A" := (@paths A x y) : type_scope.
7 Notation "x = y" := (x = y :>_) : type_scope.
8
9 Module success.
10 Axiom bar : nat -> Type -> Type.
11
12 Definition foo (n : nat) (A : Type) : Type :=
13 match n with
14 | O => A
15 | S n' => forall x y : A, bar n' (x = y)
16 end.
17
18 Definition foo_succ n A : foo (S n) A.
19 Admitted.
20
21 Goal forall n (X Y : Type) (y : X) (x : X), bar n (x = y).
22 intros.
23 apply (foo_succ _ _).
24 Defined.
25 End success.
26
27 Module failure.
28 Fixpoint bar (n : nat) (A : Type) : Type :=
29 match n with
30 | O => A
31 | S n' => forall x y : A, bar n' (x = y)
32 end.
33
34 Definition foo_succ n A : bar (S n) A.
35 Admitted.
36
37 Goal forall n (X Y : Type) (y : X) (x : X), bar n (x = y).
38 intros.
39 apply foo_succ.
40 (* Toplevel input, characters 22-34:
41 Error: In environment
42 n : nat
43 X : Type
44 Y : Type
45 y : X
46 x : X
47 Unable to unify
48 "forall x0 y0 : ?16,
49 (fix bar (n : nat) (A : Type) {struct n} : Type :=
50 match n with
51 | 0 => A
52 | S n' => forall x y : A, bar n' (x = y)
53 end) ?15 (x0 = y0)" with
54 "(fix bar (n : nat) (A : Type) {struct n} : Type :=
55 match n with
56 | 0 => A
57 | S n' => forall x y : A, bar n' (x = y)
58 end) n (x = y)".
59 *)
60 Defined.
61 End failure.