-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGrothendieckFunctorial.v
123 lines (107 loc) · 4.42 KB
/
GrothendieckFunctorial.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
Require Import JMeq.
Require Export Grothendieck FunctorCategory SetCategory.
Require Import Common Notations SmallCat SpecializedCommaCategory NatCategory FEqualDep.
Set Implicit Arguments.
Generalizable All Variables.
Set Asymmetric Patterns.
Set Universe Polymorphism.
Section GrothendieckNondependentFunctorial.
Local Open Scope category_scope.
Local Notation "Cat / C" := (SliceSpecializedCategoryOver Cat C).
Context `(C : @LocallySmallSpecializedCategory objC).
Let Cat := LocallySmallCat.
Section functorial.
Section object_of.
Definition CategoryOfElementsFunctorial_ObjectOf
(x : TypeCat ^ C)
: Cat / C.
hnf.
match goal with
| [ |- CommaSpecializedCategory_Object ?F ?G ] => refine (_ : CommaSpecializedCategory_ObjectT F G)
end.
hnf; simpl.
exists (((CategoryOfElements x
: LocallySmallSpecializedCategory _)
: LocallySmallCategory),
tt).
exact (GrothendieckFunctor _).
Defined.
End object_of.
Section morphism_of.
Variables F G : SpecializedFunctor C TypeCat.
Variable T : SpecializedNaturalTransformation F G.
Definition CategoryOfElementsFunctorial'_MorphismOf_ObjectOf
: CategoryOfElements F -> CategoryOfElements G
:= fun x => Build_GrothendieckPair _
_
(T (GrothendieckC x) (GrothendieckX x)).
Definition CategoryOfElementsFunctorial'_MorphismOf_MorphismOf
s d (m : Morphism (CategoryOfElements F) s d)
: Morphism (CategoryOfElements G)
(CategoryOfElementsFunctorial'_MorphismOf_ObjectOf s)
(CategoryOfElementsFunctorial'_MorphismOf_ObjectOf d).
exists (proj1_sig m).
abstract (
destruct m;
let H := fresh in
pose proof (Commutes T) as H;
simpl in *;
fg_equal;
repeat rewrite_rev_hyp;
reflexivity
).
Defined.
Definition CategoryOfElementsFunctorial'_MorphismOf
: Functor (CategoryOfElements F) (CategoryOfElements G).
refine (Build_SpecializedFunctor (CategoryOfElements F) (CategoryOfElements G)
CategoryOfElementsFunctorial'_MorphismOf_ObjectOf
CategoryOfElementsFunctorial'_MorphismOf_MorphismOf
_
_);
abstract (simpl; simpl_eq; reflexivity).
Defined.
Definition CategoryOfElementsFunctorial_MorphismOf
: Morphism (Cat / C)
(CategoryOfElementsFunctorial_ObjectOf F)
(CategoryOfElementsFunctorial_ObjectOf G).
hnf.
match goal with
| [ |- CommaSpecializedCategory_Morphism ?F ?G ]
=> refine (_ : CommaSpecializedCategory_MorphismT F G)
end.
hnf; simpl.
exists (CategoryOfElementsFunctorial'_MorphismOf, eq_refl).
abstract (simpl; functor_eq).
Defined.
End morphism_of.
Local Ltac t :=
repeat match goal with
| _ => intro
| _ => reflexivity
| _ => progress simpl_eq
| _ => progress destruct_head_hnf @GrothendieckPair
| _ => progress apply f_equal
| _ => progress apply Functor_eq
| _ => progress JMeq_eq
| _ => progress expand
end.
Definition CategoryOfElementsFunctorial'
: SpecializedFunctor (TypeCat ^ C) Cat.
refine (Build_SpecializedFunctor (TypeCat ^ C) Cat
(fun x => CategoryOfElements x : LocallySmallSpecializedCategory _)
CategoryOfElementsFunctorial'_MorphismOf
_
_);
abstract t.
Defined.
Definition CategoryOfElementsFunctorial
: SpecializedFunctor (TypeCat ^ C) (Cat / C).
refine (Build_SpecializedFunctor (TypeCat ^ C) (Cat / C)
CategoryOfElementsFunctorial_ObjectOf
CategoryOfElementsFunctorial_MorphismOf
_
_);
abstract t.
Defined.
End functorial.
End GrothendieckNondependentFunctorial.