Skip to content

Commit 1c8cca8

Browse files
committed
feat(CategoryTheory): the equivalence of categories induced by a bijection
1 parent f033341 commit 1c8cca8

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

Mathlib/CategoryTheory/EqToHom.lean

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,4 +338,26 @@ theorem dcongr_arg {ι : Type*} {F G : ι → C} (α : ∀ i, F i ⟶ G i) {i j
338338
subst h
339339
simp
340340

341+
/-- If `T ≃ D` is a bijection and `D` is a category, then
342+
`InducedCategory D e` is equivalent to `D`. -/
343+
@[simps]
344+
def Equivalence.induced {T : Type*} (e : T ≃ D) :
345+
InducedCategory D e ≌ D where
346+
functor := inducedFunctor e
347+
inverse :=
348+
{ obj := e.symm
349+
map {X Y} f := show e (e.symm X) ⟶ e (e.symm Y) from
350+
eqToHom (e.apply_symm_apply X) ≫ f ≫
351+
eqToHom (e.apply_symm_apply Y).symm
352+
map_comp {X Y Z} f g := by
353+
dsimp
354+
erw [Category.assoc, Category.assoc, Category.assoc]
355+
rw [eqToHom_trans_assoc, eqToHom_refl, Category.id_comp] }
356+
unitIso := NatIso.ofComponents (fun _ ↦ eqToIso (by simp)) (fun {X Y} f ↦ by
357+
dsimp
358+
erw [eqToHom_trans_assoc _ (by simp), eqToHom_refl, Category.id_comp]
359+
rfl )
360+
counitIso := NatIso.ofComponents (fun _ ↦ eqToIso (by simp))
361+
functor_unitIso_comp X := eqToHom_trans (by simp) (by simp)
362+
341363
end CategoryTheory

Mathlib/CategoryTheory/EssentiallySmall.lean

Lines changed: 2 additions & 1 deletion
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: Kim Morrison
55
-/
66
import Mathlib.CategoryTheory.Category.ULift
7+
import Mathlib.CategoryTheory.EqToHom
78
import Mathlib.CategoryTheory.Skeletal
89
import Mathlib.Logic.UnivLE
910
import Mathlib.Logic.Small.Basic
@@ -189,7 +190,7 @@ noncomputable instance [Small.{w} C] : Category.{v} (Shrink.{w} C) :=
189190

190191
/-- The categorical equivalence between `C` and `Shrink C`, when `C` is small. -/
191192
noncomputable def equivalence [Small.{w} C] : C ≌ Shrink.{w} C :=
192-
(inducedFunctor (equivShrink C).symm).asEquivalence.symm
193+
(Equivalence.induced _).symm
193194

194195
end Shrink
195196

0 commit comments

Comments
 (0)