Functors #
Defines a functor between categories, extending a Prefunctor
between quivers.
Introduces, in the CategoryTheory
scope, notations C ⥤ D
for the type of all functors
from C
to D
, 𝟭
for the identity functor and ⋙
for functor composition.
TODO: Switch to using the ⇒
arrow.
Functor C D
represents a functor between categories C
and D
.
To apply a functor F
to an object use F.obj X
, and to a morphism use F.map f
.
The axiom map_id
expresses preservation of identities, and
map_comp
expresses functoriality.
See https://stacks.math.columbia.edu/tag/001B.
- obj : C → D
- map_id : ∀ (X : C), self.map (CategoryTheory.CategoryStruct.id X) = CategoryTheory.CategoryStruct.id (self.obj X)
A functor preserves identity morphisms.
- map_comp : ∀ {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z), self.map (CategoryTheory.CategoryStruct.comp f g) = CategoryTheory.CategoryStruct.comp (self.map f) (self.map g)
A functor preserves composition.
Instances For
A functor preserves identity morphisms.
A functor preserves composition.
Notation for a functor between categories.
Equations
- CategoryTheory.«term_⥤_» = Lean.ParserDescr.trailingNode `CategoryTheory.term_⥤_ 26 27 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⥤ ") (Lean.ParserDescr.cat `term 26))
Instances For
𝟭 C
is the identity functor on a category C
.
Equations
- CategoryTheory.Functor.id C = { obj := fun (X : C) => X, map := fun {X Y : C} (f : X ⟶ Y) => f, map_id := ⋯, map_comp := ⋯ }
Instances For
Notation for the identity functor on a category.
Equations
- CategoryTheory.«term𝟭» = Lean.ParserDescr.node `CategoryTheory.term𝟭 1024 (Lean.ParserDescr.symbol "𝟭")
Instances For
Equations
- CategoryTheory.Functor.instInhabited C = { default := CategoryTheory.Functor.id C }
F ⋙ G
is the composition of a functor F
and a functor G
(F
first, then G
).
Equations
Instances For
Notation for composition of functors.
Equations
- CategoryTheory.«term_⋙_» = Lean.ParserDescr.trailingNode `CategoryTheory.term_⋙_ 80 81 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⋙ ") (Lean.ParserDescr.cat `term 80))