Groupoids #
We define groupoid
as a typeclass extending category
,
asserting that all morphisms have inverses.
The instance is_iso.of_groupoid (f : X ⟶ Y) : is_iso f
means that you can then write
inv f
to access the inverse of any morphism f
.
groupoid.iso_equiv_hom : (X ≅ Y) ≃ (X ⟶ Y)
provides the equivalence between
isomorphisms and morphisms in a groupoid.
We provide a (non-instance) constructor groupoid.of_is_iso
from an existing category
with is_iso f
for every f
.
See also #
See also category_theory.core
for the groupoid of isomorphisms in a category.
- to_category : category_theory.category obj
- inv : Π {X Y : obj}, (X ⟶ Y) → (Y ⟶ X)
- inv_comp' : (∀ {X Y : obj} (f : X ⟶ Y), category_theory.groupoid.inv f ≫ f = 𝟙 Y) . "obviously"
- comp_inv' : (∀ {X Y : obj} (f : X ⟶ Y), f ≫ category_theory.groupoid.inv f = 𝟙 X) . "obviously"
A groupoid
is a category such that all morphisms are isomorphisms.
A large_groupoid
is a groupoid
where the objects live in Type (u+1)
while the morphisms live in Type u
.
A small_groupoid
is a groupoid
where the objects and morphisms live in the same universe.
In a groupoid, isomorphisms are equivalent to morphisms.
Equations
- category_theory.groupoid.iso_equiv_hom X Y = {to_fun := category_theory.iso.hom Y, inv_fun := λ (f : X ⟶ Y), {hom := f, inv := category_theory.groupoid.inv f, hom_inv_id' := _, inv_hom_id' := _}, left_inv := _, right_inv := _}
A category where every morphism is_iso
is a groupoid.
Equations
- category_theory.groupoid.of_is_iso all_is_iso = {to_category := {to_category_struct := category_theory.category.to_category_struct _inst_1, id_comp' := _, comp_id' := _, assoc' := _}, inv := λ (X Y : C) (f : X ⟶ Y), category_theory.inv f, inv_comp' := _, comp_inv' := _}
A category with a unique morphism between any two objects is a groupoid
Equations
- category_theory.groupoid.of_hom_unique all_unique = {to_category := {to_category_struct := category_theory.category.to_category_struct _inst_1, id_comp' := _, comp_id' := _, assoc' := _}, inv := λ (X Y : C) (f : X ⟶ Y), default, inv_comp' := _, comp_inv' := _}
Equations
- category_theory.induced_category.groupoid D F = {to_category := {to_category_struct := category_theory.category.to_category_struct (category_theory.induced_category.category F), id_comp' := _, comp_id' := _, assoc' := _}, inv := λ (X Y : category_theory.induced_category D F) (f : X ⟶ Y), category_theory.groupoid.inv f, inv_comp' := _, comp_inv' := _}
Equations
- category_theory.groupoid_pi = {to_category := {to_category_struct := category_theory.category.to_category_struct (category_theory.pi (λ (i : I), J i)), id_comp' := _, comp_id' := _, assoc' := _}, inv := λ (x y : Π (i : I), J i) (f : Π (i : I), x i ⟶ y i) (i : I), category_theory.groupoid.inv (f i), inv_comp' := _, comp_inv' := _}
Equations
- category_theory.groupoid_prod = {to_category := {to_category_struct := category_theory.category.to_category_struct (category_theory.prod α β), id_comp' := _, comp_id' := _, assoc' := _}, inv := λ (x y : α × β) (f : x ⟶ y), (category_theory.groupoid.inv f.fst, category_theory.groupoid.inv f.snd), inv_comp' := _, comp_inv' := _}