@@ -25,25 +25,25 @@ variable {I : Type w₁} {C : I → Type u₁} [∀ i, Category.{v₁} (C i)]
25
25
/-- The type of morphisms of a disjoint union of categories: for `X : C i` and `Y : C j`, a morphism
26
26
`(i, X) ⟶ (j, Y)` if `i = j` is just a morphism `X ⟶ Y`, and if `i ≠ j` there are no such morphisms.
27
27
-/
28
- inductive SigmaHom : (Σi , C i) → (Σi , C i) → Type max w₁ v₁ u₁
28
+ inductive SigmaHom : (Σ i , C i) → (Σ i , C i) → Type max w₁ v₁ u₁
29
29
| mk : ∀ {i : I} {X Y : C i}, (X ⟶ Y) → SigmaHom ⟨i, X⟩ ⟨i, Y⟩
30
30
31
31
namespace SigmaHom
32
32
33
33
/-- The identity morphism on an object. -/
34
- def id : ∀ X : Σi , C i, SigmaHom X X
34
+ def id : ∀ X : Σ i , C i, SigmaHom X X
35
35
| ⟨_, _⟩ => mk (𝟙 _)
36
36
-- Porting note: reordered universes
37
37
38
- instance (X : Σi , C i) : Inhabited (SigmaHom X X) :=
38
+ instance (X : Σ i , C i) : Inhabited (SigmaHom X X) :=
39
39
⟨id X⟩
40
40
41
41
/-- Composition of sigma homomorphisms. -/
42
- def comp : ∀ {X Y Z : Σi , C i}, SigmaHom X Y → SigmaHom Y Z → SigmaHom X Z
42
+ def comp : ∀ {X Y Z : Σ i , C i}, SigmaHom X Y → SigmaHom Y Z → SigmaHom X Z
43
43
| _, _, _, mk f, mk g => mk (f ≫ g)
44
44
-- Porting note: reordered universes
45
45
46
- instance : CategoryStruct (Σi , C i) where
46
+ instance : CategoryStruct (Σ i , C i) where
47
47
Hom := SigmaHom
48
48
id := id
49
49
comp f g := comp f g
@@ -52,36 +52,36 @@ instance : CategoryStruct (Σi, C i) where
52
52
lemma comp_def (i : I) (X Y Z : C i) (f : X ⟶ Y) (g : Y ⟶ Z) : comp (mk f) (mk g) = mk (f ≫ g) :=
53
53
rfl
54
54
55
- lemma assoc : ∀ {X Y Z W : Σi , C i} (f : X ⟶ Y) (g : Y ⟶ Z) (h : Z ⟶ W), (f ≫ g) ≫ h = f ≫ g ≫ h
55
+ lemma assoc : ∀ {X Y Z W : Σ i , C i} (f : X ⟶ Y) (g : Y ⟶ Z) (h : Z ⟶ W), (f ≫ g) ≫ h = f ≫ g ≫ h
56
56
| _, _, _, _, mk _, mk _, mk _ => congr_arg mk (Category.assoc _ _ _)
57
57
58
- lemma id_comp : ∀ {X Y : Σi , C i} (f : X ⟶ Y), 𝟙 X ≫ f = f
58
+ lemma id_comp : ∀ {X Y : Σ i , C i} (f : X ⟶ Y), 𝟙 X ≫ f = f
59
59
| _, _, mk _ => congr_arg mk (Category.id_comp _)
60
60
61
- lemma comp_id : ∀ {X Y : Σi , C i} (f : X ⟶ Y), f ≫ 𝟙 Y = f
61
+ lemma comp_id : ∀ {X Y : Σ i , C i} (f : X ⟶ Y), f ≫ 𝟙 Y = f
62
62
| _, _, mk _ => congr_arg mk (Category.comp_id _)
63
63
64
64
end SigmaHom
65
65
66
- instance sigma : Category (Σi , C i) where
66
+ instance sigma : Category (Σ i , C i) where
67
67
id_comp := SigmaHom.id_comp
68
68
comp_id := SigmaHom.comp_id
69
69
assoc := SigmaHom.assoc
70
70
71
71
/-- The inclusion functor into the disjoint union of categories. -/
72
72
@[simps map]
73
- def incl (i : I) : C i ⥤ Σi , C i where
73
+ def incl (i : I) : C i ⥤ Σ i , C i where
74
74
obj X := ⟨i, X⟩
75
75
map := SigmaHom.mk
76
76
77
77
@[simp]
78
78
lemma incl_obj {i : I} (X : C i) : (incl i).obj X = ⟨i, X⟩ :=
79
79
rfl
80
80
81
- instance (i : I) : Functor.Full (incl i : C i ⥤ Σi , C i) where
81
+ instance (i : I) : Functor.Full (incl i : C i ⥤ Σ i , C i) where
82
82
map_surjective := fun ⟨f⟩ => ⟨f, rfl⟩
83
83
84
- instance (i : I) : Functor.Faithful (incl i : C i ⥤ Σi , C i) where
84
+ instance (i : I) : Functor.Faithful (incl i : C i ⥤ Σ i , C i) where
85
85
map_injective {_ _ _ _} h := by injection h
86
86
87
87
section
@@ -92,19 +92,19 @@ variable {D : Type u₂} [Category.{v₂} D] (F : ∀ i, C i ⥤ D)
92
92
To build a natural transformation over the sigma category, it suffices to specify it restricted to
93
93
each subcategory.
94
94
-/
95
- def natTrans {F G : (Σi , C i) ⥤ D} (h : ∀ i : I, incl i ⋙ F ⟶ incl i ⋙ G) : F ⟶ G where
95
+ def natTrans {F G : (Σ i , C i) ⥤ D} (h : ∀ i : I, incl i ⋙ F ⟶ incl i ⋙ G) : F ⟶ G where
96
96
app := fun ⟨j, X⟩ => (h j).app X
97
97
naturality := by
98
98
rintro ⟨j, X⟩ ⟨_, _⟩ ⟨f⟩
99
99
apply (h j).naturality
100
100
101
101
@[simp]
102
- lemma natTrans_app {F G : (Σi , C i) ⥤ D} (h : ∀ i : I, incl i ⋙ F ⟶ incl i ⋙ G) (i : I)
102
+ lemma natTrans_app {F G : (Σ i , C i) ⥤ D} (h : ∀ i : I, incl i ⋙ F ⟶ incl i ⋙ G) (i : I)
103
103
(X : C i) : (natTrans h).app ⟨i, X⟩ = (h i).app X :=
104
104
rfl
105
105
106
106
/-- (Implementation). An auxiliary definition to build the functor `desc`. -/
107
- def descMap : ∀ X Y : Σi , C i, (X ⟶ Y) → ((F X.1 ).obj X.2 ⟶ (F Y.1 ).obj Y.2 )
107
+ def descMap : ∀ X Y : Σ i , C i, (X ⟶ Y) → ((F X.1 ).obj X.2 ⟶ (F Y.1 ).obj Y.2 )
108
108
| _, _, SigmaHom.mk g => (F _).map g
109
109
-- Porting note: reordered universes
110
110
@@ -117,7 +117,7 @@ this property.
117
117
This witnesses that the sigma-type is the coproduct in Cat.
118
118
-/
119
119
@[simps obj]
120
- def desc : (Σi , C i) ⥤ D where
120
+ def desc : (Σ i , C i) ⥤ D where
121
121
obj X := (F X.1 ).obj X.2
122
122
map g := descMap F _ _ g
123
123
map_id := by
@@ -149,26 +149,26 @@ lemma inclDesc_inv_app (i : I) (X : C i) : (inclDesc F i).inv.app X = 𝟙 ((F i
149
149
/-- If `q` when restricted to each subcategory `C i` agrees with `F i`, then `q` is isomorphic to
150
150
`desc F`.
151
151
-/
152
- def descUniq (q : (Σi , C i) ⥤ D) (h : ∀ i, incl i ⋙ q ≅ F i) : q ≅ desc F :=
152
+ def descUniq (q : (Σ i , C i) ⥤ D) (h : ∀ i, incl i ⋙ q ≅ F i) : q ≅ desc F :=
153
153
NatIso.ofComponents (fun ⟨i, X⟩ => (h i).app X) <| by
154
154
rintro ⟨i, X⟩ ⟨_, _⟩ ⟨f⟩
155
155
apply (h i).hom.naturality f
156
156
157
157
@[simp]
158
- lemma descUniq_hom_app (q : (Σi , C i) ⥤ D) (h : ∀ i, incl i ⋙ q ≅ F i) (i : I) (X : C i) :
158
+ lemma descUniq_hom_app (q : (Σ i , C i) ⥤ D) (h : ∀ i, incl i ⋙ q ≅ F i) (i : I) (X : C i) :
159
159
(descUniq F q h).hom.app ⟨i, X⟩ = (h i).hom.app X :=
160
160
rfl
161
161
162
162
@[simp]
163
- lemma descUniq_inv_app (q : (Σi , C i) ⥤ D) (h : ∀ i, incl i ⋙ q ≅ F i) (i : I) (X : C i) :
163
+ lemma descUniq_inv_app (q : (Σ i , C i) ⥤ D) (h : ∀ i, incl i ⋙ q ≅ F i) (i : I) (X : C i) :
164
164
(descUniq F q h).inv.app ⟨i, X⟩ = (h i).inv.app X :=
165
165
rfl
166
166
167
167
/--
168
168
If `q₁` and `q₂` when restricted to each subcategory `C i` agree, then `q₁` and `q₂` are isomorphic.
169
169
-/
170
170
@[simps]
171
- def natIso {q₁ q₂ : (Σi , C i) ⥤ D} (h : ∀ i, incl i ⋙ q₁ ≅ incl i ⋙ q₂) : q₁ ≅ q₂ where
171
+ def natIso {q₁ q₂ : (Σ i , C i) ⥤ D} (h : ∀ i, incl i ⋙ q₁ ≅ incl i ⋙ q₂) : q₁ ≅ q₂ where
172
172
hom := natTrans fun i => (h i).hom
173
173
inv := natTrans fun i => (h i).inv
174
174
@@ -179,7 +179,7 @@ section
179
179
variable (C) {J : Type w₂} (g : J → I)
180
180
181
181
/-- A function `J → I` induces a functor `Σ j, C (g j) ⥤ Σ i, C i`. -/
182
- def map : (Σj : J, C (g j)) ⥤ Σi : I, C i :=
182
+ def map : (Σj : J, C (g j)) ⥤ Σ i : I, C i :=
183
183
desc fun j => incl (g j)
184
184
185
185
@[simp]
@@ -201,7 +201,7 @@ variable (I)
201
201
202
202
/-- The functor `Sigma.map` applied to the identity function is just the identity functor. -/
203
203
@[simps!]
204
- def mapId : map C (id : I → I) ≅ 𝟭 (Σi , C i) :=
204
+ def mapId : map C (id : I → I) ≅ 𝟭 (Σ i , C i) :=
205
205
natIso fun i => NatIso.ofComponents fun _ => Iso.refl _
206
206
207
207
variable {I} {K : Type w₃}
@@ -223,7 +223,7 @@ variable {D : I → Type u₁} [∀ i, Category.{v₁} (D i)]
223
223
224
224
/-- Assemble an `I`-indexed family of functors into a functor between the sigma types.
225
225
-/
226
- def sigma (F : ∀ i, C i ⥤ D i) : (Σi , C i) ⥤ Σi , D i :=
226
+ def sigma (F : ∀ i, C i ⥤ D i) : (Σ i , C i) ⥤ Σ i , D i :=
227
227
desc fun i => F i ⋙ incl i
228
228
229
229
end Functor
0 commit comments