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.
š 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
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).