Groupoids #
We define Groupoid
as a typeclass extending Category
,
asserting that all morphisms have inverses.
The instance IsIso.ofGroupoid (f : X ⟶ Y) : IsIso f
means that you can then write
inv f
to access the inverse of any morphism f
.
Groupoid.isoEquivHom : (X ≅ Y) ≃ (X ⟶ Y)
provides the equivalence between
isomorphisms and morphisms in a groupoid.
We provide a (non-instance) constructor Groupoid.ofIsIso
from an existing category
with IsIso f
for every f
.
See also #
See also CategoryTheory.Core
for the groupoid of isomorphisms in a category.
A Groupoid
is a category such that all morphisms are isomorphisms.
- assoc {W X Y Z : obj} (f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z) : CategoryStruct.comp (CategoryStruct.comp f g) h = CategoryStruct.comp f (CategoryStruct.comp g h)
The inverse morphism
inv f
composedf
is the identityf
composed withinv f
is the identity
Instances
A LargeGroupoid
is a groupoid
where the objects live in Type (u+1)
while the morphisms live in Type u
.
Equations
Instances For
A SmallGroupoid
is a groupoid
where the objects and morphisms live in the same universe.
Equations
Instances For
Groupoid.inv
is involutive.
Equations
- CategoryTheory.Groupoid.invEquiv = { toFun := CategoryTheory.Groupoid.inv, invFun := CategoryTheory.Groupoid.inv, left_inv := ⋯, right_inv := ⋯ }
Instances For
Equations
- CategoryTheory.groupoidHasInvolutiveReverse = { reverse' := fun {a b : C} (f : a ⟶ b) => CategoryTheory.Groupoid.inv f, inv' := ⋯ }
The functor from a groupoid C
to its opposite sending every morphism to its inverse.
Equations
- CategoryTheory.Groupoid.invFunctor C = { obj := Opposite.op, map := fun {x x_1 : C} (f : x ⟶ x_1) => (CategoryTheory.Groupoid.inv f).op, map_id := ⋯, map_comp := ⋯ }
Instances For
A Prop-valued typeclass asserting that a given category is a groupoid.
Instances
Promote (noncomputably) an IsGroupoid
to a Groupoid
structure.
Equations
- CategoryTheory.Groupoid.ofIsGroupoid = { toCategory := inst✝¹, inv := fun {X Y : C} (f : X ⟶ Y) => CategoryTheory.inv f, inv_comp := ⋯, comp_inv := ⋯ }
Instances For
A category where every morphism IsIso
is a groupoid.
Equations
- CategoryTheory.Groupoid.ofIsIso all_is_iso = { toCategory := inst✝, inv := fun {X Y : C} (f : X ⟶ Y) => CategoryTheory.inv f, inv_comp := ⋯, comp_inv := ⋯ }
Instances For
A category with a unique morphism between any two objects is a groupoid
Equations
- CategoryTheory.Groupoid.ofHomUnique all_unique = { toCategory := inst✝, inv := fun {X Y : C} (x : X ⟶ Y) => default, inv_comp := ⋯, comp_inv := ⋯ }
Instances For
A category equipped with a fully faithful functor to a groupoid is fully faithful
Equations
- CategoryTheory.Groupoid.ofFullyFaithfulToGroupoid F h = { toCategory := 𝒞, inv := fun {X Y : C} (f : X ⟶ Y) => h.preimage (CategoryTheory.Groupoid.inv (F.map f)), inv_comp := ⋯, comp_inv := ⋯ }
Instances For
Equations
- CategoryTheory.groupoidPi = { toCategory := CategoryTheory.pi J, inv := fun {X Y : (i : I) → J i} (f : X ⟶ Y) (i : I) => CategoryTheory.Groupoid.inv (f i), inv_comp := ⋯, comp_inv := ⋯ }