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.
- obj : C → D
- map_id : ∀ (X : C), s.map (CategoryTheory.CategoryStruct.id X) = CategoryTheory.CategoryStruct.id (s.obj X)
A functor preserves identity morphisms.
- map_comp : ∀ {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z), s.map (CategoryTheory.CategoryStruct.comp f g) = CategoryTheory.CategoryStruct.comp (s.map f) (s.map g)
A functor preserves composition.
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.
Instances For
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 = CategoryTheory.Functor.mk { obj := fun X => X, map := fun {X Y} f => f }
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.instInhabitedFunctor C = { default := CategoryTheory.Functor.id C }
F ⋙ G
is the composition of a functor F
and a functor G
(F
first, then G
).
Equations
- CategoryTheory.Functor.comp F G = CategoryTheory.Functor.mk { obj := fun X => G.obj (F.obj X), map := fun {X Y} f => G.map (F.map f) }
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))