Namespaces
Variants
Actions

Difference between revisions of "Categorical logic"

From Encyclopedia of Mathematics
Jump to: navigation, search
(Importing text file)
 
m (link)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{TEX|done}}
 
A branch of mathematics dealing with the interaction between logic (cf. also [[Mathematical logic|Mathematical logic]]) and [[Category|category]] theory. Each of these disciplines has profoundly influenced the other. In fact, it may be claimed that, at a very basic level, logic and category theory are the same.
 
A branch of mathematics dealing with the interaction between logic (cf. also [[Mathematical logic|Mathematical logic]]) and [[Category|category]] theory. Each of these disciplines has profoundly influenced the other. In fact, it may be claimed that, at a very basic level, logic and category theory are the same.
  
Line 4: Line 5:
  
 
==Categorical proof theory.==
 
==Categorical proof theory.==
One way of looking at proofs is to see them as deductions. A deduction <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c1200601.png" /> is a method of inferring <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c1200602.png" /> from <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c1200603.png" /> (cf. also [[Derivation, logical|Derivation, logical]]; [[Natural logical deduction|Natural logical deduction]]). Evidently, deducibility is reflexive and transitive, and this translates into the identity deduction <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c1200604.png" /> and into composition of deductions
+
One way of looking at proofs is to see them as deductions. A deduction $f\colon A\to B$ is a method of inferring $B$ from $A$ (cf. also [[Derivation, logical|Derivation, logical]]; [[Natural logical deduction|Natural logical deduction]]). Evidently, deducibility is reflexive and transitive, and this translates into the identity deduction $1_A\colon A\to A$ and into composition of deductions
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c1200605.png" /></td> </tr></table>
+
$$\frac{f\colon A\to B\quad g\colon B\to C}{gf\colon A\to C}.$$
  
Originally, logicians were not interested in asking when two deductions <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c1200606.png" /> are equal; the first to do so was D. Prawitz [[#References|[a10]]]. It seems reasonable to demand that
+
Originally, logicians were not interested in asking when two deductions $A\to B$ are equal; the first to do so was D. Prawitz [[#References|[a10]]]. It seems reasonable to demand that
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c1200607.png" /></td> </tr></table>
+
$$f1_A=f=1_Bf,$$
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c1200608.png" /></td> </tr></table>
+
$$ (hg)f = h(gf)$$
  
where <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c1200609.png" />. Once this is required, the definition of a category is obtained. In such a category the objects are formulas and the arrows are deductions. But this was not the picture S. Eilenberg and S. Mac Lane had in mind when they first introduced categories [[#References|[a3]]]. In a more typical concrete category, the objects are structured sets and the arrows (or morphisms) are mappings preserving this structure.
+
where $h\colon C\to D$. Once this is required, the definition of a category is obtained. In such a category the objects are formulas and the arrows are deductions. But this was not the picture S. Eilenberg and S. Mac Lane had in mind when they first introduced categories [[#References|[a3]]]. In a more typical concrete category, the objects are structured sets and the arrows (or morphisms) are mappings preserving this structure.
  
An example of a deductive system is the positive intuitionistic propositional calculus. It deals with a designated formula <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006010.png" /> and two binary connectives <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006011.png" /> and <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006012.png" /> between formulas satisfying the following axioms and rules of inference:
+
An example of a deductive system is the positive intuitionistic propositional calculus. It deals with a designated formula $\top$ and two binary connectives $A\land B$ and $A\Rightarrow B$ between formulas satisfying the following axioms and rules of inference:
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006013.png" /></td> </tr></table>
+
$$\mathbf p_{AB}\colon A\land B\to A,\quad \mathbf q_{AB}\colon A\land B\to B,$$
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006014.png" /></td> </tr></table>
+
$$\mathbf o_A\colon A\to\top,\quad \mathbf e_{AB}\colon A\land (A\Rightarrow B) \to B,$$
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006015.png" /></td> </tr></table>
+
$$\frac{f\colon C\to A\quad g\colon C\to B}{\langle f,g\rangle\colon C\to A\land B},$$
  
If one introduces appropriate equations, for instance, <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006016.png" />, one obtains what F.W. Lawvere [[#References|[a7]]] calls a Cartesian closed category (cf. also [[Closed category|Closed category]]). These equations will ensure that there is exactly one arrow <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006017.png" />, making <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006018.png" /> a terminal object, that there is a one-to-one correspondence between pairs of arrows <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006019.png" />, <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006020.png" /> and arrows <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006021.png" />, making <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006022.png" /> a Cartesian product, and that there is a one-to-one correspondence between arrows <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006023.png" /> and arrows <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006024.png" />, making <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006025.png" /> a case of exponentiation. Lawvere threw additional light on this situation by noting, for instance, that <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006026.png" /> and <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006027.png" /> are adjoint functors. Passing to categorical notation, one writes <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006028.png" /> for <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006029.png" />, <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006030.png" /> for <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006031.png" /> and <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006032.png" /> for <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006033.png" />.
+
$$\frac{f\colon A\land C\to B}{f^*\colon C\to A\Rightarrow B}.$$
 +
 
 +
If one introduces appropriate equations, for instance, $\mathbf p_{AB}\langle f,g\rangle = f,$ one obtains what F.W. Lawvere [[#References|[a7]]] calls a Cartesian closed category (cf. also [[Closed category|Closed category]]). These equations will ensure that there is exactly one arrow $A\to\top$, making $\top$ a [[terminal object]], that there is a one-to-one correspondence between pairs of arrows $C\to A, C\to B$ and arrows $C\to A\land B$, making $A\land B$ a Cartesian product, and that there is a one-to-one correspondence between arrows $A\land C\to B$ and arrows $C\to A\Rightarrow B,$ making $A\Rightarrow B$ a case of exponentiation. Lawvere threw additional light on this situation by noting, for instance, that $-\land C\to B$ and $C\to -\Rightarrow B$ are adjoint functors. Passing to categorical notation, one writes $1$ for $\top$, $A\times B$ for $A\land B$ and $B^A$ for $A\Rightarrow B$.
  
 
The categorical point of view offers a unified way of looking at elementary arithmethic and [[Intuitionistic logic|intuitionistic logic]]. For example, the familiar laws of indices
 
The categorical point of view offers a unified way of looking at elementary arithmethic and [[Intuitionistic logic|intuitionistic logic]]. For example, the familiar laws of indices
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006034.png" /></td> </tr></table>
+
$$c^{a\times b} = (c^b)^a,$$
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006035.png" /></td> </tr></table>
+
$$(a\times b)^c = a^c\times b^c, c^{a+b} = c^a\times c^b,$$
  
 
translate into the following equivalences in the intuitionistic propositional calculus:
 
translate into the following equivalences in the intuitionistic propositional calculus:
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006036.png" /></td> </tr></table>
+
$$(A\land B)\Rightarrow C \leftrightarrow A\Rightarrow(B\Rightarrow C),$$
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006037.png" /></td> </tr></table>
+
$$C\Rightarrow(A\land B) \leftrightarrow (C\Rightarrow A)\land(C\Rightarrow B),
 +
  (A\lor B)\Rightarrow C \leftrightarrow (A\Rightarrow C)\land(B\Rightarrow C).
 +
$$
  
It has been assumed here that the propositional calculus has been augmented by the disjunction symbol <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006038.png" />, which translates into the categorical coproduct.
+
It has been assumed here that the propositional calculus has been augmented by the disjunction symbol $\lor$, which translates into the categorical coproduct.
  
The traditional deduction theorem admits the following analogue for Lawvere-style deductive systems: If <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006039.png" /> can be inferred from the assumption <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006040.png" />, then there is a deduction <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006041.png" /> not using this assumption.
+
The traditional deduction theorem admits the following analogue for Lawvere-style deductive systems: If $\varphi(x)\colon A\to B$ can be inferred from the assumption $x\colon\top\to C$, then there is a deduction $f\colon C\land A\to B$ not using this assumption.
  
Algebraically, one may think of <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006042.png" /> as an indeterminate arrow and of <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006043.png" /> as a polynomial in <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006044.png" />. Moreover, it turns out that
+
Algebraically, one may think of $x$ as an indeterminate arrow and of $\varphi(x)$ as a polynomial in $x$. Moreover, it turns out that
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006045.png" /></td> </tr></table>
+
$$f\langle x\mathbf o_A, 1_A\rangle = \varphi(x).$$
  
In the special case when <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006046.png" />, and upon replacing <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006047.png" /> by <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006048.png" />, this equation may be written as
+
In the special case when $A=\top$, and upon replacing $f\colon A\to B$ by $g\colon\top\to A\Rightarrow B,$ this equation may be written as
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006049.png" /></td> </tr></table>
+
$$\mathbf e_{AB}\langle g, x\rangle = \varphi(x),$$
  
and it is customary to write <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006050.png" /> and to think of <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006051.png" /> as application.
+
and it is customary to write $g=\lambda_{x\in C}\varphi(x)$ and to think of $\mathbf e_{AB}$ as application.
  
One is thus led to the traditional typed <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006053.png" />-calculus (cf. [[Lambda-calculus|<img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006054.png" />-calculus]]) of H.B. Curry and A. Church, although these authors dealt with the proof theory of implication alone, having followed D. Hilbert in applying Occam's razor to eliminate conjunction from the propositional calculus. However, viewing implication as an adjoint to conjunction, some people now (1998) prefer to study the lambda-calculus with surjective pairing, which turns out to be equivalent to a Cartesian closed category, see [[#References|[a12]]] and [[#References|[a6]]]. Like conjunction and implication, disjunction too can be lifted to the categorical level and turned into the coproduct. Even quantifiers can be presented categorically, as was done in Lawvere's hyperdoctorines [[#References|[a8]]].
+
One is thus led to the traditional typed $\lambda$-calculus (cf. [[Lambda-calculus|$\lambda$-calculus]]) of H.B. Curry and A. Church, although these authors dealt with the proof theory of implication alone, having followed D. Hilbert in applying Occam's razor to eliminate conjunction from the propositional calculus. However, viewing implication as an adjoint to conjunction, some people now (1998) prefer to study the lambda-calculus with surjective pairing, which turns out to be equivalent to a Cartesian closed category, see [[#References|[a12]]] and [[#References|[a6]]]. Like conjunction and implication, disjunction too can be lifted to the categorical level and turned into the coproduct. Even quantifiers can be presented categorically, as was done in Lawvere's hyperdoctorines [[#References|[a8]]].
  
 
==Multi-categories.==
 
==Multi-categories.==
 
One of the more successful techniques in proof theory was Gentzen's method of cut-elimination (cf. also [[Gentzen formal system|Gentzen formal system]]). G. Gentzen dealt with deductions of the form
 
One of the more successful techniques in proof theory was Gentzen's method of cut-elimination (cf. also [[Gentzen formal system|Gentzen formal system]]). G. Gentzen dealt with deductions of the form
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006055.png" /></td> </tr></table>
+
$$f\colon A_1\dots A_n\to B.$$
  
 
Composition of deductions must now be replaced by what he called a cut:
 
Composition of deductions must now be replaced by what he called a cut:
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006056.png" /></td> </tr></table>
+
$$\frac{f\colon\Lambda\to A\quad g\colon\Gamma A\Delta\to B}{g \& f\colon \Gamma\Lambda\Delta\to B}.$$
  
 
Here, capital Greek letters denote strings of formulas. Introducing suitable equations between deductions, one obtains the notion of a multi-category. Gentzen presented the logical connectives with the help of introduction rules which already incorporate some cuts, for example:
 
Here, capital Greek letters denote strings of formulas. Introducing suitable equations between deductions, one obtains the notion of a multi-category. Gentzen presented the logical connectives with the help of introduction rules which already incorporate some cuts, for example:
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006057.png" /></td> </tr></table>
+
$$\frac{f\colon\Gamma\to A\quad g\colon \Gamma\to B}{\langle f,g\rangle\colon\Gamma\to A\land B},$$
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006058.png" /></td> </tr></table>
+
$$\frac{f\colon\Gamma A\Delta\to C}{f_p\colon\Gamma A\land B\Delta\to C},
 +
  \frac{f\colon\Gamma B\Delta\to C}{f_q\colon\Gamma A\land B\Delta\to C}.
 +
$$
  
 
He showed that in that case further cuts are no longer necessary, and the same is true for identity deductions of compound formulas. At the multi-category level, every deduction obtained with cut is actually equal to one obtained without.
 
He showed that in that case further cuts are no longer necessary, and the same is true for identity deductions of compound formulas. At the multi-category level, every deduction obtained with cut is actually equal to one obtained without.
Line 73: Line 80:
 
Gentzen had imposed three structural rules: interchange, contraction and weakening; but the cut-elimination theorem holds even without them, giving rise to what has been called substructural logic [[#References|[a2]]]. A multi-category satisfying the structural rules is nothing else than a many-sorted algebraic theory (cf. also [[Many-valued logic|Many-valued logic]]). A multi-category not satisfying them is a context-free recognition grammar (cf. also [[Grammar, context-free|Grammar, context-free]]). Thus, multi-categories may be applied in linguistics. More surprisingly, they have recently found applications in theoretical physics.
 
Gentzen had imposed three structural rules: interchange, contraction and weakening; but the cut-elimination theorem holds even without them, giving rise to what has been called substructural logic [[#References|[a2]]]. A multi-category satisfying the structural rules is nothing else than a many-sorted algebraic theory (cf. also [[Many-valued logic|Many-valued logic]]). A multi-category not satisfying them is a context-free recognition grammar (cf. also [[Grammar, context-free|Grammar, context-free]]). Thus, multi-categories may be applied in linguistics. More surprisingly, they have recently found applications in theoretical physics.
  
In the absence of the structural rules, conjunction <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006059.png" /> must be distinguished from the tensor product <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006060.png" />, which is introduced as follows:
+
In the absence of the structural rules, conjunction $\land$ must be distinguished from the tensor product $\otimes$, which is introduced as follows:
 
 
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006061.png" /></td> </tr></table>
 
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006062.png" /></td> </tr></table>
+
$$\frac{f\colon\Gamma\to A\quad g\colon\Delta\to B}{\{f,g\}\colon\Gamma\Delta\to A\otimes B},$$
  
Postulating suitable equations, one ensures that there is a one-to-one correspondence between deductions <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006063.png" /> and <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006064.png" />. This is essentially how N. Bourbaki defined the [[Tensor product|tensor product]] in multi-linear algebra. The usual properties of the tensor product can now be proved, e.g. Mac Lane's pentagonal rule, which says that the compound arrow
+
$$\frac{f\colon\Gamma AB\Delta\to C}{f^S\colon\Gamma A\otimes B\Delta\to C}.$$
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006065.png" /></td> </tr></table>
+
Postulating suitable equations, one ensures that there is a one-to-one correspondence between deductions $\Gamma AB\Delta\to C$ and $\Gamma A\otimes B\Delta\to C$. This is essentially how N. Bourbaki defined the [[Tensor product|tensor product]] in multi-linear algebra. The usual properties of the tensor product can now be proved, e.g. Mac Lane's pentagonal rule, which says that the compound arrow
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006066.png" /></td> </tr></table>
+
$$
 +
((A\otimes B)\otimes C)\otimes D \to
 +
(A\otimes B)\otimes (C \otimes D) \to
 +
A\otimes (B\otimes (C \otimes D)) \to
 +
A\otimes ((B\otimes C) \otimes D) \to
 +
(A\otimes (B\otimes C)) \otimes D \to
 +
((A\otimes B)\otimes C) \otimes D
 +
$$
  
 
is the identity.
 
is the identity.
  
 
==Categorical aspect of recursive functions.==
 
==Categorical aspect of recursive functions.==
According to F.W. Lawvere, a natural numbers object <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006067.png" />, with <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006068.png" /> and <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006069.png" />, can be defined in any Cartesian closed category: For any <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006070.png" /> and <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006071.png" /> there exists a unique <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006072.png" /> such that <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006073.png" /> and <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006074.png" />. In the familiar category of sets (cf. also [[Sets, category of|Sets, category of]]), this means that <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006075.png" /> for any natural number <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006076.png" /> (cf. also [[Natural numbers object|Natural numbers object]]). The arrows <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006077.png" /> in the free Cartesian closed category with natural numbers object describe those partial recursive functions which can be proved to be universally defined (cf. also [[Partial recursive function|Partial recursive function]]). They include of course all primitive recursive functions (cf. also [[Primitive recursive function|Primitive recursive function]]).
+
According to F.W. Lawvere, a natural numbers object $(N,0,S)$, with $0\colon 1\to N$ and $S\colon N\to N$, can be defined in any Cartesian closed category: For any $a\colon 1\to A$ and $h\colon A\to A$ there exists a unique $f\colon N\to A$ such that $f0 = a$ and $fS = hf$. In the familiar category of sets (cf. also [[Sets, category of|Sets, category of]]), this means that $f(n)=h^n(a)$ for any natural number $n$ (cf. also [[Natural numbers object|Natural numbers object]]). The arrows $N^k\to N$ in the free Cartesian closed category with natural numbers object describe those partial recursive functions which can be proved to be universally defined (cf. also [[Partial recursive function|Partial recursive function]]). They include of course all primitive recursive functions (cf. also [[Primitive recursive function|Primitive recursive function]]).
  
If one is interested in partial recursive functions, say in a single variable, one should pass to the [[Monoid|monoid]] of binary relations on <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006078.png" />, the usual set of natural numbers. This is an ordered monoid with involution (involution is given by taking the converse). A recursively enumerable relation has the form <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006079.png" />, where <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006080.png" /> and <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006081.png" /> are primitive recursive functions and <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006082.png" /> is the converse of <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006083.png" />. It will be a partial recursive function if and only if <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006084.png" /> and a total recursive function if and only if also <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006085.png" />.
+
If one is interested in partial recursive functions, say in a single variable, one should pass to the [[Monoid|monoid]] of binary relations on $\N$, the usual set of natural numbers. This is an ordered monoid with involution (involution is given by taking the converse). A recursively enumerable relation has the form $fg^\wedge$, where $f$ and $g$ are primitive recursive functions and $g^\wedge$ is the converse of $g$. It will be a partial recursive function if and only if $g^\wedge g\leq f^\wedge f$ and a total recursive function if and only if also $1\leq gg^\wedge$.
  
Instead of postulating a natural numbers object, one may define such an object, provided one passes to the categorical analogue of propositional logic with variable formulas and quantification over such. The proof theory of the latter is also known as the polymorphic lambda-calculus. Already D. Prawitz had defined <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006086.png" /> as
+
Instead of postulating a natural numbers object, one may define such an object, provided one passes to the categorical analogue of propositional logic with variable formulas and quantification over such. The proof theory of the latter is also known as the polymorphic lambda-calculus. Already D. Prawitz had defined $A\lor B$ as
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006087.png" /></td> </tr></table>
+
$$\forall X (((A\Rightarrow X)\land (B\Rightarrow X))\Rightarrow X)$$
  
 
Passing to categorical notation, one may similarly define the natural numbers object with the help of
 
Passing to categorical notation, one may similarly define the natural numbers object with the help of
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006088.png" /></td> </tr></table>
+
$$\prod_X (X^X)^{X^X} \cong \prod_X X^{X^{X+1}},$$
  
following L. Wittgenstein and A. Church. The second expression also shows that the natural numbers object is the least fixpoint of the functor <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006089.png" />, which recaptures Lawvere's definition. Here, one works in a Cartesian closed category with formal products, a framework for which has been provided by R.A.G. Seely [[#References|[a11]]]. Computer scientists are interested in finding other such fixpoints working with <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006090.png" />, where <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006091.png" /> is a definable endo-functor of the category.
+
following L. Wittgenstein and A. Church. The second expression also shows that the natural numbers object is the least fixpoint of the functor $X\mapsto X+1$, which recaptures Lawvere's definition. Here, one works in a Cartesian closed category with formal products, a framework for which has been provided by R.A.G. Seely [[#References|[a11]]]. Computer scientists are interested in finding other such fixpoints working with $\prod_X X^{X^{T(X)}}$, where $T$ is a definable endo-functor of the category.
  
 
==Categorical model theory.==
 
==Categorical model theory.==
To present the model theory of first order languages categorically, M. Makkai and R. Paré [[#References|[a14]]] argue that one may as well assume the logic to be infinitary, allowing not only infinite conjunctions and disjunctions, but also quantification over infinite sets of variables. The language itself may be replaced by a sketch, a concept due to Ch. Ehresmann, namely a [[Small category|small category]] with distinguished cones and co-cones. A model is a set-valued functor from this category which turns cones into limits and co-cones into co-limits. The category of models, whose arrows are natural transformations, was characterized abstractly by C. Lair, and again independently by M. Makkai and R. Paré [[#References|[a14]]], as what the latter call an  "accessible"  category. A category <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006092.png" /> is said to be accessible if there is an infinite regular cardinal number <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006093.png" /> and a small full subcategory <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006094.png" /> consisting of <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006095.png" />-presentable objects of <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006096.png" /> such that every object of <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006097.png" /> is a <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006098.png" />-filtered co-limit of <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c12006099.png" />-filtered diagrams in <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060100.png" /> (cf. also [[Diagram|Diagram]]; [[Category|Category]]; [[Object in a category|Object in a category]]). As a special case one obtains the result for locally presentable categories [[#References|[a1]]]: these are accessible and complete.
+
To present the model theory of first order languages categorically, M. Makkai and R. Paré [[#References|[a14]]] argue that one may as well assume the logic to be infinitary, allowing not only infinite conjunctions and disjunctions, but also quantification over infinite sets of variables. The language itself may be replaced by a sketch, a concept due to Ch. Ehresmann, namely a [[Small category|small category]] with distinguished cones and co-cones. A model is a set-valued functor from this category which turns cones into limits and co-cones into co-limits. The category of models, whose arrows are natural transformations, was characterized abstractly by C. Lair, and again independently by M. Makkai and R. Paré [[#References|[a14]]], as what the latter call an  "accessible"  category. A category $\mathcal A$ is said to be accessible if there is an infinite regular cardinal number $\kappa$ and a small full subcategory $\mathcal B$ consisting of $\kappa$-presentable objects of $\mathcal A$ such that every object of $\mathcal A$ is a $\kappa$-filtered co-limit of $\kappa$-filtered diagrams in $\mathcal B$ (cf. also [[Diagram|Diagram]]; [[Category|Category]]; [[Object in a category|Object in a category]]). As a special case one obtains the result for locally presentable categories [[#References|[a1]]]: these are accessible and complete.
  
For the model theory of higher-order logic one now has recourse to the elementary toposes of F.W. Lawvere and M. Tierney. An (elementary) topos is a Cartesian closed category with a subobject classifier <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060101.png" />, accompanied by a distinguished arrow <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060102.png" /> such that, for each object <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060103.png" />, there is a one-to-one correspondence between subobjects <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060104.png" /> of <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060105.png" /> and morphisms <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060106.png" /> (cf. also [[Topos|Topos]]). This correspondence may be expressed in categorical language, but in the familiar category of sets, where <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060107.png" />, it means that <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060108.png" /> if and only if <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060109.png" />. Usually, and in the present context, it is also assumed that the topos has a natural numbers object.
+
For the model theory of higher-order logic one now has recourse to the elementary toposes of F.W. Lawvere and M. Tierney. An (elementary) topos is a Cartesian closed category with a subobject classifier $\Omega$, accompanied by a distinguished arrow $\operatorname{true}\colon 1\to\Omega$ such that, for each object $A$, there is a one-to-one correspondence between subobjects $B$ of $A$ and morphisms $\chi\colon A\to B$ (cf. also [[Topos|Topos]]). This correspondence may be expressed in categorical language, but in the familiar category of sets, where $\Omega = \{\operatorname{true}, \operatorname{false}\}$, it means that $a\in B$ if and only if $\chi(a)=\operatorname{true}$. Usually, and in the present context, it is also assumed that the topos has a natural numbers object.
  
An intuitionistic higher-order language, or type theory (cf. also [[Types, theory of|Types, theory of]]), has basic types <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060110.png" /> and <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060111.png" />, from which other types are constructed as Cartesian products and by exponentiation, although it suffices to consider exponentiation with base <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060112.png" />. In addition to variables of each type, one also has terms:
+
An intuitionistic higher-order language, or type theory (cf. also [[Types, theory of|Types, theory of]]), has basic types $\Omega$ and $N$, from which other types are constructed as Cartesian products and by exponentiation, although it suffices to consider exponentiation with base $\Omega$. In addition to variables of each type, one also has terms:
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060113.png" /></td> </tr></table>
+
$$a=a'\text{ and } a\in\alpha \quad \text{ of type }\Omega,$$
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060114.png" /></td> </tr></table>
+
$$\langle a,b\rangle\text{ of type } A\times B, \{x\in A\colon\varphi(x)\}\text{ of type } \Omega^A,$$
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060115.png" /></td> </tr></table>
+
$$0\text{ and }Sn\quad\text{ of type } N,$$
  
where <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060116.png" /> and <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060117.png" /> are of type <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060118.png" />, <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060119.png" /> is of type <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060120.png" />, <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060121.png" /> is of type <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060122.png" />, <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060123.png" /> is of type <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060124.png" />, <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060125.png" /> being a variable of type <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060126.png" />, and <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060127.png" /> is of type <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060128.png" />. Logical operations may now be defined; for example, <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060129.png" /> is short for
+
where $a$ and $a'$ are of type $A$, $\alpha$ is of type $\Omega^A$, $b$ is of type $B$, $\varphi(x)$ is of type $\Omega^A$, $x$ being a variable of type $A$, and $n$ is of type $N$. Logical operations may now be defined; for example, $\forall x\in A, \phi(x)$ is short for
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060130.png" /></td> </tr></table>
+
$$\{x\in A\colon \varphi(x)\} = \{x\in A\colon x=x\}.$$
  
With any topos <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060131.png" /> there is associated an internal language <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060132.png" />, whose types are the objects of <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060133.png" /> and whose closed terms of type <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060134.png" /> are arrows <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060135.png" />. Conversely, any language <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060136.png" /> generates a topos <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060137.png" />, whose objects are closed terms of type <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060138.png" />, up to provable equality, and whose arrows are binary relations that can be proved to be functions, also up to provable equality. It turns out that <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060139.png" /> is equivalent to <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060140.png" />, hence every topos may be assumed to be generated by a language, and that <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060141.png" /> is a conservative extension of <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060142.png" />.
+
With any topos $\mathcal T$ there is associated an internal language $L(\mathcal T)$, whose types are the objects of $\mathcal T$ and whose closed terms of type $A$ are arrows $1\to A$. Conversely, any language $\mathcal L$ generates a topos $T(\mathcal L)$, whose objects are closed terms of type $\Omega^A$, up to provable equality, and whose arrows are binary relations that can be proved to be functions, also up to provable equality. It turns out that $TL(\mathcal T)$ is equivalent to $\mathcal T$, hence every topos may be assumed to be generated by a language, and that $LT(\mathcal L)$ is a conservative extension of $\mathcal L$.
  
It is tempting to view as models of <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060143.png" /> all logical functors <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060144.png" /> or, equivalently, all translations <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060145.png" />, but the tradition of Henkin's non-standard models suggest that <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060146.png" /> be a local topos. This means that
+
It is tempting to view as models of $\mathcal L$ all logical functors $T(\mathcal L)\to \mathcal T$ or, equivalently, all translations $\mathcal L\to L(\mathcal T)$, but the tradition of Henkin's non-standard models suggest that $\mathcal T$ be a local topos. This means that
  
<img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060147.png" /> is not true in <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060148.png" />;
+
$\bot$ ist not true in $L(\mathcal T)$;
  
<img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060149.png" /> holds in <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060150.png" /> only if either <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060151.png" /> or <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060152.png" /> holds;
+
$p\lor q$ holds in $L(\mathcal T)$ only if either $p$ or $q$ holds;
  
<img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060153.png" /> holds in <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060154.png" /> only if <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060155.png" /> holds for some term <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060156.png" /> of type <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060157.png" />, that is, some arrow <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060158.png" /> in <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060159.png" />. As P. Freyd observed, these conditions assert algebraically that <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060160.png" /> is not initial and that it is an indecomposable projective. For Boolean toposes <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060161.png" />, that is, when <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060162.png" /> is classical, <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060163.png" /> being local means that <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060164.png" /> is a generator: two arrows <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060165.png" /> are equal if <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060166.png" /> for all <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060167.png" /> [[#References|[a9]]].
+
$\exists x\in A, \varphi(x)$ holds in $L(\mathcal T)$ only if $\varphi(a)$ holds for some term $a$ of type $A$, that is, some arrow $a\colon 1\to A$ in $\mathcal T$. As P. Freyd observed, these conditions assert algebraically that $1$ is not initial and that it is an indecomposable projective. For Boolean toposes $\mathcal T$, that is, when $L(\mathcal T)$ is classical, $\mathcal T$ being local means that $1$ is a generator: two arrows $f,g\colon A\to B$ are equal if $fa=ga$ for all $a\colon 1\to A$ [[#References|[a9]]].
  
It is a non-trivial fact that the so-called free topos <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060168.png" /> generated by pure intuitionistic type theory <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060169.png" />, the initial object in the category of all toposes and logical functors, is local. This fact may be exploited to justify a number of intuitionistic principles. For example, a closed formula <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060170.png" /> of <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060171.png" /> is true in <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060172.png" /> if and only if it is provable, that is, its truth can be checked. Moreover, the existential quantifier of <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060173.png" /> allows a substitutional interpretation: if <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060174.png" /> is true in <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060175.png" />, then <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060176.png" /> is true in <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060177.png" /> for some closed term in its internal language, that is, for some arrow <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060178.png" />. Another topos used for illustrating intuitionistic principles is Hyland's effective topos [[#References|[a9]]].
+
It is a non-trivial fact that the so-called free topos $T(\mathcal L_0)$ generated by pure intuitionistic type theory $\mathcal L_0$, the initial object in the category of all toposes and logical functors, is local. This fact may be exploited to justify a number of intuitionistic principles. For example, a closed formula $p$ of $\mathcal L_0$ is true in $T(\mathcal L_0)$ if and only if it is provable, that is, its truth can be checked. Moreover, the existential quantifier of $LT(\mathcal L_0)$ allows a substitutional interpretation: if $\exists x\in A, \varphi(x)$ is true in $T(\mathcal L_0)$, then $\varphi(a)$ is true in $T(\mathcal L_0)$ for some closed term in its internal language, that is, for some arrow $a\colon 1\to A$. Another topos used for illustrating intuitionistic principles is Hyland's effective topos [[#References|[a9]]].
  
 
==Categorical completeness theorems.==
 
==Categorical completeness theorems.==
Line 136: Line 148:
 
The first to formulate a categorical version of first-order completeness was A. Joyal, who proved that any small coherent category admits an isomorphism-reflecting coherent functor into a power of the category of sets.
 
The first to formulate a categorical version of first-order completeness was A. Joyal, who proved that any small coherent category admits an isomorphism-reflecting coherent functor into a power of the category of sets.
  
A category is said to be coherent if it has finite limits, the poset <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060179.png" /> of subobjects of any object <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060180.png" /> is a [[Lattice|lattice]] and, for any <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060181.png" />, the induced mapping <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060182.png" /> has a left adjoint <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060183.png" /> which is stable under substitution. The last property is a categorical translation of saying that the application of <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060184.png" /> to <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060185.png" /> commutes with substituting <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060186.png" /> for <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060187.png" />. If, furthermore, <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060188.png" /> has a right adjoint <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060189.png" />, the coherent category is said to be a Heyting category.
+
A category is said to be coherent if it has finite limits, the poset $S(A)$ of subobjects of any object $A$ is a [[Lattice|lattice]] and, for any $f\colon A\to B$, the induced mapping $f^*\colon S(B)\to S(A)$ has a left adjoint $\exists_f$ which is stable under substitution. The last property is a categorical translation of saying that the application of $\exists_z$ to $\varphi(y,z)$ commutes with substituting $\psi(y')$ for $y$. If, furthermore, $f^*$ has a right adjoint $\forall_f$, the coherent category is said to be a Heyting category.
  
Joyal's theorem is equivalent to that of Gödel and Mal'tsev [[#References|[a13]]], and it implies Deligne's theorem on the existence of enough points in a coherent topos. Joyal also proved that every small Heyting category has an isomorphism-reflecting Heyting functor to a category of the form <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060190.png" />, where <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060191.png" /> is a small category.
+
Joyal's theorem is equivalent to that of Gödel and Mal'tsev [[#References|[a13]]], and it implies Deligne's theorem on the existence of enough points in a coherent topos. Joyal also proved that every small Heyting category has an isomorphism-reflecting Heyting functor to a category of the form $\mathbf{Set}^{\mathcal P}$, where $\mathcal P$ is a small category.
  
 
This result is closely related to Kripke's completeness theorem for intuitionistic predicate calculus and also to Barr's embedding theorem for regular categories. Actually, M. Barr proved more, since he was able to replace  "isomorphism reflecting"  by  "full" . His theorem generalized earlier embedding theorems for Abelian categories by S. Lubkin, P. Freyd and B. Mitchell.
 
This result is closely related to Kripke's completeness theorem for intuitionistic predicate calculus and also to Barr's embedding theorem for regular categories. Actually, M. Barr proved more, since he was able to replace  "isomorphism reflecting"  by  "full" . His theorem generalized earlier embedding theorems for Abelian categories by S. Lubkin, P. Freyd and B. Mitchell.
Line 151: Line 163:
 
The traditional view, held by the majority of those interested in foundations, is that the foundations of mathematics should be expressed in a first-order language, the language of set theory. While an algebraic treatment of Zermelo–Fraenkel set theory has been given in [[#References|[a5]]] (cf. also [[Set theory|Set theory]]), most categorists reject the  "theology of the membership relation" . In Lawvere's view, one should concentrate on the ternary relation of composition instead of on the binary relation of membership, which leads one to seeing the world of mathematics as a category, in particular, as an elementary topos. As indicated above, toposes are essentially the same as type theories.
 
The traditional view, held by the majority of those interested in foundations, is that the foundations of mathematics should be expressed in a first-order language, the language of set theory. While an algebraic treatment of Zermelo–Fraenkel set theory has been given in [[#References|[a5]]] (cf. also [[Set theory|Set theory]]), most categorists reject the  "theology of the membership relation" . In Lawvere's view, one should concentrate on the ternary relation of composition instead of on the binary relation of membership, which leads one to seeing the world of mathematics as a category, in particular, as an elementary topos. As indicated above, toposes are essentially the same as type theories.
  
But which topos is  "the"  category of sets? It should be  "a"  local topos; but a Platonist would wish to replace the indefinite article by the definite one. An intuitionist, albeit a moderate one, might be happy with the free topos, the topos generated by pure intuitionistic type theory <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060192.png" />, in which no unnecessary axioms hold and no unnecessary terms are introduced. It so happens that many of the logical connectives have the expected interpretation in <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060193.png" />, for example, <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060194.png" /> is true in the free topos if and only if <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060195.png" /> is true or <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060196.png" /> is. Even an existential statement <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060197.png" /> is true in the free topos if and only if <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060198.png" /> is true for some term <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060199.png" /> of type <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060200.png" /> in its internal language. Unfortunately, negation, implication and universal quantification do not have the expected interpretation (unless one expects the so-called Brouwer–Heyting–Kolmogerov interpretation). This is so, in view of the [[Gödel incompleteness theorem|Gödel incompleteness theorem]] or its proof. Although Gödel's original argument was about classical type theory, it remains valid for intuitionistic type theory. For example, Gödel exhibited a formula <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060201.png" />, with <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060202.png" /> a variable of type <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060203.png" />, such that <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060204.png" /> is not true in <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060205.png" />, even though <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060206.png" /> is true for each closed term <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060207.png" /> of type <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060208.png" />. It so happens that the only closed terms of type <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060209.png" /> in the internal language of the free topos are the standard numerals <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060210.png" />, <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060211.png" />, <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/c/c120/c120060/c120060212.png" />, etc.
+
But which topos is  "the"  category of sets? It should be  "a"  local topos; but a Platonist would wish to replace the indefinite article by the definite one. An intuitionist, albeit a moderate one, might be happy with the free topos, the topos generated by pure intuitionistic type theory $\mathcal L_0$, in which no unnecessary axioms hold and no unnecessary terms are introduced. It so happens that many of the logical connectives have the expected interpretation in $T(\mathcal L_0)$, for example, $p\lor q$ is true in the free topos if and only if $p$ is true or $q$ is. Even an existential statement $\exists x\in A, \varphi(x)$ is true in the free topos if and only if $\varphi(a)$ is true for some term $a$ of type $A$ in its internal language. Unfortunately, negation, implication and universal quantification do not have the expected interpretation (unless one expects the so-called Brouwer–Heyting–Kolmogerov interpretation). This is so, in view of the [[Gödel incompleteness theorem|Gödel incompleteness theorem]] or its proof. Although Gödel's original argument was about classical type theory, it remains valid for intuitionistic type theory. For example, Gödel exhibited a formula $\varphi(x)$, with $x$ a variable of type $N$, such that $\forall x\in N, \varphi(x)$ is not true in $T(\mathcal L_0)$, even though $\varphi(a)$ is true for each closed term $a$ of type $N$. It so happens that the only closed terms of type $N$ in the internal language of the free topos are the standard numerals $0,S0,SS0$, etc.
  
 
Only few mathematicians are intuitionists and most believe in the axiom of the excluded third (cf. [[Law of the excluded middle|Law of the excluded middle]]). In accordance with the majority view, one should search for a Boolean local topos as the world of mathematics. Unfortunately, it follows from Gödel's incompleteness theorem that the topos generated by pure classical type theory is not local. Still, the completeness theorem ensures a plentitude of Boolean local toposes. Yet it seems difficult to put one's finger on a distinguished Boolean local topos, and some mathematicians have even suggested one should stop looking for one and accept the plurality of mathematical worlds instead.
 
Only few mathematicians are intuitionists and most believe in the axiom of the excluded third (cf. [[Law of the excluded middle|Law of the excluded middle]]). In accordance with the majority view, one should search for a Boolean local topos as the world of mathematics. Unfortunately, it follows from Gödel's incompleteness theorem that the topos generated by pure classical type theory is not local. Still, the completeness theorem ensures a plentitude of Boolean local toposes. Yet it seems difficult to put one's finger on a distinguished Boolean local topos, and some mathematicians have even suggested one should stop looking for one and accept the plurality of mathematical worlds instead.

Latest revision as of 20:57, 21 December 2017

A branch of mathematics dealing with the interaction between logic (cf. also Mathematical logic) and category theory. Each of these disciplines has profoundly influenced the other. In fact, it may be claimed that, at a very basic level, logic and category theory are the same.

At one time it was customary to divide logic into three parts: proof theory, recursion theory and model theory. To all these, category theory can make some fundamental contributions. Logic has also been used for presenting the foundations of mathematics, and here too category theory has something to say.

Categorical proof theory.

One way of looking at proofs is to see them as deductions. A deduction $f\colon A\to B$ is a method of inferring $B$ from $A$ (cf. also Derivation, logical; Natural logical deduction). Evidently, deducibility is reflexive and transitive, and this translates into the identity deduction $1_A\colon A\to A$ and into composition of deductions

$$\frac{f\colon A\to B\quad g\colon B\to C}{gf\colon A\to C}.$$

Originally, logicians were not interested in asking when two deductions $A\to B$ are equal; the first to do so was D. Prawitz [a10]. It seems reasonable to demand that

$$f1_A=f=1_Bf,$$

$$ (hg)f = h(gf)$$

where $h\colon C\to D$. Once this is required, the definition of a category is obtained. In such a category the objects are formulas and the arrows are deductions. But this was not the picture S. Eilenberg and S. Mac Lane had in mind when they first introduced categories [a3]. In a more typical concrete category, the objects are structured sets and the arrows (or morphisms) are mappings preserving this structure.

An example of a deductive system is the positive intuitionistic propositional calculus. It deals with a designated formula $\top$ and two binary connectives $A\land B$ and $A\Rightarrow B$ between formulas satisfying the following axioms and rules of inference:

$$\mathbf p_{AB}\colon A\land B\to A,\quad \mathbf q_{AB}\colon A\land B\to B,$$

$$\mathbf o_A\colon A\to\top,\quad \mathbf e_{AB}\colon A\land (A\Rightarrow B) \to B,$$

$$\frac{f\colon C\to A\quad g\colon C\to B}{\langle f,g\rangle\colon C\to A\land B},$$

$$\frac{f\colon A\land C\to B}{f^*\colon C\to A\Rightarrow B}.$$

If one introduces appropriate equations, for instance, $\mathbf p_{AB}\langle f,g\rangle = f,$ one obtains what F.W. Lawvere [a7] calls a Cartesian closed category (cf. also Closed category). These equations will ensure that there is exactly one arrow $A\to\top$, making $\top$ a terminal object, that there is a one-to-one correspondence between pairs of arrows $C\to A, C\to B$ and arrows $C\to A\land B$, making $A\land B$ a Cartesian product, and that there is a one-to-one correspondence between arrows $A\land C\to B$ and arrows $C\to A\Rightarrow B,$ making $A\Rightarrow B$ a case of exponentiation. Lawvere threw additional light on this situation by noting, for instance, that $-\land C\to B$ and $C\to -\Rightarrow B$ are adjoint functors. Passing to categorical notation, one writes $1$ for $\top$, $A\times B$ for $A\land B$ and $B^A$ for $A\Rightarrow B$.

The categorical point of view offers a unified way of looking at elementary arithmethic and intuitionistic logic. For example, the familiar laws of indices

$$c^{a\times b} = (c^b)^a,$$

$$(a\times b)^c = a^c\times b^c, c^{a+b} = c^a\times c^b,$$

translate into the following equivalences in the intuitionistic propositional calculus:

$$(A\land B)\Rightarrow C \leftrightarrow A\Rightarrow(B\Rightarrow C),$$

$$C\Rightarrow(A\land B) \leftrightarrow (C\Rightarrow A)\land(C\Rightarrow B), (A\lor B)\Rightarrow C \leftrightarrow (A\Rightarrow C)\land(B\Rightarrow C). $$

It has been assumed here that the propositional calculus has been augmented by the disjunction symbol $\lor$, which translates into the categorical coproduct.

The traditional deduction theorem admits the following analogue for Lawvere-style deductive systems: If $\varphi(x)\colon A\to B$ can be inferred from the assumption $x\colon\top\to C$, then there is a deduction $f\colon C\land A\to B$ not using this assumption.

Algebraically, one may think of $x$ as an indeterminate arrow and of $\varphi(x)$ as a polynomial in $x$. Moreover, it turns out that

$$f\langle x\mathbf o_A, 1_A\rangle = \varphi(x).$$

In the special case when $A=\top$, and upon replacing $f\colon A\to B$ by $g\colon\top\to A\Rightarrow B,$ this equation may be written as

$$\mathbf e_{AB}\langle g, x\rangle = \varphi(x),$$

and it is customary to write $g=\lambda_{x\in C}\varphi(x)$ and to think of $\mathbf e_{AB}$ as application.

One is thus led to the traditional typed $\lambda$-calculus (cf. $\lambda$-calculus) of H.B. Curry and A. Church, although these authors dealt with the proof theory of implication alone, having followed D. Hilbert in applying Occam's razor to eliminate conjunction from the propositional calculus. However, viewing implication as an adjoint to conjunction, some people now (1998) prefer to study the lambda-calculus with surjective pairing, which turns out to be equivalent to a Cartesian closed category, see [a12] and [a6]. Like conjunction and implication, disjunction too can be lifted to the categorical level and turned into the coproduct. Even quantifiers can be presented categorically, as was done in Lawvere's hyperdoctorines [a8].

Multi-categories.

One of the more successful techniques in proof theory was Gentzen's method of cut-elimination (cf. also Gentzen formal system). G. Gentzen dealt with deductions of the form

$$f\colon A_1\dots A_n\to B.$$

Composition of deductions must now be replaced by what he called a cut:

$$\frac{f\colon\Lambda\to A\quad g\colon\Gamma A\Delta\to B}{g \& f\colon \Gamma\Lambda\Delta\to B}.$$

Here, capital Greek letters denote strings of formulas. Introducing suitable equations between deductions, one obtains the notion of a multi-category. Gentzen presented the logical connectives with the help of introduction rules which already incorporate some cuts, for example:

$$\frac{f\colon\Gamma\to A\quad g\colon \Gamma\to B}{\langle f,g\rangle\colon\Gamma\to A\land B},$$

$$\frac{f\colon\Gamma A\Delta\to C}{f_p\colon\Gamma A\land B\Delta\to C}, \frac{f\colon\Gamma B\Delta\to C}{f_q\colon\Gamma A\land B\Delta\to C}. $$

He showed that in that case further cuts are no longer necessary, and the same is true for identity deductions of compound formulas. At the multi-category level, every deduction obtained with cut is actually equal to one obtained without.

Gentzen had imposed three structural rules: interchange, contraction and weakening; but the cut-elimination theorem holds even without them, giving rise to what has been called substructural logic [a2]. A multi-category satisfying the structural rules is nothing else than a many-sorted algebraic theory (cf. also Many-valued logic). A multi-category not satisfying them is a context-free recognition grammar (cf. also Grammar, context-free). Thus, multi-categories may be applied in linguistics. More surprisingly, they have recently found applications in theoretical physics.

In the absence of the structural rules, conjunction $\land$ must be distinguished from the tensor product $\otimes$, which is introduced as follows:

$$\frac{f\colon\Gamma\to A\quad g\colon\Delta\to B}{\{f,g\}\colon\Gamma\Delta\to A\otimes B},$$

$$\frac{f\colon\Gamma AB\Delta\to C}{f^S\colon\Gamma A\otimes B\Delta\to C}.$$

Postulating suitable equations, one ensures that there is a one-to-one correspondence between deductions $\Gamma AB\Delta\to C$ and $\Gamma A\otimes B\Delta\to C$. This is essentially how N. Bourbaki defined the tensor product in multi-linear algebra. The usual properties of the tensor product can now be proved, e.g. Mac Lane's pentagonal rule, which says that the compound arrow

$$ ((A\otimes B)\otimes C)\otimes D \to (A\otimes B)\otimes (C \otimes D) \to A\otimes (B\otimes (C \otimes D)) \to A\otimes ((B\otimes C) \otimes D) \to (A\otimes (B\otimes C)) \otimes D \to ((A\otimes B)\otimes C) \otimes D $$

is the identity.

Categorical aspect of recursive functions.

According to F.W. Lawvere, a natural numbers object $(N,0,S)$, with $0\colon 1\to N$ and $S\colon N\to N$, can be defined in any Cartesian closed category: For any $a\colon 1\to A$ and $h\colon A\to A$ there exists a unique $f\colon N\to A$ such that $f0 = a$ and $fS = hf$. In the familiar category of sets (cf. also Sets, category of), this means that $f(n)=h^n(a)$ for any natural number $n$ (cf. also Natural numbers object). The arrows $N^k\to N$ in the free Cartesian closed category with natural numbers object describe those partial recursive functions which can be proved to be universally defined (cf. also Partial recursive function). They include of course all primitive recursive functions (cf. also Primitive recursive function).

If one is interested in partial recursive functions, say in a single variable, one should pass to the monoid of binary relations on $\N$, the usual set of natural numbers. This is an ordered monoid with involution (involution is given by taking the converse). A recursively enumerable relation has the form $fg^\wedge$, where $f$ and $g$ are primitive recursive functions and $g^\wedge$ is the converse of $g$. It will be a partial recursive function if and only if $g^\wedge g\leq f^\wedge f$ and a total recursive function if and only if also $1\leq gg^\wedge$.

Instead of postulating a natural numbers object, one may define such an object, provided one passes to the categorical analogue of propositional logic with variable formulas and quantification over such. The proof theory of the latter is also known as the polymorphic lambda-calculus. Already D. Prawitz had defined $A\lor B$ as

$$\forall X (((A\Rightarrow X)\land (B\Rightarrow X))\Rightarrow X)$$

Passing to categorical notation, one may similarly define the natural numbers object with the help of

$$\prod_X (X^X)^{X^X} \cong \prod_X X^{X^{X+1}},$$

following L. Wittgenstein and A. Church. The second expression also shows that the natural numbers object is the least fixpoint of the functor $X\mapsto X+1$, which recaptures Lawvere's definition. Here, one works in a Cartesian closed category with formal products, a framework for which has been provided by R.A.G. Seely [a11]. Computer scientists are interested in finding other such fixpoints working with $\prod_X X^{X^{T(X)}}$, where $T$ is a definable endo-functor of the category.

Categorical model theory.

To present the model theory of first order languages categorically, M. Makkai and R. Paré [a14] argue that one may as well assume the logic to be infinitary, allowing not only infinite conjunctions and disjunctions, but also quantification over infinite sets of variables. The language itself may be replaced by a sketch, a concept due to Ch. Ehresmann, namely a small category with distinguished cones and co-cones. A model is a set-valued functor from this category which turns cones into limits and co-cones into co-limits. The category of models, whose arrows are natural transformations, was characterized abstractly by C. Lair, and again independently by M. Makkai and R. Paré [a14], as what the latter call an "accessible" category. A category $\mathcal A$ is said to be accessible if there is an infinite regular cardinal number $\kappa$ and a small full subcategory $\mathcal B$ consisting of $\kappa$-presentable objects of $\mathcal A$ such that every object of $\mathcal A$ is a $\kappa$-filtered co-limit of $\kappa$-filtered diagrams in $\mathcal B$ (cf. also Diagram; Category; Object in a category). As a special case one obtains the result for locally presentable categories [a1]: these are accessible and complete.

For the model theory of higher-order logic one now has recourse to the elementary toposes of F.W. Lawvere and M. Tierney. An (elementary) topos is a Cartesian closed category with a subobject classifier $\Omega$, accompanied by a distinguished arrow $\operatorname{true}\colon 1\to\Omega$ such that, for each object $A$, there is a one-to-one correspondence between subobjects $B$ of $A$ and morphisms $\chi\colon A\to B$ (cf. also Topos). This correspondence may be expressed in categorical language, but in the familiar category of sets, where $\Omega = \{\operatorname{true}, \operatorname{false}\}$, it means that $a\in B$ if and only if $\chi(a)=\operatorname{true}$. Usually, and in the present context, it is also assumed that the topos has a natural numbers object.

An intuitionistic higher-order language, or type theory (cf. also Types, theory of), has basic types $\Omega$ and $N$, from which other types are constructed as Cartesian products and by exponentiation, although it suffices to consider exponentiation with base $\Omega$. In addition to variables of each type, one also has terms:

$$a=a'\text{ and } a\in\alpha \quad \text{ of type }\Omega,$$

$$\langle a,b\rangle\text{ of type } A\times B, \{x\in A\colon\varphi(x)\}\text{ of type } \Omega^A,$$

$$0\text{ and }Sn\quad\text{ of type } N,$$

where $a$ and $a'$ are of type $A$, $\alpha$ is of type $\Omega^A$, $b$ is of type $B$, $\varphi(x)$ is of type $\Omega^A$, $x$ being a variable of type $A$, and $n$ is of type $N$. Logical operations may now be defined; for example, $\forall x\in A, \phi(x)$ is short for

$$\{x\in A\colon \varphi(x)\} = \{x\in A\colon x=x\}.$$

With any topos $\mathcal T$ there is associated an internal language $L(\mathcal T)$, whose types are the objects of $\mathcal T$ and whose closed terms of type $A$ are arrows $1\to A$. Conversely, any language $\mathcal L$ generates a topos $T(\mathcal L)$, whose objects are closed terms of type $\Omega^A$, up to provable equality, and whose arrows are binary relations that can be proved to be functions, also up to provable equality. It turns out that $TL(\mathcal T)$ is equivalent to $\mathcal T$, hence every topos may be assumed to be generated by a language, and that $LT(\mathcal L)$ is a conservative extension of $\mathcal L$.

It is tempting to view as models of $\mathcal L$ all logical functors $T(\mathcal L)\to \mathcal T$ or, equivalently, all translations $\mathcal L\to L(\mathcal T)$, but the tradition of Henkin's non-standard models suggest that $\mathcal T$ be a local topos. This means that

$\bot$ ist not true in $L(\mathcal T)$;

$p\lor q$ holds in $L(\mathcal T)$ only if either $p$ or $q$ holds;

$\exists x\in A, \varphi(x)$ holds in $L(\mathcal T)$ only if $\varphi(a)$ holds for some term $a$ of type $A$, that is, some arrow $a\colon 1\to A$ in $\mathcal T$. As P. Freyd observed, these conditions assert algebraically that $1$ is not initial and that it is an indecomposable projective. For Boolean toposes $\mathcal T$, that is, when $L(\mathcal T)$ is classical, $\mathcal T$ being local means that $1$ is a generator: two arrows $f,g\colon A\to B$ are equal if $fa=ga$ for all $a\colon 1\to A$ [a9].

It is a non-trivial fact that the so-called free topos $T(\mathcal L_0)$ generated by pure intuitionistic type theory $\mathcal L_0$, the initial object in the category of all toposes and logical functors, is local. This fact may be exploited to justify a number of intuitionistic principles. For example, a closed formula $p$ of $\mathcal L_0$ is true in $T(\mathcal L_0)$ if and only if it is provable, that is, its truth can be checked. Moreover, the existential quantifier of $LT(\mathcal L_0)$ allows a substitutional interpretation: if $\exists x\in A, \varphi(x)$ is true in $T(\mathcal L_0)$, then $\varphi(a)$ is true in $T(\mathcal L_0)$ for some closed term in its internal language, that is, for some arrow $a\colon 1\to A$. Another topos used for illustrating intuitionistic principles is Hyland's effective topos [a9].

Categorical completeness theorems.

Completeness theorems in logic assert that certain theories have enough models (cf. also Gödel completeness theorem). For classical first-order logic such a result is due to K. Gödel and A.I. Mal'tsev, and a generalization to intuitionistic systems was given by S. Kripke. For classical higher-order logic, completeness was established by L.A. Henkin; for the intuitionistic version see [a6].

The first to formulate a categorical version of first-order completeness was A. Joyal, who proved that any small coherent category admits an isomorphism-reflecting coherent functor into a power of the category of sets.

A category is said to be coherent if it has finite limits, the poset $S(A)$ of subobjects of any object $A$ is a lattice and, for any $f\colon A\to B$, the induced mapping $f^*\colon S(B)\to S(A)$ has a left adjoint $\exists_f$ which is stable under substitution. The last property is a categorical translation of saying that the application of $\exists_z$ to $\varphi(y,z)$ commutes with substituting $\psi(y')$ for $y$. If, furthermore, $f^*$ has a right adjoint $\forall_f$, the coherent category is said to be a Heyting category.

Joyal's theorem is equivalent to that of Gödel and Mal'tsev [a13], and it implies Deligne's theorem on the existence of enough points in a coherent topos. Joyal also proved that every small Heyting category has an isomorphism-reflecting Heyting functor to a category of the form $\mathbf{Set}^{\mathcal P}$, where $\mathcal P$ is a small category.

This result is closely related to Kripke's completeness theorem for intuitionistic predicate calculus and also to Barr's embedding theorem for regular categories. Actually, M. Barr proved more, since he was able to replace "isomorphism reflecting" by "full" . His theorem generalized earlier embedding theorems for Abelian categories by S. Lubkin, P. Freyd and B. Mitchell.

The intuitionistic generalization of Henkin's completeness theorem can be expressed algebraically thus [a6]: Every small topos can be fully embedded by a logical functor into a product of local toposes.

In fact, more can be said, according to a theorem by S. Awodey, improving an earlier result by J. Lambek and I. Moerdijk: Every small topos is the topos of continuous sections of a topological sheaf of local toposes.

Categorical foundations.

According to the Frege–Russell logicist program, the language of symbolic logic was also to serve for the foundations of mathematics. This is only possible if one adopts at least one non-logical axiom, the axiom of infinity, or, equivalently, if one admits the type of natural numbers (cf. also Infinity, axiom of). Conceivably, it is also possible if one allows quantification over types.

The traditional view, held by the majority of those interested in foundations, is that the foundations of mathematics should be expressed in a first-order language, the language of set theory. While an algebraic treatment of Zermelo–Fraenkel set theory has been given in [a5] (cf. also Set theory), most categorists reject the "theology of the membership relation" . In Lawvere's view, one should concentrate on the ternary relation of composition instead of on the binary relation of membership, which leads one to seeing the world of mathematics as a category, in particular, as an elementary topos. As indicated above, toposes are essentially the same as type theories.

But which topos is "the" category of sets? It should be "a" local topos; but a Platonist would wish to replace the indefinite article by the definite one. An intuitionist, albeit a moderate one, might be happy with the free topos, the topos generated by pure intuitionistic type theory $\mathcal L_0$, in which no unnecessary axioms hold and no unnecessary terms are introduced. It so happens that many of the logical connectives have the expected interpretation in $T(\mathcal L_0)$, for example, $p\lor q$ is true in the free topos if and only if $p$ is true or $q$ is. Even an existential statement $\exists x\in A, \varphi(x)$ is true in the free topos if and only if $\varphi(a)$ is true for some term $a$ of type $A$ in its internal language. Unfortunately, negation, implication and universal quantification do not have the expected interpretation (unless one expects the so-called Brouwer–Heyting–Kolmogerov interpretation). This is so, in view of the Gödel incompleteness theorem or its proof. Although Gödel's original argument was about classical type theory, it remains valid for intuitionistic type theory. For example, Gödel exhibited a formula $\varphi(x)$, with $x$ a variable of type $N$, such that $\forall x\in N, \varphi(x)$ is not true in $T(\mathcal L_0)$, even though $\varphi(a)$ is true for each closed term $a$ of type $N$. It so happens that the only closed terms of type $N$ in the internal language of the free topos are the standard numerals $0,S0,SS0$, etc.

Only few mathematicians are intuitionists and most believe in the axiom of the excluded third (cf. Law of the excluded middle). In accordance with the majority view, one should search for a Boolean local topos as the world of mathematics. Unfortunately, it follows from Gödel's incompleteness theorem that the topos generated by pure classical type theory is not local. Still, the completeness theorem ensures a plentitude of Boolean local toposes. Yet it seems difficult to put one's finger on a distinguished Boolean local topos, and some mathematicians have even suggested one should stop looking for one and accept the plurality of mathematical worlds instead.

References

[a1] P. Gabriel, F. Ulmer, "Lokal präsentierbare Kategorien" , Lecture Notes Math. , 221 , Springer (1971)
[a2] K. Došen, P. Schroeder-Heister, "Substructural logics" , Oxford Univ. Press (1993)
[a3] S. Eilenberg, S. Mac Lane, "General theory of natural equivalences" Trans. Amer. Math. Soc. , 58 (1945)
[a4] W.S. Hatcher, "The logical foundations of mathematics" , Pergamon (1982)
[a5] A. Joyal, I Moerdijk, "Algebraic set theory" , Cambridge Univ. Press (1995)
[a6] J. Lambek, P.J. Scott, "Introduction to higher order categorical logic" , Cambridge Univ. Press (1986)
[a7] F.W. Lawvere, "Adjointness in foundations" Dialectica , 23 (1969) pp. 281–296
[a8] F.W. Lawvere, "Equality in hyperdoctrines and comprehension schema as an adjoint functor" A. Heller (ed.) , Proc. New York Symp. Appl. Categorical Algebra , Amer. Math. Soc. (1970) pp. 1–14
[a9] C. McLarty, "Elementary categories, elementary toposes" , Clarendon Press (1992)
[a10] D. Prawitz, "Natural deduction" , Almquist and Wiksell (1965)
[a11] R.A.G. Seely, "Categorical semantics for higher order polymorphic lambda calculus" J. Symbolic Logic , 52 (1987) pp. 969–989
[a12] "To H.B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism" J.P. Seldin (ed.) J.R. Hindley (ed.) , Acad. Press (1980)
[a13] M. Makkai, G.E. Reyes, "First order categorical logic" , Lecture Notes Math. , 611 , Springer (1977)
[a14] M. Makkai, R. Paré, "Accessible categories: the foundations of catgeorical model theory" , Contemp. Math. Ser. , 104 , Amer. Math. Soc. (1989)
[a15] K. Došen, "Cut-elimination in categories" , Kluwer Acad. Publ. (1999)
How to Cite This Entry:
Categorical logic. Encyclopedia of Mathematics. URL: http://encyclopediaofmath.org/index.php?title=Categorical_logic&oldid=12084
This article was adapted from an original article by J. Lambek (originator), which appeared in Encyclopedia of Mathematics - ISBN 1402006098. See original article