Debian Codegraph @

test-suite/bugs/HoTT_coq_117.v

raw
1 (* File reduced by coq-bug-finder from original input, then from 1461 lines to 81 lines, then from 84 lines to 40 lines, then from 50 lines to 24 lines *)
2
3 Inductive paths {A : Type} (a : A) : A -> Type :=
4 idpath : paths a a.
5 Notation "x = y :> A" := (@paths A x y) : type_scope.
6 Notation "x = y" := (x = y :>_) : type_scope.
7 Class Contr_internal (A : Type) := BuildContr {
8 center : A ;
9 contr : (forall y : A, center = y)
10 }.
11 Class Funext := {}.
12
13 Definition path_forall `{Funext} {A : Type} {P : A -> Type} (f g : forall x : A, P x) :
14 (forall x, f x = g x) -> f = g.
15
16 Admitted.
17
18 Inductive Empty : Set := .
19 Fail #[export] Instance contr_from_Empty {_ : Funext} (A : Type) :
20 Contr_internal (Empty -> A) :=
21 BuildContr _
22 (Empty_rect (fun _ => A))
23 (fun f => path_forall _ f (fun x => Empty_rect _ x)).
24
25 Fail #[export] Instance contr_from_Empty {F : Funext} (A : Type) :
26 Contr_internal (Empty -> A) :=
27 BuildContr _
28 (Empty_rect (fun _ => A))
29 (fun f => path_forall _ f (fun x => Empty_rect _ x)).
30
31 (** This could be disallowed, this uses the Funext argument *)
32 #[export] Instance contr_from_Empty {_ : Funext} (A : Type) :
33 Contr_internal (Empty -> A) :=
34 BuildContr _
35 (Empty_rect (fun _ => A))
36 (fun f => path_forall _ f (fun x => Empty_rect (fun _ => _ x = f x) x)).
37
38 #[export] Instance contr_from_Empty' {_ : Funext} (A : Type) :
39 Contr_internal (Empty -> A) :=
40 BuildContr _
41 (Empty_rect (fun _ => A))
42 (fun f => path_forall _ f (fun x => Empty_rect (fun _ => _ x = f x) x)).
43 (* Toplevel input, characters 15-220:
44 Anomaly: unknown meta ?190. Please report. *)