\[ \require{mathtools} \let\DeclarePairedDelimiter\DeclarePairedDelimiters % MathJax typo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % symbol %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % sets \newcommand{\N}{\mathbb{N}} % natural numbers \newcommand{\Z}{\mathbb{Z}} % integers \newcommand{\Q}{\mathbb{Q}} % rational numbers \newcommand{\R}{\mathbb{R}} % real numbers \newcommand{\C}{\mathbb{C}} % complex numbers % category \newcommand{\catf}[1]{{\mathbf{#1}}} \newcommand{\cA}{\catf{A}} \newcommand{\cB}{\catf{B}} \newcommand{\cC}{\catf{C}} \newcommand{\cD}{\catf{D}} \newcommand{\cE}{\catf{E}} \newcommand{\cF}{\catf{F}} \newcommand{\cG}{\catf{G}} \newcommand{\cH}{\catf{H}} \newcommand{\cI}{\catf{I}} \newcommand{\cJ}{\catf{J}} \newcommand{\cK}{\catf{K}} \newcommand{\cL}{\catf{L}} \newcommand{\cM}{\catf{M}} \newcommand{\cN}{\catf{N}} \newcommand{\cO}{\catf{O}} \newcommand{\cP}{\catf{P}} \newcommand{\cQ}{\catf{Q}} \newcommand{\cR}{\catf{R}} \newcommand{\cS}{\catf{S}} \newcommand{\cT}{\catf{T}} \newcommand{\cU}{\catf{U}} \newcommand{\cV}{\catf{V}} \newcommand{\cW}{\catf{W}} \newcommand{\cX}{\catf{X}} \newcommand{\cY}{\catf{Y}} \newcommand{\cZ}{\catf{Z}} \newcommand{\cZero}{\catf{0}} \newcommand{\cOne}{\catf{1}} \newcommand{\cTwo}{\catf{2}} \newcommand{\cArr}{\catf{Arr}} % arrow \newcommand{\cPSh}{\catf{PSh}} % presheaf \newcommand{\cCone}{\catf{Cone}} % cone \newcommand{\cCocone}{\catf{Cocone}} % cocone \newcommand{\cFin}{\catf{Fin}} % finite prefix \newcommand{\cSet}{\catf{Set}} % functions \newcommand{\cRel}{\catf{Rel}} % relations \newcommand{\cPos}{\catf{Pos}} % posets \newcommand{\cMon}{\catf{Mon}} % monoids \newcommand{\cCMon}{\catf{CMon}} % commutative monoids \newcommand{\cGrp}{\catf{Grp}} % groups \newcommand{\cAb}{\catf{Ab}} % abelian groups \newcommand{\cCat}{\catf{Cat}} % categories \newcommand{\cGrpd}{\catf{Grpd}} % groupoids \newcommand{\cVect}{\catf{Vect}} % vector spaces \newcommand{\cMat}{\catf{Mat}} % matrices \newcommand{\cTop}{\catf{Top}} % topological spaces and continuous maps \newcommand{\cMet}{\catf{Met}} % metric spaces and metric maps \newcommand{\cMeas}{\catf{Meas}} % measurable spaces and measurable functions \newcommand{\cStoch}{\catf{Stoch}} % measurable spaces and stochastic maps \newcommand{\cProb}{\catf{Prob}} % probability measures and measure-preserving functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % supscript %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\op}{^\mathrm{op}} \newcommand{\inv}{^{-1}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % function %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareMathOperator{\lcm}{lcm} \DeclareMathOperator{\logsumexp}{log-sum-exp} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % arrow %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % morphism \newcommand{\xto}{\xrightarrow} % -> \newcommand{\xot}{\xleftarrow} % <- \newcommand{\toot}{\rightleftarrows} % <=> \newcommand{\xtoot}[2]{\xrightleftharpoons[#2]{#1}} \newcommand{\iso}{\cong} % ~= \newcommand{\klto}{\rightsquigarrow} % ~> \newcommand{\mono}{\rightarrowtail} % >-> \newcommand{\epi}{\twoheadrightarrow} % ->> \newcommand{\ihom}{\multimap} % -o % category \newcommand{\incl}{\hookrightarrow} \newcommand{\adjto}[2]{\overset{{}\xto[]{#1}{}}{\underset{{}\xot[#2]{}{}}{\bot}}} % functor \newcommand{\nat}{\Rightarrow} % => \newcommand{\xnat}{\xRightarrow} % => \newcommand{\comma}{\downarrow} \newcommand{\adj}{\dashv} % -| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % delimiter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclarePairedDelimiter{\parens}{(}{)} % parentheses ( ) \DeclarePairedDelimiter{\bracks}{[}{]} % brackets [ ] \DeclarePairedDelimiter{\braces}{\{}{\}} % braces { } \DeclarePairedDelimiter{\angles}{\langle}{\rangle} % angles \DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor} \DeclarePairedDelimiter{\ceil}{\lceil}{\rceil} \newcommand{\set}{\braces} \newcommand{\singleton}{{\set{*}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % operator %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\compL}{\mathbin{\circ}} \newcommand{\compR}{\mathbin{;}} \newcommand{\Kl}{\mathrm{Kl}} \DeclareMathOperator{\Obj}{Obj} \DeclareMathOperator{\Hom}{Hom} \DeclareMathOperator{\Sub}{Sub} \DeclareMathOperator{\Eq}{Eq} \DeclareMathOperator{\Coeq}{Coeq} \DeclareMathOperator{\Pull}{Pull} \DeclareMathOperator{\Push}{Push} \DeclareMathOperator{\Lan}{Lan} \DeclareMathOperator{\Ran}{Ran} \DeclareMathOperator{\Lift}{Lift} \DeclareMathOperator{\Rift}{Rift} \DeclareMathOperator{\id}{id} \DeclareMathOperator{\act}{act} \DeclareMathOperator{\colim}{colim} % exponential \DeclareMathOperator{\partf}{partial} \DeclareMathOperator{\curry}{curry} % natural number \DeclareMathOperator{\zero}{zero} \DeclareMathOperator{\successor}{succ} % list \DeclareMathOperator{\nil}{nil} \DeclareMathOperator{\cons}{cons} \newcommand{\concat}{\mathbin{{+}\mspace{-8mu}{+}}} % fold \DeclareMathOperator{\fold}{fold} \DeclareMathOperator{\map}{map} \DeclareMathOperator{\filter}{filter} % bool \DeclareMathOperator{\cond}{cond} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % order %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\meet}{\wedge} \newcommand{\join}{\vee} \newcommand{\bigmeet}{\bigwedge} \newcommand{\bigjoin}{\bigvee} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % logic %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\lfal}{\bot} \newcommand{\ltru}{\top} \newcommand{\lcon}{\wedge} \newcommand{\lncon}{\uparrow} \newcommand{\ldis}{\vee} \newcommand{\lndis}{\downarrow} \newcommand{\limp}{\rightarrow} \newcommand{\lnimp}{\nrightarrow} \newcommand{\lcim}{\leftarrow} \newcommand{\lncim}{\nleftarrow} \newcommand{\leqv}{\leftrightarrow} \newcommand{\lneqv}{\nleftrightarrow} \newcommand{\lproves}{\vdash} % |- \newcommand{\lmodels}{\vDash} % |= \newcommand{\lnproves}{\nvdash} % |/- \newcommand{\lnmodels}{\nvDash} % |/= \]
An enriched category is a category with generalized morphisms.
1 Enriched category
A category \(\cC = (\Obj, \Hom, \compL, \id)\) enriched in a monoidal category \((\cV, \otimes, I, \alpha, \lambda, \rho)\) (\(\cV\)-enriched category) consists of
- a collection of objects \(\Obj\)
- a hom-object \(\Hom(A, B) \in \Obj_\cV\) between objects
- a composition morphism \(\compL_{A, B, C}: \Hom(B, C) \otimes \Hom(A, B) \to \Hom(A, C)\) for each triple of objects
- an identity element \(\id_A: I \to \Hom(A, A)\) for each object
subject to
- associativity: \(\compL (\id \otimes \compL) \alpha = \compL (\compL \otimes \id)\)
- identity: \(\compL (\id_B \otimes \id) = \lambda\) and \(\compL (\id \otimes \id_A) = \rho\)
2 Enriched functor
For \(\cV\)-enriched categories \(\cC\) and \(\cD\), a \(\cV\)-enriched functor \(F: \cC \to \cD\) consists of
- a function sending \(\cC\)-objects to \(\cD\)-objects \(F: \Obj_\cC \to \Obj_\cD:= A \mapsto FA\)
- a collection of \(\cV\)-morphisms indexed by pairs of \(\cC\)-objects \(F_{A, B}: \Hom_\cC(A, B) \to \Hom_\cD(FA, FB)\)
in such a way that \(F\) preserves
- composition: \(F_{A, C} \compL_\cC = \compL_\cD (F_{B, C} \otimes F_{A, B})\)
- identity: \(F_{A, A} \id_{\cC:A} = \id_{\cD:FA}\)
3 Enriched natural transformation
For \(\cV\)-enriched functors \(F, G: \cC \to \cD\), a \(\cV\)-enriched natural transformation \(\alpha: F \nat G\) is a collection of \(\cV\)-morphisms indexed by \(\cC\)-objects \(\alpha_A: I \to \Hom_\cD(FA, GA)\) that satisfies
- naturality: \(\compL_\cD (\alpha_B \otimes F_{A, B}) \lambda\inv = \compL_\cD (G_{A, B} \otimes \alpha_A) \rho\inv\)
\(\cV\cCat\): 2-category of \(\cV\)-enriched categories, \(\cV\)-enriched functors, and \(\cV\)-enriched natural transformations
4 Construction
\(\cV\)-product category \(\cC \otimes \cD\):
- \(\Obj_{\cC \otimes \cD} := \Obj_\cC \times \Obj_\cD\)
- \(\Hom_{\cC \otimes \cD}((A, B), (A', B')) := \Hom_\cC(A, A') \otimes \Hom_\cD(B, B') \in \Obj_\cV\)
The unit of \(\cV\)-product is \(\cI := (\singleton, I, \compL, \id)\).
A closed monoidal category is enriched over itself, but not vice versa.
\(\cV\)-bifunctor:
\[\begin{aligned} \begin{array}{cccc} F: & \cC \otimes \cD & \to & \cE \\ & (A, B) & \mapsto & F(A, B) \\ & \substack{ \Hom_{\cC \otimes \cD}((A, B), (A', B')) \\ \Hom_\cC(A, A') \otimes \Hom_\cD(B, B') } & \mapsto & \Hom_\cE(F(A, B), F(A',B')) \end{array} \end{aligned}\]
5 Base change
A lax monoidal functor \((F: \cV \to \cW, \mu, \eta)\) induces a 2-functor \(F_*: \cV\cCat \to \cW\cCat\) between enriched categories, where
- \(\Obj_{F_*\cC} := \Obj_\cC\)
- \(\Hom_{F_*\cC}(A, B) := F \Hom_\cC(A, B) \in \Obj_\cW\)
- \( \compL_{F_*\cC: A, B, C} := \substack{ \Hom_{F_*\cC}(B, C) \otimes \Hom_{F_*\cC}(A, B) \\ F \Hom_\cC(B, C) \otimes F \Hom_\cC(A, B) } \xto{\mu} F (\Hom_\cC(B, C) \otimes \Hom_\cC(A, B)) \xto{F \compL_{\cC: A, B, C}} \substack{ F \Hom_\cC(A, C) \\ \Hom_{F_*\cC}(A, C) } \)
- \( \id_{F_* \cC: A} := I_\cW \xto{\eta} F I_\cV \xto{F \id_{\cC: A}} \substack{ F \Hom_\cC(A, A) \\ = \Hom_{F_* \cC}(A, A) } \)
6 Examples
6.1 Category
6.1.1 Locally small category
- \((\cSet, \times, \singleton)\)
- \(\Hom(A, B) \in \cSet\)
- \(\compL: \Hom(B, C) \times \Hom(A, B) \to \Hom(A, C)\) (morphism composition)
- \(\id_A: \singleton \to \Hom(A, A)\) (identity morphism)
- \(\cSet\)-functor: functor
- \(\cCat\): small categories and functors
6.1.2 Strict 2-category
- \((\cCat, \times, \cOne)\)
- \(\cC(A, B) \in \cCat\) (1-cells \(f, g: A \to B\), 2-cells \(\alpha: f \nat g\), and vertical composition)
- \(\cC(B, C) \times \cC(A, B) \to \cC(A, C)\) (horizontal composition)
- \(\cOne \to \cC(A, A)\) (identity 1-cell \(\id_A\) and identity 2-cell \(\id_{\id_A}\))
- \(\cCat\)-functor: 2-functor
- \(\cCat\cCat\)?
6.2 Metric
6.2.1 Preorder
- \((\set{\lfal, \ltru}, \lfal \lproves \ltru, \lcon, \ltru)\)
- \(a \leq b\)
- \((b \leq c) \lcon (a \leq b) \lproves (a \leq c)\) (transitivity)
- \(\ltru \limp (a \leq a)\) (reflexivity)
- \(\set{\lfal, \ltru}\)-functor: monotone map \((a \leq_\cC b) \lproves (Fa \leq_\cD Fb)\)
- \(\cPos\): posets and monotones
6.2.2 Metric space
- \((\cQ, \geq, \otimes, I)\) monoidal preorder
- \(d(a, b) \in \cQ\)
- \(d(b, c) \otimes d(a, b) \geq d(a, c)\) (triangle inequality)
- \(I \geq d(a, a)\) (indiscernibility of identicals)
- \(\cQ\)-functor: metric map \(d_\cC(a, b) \geq d_\cD(Fa, Fb)\)
- \(\cMet_\cQ\): \(\cQ\)-metric spaces and \(\cQ\)-metric maps
A Lawvere metric space is enriched in \(([0, \infty], \geq, +, 0)\).
The Hausdorff metric is a metric on the powerset \((PA, d_{PA})\) induced by a metric on a set \((A, d_A)\).
\[d_{PA}(X, Y) := \bigmeet_{x \in X} \bigjoin_{y \in Y} d_A(x, y)\]
6.2.3 Metric category
\((\cMet_\cQ, \otimes, \cI)\)
\(d_{[A, B]} \in \cMet_\cQ\)
\(d_{[B, C]} \otimes d_{[A, B]} \to d_{[A, C]}\) (metric composition)
\[d_{[B, C]} \otimes d_{[A, B]}((g, f), (g', f')) := d_{[B, C]}(g, g') \otimes d_{[A, B]}(f, f') \geq d_{[A, C]}(g \compL f, g' \compL f')\]
\(\cI \to d_{[A, A]}\) (identity morphism)
\[I \geq d_{[\singleton, \singleton]}(\id_\singleton, \id_\singleton) \geq d_{[A, A]}(\id_A, \id_A)\]
\[d_{[A, D]}(b \compL f, c) \otimes d_{[B, D]}(h \compL g, b) \otimes d_{[A, C]}(a, g \compL f) \geq d_{[A, D]}(h \compL a, c)\]
\[d_{[A, D]}(b \compL f, c) \otimes d_{[A, D]}(h \compL g \compL f, b \compL f) \otimes d_{[A, D]}(h \compL a, h \compL g \compL f) \geq d_{[A, D]}(h \compL a, c)\]
\[d_{[A, C]}(a, g \compL f) \geq d_{[C, D]}(h, h) \otimes d_{[A, C]}(a, g \compL f) \geq d_{[A, D]}(h \compL a, h \compL g \compL f)\]
\[d_{[B, D]}(h \compL g, b) \geq d_{[B, D]}(h \compL g, b) \otimes d_{[A, B]}(f, f) \geq d_{[A, D]}(h \compL g \compL f, b \compL f)\]
\[d_{[B, D]}(h \compL g, b) \otimes d_{[A, C]}(a, g \compL f) \otimes d_{[A, D]}(c, h \compL a) \geq d_{[A, D]}(c, b \compL f)\]
\[d_{[A, D]}(h \compL g \compL f, b \compL f) \otimes d_{[A, D]}(h \compL a, h \compL g \compL f) \otimes d_{[A, D]}(c, h \compL a) \geq d_{[A, D]}(c, b \compL f)\]
\[d_{[A, C]}(a, g \compL f) \geq d_{[C, D]}(h, h) \otimes d_{[A, C]}(a, g \compL f) \geq d_{[A, D]}(h \compL a, h \compL g \compL f)\]
\[d_{[B, D]}(h \compL g, b) \geq d_{[B, D]}(h \compL g, b) \otimes d_{[A, B]}(f, f) \geq d_{[A, D]}(h \compL g \compL f, b \compL f)\]
The supremum metric is a metric on the function space \((\Hom(A, B), d_{[A, B]})\) induced by a metric on the codomain \((B, d_B)\):
\[d_{[A, B]}(f, g) := \bigmeet_{a \in A} d_B(fa, ga)\]
triangle inequality:
\[\begin{aligned} & d_{[A, B]}(g, h) \otimes d_{[A, B]}(f, g) \\ = & \bigmeet_{a \in A} d_B(ga, ha) \otimes \bigmeet_{a \in A} d_B(fa, ga) \overset{\angles{p_a \otimes p_a}}{\geq} \bigmeet_{a \in A} (d_B(ga, ha) \otimes d_B(fa, ga)) \overset{\bigmeet \compL_{fa, ga, ha}}{\geq} \bigmeet_{a \in A} d_B(fa, ha) \\ = & d_{[A, B]}(f, h) \end{aligned}\]
indiscernibility of identicals:
\[I \overset{\angles{\id_{fa}}}{\geq} \bigmeet_{a \in A} d_B(fa, fa) = d_{[A, B]}(f, f)\]