Debian Codegraph @

test-suite/bugs/bug_6775.v

raw
1 (* Issue caused and fixed during the lifetime of #6775: unification
2 failing on partially applied cumulative inductives. *)
3
4 Set Universe Polymorphism.
5
6 Set Polymorphic Inductive Cumulativity.
7
8 Unset Elimination Schemes.
9
10 Inductive paths@{i} {A : Type@{i}} (a : A) : A -> Type@{i} :=
11 idpath : paths a a.
12
13 Arguments idpath {A a} , [A] a.
14
15 Notation "x = y :> A" := (@paths A x y) : type_scope.
16 Notation "x = y" := (x = y :>_) : type_scope.
17
18 Definition inverse {A : Type} {x y : A} (p : x = y) : y = x
19 := match p with idpath => idpath end.
20
21 Arguments inverse {A x y} p : simpl nomatch.
22
23 Definition concat {A : Type} {x y z : A} (p : x = y) (q : y = z) : x = z :=
24 match p, q with idpath, idpath => idpath end.
25
26 Arguments concat {A x y z} p q : simpl nomatch.
27
28 Notation "1" := idpath.
29
30 Reserved Notation "p @ q" (at level 20).
31 Notation "p @ q" := (concat p q).
32
33 Reserved Notation "p ^" (at level 3, format "p '^'").
34 Notation "p ^" := (inverse p).
35
36 Definition concat_pV_p {A} {x y z : A} (p : x = z) (q : y = z) :
37 (p @ q^) @ q = p
38 :=
39 (match q as i return forall p, (p @ i^) @ i = p with
40 idpath =>
41 fun p =>
42 match p with idpath => 1 end
43 end) p.