# Documentation

Mathlib.CategoryTheory.FinCategory

# Finite categories #

A category is finite in this sense if it has finitely many objects, and finitely many morphisms.

## Implementation #

Prior to #14046, FinCategory required a DecidableEq instance on the object and morphism types. This does not seem to have had any practical payoff (i.e. making some definition constructive) so we have removed these requirements to avoid having to supply instances or delay with non-defeq conflicts between instances.

instance CategoryTheory.discreteHomFintype {α : Type u_1} (X : ) (Y : ) :
Fintype (X Y)
• fintypeObj :
• fintypeHom : (j j' : J) → Fintype (j j')

A category with a Fintype of objects, and a Fintype for each morphism space.

Instances
@[inline, reducible]

A FinCategory α is equivalent to a category with objects in Type.

Instances For
noncomputable def CategoryTheory.FinCategory.objAsTypeEquiv (α : Type u_1) [] :

The constructed category is indeed equivalent to α.

Instances For
@[inline, reducible]

A FinCategory α is equivalent to a fin_category with in Type.

Instances For
theorem CategoryTheory.FinCategory.categoryAsType_comp (α : Type u_1) [] :
∀ {X Y Z : } (f : X Y) (g : Y Z), = ↑(Fintype.equivFin (X Z)) (CategoryTheory.CategoryStruct.comp ((Fintype.equivFin (X Y)).symm f) ((Fintype.equivFin (Y Z)).symm g))
noncomputable instance CategoryTheory.FinCategory.categoryAsType (α : Type u_1) [] :
@[simp]
theorem CategoryTheory.FinCategory.asTypeToObjAsType_map (α : Type u_1) [] (a : Fin (Fintype.card (X Y))) :
= (Fintype.equivFin (X Y)).symm a
noncomputable def CategoryTheory.FinCategory.asTypeToObjAsType (α : Type u_1) [] :

The "identity" functor from AsType α to ObjAsType α.

Instances For
@[simp]
theorem CategoryTheory.FinCategory.objAsTypeToAsType_map (α : Type u_1) [] (a : X Y) :
= ↑(Fintype.equivFin (X Y)) a
noncomputable def CategoryTheory.FinCategory.objAsTypeToAsType (α : Type u_1) [] :

The "identity" functor from ObjAsType α to AsType α.

Instances For
noncomputable def CategoryTheory.FinCategory.asTypeEquivObjAsType (α : Type u_1) [] :

The constructed category (AsType α) is equivalent to ObjAsType α.

Instances For
noncomputable instance CategoryTheory.FinCategory.asTypeFinCategory (α : Type u_1) [] :
noncomputable def CategoryTheory.FinCategory.equivAsType (α : Type u_1) [] :

The constructed category (ObjAsType α) is indeed equivalent to α.

Instances For

The opposite of a finite category is finite.

Applying ULift to morphisms and objects of a category preserves finiteness.