Categories #
Defines a category, as a type class parametrised by the type of objects.
Notations #
Introduces notations
X ⟶ Y
for the morphism spaces,f ≫ g
for composition in the 'arrows' convention.
Users may like to add f ⊚ g
for composition in the standard convention, using
local notation f ` ⊚ `:80 g:80 := category.comp g f -- type as \oo
A preliminary structure on the way to defining a category, containing the data, but none of the axioms.
- to_category_struct : category_theory.category_struct obj
- id_comp' : (∀ {X Y : obj} (f : X ⟶ Y), 𝟙 X ≫ f = f) . "obviously"
- comp_id' : (∀ {X Y : obj} (f : X ⟶ Y), f ≫ 𝟙 Y = f) . "obviously"
- assoc' : (∀ {W X Y Z : obj} (f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z), (f ≫ g) ≫ h = f ≫ g ≫ h) . "obviously"
The typeclass category C
describes morphisms associated to objects of type C
.
The universe levels of the objects and morphisms are unconstrained, and will often need to be
specified explicitly, as category.{v} C
. (See also large_category
and small_category
.)
See https://stacks.math.columbia.edu/tag/0014.
Instances
A large_category
has objects in one universe level higher than the universe level of
the morphisms. It is useful for examples such as the category of types, or the category
of groups, etc.
A small_category
has objects and morphisms in the same universe level.
postcompose an equation between morphisms by another morphism
precompose an equation between morphisms by another morphism
A morphism f
is an epimorphism if it can be "cancelled" when precomposed:
f ≫ g = f ≫ h
implies g = h
.
See https://stacks.math.columbia.edu/tag/003B.
Instances
A morphism f
is a monomorphism if it can be "cancelled" when postcomposed:
g ≫ f = h ≫ f
implies g = h
.
See https://stacks.math.columbia.edu/tag/003B.