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
- hom : obj → obj → Type ?
A 'notation typeclass' on the way to defining a category.
- to_has_hom : category_theory.has_hom obj
- id : Π (X : obj), X ⟶ X
- comp : Π {X Y Z : obj}, (X ⟶ Y) → (Y ⟶ Z) → (X ⟶ Z)
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
.)
Instances
- category_theory.groupoid.to_category
- category_theory.ulift_category
- category_theory.functor.category
- category_theory.category.opposite
- category_theory.induced_category.category
- category_theory.full_subcategory
- category_theory.bundled_hom.category
- category_theory.prod
- category_theory.uniform_prod
- category_theory.prod_category_instance_1
- category_theory.prod_category_instance_2
- category_theory.limits.cone.category
- category_theory.limits.cocone.category
- category_theory.comma_category
- category_theory.arrow.category
- Module.category_theory.category
- Algebra.category_theory.category
- category_theory.over.category
- category_theory.under.category
- category_theory.pi
- category_theory.pi'
- category_theory.pi.sum_elim_category
- category_theory.graded_object.category_of_graded_objects
- category_theory.differential_object.category_of_differential_objects
- Top.presheaf.category
- algebraic_geometry.PresheafedSpace.category_of_PresheafedSpaces
- topological_space.open_nhds.open_nhds_category
- category_theory.category_of_elements
- category_theory.Cat.str
- category_theory.single_obj.category
- category_theory.action_category.category
- category_theory.Kleisli.category
- category_theory.monad.algebra.EilenbergMoore
- category_theory.comonad.coalgebra.EilenbergMoore
- category_theory.Monad.category_theory.category
- category_theory.Comonad.category_theory.category
- Mon_.category_theory.category
- Mod.category_theory.category
- category_theory.quotient.category
- category_theory.sum
- TopCommRing.category_theory.category
- Top.category_theory.category
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.
Instances
- category_theory.types
- Mon.large_category
- AddMon.large_category
- CommMon.large_category
- AddCommMon.large_category
- Group.large_category
- AddGroup.large_category
- CommGroup.large_category
- AddCommGroup.large_category
- SemiRing.large_category
- Ring.large_category
- CommSemiRing.large_category
- CommRing.large_category
- Top.large_category
- category_theory.Cat.category
- category_theory.Groupoid.category
- category_theory.rel
- Meas.large_category
- Preorder.large_category
- PartialOrder.large_category
- LinearOrder.large_category
- NonemptyFinLinOrd.large_category
- UniformSpace.large_category
- CpltSepUniformSpace.category
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
.
Instances
- category_theory.is_iso.epi_of_iso
- category_theory.split_epi.epi
- category_theory.epi_of_strong_epi
- category_theory.regular_epi.epi
- category_theory.category_theory.epi
- category_theory.unop_epi_of_mono
- category_theory.op_epi_of_mono
- category_theory.limits.coprod.epi_desc_of_epi_left
- category_theory.limits.coprod.epi_desc_of_epi_right
- category_theory.limits.coequalizer.π_epi
- category_theory.limits.category_theory.epi
- category_theory.limits.has_zero_object.category_theory.epi
- category_theory.limits.cokernel.desc_epi
- category_theory.preadditive.category_theory.epi
- category_theory.limits.pushout.inl_of_epi
- category_theory.limits.pushout.inr_of_epi
- category_theory.non_preadditive_abelian.category_theory.epi
- category_theory.non_preadditive_abelian.epi_factor_thru_coimage
- category_theory.non_preadditive_abelian.epi_r
- category_theory.abelian.images.category_theory.epi
- category_theory.abelian.coimages.epi_factor_thru_coimage
- category_theory.abelian.epi_pullback_of_epi_f
- category_theory.abelian.epi_pullback_of_epi_g
- category_theory.exact.epi
A morphism f
is a monomorphism if it can be "cancelled" when postcomposed:
g ≫ f = h ≫ f
implies g = h
.
Instances
- category_theory.is_iso.mono_of_iso
- category_theory.split_mono.mono
- category_theory.regular_mono.mono
- category_theory.category_theory.mono
- category_theory.unop_mono_of_epi
- category_theory.op_mono_of_epi
- category_theory.limits.prod.mono_lift_of_mono_left
- category_theory.limits.prod.mono_lift_of_mono_right
- category_theory.limits.equalizer.ι_mono
- category_theory.limits.mono_factorisation.m_mono
- category_theory.limits.category_theory.mono
- category_theory.limits.lift_mono
- category_theory.limits.has_zero_object.category_theory.mono
- category_theory.limits.kernel.lift_mono
- category_theory.preadditive.category_theory.mono
- category_theory.limits.types.category_theory.mono
- category_theory.limits.pullback.fst_of_mono
- category_theory.limits.pullback.snd_of_mono
- category_theory.non_preadditive_abelian.mono_factor_thru_image
- category_theory.non_preadditive_abelian.category_theory.mono
- category_theory.non_preadditive_abelian.mono_Δ
- category_theory.non_preadditive_abelian.mono_r
- category_theory.abelian.images.mono_factor_thru_image
- category_theory.abelian.coimages.category_theory.mono
- category_theory.abelian.mono_pushout_of_mono_f
- category_theory.abelian.mono_pushout_of_mono_g
- AddCommGroup.category_theory.mono
- category_theory.initial_mono
Equations
- _ = _
Equations
- _ = _
We now put a category instance on any preorder.
Because we do not allow the morphisms of a category to live in Prop
,
unfortunately we need to use plift
and ulift
when defining the morphisms.
As convenience functions, we provide hom_of_le
and le_of_hom
to wrap and unwrap inequalities.
Express an inequality as a morphism in the corresponding preorder category.
Equations
- category_theory.hom_of_le h = {down := {down := h}}
Extract the underlying inequality from a morphism in a preorder category.