The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V24. Category theory

Mathlib.CategoryTheory.Discrete.SumsProducts

18 declarations. Mathlib docs · Source

Sums and products of discrete categories.

This file shows that binary products and binary sums of discrete categories are also discrete, both in the form of explicit equivalences and through the IsDiscrete typeclass.

Main declarations

  • Discrete.productEquiv: The equivalence of categories between Discrete (J × K) and Discrete J × Discrete K
  • Discrete.sumEquiv: The equivalence of categories between Discrete (J ⊕ K) and Discrete J ⊕ Discrete K.
  • IsDiscrete.prod: an IsDiscrete instance on the product of two discrete categories.
  • IsDiscrete.sum: an IsDiscrete instance on the sum of two discrete categories.

def CategoryTheory.Discrete.productEquiv E3 #

{J : Type u_1} →
  {K : Type u_2} → CategoryTheory.Discrete (J × K) ≌ CategoryTheory.Discrete J × CategoryTheory.Discrete K

The discrete category on a product is equivalent to the product of the discrete categories.

theorem CategoryTheory.Discrete.productEquiv_counitIso_hom_app E0 #

∀ {J : Type u_1} {K : Type u_2} (X : CategoryTheory.Discrete J × CategoryTheory.Discrete K),
  CategoryTheory.Discrete.productEquiv.counitIso.hom.app X =
    CategoryTheory.Prod.mkHom (CategoryTheory.CategoryStruct.id X.1) (CategoryTheory.CategoryStruct.id X.2)

theorem CategoryTheory.Discrete.productEquiv_counitIso_inv_app E0 #

∀ {J : Type u_1} {K : Type u_2} (X : CategoryTheory.Discrete J × CategoryTheory.Discrete K),
  CategoryTheory.Discrete.productEquiv.counitIso.inv.app X =
    CategoryTheory.Prod.mkHom (CategoryTheory.CategoryStruct.id X.1) (CategoryTheory.CategoryStruct.id X.2)

theorem CategoryTheory.Discrete.productEquiv_inverse_obj_as E0 #

∀ {J : Type u_1} {K : Type u_2} (x : CategoryTheory.Discrete J × CategoryTheory.Discrete K),
  (CategoryTheory.Discrete.productEquiv.inverse.obj x).as = (x.1.as, x.2.as)

theorem CategoryTheory.Discrete.productEquiv_functor_obj E0 #

∀ {J : Type u_1} {K : Type u_2} (a : CategoryTheory.Discrete (J × K)),
  CategoryTheory.Discrete.productEquiv.functor.obj a = ({ as := a.as.1 }, { as := a.as.2 })

theorem CategoryTheory.Discrete.productEquiv_functor_map E0 #

∀ {J : Type u_1} {K : Type u_2} {X Y : CategoryTheory.Discrete (J × K)} (f : X ⟶ Y),
  CategoryTheory.Discrete.productEquiv.functor.map f =
    CategoryTheory.Discrete.Hom.rec (fun eq ↦ CategoryTheory.eqToHom ⋯) f

theorem CategoryTheory.Discrete.productEquiv_inverse_map E0 #

∀ {J : Type u_1} {K : Type u_2} {X Y : CategoryTheory.Discrete J × CategoryTheory.Discrete K} (x : X ⟶ Y),
  CategoryTheory.Discrete.productEquiv.inverse.map x =
    match x with
    | (f₁, f₂) => CategoryTheory.eqToHom ⋯

def CategoryTheory.Discrete.sumEquiv E3 #

{J : Type u_1} →
  {K : Type u_2} → CategoryTheory.Discrete (J ⊕ K) ≌ CategoryTheory.Discrete J ⊕ CategoryTheory.Discrete K

The discrete category on a sum is equivalent to the sum of the discrete categories.

theorem CategoryTheory.Discrete.sumEquiv_counitIso_inv_app E0 #

∀ {J : Type u_1} {K : Type u_2} (X : CategoryTheory.Discrete J ⊕ CategoryTheory.Discrete K),
  CategoryTheory.Discrete.sumEquiv.counitIso.inv.app X =
    (match X with
      | Sum.inl x => CategoryTheory.Iso.refl (Sum.inl x)
      | Sum.inr x => CategoryTheory.Iso.refl (Sum.inr x)).inv

theorem CategoryTheory.Discrete.sumEquiv_unitIso_inv_app E0 #

∀ {J : Type u_1} {K : Type u_2} (X : CategoryTheory.Discrete (J ⊕ K)),
  CategoryTheory.Discrete.sumEquiv.unitIso.inv.app X =
    (match X.as with
      | Sum.inl x => CategoryTheory.Iso.refl { as := Sum.inl x }
      | Sum.inr x => CategoryTheory.Iso.refl { as := Sum.inr x }).inv

theorem CategoryTheory.Discrete.sumEquiv_inverse_map E0 #

∀ {J : Type u_1} {K : Type u_2} {X Y : CategoryTheory.Discrete J ⊕ CategoryTheory.Discrete K} (f : X ⟶ Y),
  CategoryTheory.Discrete.sumEquiv.inverse.map f =
    CategoryTheory.Sum.homInduction (fun x x_1 f ↦ (CategoryTheory.Discrete.functor fun t ↦ { as := Sum.inl t }).map f)
      (fun x x_1 g ↦ (CategoryTheory.Discrete.functor fun t ↦ { as := Sum.inr t }).map g) f

theorem CategoryTheory.Discrete.sumEquiv_unitIso_hom_app E0 #

∀ {J : Type u_1} {K : Type u_2} (X : CategoryTheory.Discrete (J ⊕ K)),
  CategoryTheory.Discrete.sumEquiv.unitIso.hom.app X =
    (match X.as with
      | Sum.inl x => CategoryTheory.Iso.refl { as := Sum.inl x }
      | Sum.inr x => CategoryTheory.Iso.refl { as := Sum.inr x }).hom

theorem CategoryTheory.Discrete.sumEquiv_counitIso_hom_app E0 #

∀ {J : Type u_1} {K : Type u_2} (X : CategoryTheory.Discrete J ⊕ CategoryTheory.Discrete K),
  CategoryTheory.Discrete.sumEquiv.counitIso.hom.app X =
    (match X with
      | Sum.inl x => CategoryTheory.Iso.refl (Sum.inl x)
      | Sum.inr x => CategoryTheory.Iso.refl (Sum.inr x)).hom

theorem CategoryTheory.Discrete.sumEquiv_functor_obj E0 #

∀ {J : Type u_1} {K : Type u_2} (a : CategoryTheory.Discrete (J ⊕ K)),
  CategoryTheory.Discrete.sumEquiv.functor.obj a =
    match a.as with
    | Sum.inl j => Sum.inl { as := j }
    | Sum.inr k => Sum.inr { as := k }

theorem CategoryTheory.Discrete.sumEquiv_inverse_obj E0 #

∀ {J : Type u_1} {K : Type u_2} (x : CategoryTheory.Discrete J ⊕ CategoryTheory.Discrete K),
  CategoryTheory.Discrete.sumEquiv.inverse.obj x =
    match x with
    | Sum.inl X => { as := Sum.inl X.as }
    | Sum.inr X => { as := Sum.inr X.as }

theorem CategoryTheory.Discrete.sumEquiv_functor_map E0 #

∀ {J : Type u_1} {K : Type u_2} {X Y : CategoryTheory.Discrete (J ⊕ K)} (f : X ⟶ Y),
  CategoryTheory.Discrete.sumEquiv.functor.map f = CategoryTheory.Discrete.Hom.rec (fun eq ↦ CategoryTheory.eqToHom ⋯) f

instance CategoryTheory.IsDiscrete.prod E3 #

∀ (C : Type u_1) [inst : CategoryTheory.Category.{v_1, u_1} C] (D : Type u_3)
  [inst_1 : CategoryTheory.Category.{v_3, u_3} D] [CategoryTheory.IsDiscrete C] [CategoryTheory.IsDiscrete D],
  CategoryTheory.IsDiscrete (C × D)

A product of discrete categories is discrete.

instance CategoryTheory.IsDiscrete.sum E3 #

∀ (C : Type u_1) (C' : Type u_2) [inst : CategoryTheory.Category.{v_1, u_1} C]
  [inst_1 : CategoryTheory.Category.{v_2, u_2} C'] [CategoryTheory.IsDiscrete C] [CategoryTheory.IsDiscrete C'],
  CategoryTheory.IsDiscrete (C ⊕ C')

A sum of discrete categories is discrete.