| 1 |
(* File reduced by coq-bug-finder from original input, then from 6303 lines to 66 lines, then from 63 lines to 36 lines *) |
| 2 |
Inductive paths {A : Type} (a : A) : A -> Type := idpath : paths a a where "x = y :> A" := (@paths A x y) : type_scope. |
| 3 |
Arguments idpath {A a} , [A] a. |
| 4 |
Notation "x = y" := (x = y :>_) : type_scope. |
| 5 |
Class Contr_internal (A : Type) := BuildContr { center : A ; contr : (forall y : A, center = y) }. |
| 6 |
Inductive trunc_index : Type := |
| 7 |
| minus_two : trunc_index |
| 8 |
| trunc_S : trunc_index -> trunc_index. |
| 9 |
Fixpoint IsTrunc_internal (n : trunc_index) (A : Type) : Type := |
| 10 |
match n with |
| 11 |
| minus_two => Contr_internal A |
| 12 |
| trunc_S n' => forall (x y : A), IsTrunc_internal n' (x = y) |
| 13 |
end. |
| 14 |
Class IsTrunc (n : trunc_index) (A : Type) : Type := Trunc_is_trunc : IsTrunc_internal n A. |
| 15 |
#[export] Instance istrunc_paths (A : Type) n `{H : IsTrunc (trunc_S n) A} (x y : A) : IsTrunc n (x = y) := H x y. |
| 16 |
Notation Contr := (IsTrunc minus_two). |
| 17 |
Section groupoid_category. |
| 18 |
Variable X : Type. |
| 19 |
Context `{H : IsTrunc (trunc_S (trunc_S (trunc_S minus_two))) X}. |
| 20 |
Goal X -> True. |
| 21 |
intro d. |
| 22 |
pose (_ : Contr (idpath = idpath :> (@paths (@paths X d d) idpath idpath))) as H'. (* success *) |
| 23 |
clear H'. |
| 24 |
compute in H. |
| 25 |
change (forall (x y : X) (p q : x = y) (r s : p = q), Contr (r = s)) in H. |
| 26 |
assert (H' := H). |
| 27 |
set (foo:=_ : Contr (idpath = idpath :> (@paths (@paths X d d) idpath idpath))). (* success *) |
| 28 |
clear H' foo. |
| 29 |
Set Typeclasses Debug. |
| 30 |
pose (_ : Contr (idpath = idpath :> (@paths (@paths X d d) idpath idpath))). |
| 31 |
Abort. |
| 32 |
End groupoid_category. |