Debian Codegraph @

test-suite/bugs/HoTT_coq_056.v

raw
1 Require Import TestSuite.admit.
2 (* File reduced by coq-bug-finder from 10455 lines to 8350 lines, then from 7790 lines to 710 lines, then from 7790 lines to 710 lines, then from 566 lines to 340 lines, then from 191 lines to 171 lines, then from 191 lines to 171 lines. *)
3
4 Set Implicit Arguments.
5 Set Universe Polymorphism.
6 Definition admit {T} : T.
7 Admitted.
8 Reserved Notation "x ≅ y" (at level 70, no associativity).
9 Reserved Notation "i ^op" (at level 3).
10 Reserved Infix "∘" (at level 40, left associativity).
11 Reserved Notation "F ⟨ x ⟩" (at level 10, no associativity, x at level 10).
12 Reserved Notation "F ⟨ x , y ⟩" (at level 10, no associativity, x at level 10, y at level 10).
13 Reserved Notation "F ⟨ ─ ⟩" (at level 10, no associativity).
14 Reserved Notation "F ⟨ x , ─ ⟩" (at level 10, no associativity, x at level 10).
15 Reserved Notation "F ⟨ ─ , y ⟩" (at level 10, no associativity, y at level 10).
16 Delimit Scope object_scope with object.
17 Delimit Scope morphism_scope with morphism.
18 Delimit Scope category_scope with category.
19 Delimit Scope functor_scope with functor.
20 Inductive paths {A : Type} (a : A) : A -> Type :=
21 idpath : paths a a.
22 Arguments idpath {A a} , [A] a.
23 Notation "x = y :> A" := (@paths A x y) : type_scope.
24 Notation "x = y" := (x = y :>_) : type_scope.
25 Delimit Scope path_scope with path.
26 Local Open Scope path_scope.
27
28 Record PreCategory :=
29 Build_PreCategory' {
30 Object :> Type;
31 Morphism : Object -> Object -> Type
32 }.
33
34 Bind Scope category_scope with PreCategory.
35
36 Definition Build_PreCategory
37 Object Morphism
38 := @Build_PreCategory' Object
39 Morphism.
40
41 Record Functor (C D : PreCategory) :=
42 {
43 ObjectOf :> C -> D;
44 MorphismOf : forall s d, C.(Morphism) s d -> D.(Morphism) (ObjectOf s) (ObjectOf d)
45 }.
46 Arguments MorphismOf [C%_category] [D%_category] F%_functor [s%_object d%_object] m%_morphism : rename, simpl nomatch.
47 Class Isomorphic {C : PreCategory} (s d : C) := {}.
48 Definition ComposeFunctors C D E (G : Functor D E) (F : Functor C D) : Functor C E
49 := Build_Functor C E
50 (fun c => G (F c))
51 (fun _ _ m => G.(MorphismOf) (F.(MorphismOf) m)).
52
53 Infix "∘" := ComposeFunctors : functor_scope.
54
55 Definition IdentityFunctor C : Functor C C
56 := Build_Functor C C
57 (fun x => x)
58 (fun _ _ x => x).
59
60 Notation "─" := (IdentityFunctor _) : functor_scope.
61 Record NaturalTransformation C D (F G : Functor C D) :=
62 Build_NaturalTransformation' { }.
63
64 Definition OppositeCategory (C : PreCategory) : PreCategory
65 := @Build_PreCategory' C
66 (fun s d => Morphism C d s).
67
68 Notation "C ^op" := (OppositeCategory C) : category_scope.
69
70 Definition ProductCategory (C D : PreCategory) : PreCategory
71 := @Build_PreCategory (C * D)%type
72 (fun s d => (C.(Morphism) (fst s) (fst d) * D.(Morphism) (snd s) (snd d))%type).
73
74 Infix "*" := ProductCategory : category_scope.
75
76 Definition OppositeFunctor C D (F : Functor C D) : Functor (C ^op) (D ^op)
77 := Build_Functor (C ^op) (D ^op)
78 (ObjectOf F)
79 (fun s d => MorphismOf F (s := d) (d := s)).
80 Notation "F ^op" := (OppositeFunctor F) : functor_scope.
81
82 Definition FunctorProduct' C D C' D' (F : Functor C D) (F' : Functor C' D') : Functor (C * C') (D * D')
83 := admit.
84
85 Class FunctorApplicationInterpretable
86 {C D} (F : Functor C D)
87 {argsT : Type} (args : argsT)
88 {T : Type} (rtn : T)
89 := {}.
90 Definition FunctorApplicationOf {C D} F {argsT} args {T} {rtn}
91 `{@FunctorApplicationInterpretable C D F argsT args T rtn}
92 := rtn.
93
94 Global Arguments FunctorApplicationOf / {C} {D} F {argsT} args {T} {rtn} {_}.
95
96 Global Instance FunctorApplicationDash C D (F : Functor C D)
97 : FunctorApplicationInterpretable F (IdentityFunctor C) F | 0 := {}.
98 Global Instance FunctorApplicationFunctorFunctor' A B C C' D (F : Functor (A * B) D) (G : Functor C A) (H : Functor C' B)
99 : FunctorApplicationInterpretable F (G, H) (F ∘ (FunctorProduct' G H))%functor | 100 := {}.
100
101 Notation "F ⟨ x ⟩" := (FunctorApplicationOf F%functor x%functor) : functor_scope.
102
103 Notation "F ⟨ x , y ⟩" := (FunctorApplicationOf F%functor (x%functor , y%functor)) : functor_scope.
104
105 Notation "F ⟨ ─ ⟩" := (F ⟨ ( ─ ) ⟩)%functor : functor_scope.
106
107 Notation "F ⟨ x , ─ ⟩" := (F ⟨ x , ( ─ ) ⟩)%functor : functor_scope.
108
109 Notation "F ⟨ ─ , y ⟩" := (F ⟨ ( ─ ) , y ⟩)%functor : functor_scope.
110
111 Definition FunctorCategory (C D : PreCategory) : PreCategory
112 := @Build_PreCategory (Functor C D)
113 (NaturalTransformation (C := C) (D := D)).
114
115 Notation "[ C , D ]" := (FunctorCategory C D) : category_scope.
116
117 Definition SetCat : PreCategory := @Build_PreCategory Type (fun x y => x -> y).
118
119 Definition HomFunctor C : Functor (C^op * C) SetCat.
120 admit.
121 Defined.
122 Definition NaturalIsomorphism (C D : PreCategory) F G := @Isomorphic [C, D] F G.
123 Infix "≅" := NaturalIsomorphism : natural_transformation_scope.
124
125 Local Open Scope functor_scope.
126 Local Open Scope natural_transformation_scope.
127
128 Section Adjunction.
129 Variable C : PreCategory.
130 Variable D : PreCategory.
131
132 Variable F : Functor C D.
133 Variable G : Functor D C.
134 Let Adjunction_Type := Eval simpl in HomFunctor D ⟨ F^op ⟨ ─ ⟩ , ─ ⟩ ≅ HomFunctor C ⟨ ─ , G ⟨ ─ ⟩ ⟩.
135 Record Adjunction := { AMateOf : Adjunction_Type }.
136 End Adjunction.
137
138 Section AdjunctionEquivalences.
139 Variable C : PreCategory.
140 Variable D : PreCategory.
141
142 Variable F : Functor C D.
143 Variable G : Functor D C.
144 Variable A : Adjunction F G.
145 Set Printing All.
146 Definition foo := @AMateOf C D F G A.
147 (* File "./HoTT_coq_56.v", line 145, characters 37-38:
148 Error:
149 In environment
150 C : PreCategory
151 D : PreCategory
152 F : Functor C D
153 G : Functor D C
154 A : @Adjunction C D F G
155 The term "A" has type "@Adjunction C D F G" while it is expected to have type
156 "@Adjunction C D F G". *)
157 End AdjunctionEquivalences.