The areas / V24. Category theory
Mathlib.CategoryTheory.CodiscreteCategory
37 declarations. Mathlib docs · Source
def CategoryTheory.Codiscrete.ctorIdx E1 #
{α : Type u} → CategoryTheory.Codiscrete α → ℕ
theorem CategoryTheory.Codiscrete.mk.inj E1 #
∀ {α : Type u} {as as_1 : α}, { as := as } = { as := as_1 } → as = as_1
theorem CategoryTheory.Codiscrete.mk.injEq E0 #
∀ {α : Type u} (as as_1 : α), ({ as := as } = { as := as_1 }) = (as = as_1)
structure CategoryTheory.Codiscrete E1 #
Type u → Type u
A wrapper for promoting any type to a category, with a unique morphism between any two objects of the category.
theorem CategoryTheory.Codiscrete.ext E1 #
∀ {α : Type u} {x y : CategoryTheory.Codiscrete α}, x.as = y.as → x = y
theorem CategoryTheory.Codiscrete.ext_iff E0 #
∀ {α : Type u} {x y : CategoryTheory.Codiscrete α}, x = y ↔ x.as = y.as
ctor CategoryTheory.Codiscrete.mk E0 #
{α : Type u} → α → CategoryTheory.Codiscrete α
abbrev CategoryTheory.Codiscrete.as E1 #
{α : Type u} → CategoryTheory.Codiscrete α → α
A wrapper for promoting any type to a category, with a unique morphism between any two objects of the category.
theorem CategoryTheory.Codiscrete.mk_as E0 #
∀ {α : Type u} (X : CategoryTheory.Codiscrete α), { as := X.as } = X
def CategoryTheory.codiscreteEquiv E1 #
{α : Type u} → CategoryTheory.Codiscrete α ≃ α
Codiscrete α is equivalent to the original type α.
theorem CategoryTheory.codiscreteEquiv_apply E0 #
∀ {α : Type u} (self : CategoryTheory.Codiscrete α), CategoryTheory.codiscreteEquiv self = self.as
theorem CategoryTheory.codiscreteEquiv_symm_apply_as E0 #
∀ {α : Type u} (as : α), (CategoryTheory.codiscreteEquiv.symm as).as = as
instance CategoryTheory.instDecidableEqCodiscrete E0 #
{α : Type u} → [DecidableEq α] → DecidableEq (CategoryTheory.Codiscrete α)
instance CategoryTheory.Codiscrete.instCategory E0 #
(A : Type u_1) → CategoryTheory.Category.{0, u_1} (CategoryTheory.Codiscrete A)
def CategoryTheory.Codiscrete.iso E1 #
{A : Type u} → (x y : CategoryTheory.Codiscrete A) → x ≅ y
Any two objects in a codiscrete category are isomorphic.
instance CategoryTheory.Codiscrete.uniqueHom E0 #
{A : Type u} → (x y : CategoryTheory.Codiscrete A) → Unique (x ⟶ y)
theorem CategoryTheory.Codiscrete.uniqueHom_default E0 #
∀ {A : Type u} (x y : CategoryTheory.Codiscrete A), default = (x.iso y).hom
theorem CategoryTheory.Codiscrete.uniqueIso_default E0 #
∀ {A : Type u} (x y : CategoryTheory.Codiscrete A), default = x.iso y
instance CategoryTheory.Codiscrete.uniqueIso E0 #
{A : Type u} → (x y : CategoryTheory.Codiscrete A) → Unique (x ≅ y)
def CategoryTheory.Codiscrete.functor E1 #
{C : Type u} →
[inst : CategoryTheory.Category.{v, u} C] →
{A : Type w} → (C → A) → CategoryTheory.Functor C (CategoryTheory.Codiscrete A)
Any function C → A lifts to a functor C ⥤ Codiscrete A.
def CategoryTheory.Codiscrete.invFunctor E1 #
{C : Type u} →
[inst : CategoryTheory.Category.{v, u} C] →
{A : Type w} → CategoryTheory.Functor C (CategoryTheory.Codiscrete A) → C → A
The underlying function C → A of a functor C ⥤ Codiscrete A.
def CategoryTheory.Codiscrete.natTrans E1 #
{C : Type u} →
[inst : CategoryTheory.Category.{v, u} C] →
{A : Type w} → {F G : CategoryTheory.Functor C (CategoryTheory.Codiscrete A)} → F ⟶ G
Given two functors to a codiscrete category, there is a trivial natural transformation.
def CategoryTheory.Codiscrete.natIso E1 #
{C : Type u} →
[inst : CategoryTheory.Category.{v, u} C] →
{A : Type w} → {F G : CategoryTheory.Functor C (CategoryTheory.Codiscrete A)} → F ≅ G
Given two functors into a codiscrete category, the trivial natural transformation is a natural isomorphism.
def CategoryTheory.Codiscrete.natIsoFunctor E1 #
{C : Type u} →
[inst : CategoryTheory.Category.{v, u} C] →
{A : Type w} →
{F : CategoryTheory.Functor C (CategoryTheory.Codiscrete A)} →
F ≅ CategoryTheory.Codiscrete.functor (CategoryTheory.Codiscrete.as ∘ F.obj)
Every functor F to a codiscrete category is naturally isomorphic (actually, equal) to
Codiscrete.as ∘ F.obj.
theorem CategoryTheory.Codiscrete.natIsoFunctor_hom_app E0 #
∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {A : Type w}
{F : CategoryTheory.Functor C (CategoryTheory.Codiscrete A)} (X : C),
CategoryTheory.Codiscrete.natIsoFunctor.hom.app X = CategoryTheory.CategoryStruct.id (F.obj X)
theorem CategoryTheory.Codiscrete.natIsoFunctor_inv_app E0 #
∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {A : Type w}
{F : CategoryTheory.Functor C (CategoryTheory.Codiscrete A)} (X : C),
CategoryTheory.Codiscrete.natIsoFunctor.inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)
def CategoryTheory.Codiscrete.functorOfFun E1 #
{A : Type u_1} →
{B : Type u_2} → (A → B) → CategoryTheory.Functor (CategoryTheory.Codiscrete A) (CategoryTheory.Codiscrete B)
A function induces a functor between codiscrete categories.
def CategoryTheory.Codiscrete.oppositeEquivalence E1 #
(A : Type u_1) → (CategoryTheory.Codiscrete A)ᵒᵖ ≌ CategoryTheory.Codiscrete A
A codiscrete category is equivalent to its opposite category.
def CategoryTheory.Codiscrete.functorToCat E1 #
CategoryTheory.Functor (Type u) CategoryTheory.Cat
Codiscrete.functorToCat turns a type into a codiscrete category.
def CategoryTheory.Codiscrete.equivFunctorToCodiscrete E1 #
{C : Type u} →
[inst : CategoryTheory.Category.{v, u} C] →
{A : Type w} → (C → A) ≃ CategoryTheory.Functor C (CategoryTheory.Codiscrete A)
For a category C and type A, there is an equivalence between functions objects.obj C ⟶ A
and functors C ⥤ Codiscrete A.
def CategoryTheory.Codiscrete.adj E1 #
CategoryTheory.Cat.objects ⊣ CategoryTheory.Codiscrete.functorToCat
The functor that turns a type into a codiscrete category is right adjoint to the objects functor.
def CategoryTheory.Codiscrete.unitApp E1 #
(C : Type u) → [inst : CategoryTheory.Category.{v, u} C] → CategoryTheory.Functor C (CategoryTheory.Codiscrete C)
Components of the unit of the adjunction Cat.objects ⊣ Codiscrete.functorToCat.
def CategoryTheory.Codiscrete.counitApp E1 #
(A : Type u) → CategoryTheory.Codiscrete A → A
Components of the counit of the adjunction Cat.objects ⊣ Codiscrete.functorToCat
theorem CategoryTheory.Codiscrete.adj_unit_app E1 #
∀ (X : CategoryTheory.Cat), CategoryTheory.Codiscrete.adj.unit.app X = (CategoryTheory.Codiscrete.unitApp ↑X).toCatHom
theorem CategoryTheory.Codiscrete.adj_counit_app E1 #
∀ (A : Type u), CategoryTheory.Codiscrete.adj.counit.app A = TypeCat.ofHom (CategoryTheory.Codiscrete.counitApp A)
theorem CategoryTheory.Codiscrete.left_triangle_components E1 #
∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C],
CategoryTheory.Codiscrete.counitApp C ∘ (CategoryTheory.Codiscrete.unitApp C).obj = id
Left triangle equality of the adjunction Cat.objects ⊣ Codiscrete.functorToCat,
as a universe polymorphic statement.
theorem CategoryTheory.Codiscrete.right_triangle_components E1 #
∀ (X : Type u),
(CategoryTheory.Codiscrete.unitApp (CategoryTheory.Codiscrete X)).comp
(CategoryTheory.Codiscrete.functorOfFun (CategoryTheory.Codiscrete.counitApp X)) =
CategoryTheory.Functor.id (CategoryTheory.Codiscrete X)
Right triangle equality of the adjunction Cat.objects ⊣ Codiscrete.functorToCat,
stated using a composition of functors.