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.Basic

90 declarations. Mathlib docs · Source

Discrete categories

We define Discrete α as a structure containing a term a : α for any type α, and use this type alias to provide a SmallCategory instance whose only morphisms are the identities.

There is an annoying technical difficulty that it has turned out to be inconvenient to allow categories with morphisms living in Prop, so instead of defining X ⟶ Y in Discrete α as X = Y, one might define it as PLift (X = Y). In fact, to allow Discrete α to be a SmallCategory (i.e. with morphisms in the same universe as the objects), one might define X ⟶ Y as ULift (PLift (X = Y)). But another technical difficulty is that to_dual wants the definition of X ⟶ Y to be dual to the definition of Y ⟶ X, so we define X ⟶ Y using a structure: Discrete.Hom X.as Y.as. One could also change Discrete.Hom so that the definition is Discrete.Hom X Y, but it turns out that having the .as around helps with subsingleton elimination in unification, e.g. when dealing with Discrete PUnit.

Discrete.functor promotes a function f : I → C (for any category C) to a functor Discrete.functor f : Discrete I ⥤ C.

Similarly, Discrete.natTrans and Discrete.natIso promote I-indexed families of morphisms, or I-indexed families of isomorphisms to natural transformations or natural isomorphism.

We show equivalences of types are the same as (categorical) equivalences of the corresponding discrete categories.

theorem CategoryTheory.Discrete.eqToHom.congr_simp E1 #

∀ {α : Type u₁} {X Y : CategoryTheory.Discrete α} (h : X.as = Y.as),
  CategoryTheory.Discrete.eqToHom h = CategoryTheory.Discrete.eqToHom h

theorem CategoryTheory.Discrete.mk.injEq E0 #

∀ {α : Type u₁} (as as_1 : α), ({ as := as } = { as := as_1 }) = (as = as_1)

theorem CategoryTheory.Discrete.mk.inj E1 #

∀ {α : Type u₁} {as as_1 : α}, { as := as } = { as := as_1 } → as = as_1

theorem CategoryTheory.Discrete.Hom.mk.congr_simp E1 #

∀ {α : Type u₁} {a b : α} (eq : a = b), { eq := eq } = { eq := eq }

def CategoryTheory.Discrete.ctorIdx E1 #

{α : Type u₁} → CategoryTheory.Discrete α → ℕ

def CategoryTheory.Discrete.Hom.ctorIdx E1 #

{α : Type u₁} → {a b : α} → CategoryTheory.Discrete.Hom a b → ℕ

structure CategoryTheory.Discrete E3 #

Type u₁ → Type u₁

A wrapper for promoting any type to a category, with the only morphisms being equalities.

theorem CategoryTheory.Discrete.ext_iff E0 #

∀ {α : Type u₁} {x y : CategoryTheory.Discrete α}, x = y ↔ x.as = y.as

theorem CategoryTheory.Discrete.ext E1 #

∀ {α : Type u₁} {x y : CategoryTheory.Discrete α}, x.as = y.as → x = y

ctor CategoryTheory.Discrete.mk E0 #

{α : Type u₁} → α → CategoryTheory.Discrete α

abbrev CategoryTheory.Discrete.as E1 #

{α : Type u₁} → CategoryTheory.Discrete α → α

A wrapper for promoting any type to a category, with the only morphisms being equalities.

theorem CategoryTheory.Discrete.mk_as E0 #

∀ {α : Type u₁} (X : CategoryTheory.Discrete α), { as := X.as } = X

def CategoryTheory.discreteEquiv E1 #

{α : Type u₁} → CategoryTheory.Discrete α ≃ α

Discrete α is equivalent to the original type α.

theorem CategoryTheory.discreteEquiv_symm_apply_as E0 #

∀ {α : Type u₁} (as : α), (CategoryTheory.discreteEquiv.symm as).as = as

theorem CategoryTheory.discreteEquiv_apply E0 #

∀ {α : Type u₁} (self : CategoryTheory.Discrete α), CategoryTheory.discreteEquiv self = self.as

theorem CategoryTheory.Discrete.as_bijective E1 #

∀ {α : Type u_1}, Function.Bijective CategoryTheory.Discrete.as

instance CategoryTheory.instDecidableEqDiscrete E0 #

{α : Type u₁} → [DecidableEq α] → DecidableEq (CategoryTheory.Discrete α)

structure CategoryTheory.Discrete.Hom E1 #

{α : Type u₁} → α → α → Type u₁

The only morphisms in Discrete α are the identity morphisms.

ctor CategoryTheory.Discrete.Hom.mk E0 #

{α : Type u₁} → {a b : α} → a = b → CategoryTheory.Discrete.Hom a b

theorem CategoryTheory.Discrete.Hom.eq E1 #

∀ {α : Type u₁} {a b : α} (self : CategoryTheory.Discrete.Hom a b), a = b

instance CategoryTheory.discreteCategory E0 #

(α : Type u₁) → CategoryTheory.SmallCategory (CategoryTheory.Discrete α)

The "Discrete" category on a type, whose morphisms are equalities.

Because we do not allow morphisms in Prop (only in Type), somewhat annoyingly we have to define X ⟶ Y as ULift (PLift (X = Y)).

instance CategoryTheory.Discrete.instInhabited E0 #

{α : Type u₁} → [Inhabited α] → Inhabited (CategoryTheory.Discrete α)

instance CategoryTheory.Discrete.instSubsingleton E0 #

∀ {α : Type u₁} [Subsingleton α], Subsingleton (CategoryTheory.Discrete α)

theorem CategoryTheory.Discrete.hom_eq E0 #

∀ {α : Type u₁} {X Y : CategoryTheory.Discrete α} {f g : X ⟶ Y}, f = g

instance CategoryTheory.Discrete.instSubsingletonDiscreteHom E0 #

∀ {α : Type u₁} (X Y : CategoryTheory.Discrete α), Subsingleton (X ⟶ Y)

def CategoryTheory.Discrete.tacticDiscrete_cases E1 #

Lean.ParserDescr

A simple tactic to run cases on any Discrete α hypotheses.

def CategoryTheory.Discrete.discreteCases E1 #

Lean.Elab.Tactic.TacticM Unit

Use:

attribute [local aesop safe tactic (rule_sets := [CategoryTheory])]
  CategoryTheory.Discrete.discreteCases

to locally give cat_disch the ability to call cases on Discrete and (_ : Discrete _) ⟶ (_ : Discrete _) hypotheses.

instance CategoryTheory.Discrete.instUnique E0 #

{α : Type u₁} → [Unique α] → Unique (CategoryTheory.Discrete α)

abbrev CategoryTheory.Discrete.eqToHom E1 #

{α : Type u₁} → {X Y : CategoryTheory.Discrete α} → X.as = Y.as → (X ⟶ Y)

Promote an equation between the wrapped terms in X Y : Discrete α to a morphism X ⟶ Y in the discrete category.

abbrev CategoryTheory.Discrete.eqToIso E1 #

{α : Type u₁} → {X Y : CategoryTheory.Discrete α} → X.as = Y.as → (X ≅ Y)

Promote an equation between the wrapped terms in X Y : Discrete α to an isomorphism X ≅ Y in the discrete category.

abbrev CategoryTheory.Discrete.eqToHom' E1 #

{α : Type u₁} → {a b : α} → a = b → ({ as := a } ⟶ { as := b })

A variant of eqToHom that lifts terms to the discrete category.

abbrev CategoryTheory.Discrete.eqToIso' E1 #

{α : Type u₁} → {a b : α} → a = b → ({ as := a } ≅ { as := b })

A variant of eqToIso that lifts terms to the discrete category.

theorem CategoryTheory.Discrete.id_def E0 #

∀ {α : Type u₁} (X : CategoryTheory.Discrete α), { eq := ⋯ } = CategoryTheory.CategoryStruct.id X

theorem CategoryTheory.Discrete.id_def' E0 #

∀ {α : Type u₁} (X : α), { eq := ⋯ } = CategoryTheory.CategoryStruct.id { as := X }

instance CategoryTheory.Discrete.instIsIso E0 #

∀ {I : Type u₁} {i j : CategoryTheory.Discrete I} (f : i ⟶ j), CategoryTheory.IsIso f

def CategoryTheory.Discrete.functor E1 #

{C : Type u₂} →
  [inst : CategoryTheory.Category.{v₂, u₂} C] →
    {I : Type u₁} → (I → C) → CategoryTheory.Functor (CategoryTheory.Discrete I) C

Any function I → C gives a functor Discrete I ⥤ C.

theorem CategoryTheory.Discrete.functor_obj E0 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u₁} (F : I → C) (i : I),
  (CategoryTheory.Discrete.functor F).obj { as := i } = F i

theorem CategoryTheory.Discrete.functor_map E1 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u₁} (F : I → C) {i : CategoryTheory.Discrete I}
  (f : i ⟶ i), (CategoryTheory.Discrete.functor F).map f = CategoryTheory.CategoryStruct.id (F i.as)

theorem CategoryTheory.Discrete.functor_obj_eq_as E0 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u₁} (F : I → C) (X : CategoryTheory.Discrete I),
  (CategoryTheory.Discrete.functor F).obj X = F X.as

theorem CategoryTheory.Discrete.range_functor E0 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u_1} (X : I → C),
  Set.range (CategoryTheory.Discrete.functor X).obj = Set.range X

theorem CategoryTheory.Discrete.functor_ext E1 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u₁}
  {G F : CategoryTheory.Functor (CategoryTheory.Discrete I) C},
  (∀ (i : I), G.obj { as := i } = F.obj { as := i }) → G = F

theorem CategoryTheory.Discrete.functor_ext_iff E0 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u₁}
  {G F : CategoryTheory.Functor (CategoryTheory.Discrete I) C}, G = F ↔ ∀ (i : I), G.obj { as := i } = F.obj { as := i }

def CategoryTheory.Discrete.functorComp E1 #

{C : Type u₂} →
  [inst : CategoryTheory.Category.{v₂, u₂} C] →
    {I : Type u₁} →
      {J : Type u₁'} →
        (f : J → C) →
          (g : I → J) →
            CategoryTheory.Discrete.functor (f ∘ g) ≅
              (CategoryTheory.Discrete.functor (CategoryTheory.Discrete.mk ∘ g)).comp
                (CategoryTheory.Discrete.functor f)

The discrete functor induced by a composition of maps can be written as a composition of two discrete functors.

theorem CategoryTheory.Discrete.functorComp_hom_app E0 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u₁} {J : Type u₁'} (f : J → C) (g : I → J)
  (X : CategoryTheory.Discrete I),
  (CategoryTheory.Discrete.functorComp f g).hom.app X = CategoryTheory.CategoryStruct.id (f (g X.as))

theorem CategoryTheory.Discrete.functorComp_inv_app E0 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u₁} {J : Type u₁'} (f : J → C) (g : I → J)
  (X : CategoryTheory.Discrete I),
  (CategoryTheory.Discrete.functorComp f g).inv.app X = CategoryTheory.CategoryStruct.id (f (g X.as))

def CategoryTheory.Discrete.natTrans E1 #

{C : Type u₂} →
  [inst : CategoryTheory.Category.{v₂, u₂} C] →
    {I : Type u₁} →
      {F G : CategoryTheory.Functor (CategoryTheory.Discrete I) C} →
        ((i : CategoryTheory.Discrete I) → F.obj i ⟶ G.obj i) → (F ⟶ G)

For functors out of a discrete category, a natural transformation is just a collection of maps, as the naturality squares are trivial.

theorem CategoryTheory.Discrete.natTrans_app E0 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u₁}
  {F G : CategoryTheory.Functor (CategoryTheory.Discrete I) C} (f : (i : CategoryTheory.Discrete I) → F.obj i ⟶ G.obj i)
  (i : CategoryTheory.Discrete I), (CategoryTheory.Discrete.natTrans f).app i = f i

def CategoryTheory.Discrete.natIso E1 #

{C : Type u₂} →
  [inst : CategoryTheory.Category.{v₂, u₂} C] →
    {I : Type u₁} →
      {F G : CategoryTheory.Functor (CategoryTheory.Discrete I) C} →
        ((i : CategoryTheory.Discrete I) → F.obj i ≅ G.obj i) → (F ≅ G)

For functors out of a discrete category, a natural isomorphism is just a collection of isomorphisms, as the naturality squares are trivial.

theorem CategoryTheory.Discrete.natIso_hom_app E0 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u₁}
  {F G : CategoryTheory.Functor (CategoryTheory.Discrete I) C} (f : (i : CategoryTheory.Discrete I) → F.obj i ≅ G.obj i)
  (X : CategoryTheory.Discrete I), (CategoryTheory.Discrete.natIso f).hom.app X = (f X).hom

theorem CategoryTheory.Discrete.natIso_inv_app E0 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u₁}
  {F G : CategoryTheory.Functor (CategoryTheory.Discrete I) C} (f : (i : CategoryTheory.Discrete I) → F.obj i ≅ G.obj i)
  (X : CategoryTheory.Discrete I), (CategoryTheory.Discrete.natIso f).inv.app X = (f X).inv

instance CategoryTheory.Discrete.instIsIsoFunctorNatTrans E0 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u_1}
  {F G : CategoryTheory.Functor (CategoryTheory.Discrete I) C} (f : (i : CategoryTheory.Discrete I) → F.obj i ⟶ G.obj i)
  [∀ (i : CategoryTheory.Discrete I), CategoryTheory.IsIso (f i)],
  CategoryTheory.IsIso (CategoryTheory.Discrete.natTrans f)

theorem CategoryTheory.Discrete.natIso_app E0 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u₁}
  {F G : CategoryTheory.Functor (CategoryTheory.Discrete I) C} (f : (i : CategoryTheory.Discrete I) → F.obj i ≅ G.obj i)
  (i : CategoryTheory.Discrete I), (CategoryTheory.Discrete.natIso f).app i = f i

def CategoryTheory.Discrete.natIsoFunctor E1 #

{C : Type u₂} →
  [inst : CategoryTheory.Category.{v₂, u₂} C] →
    {I : Type u₁} →
      {F : CategoryTheory.Functor (CategoryTheory.Discrete I) C} →
        F ≅ CategoryTheory.Discrete.functor (F.obj ∘ CategoryTheory.Discrete.mk)

Every functor F from a discrete category is naturally isomorphic (actually, equal) to Discrete.functor (F.obj).

theorem CategoryTheory.Discrete.natIsoFunctor_hom_app E0 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u₁}
  {F : CategoryTheory.Functor (CategoryTheory.Discrete I) C} (X : CategoryTheory.Discrete I),
  CategoryTheory.Discrete.natIsoFunctor.hom.app X = CategoryTheory.CategoryStruct.id (F.obj X)

theorem CategoryTheory.Discrete.natIsoFunctor_inv_app E0 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u₁}
  {F : CategoryTheory.Functor (CategoryTheory.Discrete I) C} (X : CategoryTheory.Discrete I),
  CategoryTheory.Discrete.natIsoFunctor.inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)

def CategoryTheory.Discrete.compNatIsoDiscrete E1 #

{C : Type u₂} →
  [inst : CategoryTheory.Category.{v₂, u₂} C] →
    {I : Type u₁} →
      {D : Type u₃} →
        [inst_1 : CategoryTheory.Category.{v₃, u₃} D] →
          (F : I → C) →
            (G : CategoryTheory.Functor C D) →
              (CategoryTheory.Discrete.functor F).comp G ≅ CategoryTheory.Discrete.functor (G.obj ∘ F)

Composing Discrete.functor F with another functor G amounts to composing F with G.obj

theorem CategoryTheory.Discrete.compNatIsoDiscrete_hom_app E0 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u₁} {D : Type u₃}
  [inst_1 : CategoryTheory.Category.{v₃, u₃} D] (F : I → C) (G : CategoryTheory.Functor C D)
  (X : CategoryTheory.Discrete I),
  (CategoryTheory.Discrete.compNatIsoDiscrete F G).hom.app X = CategoryTheory.CategoryStruct.id (G.obj (F X.as))

theorem CategoryTheory.Discrete.compNatIsoDiscrete_inv_app E0 #

∀ {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C] {I : Type u₁} {D : Type u₃}
  [inst_1 : CategoryTheory.Category.{v₃, u₃} D] (F : I → C) (G : CategoryTheory.Functor C D)
  (X : CategoryTheory.Discrete I),
  (CategoryTheory.Discrete.compNatIsoDiscrete F G).inv.app X = CategoryTheory.CategoryStruct.id (G.obj (F X.as))

def CategoryTheory.Discrete.equivalence E1 #

{I : Type u₁} → {J : Type u₂} → I ≃ J → (CategoryTheory.Discrete I ≌ CategoryTheory.Discrete J)

We can promote a type-level Equiv to an equivalence between the corresponding discrete categories.

theorem CategoryTheory.Discrete.equivalence_unitIso E0 #

∀ {I : Type u₁} {J : Type u₂} (e : I ≃ J),
  (CategoryTheory.Discrete.equivalence e).unitIso = CategoryTheory.Discrete.natIso fun i ↦ CategoryTheory.eqToIso ⋯

theorem CategoryTheory.Discrete.equivalence_functor E0 #

∀ {I : Type u₁} {J : Type u₂} (e : I ≃ J),
  (CategoryTheory.Discrete.equivalence e).functor = CategoryTheory.Discrete.functor (CategoryTheory.Discrete.mk ∘ ⇑e)

theorem CategoryTheory.Discrete.equivalence_counitIso E0 #

∀ {I : Type u₁} {J : Type u₂} (e : I ≃ J),
  (CategoryTheory.Discrete.equivalence e).counitIso = CategoryTheory.Discrete.natIso fun j ↦ CategoryTheory.eqToIso ⋯

theorem CategoryTheory.Discrete.equivalence_inverse E0 #

∀ {I : Type u₁} {J : Type u₂} (e : I ≃ J),
  (CategoryTheory.Discrete.equivalence e).inverse =
    CategoryTheory.Discrete.functor (CategoryTheory.Discrete.mk ∘ ⇑e.symm)

def CategoryTheory.Discrete.equivOfEquivalence E1 #

{α : Type u₁} → {β : Type u₂} → (CategoryTheory.Discrete α ≌ CategoryTheory.Discrete β) → α ≃ β

We can convert an equivalence of discrete categories to a type-level Equiv.

theorem CategoryTheory.Discrete.equivOfEquivalence_apply E0 #

∀ {α : Type u₁} {β : Type u₂} (h : CategoryTheory.Discrete α ≌ CategoryTheory.Discrete β) (a : α),
  (CategoryTheory.Discrete.equivOfEquivalence h) a =
    (CategoryTheory.Discrete.as ∘ h.functor.obj ∘ CategoryTheory.Discrete.mk) a

theorem CategoryTheory.Discrete.equivOfEquivalence_symm_apply E0 #

∀ {α : Type u₁} {β : Type u₂} (h : CategoryTheory.Discrete α ≌ CategoryTheory.Discrete β) (a : β),
  (CategoryTheory.Discrete.equivOfEquivalence h).symm a =
    (CategoryTheory.Discrete.as ∘ h.inverse.obj ∘ CategoryTheory.Discrete.mk) a

def CategoryTheory.Discrete.opposite E1 #

(α : Type u₁) → (CategoryTheory.Discrete α)ᵒᵖ ≌ CategoryTheory.Discrete α

A discrete category is equivalent to its opposite category.

theorem CategoryTheory.Discrete.opposite_functor_obj_as E0 #

∀ (α : Type u₁) (X : (CategoryTheory.Discrete α)ᵒᵖ),
  ((CategoryTheory.Discrete.opposite α).functor.obj X).as = (Opposite.unop X).as

theorem CategoryTheory.Discrete.opposite_inverse_obj E0 #

∀ (α : Type u₁) (a : CategoryTheory.Discrete α), (CategoryTheory.Discrete.opposite α).inverse.obj a = Opposite.op a

theorem CategoryTheory.Discrete.functor_map_id E0 #

∀ {J : Type v₁} {C : Type u₂} [inst : CategoryTheory.Category.{v₂, u₂} C]
  (F : CategoryTheory.Functor (CategoryTheory.Discrete J) C) {j : CategoryTheory.Discrete J} (f : j ⟶ j),
  F.map f = CategoryTheory.CategoryStruct.id (F.obj j)

theorem CategoryTheory.Discrete.forall E0 #

∀ {α : Type u_1} {p : CategoryTheory.Discrete α → Prop},
  (∀ (a : CategoryTheory.Discrete α), p a) ↔ ∀ (a' : α), p { as := a' }

theorem CategoryTheory.Discrete.exists E0 #

∀ {α : Type u_1} {p : CategoryTheory.Discrete α → Prop}, (∃ a, p a) ↔ ∃ a', p { as := a' }

def CategoryTheory.piEquivalenceFunctorDiscrete E1 #

(J : Type u₂) →
  (C : Type u₁) →
    [inst : CategoryTheory.Category.{v₁, u₁} C] → J → C ≌ CategoryTheory.Functor (CategoryTheory.Discrete J) C

The equivalence of categories (J → C) ≌ (Discrete J ⥤ C).

theorem CategoryTheory.piEquivalenceFunctorDiscrete_inverse_obj E0 #

∀ (J : Type u₂) (C : Type u₁) [inst : CategoryTheory.Category.{v₁, u₁} C]
  (F : CategoryTheory.Functor (CategoryTheory.Discrete J) C) (j : J),
  (CategoryTheory.piEquivalenceFunctorDiscrete J C).inverse.obj F j = F.obj { as := j }

theorem CategoryTheory.piEquivalenceFunctorDiscrete_functor_obj E0 #

∀ (J : Type u₂) (C : Type u₁) [inst : CategoryTheory.Category.{v₁, u₁} C] (F : J → C),
  (CategoryTheory.piEquivalenceFunctorDiscrete J C).functor.obj F = CategoryTheory.Discrete.functor F

theorem CategoryTheory.piEquivalenceFunctorDiscrete_unitIso E0 #

∀ (J : Type u₂) (C : Type u₁) [inst : CategoryTheory.Category.{v₁, u₁} C],
  (CategoryTheory.piEquivalenceFunctorDiscrete J C).unitIso =
    CategoryTheory.Iso.refl (CategoryTheory.Functor.id (J → C))

theorem CategoryTheory.piEquivalenceFunctorDiscrete_inverse_map E0 #

∀ (J : Type u₂) (C : Type u₁) [inst : CategoryTheory.Category.{v₁, u₁} C]
  {X Y : CategoryTheory.Functor (CategoryTheory.Discrete J) C} (f : X ⟶ Y) (j : J),
  (CategoryTheory.piEquivalenceFunctorDiscrete J C).inverse.map f j = f.app { as := j }

theorem CategoryTheory.piEquivalenceFunctorDiscrete_functor_map E0 #

∀ (J : Type u₂) (C : Type u₁) [inst : CategoryTheory.Category.{v₁, u₁} C] {X Y : J → C} (f : X ⟶ Y),
  (CategoryTheory.piEquivalenceFunctorDiscrete J C).functor.map f = CategoryTheory.Discrete.natTrans fun j ↦ f j.as

theorem CategoryTheory.piEquivalenceFunctorDiscrete_counitIso E0 #

∀ (J : Type u₂) (C : Type u₁) [inst : CategoryTheory.Category.{v₁, u₁} C],
  (CategoryTheory.piEquivalenceFunctorDiscrete J C).counitIso =
    CategoryTheory.NatIso.ofComponents
      (fun F ↦
        CategoryTheory.NatIso.ofComponents
          (fun x ↦
            CategoryTheory.Iso.refl
              ((({ obj := fun F j ↦ F.obj { as := j }, map := fun {X Y} f j ↦ f.app { as := j }, map_id := ⋯,
                            map_comp := ⋯ }.comp
                        { obj := fun F ↦ CategoryTheory.Discrete.functor F,
                          map := fun {X Y} f ↦ CategoryTheory.Discrete.natTrans fun j ↦ f j.as, map_id := ⋯,
                          map_comp := ⋯ }).obj
                    F).obj
                x))
          ⋯)
      ⋯

def CategoryTheory.piEquivalenceFunctorDiscreteCompEvaluationIso E1 #

(C : Type u_1) →
  [inst : CategoryTheory.Category.{v_1, u_1} C] →
    {J : Type u_2} →
      (j : J) →
        (CategoryTheory.piEquivalenceFunctorDiscrete J C).functor.comp
            ((CategoryTheory.evaluation (CategoryTheory.Discrete J) C).obj { as := j }) ≅
          CategoryTheory.Pi.eval (fun a ↦ C) j

piEquivalenceFunctorDiscrete is compatible with evaluation.

theorem CategoryTheory.piEquivalenceFunctorDiscreteCompEvaluationIso_hom_app E0 #

∀ (C : Type u_1) [inst : CategoryTheory.Category.{v_1, u_1} C] {J : Type u_2} (j : J) (X : J → C),
  (CategoryTheory.piEquivalenceFunctorDiscreteCompEvaluationIso C j).hom.app X = CategoryTheory.CategoryStruct.id (X j)

theorem CategoryTheory.piEquivalenceFunctorDiscreteCompEvaluationIso_inv_app E0 #

∀ (C : Type u_1) [inst : CategoryTheory.Category.{v_1, u_1} C] {J : Type u_2} (j : J) (X : J → C),
  (CategoryTheory.piEquivalenceFunctorDiscreteCompEvaluationIso C j).inv.app X = CategoryTheory.CategoryStruct.id (X j)

class CategoryTheory.IsDiscrete E1 #

(C : Type u_1) → [CategoryTheory.Category.{v_1, u_1} C] → Prop

A category is discrete when there is at most one morphism between two objects, in which case they are equal.

ctor CategoryTheory.IsDiscrete.mk E0 #

∀ {C : Type u_1} [inst : CategoryTheory.Category.{v_1, u_1} C],
  autoParam (∀ (X Y : C), Subsingleton (X ⟶ Y)) CategoryTheory.IsDiscrete.subsingleton._autoParam →
    (∀ {X Y : C} (f : X ⟶ Y), X = Y) → CategoryTheory.IsDiscrete C

instance CategoryTheory.IsDiscrete.subsingleton E0 #

∀ {C : Type u_1} {inst : CategoryTheory.Category.{v_1, u_1} C} [self : CategoryTheory.IsDiscrete C] (X Y : C),
  Subsingleton (X ⟶ Y)

instance CategoryTheory.Discrete.isDiscrete E0 #

∀ (C : Type u_1), CategoryTheory.IsDiscrete (CategoryTheory.Discrete C)

instance CategoryTheory.instIsDiscreteOfSubsingletonOfIsThin E0 #

∀ {C : Type u_1} [inst : CategoryTheory.Category.{u_2, u_1} C] [Subsingleton C] [Quiver.IsThin C],
  CategoryTheory.IsDiscrete C

theorem CategoryTheory.obj_ext_of_isDiscrete E1 #

∀ {C : Type u_1} [inst : CategoryTheory.Category.{v_1, u_1} C] [CategoryTheory.IsDiscrete C] {X Y : C} (f : X ⟶ Y),
  X = Y

instance CategoryTheory.isIso_of_isDiscrete E0 #

∀ {C : Type u_1} [inst : CategoryTheory.Category.{v_1, u_1} C] [CategoryTheory.IsDiscrete C] {X Y : C} (f : X ⟶ Y),
  CategoryTheory.IsIso f

instance CategoryTheory.instIsDiscreteOpposite E0 #

∀ {C : Type u_1} [inst : CategoryTheory.Category.{v_1, u_1} C] [CategoryTheory.IsDiscrete C],
  CategoryTheory.IsDiscrete Cᵒᵖ