Documentation

Mathlib.CategoryTheory.Groupoid

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.

class CategoryTheory.Groupoid (obj : Type u) extends CategoryTheory.Category.{v, u} obj :
Type (max u (v + 1))

A Groupoid is a category such that all morphisms are isomorphisms.

Instances
    @[reducible, inline]
    abbrev CategoryTheory.LargeGroupoid (C : Type (u + 1)) :
    Type (u + 1)

    A LargeGroupoid is a groupoid where the objects live in Type (u+1) while the morphisms live in Type u.

    Equations
      Instances For
        @[reducible, inline]
        abbrev CategoryTheory.SmallGroupoid (C : Type u) :
        Type (u + 1)

        A SmallGroupoid is a groupoid where the objects and morphisms live in the same universe.

        Equations
          Instances For
            @[instance 100]
            instance CategoryTheory.IsIso.of_groupoid {C : Type u} [Groupoid C] {X Y : C} (f : X Y) :
            @[simp]
            theorem CategoryTheory.Groupoid.inv_eq_inv {C : Type u} [Groupoid C] {X Y : C} (f : X Y) :
            def CategoryTheory.Groupoid.invEquiv {C : Type u} [Groupoid C] {X Y : C} :
            (X Y) (Y X)

            Groupoid.inv is involutive.

            Equations
              Instances For
                @[simp]
                theorem CategoryTheory.Groupoid.invEquiv_symm_apply {C : Type u} [Groupoid C] {X Y : C} (a✝ : Y X) :
                invEquiv.symm a✝ = inv a✝
                @[simp]
                theorem CategoryTheory.Groupoid.invEquiv_apply {C : Type u} [Groupoid C] {X Y : C} (a✝ : X Y) :
                invEquiv a✝ = inv a✝
                @[simp]
                theorem CategoryTheory.Groupoid.reverse_eq_inv {C : Type u} [Groupoid C] {X Y : C} (f : X Y) :
                def CategoryTheory.Groupoid.isoEquivHom {C : Type u} [Groupoid C] (X Y : C) :
                (X Y) (X Y)

                In a groupoid, isomorphisms are equivalent to morphisms.

                Equations
                  Instances For
                    @[simp]
                    theorem CategoryTheory.Groupoid.isoEquivHom_symm_apply_hom {C : Type u} [Groupoid C] (X Y : C) (f : X Y) :
                    ((isoEquivHom X Y).symm f).hom = f
                    @[simp]
                    theorem CategoryTheory.Groupoid.isoEquivHom_apply {C : Type u} [Groupoid C] (X Y : C) (self : X Y) :
                    (isoEquivHom X Y) self = self.hom

                    The functor from a groupoid C to its opposite sending every morphism to its inverse.

                    Equations
                      Instances For
                        @[simp]
                        theorem CategoryTheory.Groupoid.invFunctor_obj (C : Type u) [Groupoid C] (unop : C) :
                        (invFunctor C).obj unop = Opposite.op unop
                        @[simp]
                        theorem CategoryTheory.Groupoid.invFunctor_map (C : Type u) [Groupoid C] {x✝ x✝¹ : C} (f : x✝ x✝¹) :
                        (invFunctor C).map f = (inv f).op

                        A Prop-valued typeclass asserting that a given category is a groupoid.

                        • all_isIso {X Y : C} (f : X Y) : IsIso f
                        Instances

                          Promote (noncomputably) an IsGroupoid to a Groupoid structure.

                          Equations
                            Instances For
                              noncomputable def CategoryTheory.Groupoid.ofIsIso {C : Type u} [Category.{v, u} C] (all_is_iso : ∀ {X Y : C} (f : X Y), IsIso f) :

                              A category where every morphism IsIso is a groupoid.

                              Equations
                                Instances For
                                  def CategoryTheory.Groupoid.ofHomUnique {C : Type u} [Category.{v, u} C] (all_unique : {X Y : C} → Unique (X Y)) :

                                  A category with a unique morphism between any two objects is a groupoid

                                  Equations
                                    Instances For

                                      A category equipped with a fully faithful functor to a groupoid is fully faithful

                                      Equations
                                        Instances For
                                          instance CategoryTheory.InducedCategory.groupoid {C : Type u} (D : Type u₂) [Groupoid D] (F : CD) :
                                          Equations
                                            instance CategoryTheory.groupoidPi {I : Type u} {J : IType u₂} [(i : I) → Groupoid (J i)] :
                                            Groupoid ((i : I) → J i)
                                            Equations
                                              instance CategoryTheory.groupoidProd {α : Type u} {β : Type v} [Groupoid α] [Groupoid β] :
                                              Groupoid (α × β)
                                              Equations
                                                instance CategoryTheory.isGroupoidPi {I : Type u} {J : IType u₂} [(i : I) → Category.{v, u₂} (J i)] [∀ (i : I), IsGroupoid (J i)] :
                                                IsGroupoid ((i : I) → J i)