Debian Codegraph @

test-suite/bugs/bug_4231.v

raw
1 (* File reduced by coq-bug-finder from original input, then from 981 lines to 33 lines *)
2 (* coqc version 8.5beta2 (May 2015) compiled on May 5 2015 15:20:21 with OCaml 4.01.0
3 coqtop version 8.5beta2 (May 2015) *)
4
5 Axiom ap : forall {A B:Type} (f:A -> B) {x y:A} (p:x = y), f x = f y.
6
7 Definition Sect {A B : Type} (s : A -> B) (r : B -> A) :=
8 forall x : A, r (s x) = x.
9
10 Class IsEquiv {A B : Type} (f : A -> B) := BuildIsEquiv {
11 equiv_inv : B -> A ;
12 eisretr : Sect equiv_inv f;
13 eissect : Sect f equiv_inv;
14 eisadj : forall x : A, eisretr (f x) = ap f (eissect x)
15 }.
16
17 Definition Lift@{i j} (A : Type@{i}) : Type@{j}
18 := Eval hnf in let enforce_lt := Type@{i} : Type@{j} in A.
19
20 Definition lower {A} : Lift A -> A := fun x => x.
21
22 Definition lift2 {A B} (f : forall x : A, B x) : forall x : Lift A, Lift (B (lower x))
23 := f.
24
25 Global Instance lift_isequiv {A B} (f : A -> B) {H : IsEquiv f} : @ IsEquiv _ _ (lift2 f).
26 (* Used to be: *)
27 (* Toplevel input, characters 95-102:
28 Error:
29 In environment
30 A : Type
31 B : Type
32 f : A -> B
33 H : IsEquiv f
34 The term "lift2 f" has type "Lift A -> Lift B"
35 while it is expected to have type "Lift A -> ?T0" (cannot instantiate
36 "?T0" because "x" is not in its scope: available arguments are
37 "A" "B" "f" "H"). *)
38 Abort.