Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 4026bd8

Browse files
committed
feat(category_theory/full_subcategory): induced category from a groupoid is a groupoid (#2715)
Also some minor cleanup to the same file.
1 parent 2fa1d7c commit 4026bd8

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/category_theory/full_subcategory.lean

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Scott Morrison, Reid Barton
55
-/
66
import category_theory.fully_faithful
7+
import category_theory.groupoid
78

89
namespace category_theory
910

@@ -55,18 +56,22 @@ instance induced_category.category : category.{v} (induced_category D F) :=
5556
id := λ X, 𝟙 (F X),
5657
comp := λ _ _ _ f g, f ≫ g }
5758

58-
def induced_functor : induced_category D F ⥤ D :=
59+
@[simps] def induced_functor : induced_category D F ⥤ D :=
5960
{ obj := F, map := λ x y f, f }
6061

61-
@[simp] lemma induced_functor.obj {X} : (induced_functor F).obj X = F X := rfl
62-
@[simp] lemma induced_functor.hom {X Y} {f : X ⟶ Y} : (induced_functor F).map f = f := rfl
63-
6462
instance induced_category.full : full (induced_functor F) :=
6563
{ preimage := λ x y f, f }
6664
instance induced_category.faithful : faithful (induced_functor F) := {}
6765

6866
end induced
6967

68+
instance induced_category.groupoid {C : Type u₁} (D : Type u₂) [groupoid.{v} D] (F : C → D) :
69+
groupoid.{v} (induced_category D F) :=
70+
{ inv := λ X Y f, groupoid.inv f,
71+
inv_comp' := λ X Y f, groupoid.inv_comp f,
72+
comp_inv' := λ X Y f, groupoid.comp_inv f,
73+
.. induced_category.category F }
74+
7075
section full_subcategory
7176
/- A full subcategory is the special case of an induced category with F = subtype.val. -/
7277

@@ -84,7 +89,7 @@ induced_functor subtype.val
8489
@[simp] lemma full_subcategory_inclusion.map {X Y} {f : X ⟶ Y} :
8590
(full_subcategory_inclusion Z).map f = f := rfl
8691

87-
instance full_subcategory.ful : full (full_subcategory_inclusion Z) :=
92+
instance full_subcategory.full : full (full_subcategory_inclusion Z) :=
8893
induced_category.full subtype.val
8994
instance full_subcategory.faithful : faithful (full_subcategory_inclusion Z) :=
9095
induced_category.faithful subtype.val

0 commit comments

Comments
 (0)