Documentation

Mathlib.CategoryTheory.CodiscreteCategory

Codiscrete categories #

We define Codiscrete A as an alias for the type A, and use this type alias to provide a Category instance whose Hom types are Unit.

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

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

We define functorToCat : Type u ⥤ Cat.{0,u} which sends a type to the codiscrete category and show it is right adjoint to Cat.objects.

structure CategoryTheory.Codiscrete (α : Type u) :

A wrapper for promoting any type to a category, with a unique morphism between any two objects of the category.

  • as : α

    A wrapper for promoting any type to a category, with a unique morphism between any two objects of the category.

Instances For
    theorem CategoryTheory.Codiscrete.ext_iff {α : Type u} {x y : Codiscrete α} :
    x = y x.as = y.as
    theorem CategoryTheory.Codiscrete.ext {α : Type u} {x y : Codiscrete α} (as : x.as = y.as) :
    x = y
    @[simp]
    theorem CategoryTheory.Codiscrete.mk_as {α : Type u} (X : Codiscrete α) :
    { as := X.as } = X

    Codiscrete α is equivalent to the original type α.

    Equations
    Instances For
      @[simp]
      @[implicit_reducible]
      Equations
      • One or more equations did not get rendered due to their size.

      Any two objects in a codiscrete category are isomorphic.

      Equations
      • x.iso y = { hom := (), inv := (), hom_inv_id := , inv_hom_id := }
      Instances For
        theorem CategoryTheory.Codiscrete.eq_iso_hom {A : Type u} {x y : Codiscrete A} (f : x y) :
        f = (x.iso y).hom
        theorem CategoryTheory.Codiscrete.eq_iso_inv {A : Type u} {x y : Codiscrete A} (f : x y) :
        f = (y.iso x).inv
        @[implicit_reducible]
        Equations
        @[implicit_reducible]
        Equations
        def CategoryTheory.Codiscrete.functor {C : Type u} [Category.{v, u} C] {A : Type w} (F : CA) :

        Any function C → A lifts to a functor C ⥤ Codiscrete A.

        Equations
        Instances For

          The underlying function C → A of a functor C ⥤ Codiscrete A.

          Equations
          Instances For

            Given two functors to a codiscrete category, there is a trivial natural transformation.

            Equations
            Instances For

              Given two functors into a codiscrete category, the trivial natural transformation is a natural isomorphism.

              Equations
              Instances For

                Every functor F to a codiscrete category is naturally isomorphic (actually, equal) to Codiscrete.as ∘ F.obj.

                Equations
                Instances For
                  def CategoryTheory.Codiscrete.functorOfFun {A : Type u_1} {B : Type u_2} (f : AB) :

                  A function induces a functor between codiscrete categories.

                  Equations
                  Instances For

                    A codiscrete category is equivalent to its opposite category.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      Codiscrete.functorToCat turns a type into a codiscrete category.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        For a category C and type A, there is an equivalence between functions objects.obj C ⟶ A and functors C ⥤ Codiscrete A.

                        Equations
                        Instances For

                          The functor that turns a type into a codiscrete category is right adjoint to the objects functor.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            Components of the unit of the adjunction Cat.objects ⊣ Codiscrete.functorToCat.

                            Equations
                            Instances For

                              Components of the counit of the adjunction Cat.objects ⊣ Codiscrete.functorToCat

                              Equations
                              Instances For

                                Left triangle equality of the adjunction Cat.objects ⊣ Codiscrete.functorToCat, as a universe polymorphic statement.

                                Right triangle equality of the adjunction Cat.objects ⊣ Codiscrete.functorToCat, stated using a composition of functors.