\documentclass[12pt,titlepage]{article} \usepackage{amsmath} \usepackage{mathrsfs} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsthm} \usepackage{mathtools} \usepackage{graphicx} \usepackage{color} \usepackage{ucs} \usepackage[utf8x]{inputenc} \usepackage{xparse} \usepackage{hyperref} %----Macros---------- % % Unresolved issues: % % \righttoleftarrow % \lefttorightarrow % % \color{} with HTML colorspec % \bgcolor % \array with options (without options, it's equivalent to the matrix environment) % Of the standard HTML named colors, white, black, red, green, blue and yellow % are predefined in the color package. Here are the rest. \definecolor{aqua}{rgb}{0, 1.0, 1.0} \definecolor{fuschia}{rgb}{1.0, 0, 1.0} \definecolor{gray}{rgb}{0.502, 0.502, 0.502} \definecolor{lime}{rgb}{0, 1.0, 0} \definecolor{maroon}{rgb}{0.502, 0, 0} \definecolor{navy}{rgb}{0, 0, 0.502} \definecolor{olive}{rgb}{0.502, 0.502, 0} \definecolor{purple}{rgb}{0.502, 0, 0.502} \definecolor{silver}{rgb}{0.753, 0.753, 0.753} \definecolor{teal}{rgb}{0, 0.502, 0.502} % Because of conflicts, \space and \mathop are converted to % \itexspace and \operatorname during preprocessing. % itex: \space{ht}{dp}{wd} % % Height and baseline depth measurements are in units of tenths of an ex while % the width is measured in tenths of an em. \makeatletter \newdimen\itex@wd% \newdimen\itex@dp% \newdimen\itex@thd% \def\itexspace#1#2#3{\itex@wd=#3em% \itex@wd=0.1\itex@wd% \itex@dp=#2ex% \itex@dp=0.1\itex@dp% \itex@thd=#1ex% \itex@thd=0.1\itex@thd% \advance\itex@thd\the\itex@dp% \makebox[\the\itex@wd]{\rule[-\the\itex@dp]{0cm}{\the\itex@thd}}} \makeatother % \tensor and \multiscript \makeatletter \newif\if@sup \newtoks\@sups \def\append@sup#1{\edef\act{\noexpand\@sups={\the\@sups #1}}\act}% \def\reset@sup{\@supfalse\@sups={}}% \def\mk@scripts#1#2{\if #2/ \if@sup ^{\the\@sups}\fi \else% \ifx #1_ \if@sup ^{\the\@sups}\reset@sup \fi {}_{#2}% \else \append@sup#2 \@suptrue \fi% \expandafter\mk@scripts\fi} \def\tensor#1#2{\reset@sup#1\mk@scripts#2_/} \def\multiscripts#1#2#3{\reset@sup{}\mk@scripts#1_/#2% \reset@sup\mk@scripts#3_/} \makeatother % \slash \makeatletter \newbox\slashbox \setbox\slashbox=\hbox{$/$} \def\itex@pslash#1{\setbox\@tempboxa=\hbox{$#1$} \@tempdima=0.5\wd\slashbox \advance\@tempdima 0.5\wd\@tempboxa \copy\slashbox \kern-\@tempdima \box\@tempboxa} \def\slash{\protect\itex@pslash} \makeatother % math-mode versions of \rlap, etc % from Alexander Perlis, "A complement to \smash, \llap, and lap" % http://math.arizona.edu/~aprl/publications/mathclap/ \def\clap#1{\hbox to 0pt{\hss#1\hss}} \def\mathllap{\mathpalette\mathllapinternal} \def\mathrlap{\mathpalette\mathrlapinternal} \def\mathclap{\mathpalette\mathclapinternal} \def\mathllapinternal#1#2{\llap{$\mathsurround=0pt#1{#2}$}} \def\mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}} \def\mathclapinternal#1#2{\clap{$\mathsurround=0pt#1{#2}$}} % Renames \sqrt as \oldsqrt and redefine root to result in \sqrt[#1]{#2} \let\oldroot\root \def\root#1#2{\oldroot #1 \of{#2}} \renewcommand{\sqrt}[2][]{\oldroot #1 \of{#2}} % Manually declare the txfonts symbolsC font \DeclareSymbolFont{symbolsC}{U}{txsyc}{m}{n} \SetSymbolFont{symbolsC}{bold}{U}{txsyc}{bx}{n} \DeclareFontSubstitution{U}{txsyc}{m}{n} % Manually declare the stmaryrd font \DeclareSymbolFont{stmry}{U}{stmry}{m}{n} \SetSymbolFont{stmry}{bold}{U}{stmry}{b}{n} % Manually declare the MnSymbolE font \DeclareFontFamily{OMX}{MnSymbolE}{} \DeclareSymbolFont{mnomx}{OMX}{MnSymbolE}{m}{n} \SetSymbolFont{mnomx}{bold}{OMX}{MnSymbolE}{b}{n} \DeclareFontShape{OMX}{MnSymbolE}{m}{n}{ <-6> MnSymbolE5 <6-7> MnSymbolE6 <7-8> MnSymbolE7 <8-9> MnSymbolE8 <9-10> MnSymbolE9 <10-12> MnSymbolE10 <12-> MnSymbolE12}{} % Declare specific arrows from txfonts without loading the full package \makeatletter \def\re@DeclareMathSymbol#1#2#3#4{% \let#1=\undefined \DeclareMathSymbol{#1}{#2}{#3}{#4}} \re@DeclareMathSymbol{\neArrow}{\mathrel}{symbolsC}{116} \re@DeclareMathSymbol{\neArr}{\mathrel}{symbolsC}{116} \re@DeclareMathSymbol{\seArrow}{\mathrel}{symbolsC}{117} \re@DeclareMathSymbol{\seArr}{\mathrel}{symbolsC}{117} \re@DeclareMathSymbol{\nwArrow}{\mathrel}{symbolsC}{118} \re@DeclareMathSymbol{\nwArr}{\mathrel}{symbolsC}{118} \re@DeclareMathSymbol{\swArrow}{\mathrel}{symbolsC}{119} \re@DeclareMathSymbol{\swArr}{\mathrel}{symbolsC}{119} \re@DeclareMathSymbol{\nequiv}{\mathrel}{symbolsC}{46} \re@DeclareMathSymbol{\Perp}{\mathrel}{symbolsC}{121} \re@DeclareMathSymbol{\Vbar}{\mathrel}{symbolsC}{121} \re@DeclareMathSymbol{\sslash}{\mathrel}{stmry}{12} \re@DeclareMathSymbol{\bigsqcap}{\mathop}{stmry}{"64} \re@DeclareMathSymbol{\biginterleave}{\mathop}{stmry}{"6} \re@DeclareMathSymbol{\invamp}{\mathrel}{symbolsC}{77} \re@DeclareMathSymbol{\parr}{\mathrel}{symbolsC}{77} \makeatother % \llangle, \rrangle, \lmoustache and \rmoustache from MnSymbolE \makeatletter \def\Decl@Mn@Delim#1#2#3#4{% \if\relax\noexpand#1% \let#1\undefined \fi \DeclareMathDelimiter{#1}{#2}{#3}{#4}{#3}{#4}} \def\Decl@Mn@Open#1#2#3{\Decl@Mn@Delim{#1}{\mathopen}{#2}{#3}} \def\Decl@Mn@Close#1#2#3{\Decl@Mn@Delim{#1}{\mathclose}{#2}{#3}} \Decl@Mn@Open{\llangle}{mnomx}{'164} \Decl@Mn@Close{\rrangle}{mnomx}{'171} \Decl@Mn@Open{\lmoustache}{mnomx}{'245} \Decl@Mn@Close{\rmoustache}{mnomx}{'244} \makeatother % Widecheck \makeatletter \DeclareRobustCommand\widecheck[1]{{\mathpalette\@widecheck{#1}}} \def\@widecheck#1#2{% \setbox\z@\hbox{\m@th$#1#2$}% \setbox\tw@\hbox{\m@th$#1% \widehat{% \vrule\@width\z@\@height\ht\z@ \vrule\@height\z@\@width\wd\z@}$}% \dp\tw@-\ht\z@ \@tempdima\ht\z@ \advance\@tempdima2\ht\tw@ \divide\@tempdima\thr@@ \setbox\tw@\hbox{% \raise\@tempdima\hbox{\scalebox{1}[-1]{\lower\@tempdima\box \tw@}}}% {\ooalign{\box\tw@ \cr \box\z@}}} \makeatother % \mathraisebox{voffset}[height][depth]{something} \makeatletter \NewDocumentCommand\mathraisebox{moom}{% \IfNoValueTF{#2}{\def\@temp##1##2{\raisebox{#1}{$\m@th##1##2$}}}{% \IfNoValueTF{#3}{\def\@temp##1##2{\raisebox{#1}[#2]{$\m@th##1##2$}}% }{\def\@temp##1##2{\raisebox{#1}[#2][#3]{$\m@th##1##2$}}}}% \mathpalette\@temp{#4}} \makeatletter % udots (taken from yhmath) \makeatletter \def\udots{\mathinner{\mkern2mu\raise\p@\hbox{.} \mkern2mu\raise4\p@\hbox{.}\mkern1mu \raise7\p@\vbox{\kern7\p@\hbox{.}}\mkern1mu}} \makeatother %% Fix array \newcommand{\itexarray}[1]{\begin{matrix}#1\end{matrix}} %% \itexnum is a noop \newcommand{\itexnum}[1]{#1} %% Renaming existing commands \newcommand{\underoverset}[3]{\underset{#1}{\overset{#2}{#3}}} \newcommand{\widevec}{\overrightarrow} \newcommand{\darr}{\downarrow} \newcommand{\nearr}{\nearrow} \newcommand{\nwarr}{\nwarrow} \newcommand{\searr}{\searrow} \newcommand{\swarr}{\swarrow} \newcommand{\curvearrowbotright}{\curvearrowright} \newcommand{\uparr}{\uparrow} \newcommand{\downuparrow}{\updownarrow} \newcommand{\duparr}{\updownarrow} \newcommand{\updarr}{\updownarrow} \newcommand{\gt}{>} \newcommand{\lt}{<} \newcommand{\map}{\mapsto} \newcommand{\embedsin}{\hookrightarrow} \newcommand{\Alpha}{A} \newcommand{\Beta}{B} \newcommand{\Zeta}{Z} \newcommand{\Eta}{H} \newcommand{\Iota}{I} \newcommand{\Kappa}{K} \newcommand{\Mu}{M} \newcommand{\Nu}{N} \newcommand{\Rho}{P} \newcommand{\Tau}{T} \newcommand{\Upsi}{\Upsilon} \newcommand{\omicron}{o} \newcommand{\lang}{\langle} \newcommand{\rang}{\rangle} \newcommand{\Union}{\bigcup} \newcommand{\Intersection}{\bigcap} \newcommand{\Oplus}{\bigoplus} \newcommand{\Otimes}{\bigotimes} \newcommand{\Wedge}{\bigwedge} \newcommand{\Vee}{\bigvee} \newcommand{\coproduct}{\coprod} \newcommand{\product}{\prod} \newcommand{\closure}{\overline} \newcommand{\integral}{\int} \newcommand{\doubleintegral}{\iint} \newcommand{\tripleintegral}{\iiint} \newcommand{\quadrupleintegral}{\iiiint} \newcommand{\conint}{\oint} \newcommand{\contourintegral}{\oint} \newcommand{\infinity}{\infty} \newcommand{\bottom}{\bot} \newcommand{\minusb}{\boxminus} \newcommand{\plusb}{\boxplus} \newcommand{\timesb}{\boxtimes} \newcommand{\intersection}{\cap} \newcommand{\union}{\cup} \newcommand{\Del}{\nabla} \newcommand{\odash}{\circleddash} \newcommand{\negspace}{\!} \newcommand{\widebar}{\overline} \newcommand{\textsize}{\normalsize} \renewcommand{\scriptsize}{\scriptstyle} \newcommand{\scriptscriptsize}{\scriptscriptstyle} \newcommand{\mathfr}{\mathfrak} \newcommand{\statusline}[2]{#2} \newcommand{\tooltip}[2]{#2} \newcommand{\toggle}[2]{#2} % Theorem Environments \theoremstyle{plain} \newtheorem{theorem}{Theorem} \newtheorem{lemma}{Lemma} \newtheorem{prop}{Proposition} \newtheorem{cor}{Corollary} \newtheorem*{utheorem}{Theorem} \newtheorem*{ulemma}{Lemma} \newtheorem*{uprop}{Proposition} \newtheorem*{ucor}{Corollary} \theoremstyle{definition} \newtheorem{defn}{Definition} \newtheorem{example}{Example} \newtheorem*{udefn}{Definition} \newtheorem*{uexample}{Example} \theoremstyle{remark} \newtheorem{remark}{Remark} \newtheorem{note}{Note} \newtheorem*{uremark}{Remark} \newtheorem*{unote}{Note} %------------------------------------------------------------------- \begin{document} %------------------------------------------------------------------- \section*{complete small category} \hypertarget{context}{}\subsubsection*{{Context}}\label{context} \hypertarget{category_theory}{}\paragraph*{{Category theory}}\label{category_theory} [[!include category theory - contents]] \hypertarget{limits_and_colimits}{}\paragraph*{{Limits and colimits}}\label{limits_and_colimits} [[!include infinity-limits - contents]] \hypertarget{complete_small_categories}{}\section*{{Complete small categories}}\label{complete_small_categories} \noindent\hyperlink{definition}{Definition}\dotfill \pageref*{definition} \linebreak \noindent\hyperlink{in_classical_logic}{In classical logic}\dotfill \pageref*{in_classical_logic} \linebreak \noindent\hyperlink{in_grothendieck_toposes}{In Grothendieck toposes}\dotfill \pageref*{in_grothendieck_toposes} \linebreak \noindent\hyperlink{in_more_general_toposes_and_constructive_mathematics}{In more general toposes and constructive mathematics}\dotfill \pageref*{in_more_general_toposes_and_constructive_mathematics} \linebreak \noindent\hyperlink{modelling_impredicative_type_theory}{Modelling impredicative type theory}\dotfill \pageref*{modelling_impredicative_type_theory} \linebreak \noindent\hyperlink{references}{References}\dotfill \pageref*{references} \linebreak \hypertarget{definition}{}\subsection*{{Definition}}\label{definition} A \textbf{complete small category} (or \textbf{small complete category}) is a [[category]] which is both [[small category|small]] (has only a [[set]] of [[objects]] and [[morphisms]]) and [[complete category|complete]] (has a [[limit]] of every small [[diagram]]). (Note that the phrase ``[[small-complete category]]'' is sometimes used to mean merely a complete category, i.e. one which is ``complete relative to small diagrams''. Therefore, ``complete small category'' is a safer term for our concept.) \hypertarget{in_classical_logic}{}\subsection*{{In classical logic}}\label{in_classical_logic} In the presence of [[classical logic]], complete small categories reduce to [[complete lattices]] by the following theorem of Freyd. \begin{utheorem} If (in some [[universe]] $U$) a small [[category]] $D$ has [[product]]s of families of objects whose size is at least that of its set of morphisms, then $D$ is a [[preorder]]. In particular, any complete small category is a [[preorder]]. \end{utheorem} \begin{proof} Let $x$, $y$ be any two objects, and suppose (contrary to $D$ being a preorder) that there are at least two different morphisms $x \,\underoverset{s}{r}{\rightrightarrows}\, y$. Then the set of morphisms \begin{displaymath} x \to \prod_{f \in Mor(D)} y \end{displaymath} has [[cardinality]] at least $2^{|Mor(D)|} \gt {|Mor(D)|}$, which is a contradiction. \end{proof} \hypertarget{in_grothendieck_toposes}{}\subsection*{{In Grothendieck toposes}}\label{in_grothendieck_toposes} The [[internal logic]] of a [[topos]] is not, in general, classical, so the above proof does not apply when considering [[internal categories]] in a topos. However, in a [[Grothendieck topos]], one can show that the conclusion still holds by essentially reducing the question to the analogous one in $Set$. A brief description of the argument can be found in the answer to \href{http://mathoverflow.net/questions/43433/small-complete-categories-in-a-grothendieck-topos}{this question}. \hypertarget{in_more_general_toposes_and_constructive_mathematics}{}\subsection*{{In more general toposes and constructive mathematics}}\label{in_more_general_toposes_and_constructive_mathematics} However, it is possible to have non-preorder complete small categories in non-Grothendieck topoi. In particular, the [[effective topos]], along with most other [[realizability topos|realizability toposes]], does contain such internal categories, arising for example from the [[modest sets]] or [[partial equivalence relations]]. See \hyperlink{Hyland88}{Hyland88} and \hyperlink{HRR90}{HRR90} for details. It follows that, in [[constructive mathematics]], it is impossible to prove even that every complete small category in $Set$ or in a Grothendieck topos must be a preorder. There is a subtlety, however, because in the absence of the [[axiom of choice]], there is a difference between a category being ``strongly complete'' in the sense of being equipped with limit-assigning [[functors]], and being ``weakly complete'' in the sense that there merely \emph{exists} a limit for every diagram. The complete small categories in realizability toposes are only weakly complete, which categorically means that only the [[stack]] completions of their corresponding [[indexed categories]] are complete in the relevant indexed-category sense. It seems to be unknown whether there exists a (necessarily non-Grothendieck) topos containing a \emph{strongly} complete small category. However, one of the complete small categories in the effective topos does become strongly complete when the ambient context is restricted to the subcategory of [[assemblies]] rather than the entire effective topos. \hypertarget{modelling_impredicative_type_theory}{}\subsection*{{Modelling impredicative type theory}}\label{modelling_impredicative_type_theory} Complete small categories have applications to the modeling of impredicative [[polymorphism]]. Suppose that there is a full subcategory $\mathbf C$ of $\mathbf{Set}$ that is small and complete. Then we can interpret an impredicatively-quantified type as \begin{displaymath} \llbracket \forall X.T \rrbracket = \prod_{A\in \mathbf{C}} \llbracket T\rrbracket_{A/X} \end{displaymath} although there are more elaborate formulations that use a subset of this product. At least at first glance, this requires $\mathbf{C}$ to be \emph{strongly} complete. Hence it works in the category of assemblies, but not the entire realizability topos. An alternative approach is to suppose that there is a full [[replete subcategory]] $\mathcal{C}$ of $\mathbf{Set}$ which is complete in the sense of being closed under set-indexed products and equalizers, yet [[essentially small]], i.e. with a small skeleton $\mathbf C$. (Being replete, $\mathcal{C}$ will not itself be small.) Such a category can be obtained as the repletion of any \emph{weakly} complete \emph{actually} small subcategory, such as exist in realizability toposes. See \hyperlink{RS04}{RS04} and \hyperlink{MS09}{MS09}. The interpretation of the impredicative $\forall$ is then achieved by a product over the sets in the small skeleton $\mathbf C$. However, to eliminate terms of type $\forall$, one must pick an isomorphism to a set in the skeleton, and be confident that the choice does not matter, and for this reason a relational parametricity is built in to the interpretation of $\forall$. In more detail: \begin{displaymath} \llbracket \forall X.T \rrbracket = \{\pi\in \prod_{A\in \mathbf{C}} \llbracket T\rrbracket_{A/X} | \forall R\subseteq A\times B. \mathcal{R}_R( \pi(A),\pi(B))\} \end{displaymath} where $\mathcal{R}_R$ is a binary logical relation, suitably defined, and \begin{displaymath} \llbracket (t:\forall X.T)(U)\rrbracket = gpd(i)(\llbracket t\rrbracket_D) \end{displaymath} where $i\colon D \to \llbracket U\rrbracket$ is a bijection with a set in the skeleton $\mathbf C$, and we are using the fact that for any bijection $j\colon C\to D$, there is a functorial action $gpd(j)\llbracket T\rrbracket_{C/X}\to \llbracket T\rrbracket_{D/X}.$ For discussion about whether this works, see the nForum thread for this page. Note that to model polymorphic simple type theory such as [[System F]], it is not necessary for this purpose that $\mathbf{C}$ be \emph{complete}; all it needs is to have products indexed by its own set of \emph{objects}. Freyd's theorem does not apply in this case, since there might be fewer objects than morphisms; and indeed there are plenty of categories even classically that have products indexed by their set of objects, e.g. any one-object category. It is true, however, that (assuming classical logic) no \emph{full subcategory of $Set$} can have products indexed by its own set of objects; this (and a bit more) was shown in \hyperlink{Reynolds84}{Reynolds 84}, again by reducing to Cantor's diagonal argument. On the other hand, to break this argument we do not have to move to realizability; Grothendieck toposes suffice, as shown in \hyperlink{Pitts87}{Pitts 87} via the [[Yoneda embedding]] of a syntactic model into its topos of presheaves. In contrast, something more like a true complete small category may be necessary to model an impredicative dependent type theory such as the [[calculus of constructions]] with a proof-relevant impredicative sort (traditionally called ``Set''), where the impredicative universe admits [[Pi-types]] with \emph{arbitrary} domain. \hypertarget{references}{}\subsection*{{References}}\label{references} Freyd's theorem may not have been published by him. The original reference for the complete small categories in the effective topos is: \begin{itemize}% \item A small complete category, [[Martin Hyland]], Annals of Pure and Applied Logic 40 (1988), \href{https://webdpmms.maths.cam.ac.uk/~martin/Research/Oldpapers/smallcomplete88.pdf}{pdf} \end{itemize} It was expanded further in the following paper, which discusses the strong/weak completeness issue and the relation to stacks in more detail: \begin{itemize}% \item Hyland, J. M., Robinson, E. P. and Rosolini, G. (1990), The Discrete Objects in the Effective Topos. Proceedings of the London Mathematical Society, s3-60: 1-36. \href{https://doi.org/10.1112/plms/s3-60.1.1}{doi:10.1112/plms/s3-60.1.1} \end{itemize} There was much related activity around that time, by [[Peter Freyd]], [[Eugenio Moggi]], [[Andrew Pitts]], [[John Reynolds]], Guiseppe Rosolini, and others, including: \begin{itemize}% \item [[John Reynolds]], Polymorphism is not set-theoretic. In: Kahn G., MacQueen D.B., Plotkin G. (eds) Semantics of Data Types. SDT 1984. Lecture Notes in Computer Science, vol 173. Springer, Berlin, Heidelberg \item [[Andy Pitts]], Polymorphism is Set Theoretic, Constructively. In Category Theory and Computer Science, Proceedings, Edinburgh 1987, Lecture Notes in Computer Science Vol. 283 (Springer-Verlag, Berlin, 1987), pp 12-39, \href{https://www.cl.cam.ac.uk/~amp12/papers/polist/polist.pdf}{PDF} \end{itemize} A more recent survey of this type of model for polymorphic type theory is in \begin{itemize}% \item Andrea Asperti and Simone Martini, Categorical models of polymorphism, Information and Computation, Volume 99, Issue 1, 1992, Pages 1-79, \href{https://doi.org/10.1016/0890-5401(92}{DOI}90024-A.) \end{itemize} The idea of using a replete complete subcategory which is essentially small in [[constructive set theory|IZF]] is discussed in \begin{itemize}% \item Using Synthetic Domain Theory to Prove Operational Properties of a Polymorphic Programming Language Based on Strictness``, Guiseppe Rosolini and [[Alex Simpson]], unpublished, 2004. \href{https://www.researchgate.net/profile/Giuseppe_Rosolini/publication/237887060_Using_Synthetic_Domain_Theory_to_Prove_Operational_Properties_of_a_Polymorphic_Programming_Language_Based_on_Strictness/links/0deec53356d020dc85000000/Using-Synthetic-Domain-Theory-to-Prove-Operational-Properties-of-a-Polymorphic-Programming-Language-Based-on-Strictness.pdf}{ResearchGate} \item Relational parametricity for computational effects, Rasmus Møgelberg and [[Alex Simpson]], Logical Methods in Computer Science, Vol 5 (3:7), 2009. \href{https://arxiv.org/abs/0906.5488}{arxiv}. \end{itemize} [[!redirects complete small category]] [[!redirects complete small categories]] [[!redirects small complete category]] [[!redirects small complete categories]] \end{document}