Debian Codegraph @

test-suite/bugs/bug_3686.v

raw
1 Require Import TestSuite.admit.
2 Set Universe Polymorphism.
3 Set Implicit Arguments.
4 Record PreCategory := { object :> Type ; morphism : object -> object -> Type }.
5 Bind Scope category_scope with PreCategory.
6 Record Functor (C D : PreCategory) :=
7 { object_of :> C -> D;
8 morphism_of : forall s d, morphism C s d -> morphism D (object_of s) (object_of d);
9 identity_of : forall s m, morphism_of s s m = morphism_of s s m }.
10 Definition sub_pre_cat (P : PreCategory -> Type) : PreCategory.
11 Proof.
12 exact (@Build_PreCategory PreCategory Functor).
13 Defined.
14 Definition opposite (C : PreCategory) : PreCategory.
15 Proof.
16 exact (@Build_PreCategory C (fun s d => morphism C d s)).
17 Defined.
18 Local Notation "C ^op" := (opposite C) (at level 3, format "C '^op'") : category_scope.
19 Definition prod (C D : PreCategory) : PreCategory.
20 Proof.
21 refine (@Build_PreCategory
22 (C * D)%type
23 (fun s d => (morphism C (fst s) (fst d) * morphism D (snd s) (snd d))%type)).
24 Defined.
25 Local Infix "*" := prod : category_scope.
26 Axiom functor_category : PreCategory -> PreCategory -> PreCategory.
27 Local Notation "C -> D" := (functor_category C D) : category_scope.
28 Module Export PointwiseCore.
29 Definition pointwise
30 (C C' : PreCategory)
31 (F : Functor C' C)
32 (D D' : PreCategory)
33 (G : Functor D D')
34 : Functor (C -> D) (C' -> D').
35 Proof.
36 unshelve (refine (Build_Functor
37 (C -> D) (C' -> D')
38 _
39 _
40 _));
41 abstract admit.
42 Defined.
43 End PointwiseCore.
44 Axiom Pidentity_of : forall (C D : PreCategory) (F : Functor C C) (G : Functor D D), pointwise F G = pointwise F G.
45 Local Open Scope category_scope.
46 Definition functor_uncurried (P : PreCategory -> Type)
47 (has_functor_categories : forall C D : @sub_pre_cat P, P (C -> D))
48 : object (((@sub_pre_cat P)^op * (@sub_pre_cat P)) -> (@sub_pre_cat P)).
49 Proof.
50 pose (let object_of := (fun CD => (((fst CD) -> (snd CD))))
51 in Build_Functor
52 ((@sub_pre_cat P)^op * (@sub_pre_cat P)) (@sub_pre_cat P)
53 object_of
54 (fun CD C'D' FG => pointwise (fst FG) (snd FG))
55 (fun _ _ => Pidentity_of _ _)) || fail "early".
56 Include PointwiseCore.
57 pose (let object_of := (fun CD => (((fst CD) -> (snd CD))))
58 in Build_Functor
59 ((@sub_pre_cat P)^op * (@sub_pre_cat P)) (@sub_pre_cat P)
60 object_of
61 (fun CD C'D' FG => pointwise (fst FG) (snd FG))
62 (fun _ _ => Pidentity_of _ _)).
63 Abort.