File: Mathlib/CategoryTheory/Groupoid.lean

full_name: CategoryTheory.Groupoid
code: /-- A `Groupoid` is a category such that all morphisms are isomorphisms. -/
class Groupoid (obj : Type u) extends Category.{v} obj : Type max u (v + 1) where
  /-- The inverse morphism -/
  inv : ∀ {X Y : obj}, (X ⟶ Y) → (Y ⟶ X)
  /-- `inv f` composed `f` is the identity -/
  inv_comp : ∀ {X Y : obj} (f : X ⟶ Y), comp (inv f) f = id Y := by aesop_cat
  /-- `f` composed with `inv f` is the identity -/
  comp_inv : ∀ {X Y : obj} (f : X ⟶ Y), comp f (inv f) = id X := by aesop_cat
goal: Type (max u (v + 1))

full_name: CategoryTheory.Groupoid.comp_inv
code: /-- A `Groupoid` is a category such that all morphisms are isomorphisms. -/
class Groupoid (obj : Type u) extends Category.{v} obj : Type max u (v + 1) where
  /-- The inverse morphism -/
  inv : ∀ {X Y : obj}, (X ⟶ Y) → (Y ⟶ X)
  /-- `inv f` composed `f` is the identity -/
  inv_comp : ∀ {X Y : obj} (f : X ⟶ Y), comp (inv f) f = id Y := by aesop_cat
  /-- `f` composed with `inv f` is the identity -/
  comp_inv : ∀ {X Y : obj} (f : X ⟶ Y), comp f (inv f) = id X := by aesop_cat
goal: CategoryTheory.CategoryStruct.comp f (CategoryTheory.Groupoid.inv f) = CategoryTheory.CategoryStruct.id X

full_name: CategoryTheory.Groupoid.inv
code: /-- A `Groupoid` is a category such that all morphisms are isomorphisms. -/
class Groupoid (obj : Type u) extends Category.{v} obj : Type max u (v + 1) where
  /-- The inverse morphism -/
  inv : ∀ {X Y : obj}, (X ⟶ Y) → (Y ⟶ X)
  /-- `inv f` composed `f` is the identity -/
  inv_comp : ∀ {X Y : obj} (f : X ⟶ Y), comp (inv f) f = id Y := by aesop_cat
  /-- `f` composed with `inv f` is the identity -/
  comp_inv : ∀ {X Y : obj} (f : X ⟶ Y), comp f (inv f) = id X := by aesop_cat
goal: (X ⟶ Y) → (Y ⟶ X)

full_name: CategoryTheory.Groupoid.inv_comp
code: /-- A `Groupoid` is a category such that all morphisms are isomorphisms. -/
class Groupoid (obj : Type u) extends Category.{v} obj : Type max u (v + 1) where
  /-- The inverse morphism -/
  inv : ∀ {X Y : obj}, (X ⟶ Y) → (Y ⟶ X)
  /-- `inv f` composed `f` is the identity -/
  inv_comp : ∀ {X Y : obj} (f : X ⟶ Y), comp (inv f) f = id Y := by aesop_cat
  /-- `f` composed with `inv f` is the identity -/
  comp_inv : ∀ {X Y : obj} (f : X ⟶ Y), comp f (inv f) = id X := by aesop_cat
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.Groupoid.inv f) f = CategoryTheory.CategoryStruct.id Y

full_name: CategoryTheory.LargeGroupoid
code: /-- A `LargeGroupoid` is a groupoid
where the objects live in `Type (u+1)` while the morphisms live in `Type u`.
-/
abbrev LargeGroupoid (C : Type (u + 1)) : Type (u + 1) 
goal: Type (u + 1)

full_name: CategoryTheory.SmallGroupoid
code: /-- A `SmallGroupoid` is a groupoid
where the objects and morphisms live in the same universe.
-/
abbrev SmallGroupoid (C : Type u) : Type (u + 1) 
goal: Type (u + 1)

full_name: CategoryTheory.IsIso.of_groupoid
code: instance (priority := 100) IsIso.of_groupoid (f : X ⟶ Y) : IsIso f 
goal: CategoryTheory.IsIso f

full_name: CategoryTheory.Groupoid.inv_eq_inv
code: @[simp]
theorem Groupoid.inv_eq_inv (f : X ⟶ Y) : Groupoid.inv f = CategoryTheory.inv f 
goal: CategoryTheory.Groupoid.inv f = CategoryTheory.inv f

full_name: CategoryTheory.Groupoid.invEquiv_apply
code: /-- `Groupoid.inv` is involutive. -/
@[simps]
def Groupoid.invEquiv : (X ⟶ Y) ≃ (Y ⟶ X) 
goal: ∀ (a : X ⟶ Y), CategoryTheory.Groupoid.invEquiv a = CategoryTheory.Groupoid.inv a

full_name: CategoryTheory.Groupoid.invEquiv
code: /-- `Groupoid.inv` is involutive. -/
@[simps]
def Groupoid.invEquiv : (X ⟶ Y) ≃ (Y ⟶ X) 
goal: (X ⟶ Y) ≃ (Y ⟶ X)

full_name: CategoryTheory.Groupoid.invEquiv_symm_apply
code: /-- `Groupoid.inv` is involutive. -/
@[simps]
def Groupoid.invEquiv : (X ⟶ Y) ≃ (Y ⟶ X) 
goal: ∀ (a : Y ⟶ X), CategoryTheory.Groupoid.invEquiv.symm a = CategoryTheory.Groupoid.inv a

full_name: CategoryTheory.groupoidHasInvolutiveReverse
code: instance (priority := 100) groupoidHasInvolutiveReverse : Quiver.HasInvolutiveReverse C 
goal: Quiver.HasInvolutiveReverse C

full_name: CategoryTheory.Groupoid.reverse_eq_inv
code: @[simp]
theorem Groupoid.reverse_eq_inv (f : X ⟶ Y) : Quiver.reverse f = Groupoid.inv f 
goal: Quiver.reverse f = CategoryTheory.Groupoid.inv f

full_name: CategoryTheory.functorMapReverse
code: instance functorMapReverse {D : Type*} [Groupoid D] (F : C ⥤ D) : F.toPrefunctor.MapReverse 
goal: F.MapReverse

full_name: CategoryTheory.Groupoid.isoEquivHom
code: /-- In a groupoid, isomorphisms are equivalent to morphisms. -/
def Groupoid.isoEquivHom : (X ≅ Y) ≃ (X ⟶ Y) 
goal: (X ≅ Y) ≃ (X ⟶ Y)

full_name: CategoryTheory.Groupoid.invFunctor_obj
code: /-- The functor from a groupoid `C` to its opposite sending every morphism to its inverse. -/
@[simps]
noncomputable def Groupoid.invFunctor : C ⥤ Cᵒᵖ 
goal: (CategoryTheory.Groupoid.invFunctor C).obj unop = Opposite.op unop

full_name: CategoryTheory.Groupoid.invFunctor
code: /-- The functor from a groupoid `C` to its opposite sending every morphism to its inverse. -/
@[simps]
noncomputable def Groupoid.invFunctor : C ⥤ Cᵒᵖ 
goal: CategoryTheory.Functor C Cᵒᵖ

full_name: CategoryTheory.Groupoid.invFunctor_map
code: /-- The functor from a groupoid `C` to its opposite sending every morphism to its inverse. -/
@[simps]
noncomputable def Groupoid.invFunctor : C ⥤ Cᵒᵖ 
goal: (CategoryTheory.Groupoid.invFunctor C).map f = (CategoryTheory.Groupoid.inv f).op

full_name: CategoryTheory.Groupoid.ofIsIso
code: /-- A category where every morphism `IsIso` is a groupoid. -/
noncomputable def Groupoid.ofIsIso (all_is_iso : ∀ {X Y : C} (f : X ⟶ Y), IsIso f) :
    Groupoid.{v} C 
goal: CategoryTheory.Groupoid C

full_name: CategoryTheory.Groupoid.ofHomUnique
code: /-- A category with a unique morphism between any two objects is a groupoid -/
def Groupoid.ofHomUnique (all_unique : ∀ {X Y : C}, Unique (X ⟶ Y)) : Groupoid.{v} C 
goal: CategoryTheory.Groupoid C

full_name: CategoryTheory.InducedCategory.groupoid
code: instance InducedCategory.groupoid {C : Type u} (D : Type u₂) [Groupoid.{v} D] (F : C → D) :
    Groupoid.{v} (InducedCategory D F) 
goal: CategoryTheory.Groupoid (CategoryTheory.InducedCategory D F)

full_name: CategoryTheory.groupoidPi
code: instance groupoidPi {I : Type u} {J : I → Type u₂} [∀ i, Groupoid.{v} (J i)] :
    Groupoid.{max u v} (∀ i : I, J i) 
goal: CategoryTheory.Groupoid ((i : I) → J i)

full_name: CategoryTheory.groupoidProd
code: instance groupoidProd {α : Type u} {β : Type v} [Groupoid.{u₂} α] [Groupoid.{v₂} β] :
    Groupoid.{max u₂ v₂} (α × β) 
goal: CategoryTheory.Groupoid (α × β)