@@ -9,7 +9,7 @@ Defines a functor between categories.
9
9
by the underlying function on objects, the name is capitalised.)
10
10
11
11
Introduces notations
12
- `C ↝ D` for the type of all functors from `C` to `D`.
12
+ `C ⥤ D` for the type of all functors from `C` to `D`.
13
13
(I would like a better arrow here, unfortunately ⇒ (`\functor`) is taken by core.)
14
14
`F X` (a coercion) for a functor `F` acting on an object `X`.
15
15
-/
@@ -39,31 +39,31 @@ structure functor (C : Type u₁) [category.{u₁ v₁} C] (D : Type u₂) [cate
39
39
(map_id' : ∀ (X : C), map' (𝟙 X) = 𝟙 (obj X) . obviously)
40
40
(map_comp' : ∀ {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z), map' (f ≫ g) = (map' f) ≫ (map' g) . obviously)
41
41
42
- infixr ` ↝ `:70 := functor -- type as \lea --
42
+ infixr ` ⥤ `:70 := functor -- type as \func --
43
43
44
44
namespace functor
45
45
46
46
section
47
47
variables {C : Type u₁} [𝒞 : category.{u₁ v₁} C] {D : Type u₂} [𝒟 : category.{u₂ v₂} D]
48
48
include 𝒞 𝒟
49
49
50
- instance : has_coe_to_fun (C ↝ D) :=
50
+ instance : has_coe_to_fun (C ⥤ D) :=
51
51
{ F := λ F, C → D,
52
52
coe := λ F, F.obj }
53
53
54
- def map (F : C ↝ D) {X Y : C} (f : X ⟶ Y) : (F X) ⟶ (F Y) := F.map' f
54
+ def map (F : C ⥤ D) {X Y : C} (f : X ⟶ Y) : (F X) ⟶ (F Y) := F.map' f
55
55
56
- @[simp] lemma map_id (F : C ↝ D) (X : C) : F.map (𝟙 X) = 𝟙 (F X) :=
56
+ @[simp] lemma map_id (F : C ⥤ D) (X : C) : F.map (𝟙 X) = 𝟙 (F X) :=
57
57
begin unfold functor.map, erw F.map_id', refl end
58
- @[simp] lemma map_comp (F : C ↝ D) {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) :
58
+ @[simp] lemma map_comp (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) :
59
59
F.map (f ≫ g) = F.map f ≫ F.map g :=
60
60
begin unfold functor.map, erw F.map_comp' end
61
61
62
62
-- We define a refl lemma 'refolding' the coercion,
63
63
-- and two lemmas for the coercion applied to an explicit structure.
64
- @[simp] lemma obj_eq_coe {F : C ↝ D} (X : C) : F.obj X = F X := by unfold_coes
64
+ @[simp] lemma obj_eq_coe {F : C ⥤ D} (X : C) : F.obj X = F X := by unfold_coes
65
65
@[simp] lemma mk_obj (o : C → D) (m mi mc) (X : C) :
66
- ({ functor . obj := o, map' := m, map_id' := mi, map_comp' := mc } : C ↝ D) X = o X := rfl
66
+ ({ functor . obj := o, map' := m, map_id' := mi, map_comp' := mc } : C ⥤ D) X = o X := rfl
67
67
@[simp] lemma mk_map (o : C → D) (m mi mc) {X Y : C} (f : X ⟶ Y) :
68
68
functor.map { functor . obj := o, map' := m, map_id' := mi, map_comp' := mc } f = m f := rfl
69
69
end
@@ -73,7 +73,7 @@ variables (C : Type u₁) [𝒞 : category.{u₁ v₁} C]
73
73
include 𝒞
74
74
75
75
/-- `functor.id C` is the identity functor on a category `C`. -/
76
- protected def id : C ↝ C :=
76
+ protected def id : C ⥤ C :=
77
77
{ obj := λ X, X,
78
78
map' := λ _ _ f, f }
79
79
@@ -92,14 +92,14 @@ include 𝒞 𝒟 ℰ
92
92
/--
93
93
`F ⋙ G` is the composition of a functor `F` and a functor `G` (`F` first, then `G`).
94
94
-/
95
- def comp (F : C ↝ D) (G : D ↝ E) : C ↝ E :=
95
+ def comp (F : C ⥤ D) (G : D ⥤ E) : C ⥤ E :=
96
96
{ obj := λ X, G (F X),
97
97
map' := λ _ _ f, G.map (F.map f) }
98
98
99
99
infixr ` ⋙ `:80 := comp
100
100
101
- @[simp] lemma comp_obj (F : C ↝ D) (G : D ↝ E) (X : C) : (F ⋙ G) X = G (F X) := rfl
102
- @[simp] lemma comp_map (F : C ↝ D) (G : D ↝ E) (X Y : C) (f : X ⟶ Y) :
101
+ @[simp] lemma comp_obj (F : C ⥤ D) (G : D ⥤ E) (X : C) : (F ⋙ G) X = G (F X) := rfl
102
+ @[simp] lemma comp_map (F : C ⥤ D) (G : D ⥤ E) (X Y : C) (f : X ⟶ Y) :
103
103
(F ⋙ G).map f = G.map (F.map f) := rfl
104
104
end
105
105
0 commit comments