| 1 |
(* Testing 8.5 regression with type classes not solving evars |
| 2 |
redefined while trying to solve them with the type class mechanism *) |
| 3 |
|
| 4 |
Global Set Universe Polymorphism. |
| 5 |
Monomorphic Universe i. |
| 6 |
Inductive paths {A : Type} (a : A) : A -> Type := |
| 7 |
idpath : paths a a. |
| 8 |
Arguments idpath {A a} , [A] a. |
| 9 |
Notation "x = y :> A" := (@paths A x y) : type_scope. |
| 10 |
Notation "x = y" := (x = y :>_) : type_scope. |
| 11 |
|
| 12 |
Inductive trunc_index : Type := |
| 13 |
| minus_two : trunc_index |
| 14 |
| trunc_S : trunc_index -> trunc_index. |
| 15 |
Notation "-1" := (trunc_S minus_two) (at level 0). |
| 16 |
|
| 17 |
Class IsPointed (A : Type) := point : A. |
| 18 |
Arguments point A {_}. |
| 19 |
|
| 20 |
Record pType := |
| 21 |
{ pointed_type : Type ; |
| 22 |
ispointed_type : IsPointed pointed_type }. |
| 23 |
Coercion pointed_type : pType >-> Sortclass. |
| 24 |
#[export] Existing Instance ispointed_type. |
| 25 |
|
| 26 |
Private Inductive Trunc (n : trunc_index) (A :Type) : Type := |
| 27 |
tr : A -> Trunc n A. |
| 28 |
Arguments tr {n A} a. |
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
Record ooGroup := |
| 33 |
{ classifying_space : pType@{i} }. |
| 34 |
|
| 35 |
Definition group_loops (X : pType) |
| 36 |
: ooGroup. |
| 37 |
Proof. |
| 38 |
(** This works: *) |
| 39 |
pose (x0 := point X). |
| 40 |
pose (H := existT (fun x:X => Trunc -1 (x = point X)) x0 (tr idpath)). |
| 41 |
clear H x0. |
| 42 |
(** But this doesn't: *) |
| 43 |
pose (existT (fun x:X => Trunc -1 (x = point X)) (point X) (tr idpath)). |
| 44 |
Abort. |