A type synonym for promoting any type to a category, with the only morphisms being equalities.
Equations
Equations
- category_theory.discrete_category α = {to_category_struct := {to_has_hom := {hom := λ (X Y : category_theory.discrete α), ulift (plift (X = Y))}, id := λ (X : category_theory.discrete α), {down := {down := _}}, comp := λ (X Y Z : category_theory.discrete α) (g : X ⟶ Y) (f : Y ⟶ Z), ulift.cases_on f (λ (f : plift (Y = Z)), f.cases_on (λ (f : Y = Z), eq.rec g f))}, id_comp' := _, comp_id' := _, assoc' := _}
Equations
- category_theory.discrete.inhabited = id _inst_1
Any function I → C
gives a functor discrete I ⥤ C
.
Equations
For functors out of a discrete category, a natural transformation is just a collection of maps, as the naturality squares are trivial.
Equations
- category_theory.discrete.nat_trans f = {app := f, naturality' := _}
For functors out of a discrete category, a natural isomorphism is just a collection of isomorphisms, as the naturality squares are trivial.
Equations
Every functor F
from a discrete category is naturally isomorphic (actually, equal) to
discrete.functor (F.obj)
.
Equations
We can promote a type-level equiv
to
an equivalence between the corresponding discrete
categories.
Equations
- category_theory.discrete.equivalence e = {functor := category_theory.discrete.functor ⇑e, inverse := category_theory.discrete.functor ⇑(e.symm), unit_iso := category_theory.discrete.nat_iso (λ (i : category_theory.discrete I), category_theory.eq_to_iso _), counit_iso := category_theory.discrete.nat_iso (λ (j : category_theory.discrete J), category_theory.eq_to_iso _), functor_unit_iso_comp' := _}
We can convert an equivalence of discrete
categories to a type-level equiv
.
A discrete category is equivalent to its opposite category.
Equations
- category_theory.discrete.opposite α = let F : category_theory.discrete α ⥤ (category_theory.discrete α)ᵒᵖ := category_theory.discrete.functor (λ (x : α), opposite.op x) in category_theory.equivalence.mk F.left_op F (category_theory.nat_iso.of_components (λ (X : (category_theory.discrete α)ᵒᵖ), _.mpr (category_theory.iso.refl X)) _) (category_theory.discrete.nat_iso (λ (X : category_theory.discrete α), _.mpr (category_theory.iso.refl X)))