---
author:
- Fabio Pasquali
title: 'The axiom of choice, co-comprehension schema and redundancies in triposes'
---

Introduction {#sec0 .unnumbered}
============

The notion of tripos has been introduced in [@tripos] and it turned out to be of central importance in category theory and categorical logic, see [@tripos; @Jacobs; @tripinret] and references therein.  Every tripos is an instance of the more general concept of doctrine and, remaining at an informal level, a doctrine can seen as a pair $({\mathcal{C}},P)$ where ${\mathcal{C}}$ is a cartesian category endowed with a chosen logic $P$ (all formal definitions are postponed to section \[sec1\]).  Following this informal description of doctrines, we can say that, from a purely logical point of view, that a tripos is a doctrine expressing higher order intuitionistic logic with equality[^1], i.e. the fragment $$\mathbb{P}, \Pi, \Sigma, {\rightarrow}, \wedge, \lor, \top, \bot, =$$ where we wrote $\mathbb{P}$ to indicate the fact that the logic is higher order, $\Pi$ do indicate universal quantification and $\Sigma$ to indicate existential quantification.\
\
The structure of a tripos closely relates the category ${\mathcal{C}}$ with the logic $P$. To stress this correspondence we mention an important fact concerning the theory of triposes, the Tripos To Topos construction [@tripos; @tripinret].  This is a construction which takes any tripos $({\mathcal{C}},P)$ and produces an elementary topos, usually denote by ${\mathcal{C}}[P]$, in such a way that the construction provides a left adjoint functor to the inclusion of the category of elementary toposes and logical functors is into the category of triposes and logical functors [@TTT].  Known examples of such toposes are the effective topos and any topos of sheaves over a locale [@tripinret].  Thus, saying that ${\mathcal{C}}$ is the base of a tripos, i.e that there is a pair $({\mathcal{C}},P)$ which is a tripos, is to say that ${\mathcal{C}}$ already possesses a sufficient structure to be freely completed to an elementary topos.\
\
A fact of particular interest for this paper is that there are some redundancies in the notion of tripos.  Using Prawitz ’s second order encoding of first order predicates logic [@Pra], it has been proved that a doctrine expressing the fragment $$\mathbb{P}, \Pi, {\rightarrow}$$ is a tripos [@tripos; @Jacobs].\
\
As one might aspect, the operation of implication ${\rightarrow}$ is strongly connected to universal quantification $\Pi$. This connection can be outlined if the doctrine $({\mathcal{C}},P)$ has comprehension.  In a doctrine $({\mathcal{C}},P)$ the property of having comprehension is the possibility to make correspond formulas of the logic $P$ to arrows of ${\mathcal{C}}$, in such a way that, if $\phi$ is the formula of $P$ to which corresponds the arrow $\lfloor\phi\rfloor$, we can think of the domain of $\lfloor\phi\rfloor$ as the abstract collection of those terms $t$ such that $\phi(t)$ holds.  Doctrines with comprehension and triposes with comprehension share many interesting properties which we will not discuss here and we address interested readers to [@Giacobbe; @Jacobs].\
\
A theorem in [@RM] states that a doctrine expressing the fragment $\{\}, \Pi, \wedge, \top$, where we use $\{\}$ to denote that the doctrine has comprehension, has also the operation of implication.  An obvious corollary is that a doctrine expressing the fragment $$\mathbb{P}, \{\}, \Pi, \wedge, \top$$ is a tripos with comprehension.\
\
In this paper we study the notion of co-comprehension (the dual notion of comprehension) and the axiom of choice in the context of doctrines.  In particular we study how these two properties contribute to definability, i.e. in reconstructing a certain structure from a (apparently) poorer one.\
\
Co-comprehension is the dual notion of comprehension, i.e the possibility to associate to every formula $\phi$ of $P$ a monic $\lceil\phi\rceil$ of ${\mathcal{C}}$ in such a way that the domain of $\lceil\phi\rceil$ abstractly represents the collection of those terms $t$ such that $\phi(t)$ does not hold.  Of course in classical logic both the notions of comprehension and co-comprehension are derivable from the other, but they are independent if we work in an intuitionistic framework.\
\
We formulate the axiom of choice (AC) in a doctrine $({\mathcal{C}},P)$ by requiring that every existentially quantified formulas of $P$ has a chosen witness (as in Hilbert’s epsilon calculus).\
\
We prove that if a cartesian category ${\mathcal{C}}$ is the base of a doctrine ${({\mathcal{C}},P)}$ expressing the fragment $$\text{AC}, \{\}^o, \mathbb{P}, \wedge,\bot, =$$ (where we denote by $\{\}^o$ the property of having co-comprehension) then ${\mathcal{C}}$ is also the base of a tripos $({\mathcal{C}},P')$. In other words ${\mathcal{C}}$ already has the sufficient structure to freely build a topos.  The way in which $P'$ is built is instrumental to prove our second result, i.e. that any doctrine expressing the fragment $$\text{AC}, \{\}^o, \mathbb{P}, {\rightarrow}, =$$ is already a tripos.\
\
The paper is organized as follows.  In section \[sec1\] we recall definitions and known facts concerning doctrines and triposes.  We recall also the notion of comprehension and full comprehension.  Even if we did not stress the difference between comprehension and full comprehension in the previous part of the introduction, this is very important in the paper (and for the theory of doctrines in general).  The role of fullness of comprehension in relation with the operation of implication is discussed in section \[sec4\], where we prove that every doctrine with full comprehension and right adjoints which satisfy (a form of) Beck-Chevalley condition is implicational.  In the same section we introduce also the notion of co-comprehension and full co-comprehension and we study its link with the operation of negation.  In particular we study the link between fullness of co-comprehension and classical logic.  In section \[sec2\] we give the definition of doctrine validating AC and we develop a piece of theory of these doctrines.  In section \[sec5\] we study those doctrines that have equality predicates, full co-comprehension and which satisfy the axiom of choice.  We prove that if AC well behaves with respect to equality and co-comprehension in a higher order doctrine ${({\mathcal{C}},P)}$, then we can build on ${\mathcal{C}}$ a tripos $({\mathcal{C}},P')$. We prove also that, in the case ${({\mathcal{C}},P)}$ has the operation of implication, is already a tripos. 

Preliminaries on doctrines and triposes {#sec1}
=======================================

In this section we recall several definitions concerning doctrines.  We refer the reader to [@Jacobs; @PittsCL] for a more detailed account. 

Doctrines {#doctrines .unnumbered}
---------

Denote by **Pos** the category of partially ordered sets and monotone functions and by **MSL** the subcategory of **Pos** on meet-semilattices and homomorphisms between them, where a meet-semilattice is a poset with binary meets.\
\
A doctrine is a pair $({\mathcal{C}},P)$ where ${\mathcal{C}}$ is a category with finite products and $P$ is a functor $$P:{\mathcal{C}}^{op}{\longrightarrow}\textbf{Pos}$$ $({\mathcal{C}},P)$ is said **primary** if $P$ factors through **MSL**.\
\
In lattices of the form $P(A)$ we shall denote binary meets by $\wedge$ and the top element, if it exists, by $\top_A$. The category ${\mathcal{C}}$ is called base of the doctrine.  For every arrow $f$ of the base, we shall write $f^*$ instead of $P(f)$.\
\
Suppose ${({\mathcal{C}},P)}$ is a doctrine.  Suppose $u:X{\longrightarrow}A$ is an arrow of the base.  Suppose that there are functors $$\Pi_u,\Sigma_u:{P}(X){\longrightarrow}{P}(A)$$ such that for every $\alpha$ in ${P}(X)$ and every $\beta$ in ${P}(A)$ it is $$\alpha\le u^*\Sigma_u\alpha\ \ \ \ \ \ \text{and}\ \ \ \ \ \ \Sigma_uu^*\beta\le\beta$$ $$u^*\Pi_u\alpha\le\alpha\ \ \ \ \ \ \text{and}\ \ \ \ \ \ \ \beta\le\Pi_uu^*\beta$$ $\Sigma_u$ is said to be left adjoint to $u^*$, while $\Pi_u$ is said to be right adjoint to $u^*$. We denote this by $\Sigma_u\dashv u^*$ and $u^*\dashv\Pi_u$.\
\
A doctrine ${({\mathcal{C}},P)}$ is **elementary** if it is primary and for every $A$ in ${\mathcal{C}}$ there is an element $\delta_A$ in $P(A\times A)$ such that for every arrow $f:A{\longrightarrow}X$ in ${\mathcal{C}}$ and every $\psi$ in $P(X\times A)$ the assignment $$\psi\mapsto <\pi_1,\pi_2>^*\psi\wedge<\pi_2,\pi_3>^*\delta_A$$ gives rise to a functor $$\Sigma_{(id_X\times \Delta_A)}:P(X\times A){\longrightarrow}P(X\times A\times A)$$ which is left adjoint to $(id_X\times \Delta_A)^*$, where $\pi_i$, with $i=1,2,3$, are the projections from $X\times A\times A$ to each of the factors and $\Delta_A = <id_A,id_A>:A{\longrightarrow}A\times A$ is the diagonal arrow of $A$.\
\
The element $\delta_A$ in $P(A\times A)$ is often called **equality predicate** over $A$.  Equality predicates are **substitutive**, i.e for every $A$ in ${\mathcal{C}}$ and every $\psi$ in $P(A)$ $$\pi_1^*\psi\wedge\delta_A = \pi_2^*\psi\wedge\delta_A$$ where $\pi_1$ and $\pi_2$ are the first and second projection from $A\times A$.\
\
Let $\mathcal{A}$ be a class of arrows of ${\mathcal{C}}$ which is stable under pullbacks, i.e. if $f:A{\longrightarrow}B$ is in $\mathcal{A}$ and $p:X{\longrightarrow}B$ is an arrow in ${\mathcal{C}}$, the pullback of $f$ along $p$, if it exists, is in $\mathcal{A}$. Suppose now that for every arrow $f:A{\longrightarrow}B$ in $\mathcal{A}$ the functor $f^*$ has a left adjoint $\Sigma_f$. We say that left adjoints satisfy the **Beck-Chevalley condition** with respect to $\mathcal{A}$ if for every pullback $$\xymatrix{
Y\ar[r]^-{g}\ar[d]_-{k}&X\ar[d]^-{h}\\
A\ar[r]_-{f}&B
}$$ with $f$ (and therefore $g$) in $\mathcal{A}$, it holds that $$h^*\Sigma_f \gamma{\simeq}\Sigma_gk^*\gamma$$for any $\gamma$ in ${P}(A)$. We say that left adjoints verify the **restricted Beck-Chevalley condition** with respect to $\mathcal{A}$ if for any $\xi$ in ${P}(B)$ it holds $$h^*\Sigma_f f^*\xi{\simeq}\Sigma_gk^*f^*\xi$$ Definitions for right adjoints $\Pi$ are analogous.\
\
Suppose $\mathcal{A}$ is a pullback stable class of morphisms of ${\mathcal{C}}$. Let ${({\mathcal{C}},P)}$ be a doctrine.  ${({\mathcal{C}},P)}$ is a **(restricted) $\Sigma(\mathcal{A})$-doctrine** if for every arrows $f$ in $\mathcal{A}$ the functor $f^*$ has a left adjoint $\Sigma_{f}$ satisfying the (restricted) Beck-Chevalley condition with respect to $\mathcal{A}$.\
\
Recall that in every category with finite products the class $Prj$ of product projections, i.e. the class of arrows of the form $\pi_A:X{\longrightarrow}A$ where $A$ appears as a factor in $X$, is stable under pullbacks.  We shall write $\Sigma$-doctrine instead of $\Sigma(Prj)$-doctrine.\
\
$\Pi(\mathcal{A})$-doctrines, restricted $\Pi(\mathcal{A})$-doctrines and $\Pi$-doctrines are defined analogously.\
\
A primary $\Sigma(\mathcal{A})$-doctrine in which for every $f:X{\longrightarrow}A$ in $\mathcal{A}$, for every $\alpha$ in $P(X)$ and every $\beta$ in $P(A)$ it is $$\Sigma_{f}(\alpha\wedge f^*\beta) = \beta\wedge\Sigma_{f}\alpha$$ is said to satisfy **Frobenius Reciprocity**.  $\Sigma$-doctrines which satisfy Frobenius Reciprocity are called **existential**.\
\
Every existential elementary doctrine $({\mathcal{C}},P)$ has the property that for every arrow $f:A{\longrightarrow}B$ in ${\mathcal{C}}$ the functor $f^*$ has a left adjoint which is computed by the following assignment $$\Sigma_f\alpha=\Sigma_{\pi_B}[(f\times id_B)^*\delta_B\wedge\pi_A^*\alpha]$$ where $\pi_B$ and $\pi_A$ are projections from $A\times B$ to each of the factors [@Jacobs; @tripinret]. 

Comprehension {#comprehension .unnumbered}
-------------

A doctrine $({\mathcal{C}},P)$ is said to have **comprehension** if for every $A$ in ${\mathcal{C}}$ the poset $P(A)$ has a top element $\top_A$ and for every $\alpha$ in $P(A)$ there is a morphism $$\lfloor\alpha\rfloor:\{\alpha\}{\longrightarrow}A$$ with $\lfloor\alpha\rfloor^*\alpha=\top_{\{\alpha\}}$ such that for every arrow $f:Y{\longrightarrow}A$ with $f^*\alpha=\top_Y$ there is a unique arrow $k:Y{\longrightarrow}\{\alpha\}$ with $\lfloor\alpha\rfloor k= f$.\
\
It is an easy check to verify that arrows of the form $\lfloor\alpha\rfloor$ are monic.  For every $A$ in ${\mathcal{C}}$ we denote by $\textbf{sub}_{\mathcal{C}}(A)$ the poset of subobjects of $A$.  The assignment $\alpha\mapsto \lfloor\alpha \rfloor$ is a faithful functor from the poset ${P}(A)$ to the poset $\textbf{sub}_{\mathcal{C}}(A)$[^2].  If it is also full we say that the doctrine $({\mathcal{C}},P)$ has **full comprehension**.\
\
A useful property of full comprehension is that for every $\alpha,\beta$ in $P(A)$ it holds that $\alpha\le\beta$ if and only if $\top_{\{\alpha\}}=\lfloor\alpha\rfloor^*\beta$.\
\
Suppose ${({\mathcal{C}},P)}$ has comprehension.  Denote by ${\mathcal{C}}_P$ the class of arrows of ${\mathcal{C}}$ of the form $\lfloor\alpha\rfloor$. Then ${\mathcal{C}}_P$ is stable under pullbacks, in fact for every $A$ in ${\mathcal{C}}$, every $\alpha$ in $P(A)$ and every $f:X{\longrightarrow}A$ the following square $$\xymatrix{
\{f^*\alpha\}\ar[d]_-{\lfloor f^*\alpha\rfloor}\ar[r]^-{q}&\{\alpha\}\ar[d]^-{\lfloor\alpha\rfloor}\\
X\ar[r]_-{f}&A
}$$ where $q$ is the arrow induced by the universal property of $\lfloor\alpha\rfloor$, is a pullback. 

Weak power objects {#weak-power-objects .unnumbered}
------------------

Suppose ${({\mathcal{C}},P)}$ is a doctrine.  We say that ${({\mathcal{C}},P)}$ has **weak power objects** if for every $A$ in ${\mathcal{C}}$ there is an object $\mathbb{P}(A)$ in ${\mathcal{C}}$ and an element $\in_A$ in ${P}(A\times \mathbb{P}(A))$ such that for every $Y$ in ${\mathcal{C}}$ and every $\phi$ in ${P}(A\times Y)$ there is an arrow $$\chi_\phi: Y{\longrightarrow}\mathbb{P}(A)$$ with $(id_A\times \chi_\phi)^*\in_A=\phi$.\
\
The term weak comes from the fact that arrows of the form $\chi_\phi$ need not to be unique.  A doctrine is said **higher order** if it has weak power objects. 

Triposes {#triposes .unnumbered}
--------

Triposes are the appropriate doctrines to express higher order predicates logic [@Jacobs].  The following definition of tripos is deduced from [@tripinret].\
\
Denote by **Hyt** the category of Heyting algebras and homomorphisms between them.  A doctrine ${({\mathcal{C}},P)}$ is said **propositional** if $P$ factors through **Hyt**.\
\
${({\mathcal{C}},P)}$ is a **tripos** if

-   ${({\mathcal{C}},P)}$ is propositional

-   ${({\mathcal{C}},P)}$ is a $\Sigma$-doctrine and a $\Pi$-doctrine

-   for each diagonal $\Delta_X:X{\longrightarrow}X\times X$ there is $\delta_X$ in ${P}(X\times X)$ such that for every $\alpha$ in ${P}(X\times X)$ $$\top_X\le\Delta_X^*\alpha\ \ \ \ \ \ \text{if and only if}\ \ \ \ \ \ \delta_X\le\alpha$$

-   ${({\mathcal{C}},P)}$ is higher order. 

Triposes are elementary doctrines, where the elementary structure is provided by the point $iii$ of the definition.\
\
An important characterization theorem of the theory of triposes is the following. 

\[redundus\] A doctrine ${({\mathcal{C}},P)}$ is a tripos if and only if

-   ${({\mathcal{C}},P)}$ is a $\Pi$-doctrine

-   for every $A$ in ${\mathcal{C}}$ there is an operation ${\rightarrow}:P(A)\times P(A){\longrightarrow}P(A)$ such that for every $f:X{\longrightarrow}A$ and every $\alpha,\beta$ in $P(A)$ it is $f^*(\alpha{\rightarrow}\beta)=f^*\alpha{\rightarrow}f^*\beta$

-   for every projection $\pi_A:X\times A{\longrightarrow}A$ in ${\mathcal{C}}$ it is $$\Pi_{\pi_A}(\pi_A^*\alpha{\rightarrow}\beta) = \alpha{\rightarrow}\Pi_{\pi_A} \beta$$ for any $\alpha$ in $P(A)$ and $\beta$ in $P(X\times A)$

-   for every $\gamma,\phi$ and $\psi$ in $P(A)$ it holds

    -   $\phi\le\psi{\rightarrow}\phi$

    -   $\gamma{\rightarrow}(\phi{\rightarrow}\psi)\le(\gamma{\rightarrow}\phi){\rightarrow}(\gamma{\rightarrow}\psi)$

    -   if $\gamma\le\phi{\rightarrow}\psi$ and $\gamma\le\phi$, then $\gamma\le\psi$

    -   if $\phi\le\psi$, then $\gamma\le\phi{\rightarrow}\psi$

-   ${({\mathcal{C}},P)}$ is higher order. 

This is theorem 1.4 of [@tripos], whose proof basically relies on the second order encoding à la Prawitz [@Pra].  A similar proof is also in [@Jacobs].\
\
A doctrine which satisfies point ii), iii) and iv) of the previous definition is said **implicational**.\
\
An easy property which a primary implicational doctrine has is that if it is a $\Sigma(\mathcal{A})$-doctrine, for some pullback stable class $\mathcal{A}$ of arrows of its base, then it satisfies Frobenius reciprocity [@Jacobs].  Therefore primary implicational $\Sigma$-doctrines are automatically existential. 

(co-)Comprehension and triposes {#sec4}
===============================

In this section we derive many useful properties that doctrines have under the assumption of having comprehension.  Then we introduce the notion of co-comprehension, the dual notion of comprehension, and we study its connection with the operation of negation that a doctrine may have.  A special focus will be given to triposes.\
\
Recall that in a doctrine ${({\mathcal{C}},P)}$ with comprehension, the collection ${\mathcal{C}}_P$ is the class of arrows of ${\mathcal{C}}$ of the form $\lfloor\alpha\rfloor:\{\alpha\}{\longrightarrow}A$. We already remarked that ${\mathcal{C}}_P$ is closed under pullbacks. 

\[nonloso\] If $({\mathcal{C}},P)$ is a primary doctrine with full comprehension, if for every arrow $\lfloor\alpha\rfloor$ of ${\mathcal{C}}_P$, the functor $\lfloor\alpha\rfloor^*$ has a left adjoint satisfying Frobenius reciprocity, then ${({\mathcal{C}},P)}$ is a restricted $\Sigma({\mathcal{C}}_P)$-doctrine. 

Note that for every $A$ in ${\mathcal{C}}$ and every $\alpha$ in ${P}(A)$ it is $$\exists_{\lfloor\alpha\rfloor}\top_{\{\alpha\}} =  \alpha$$ In fact $\lfloor\alpha\rfloor$ trivially factors through $\lfloor\exists_{\lfloor\alpha\rfloor}\top_{\{\alpha\}}\rfloor$ and by fullness of comprehension we get $\alpha \le \exists_{\lfloor\alpha\rfloor}\top_{\{\alpha\}}$. The other inequality is standard.\
\
Given the pullback $$\xymatrix{
\{f^*\alpha\}\ar[d]_-{\lfloor f^*\alpha\rfloor}\ar[r]^-{q}&\{\alpha\}\ar[d]^-{\lfloor\alpha\rfloor}\\
X\ar[r]_-{f}&A
}$$ by Frobenius Reciprocity we have $$\notag
\begin{split}
f^*\Sigma_{\lfloor\alpha\rfloor}\lfloor\alpha\rfloor^*\xi & = f^*(\xi\wedge\Sigma_{\lfloor\alpha\rfloor}\top_{\{\alpha\}} )\\
& = f^*\xi\wedge f^*\alpha\\
& = f^*\xi\wedge \Sigma_{\lfloor f^*\alpha\rfloor}\top_{\{f^*\alpha\}}\\
& = \Sigma_{\lfloor f^*\alpha\rfloor}\lfloor f^*\alpha\rfloor f^*\xi\\
& = \Sigma_{\lfloor f^*\alpha\rfloor}q^*\lfloor \alpha\rfloor^* \xi
\end{split}$$ hence the claim. 

An immediate corollary of the previous proposition is that every tripos ${({\mathcal{C}},P)}$ with full-comprehension is a restricted $\Sigma({\mathcal{C}}_P)$-doctrine.  In fact triposes are implicational existential doctrines, then they left left adjoints satisfy Frobenius reciprocity.\
\
The following lemma relates full comprehension with the implicational structure of a doctrine. 

\[bingo\] Suppose $({\mathcal{C}},P)$ is a $\Pi$-doctrine with full comprehension, if $({\mathcal{C}},P)$ is a restricted $\Pi({\mathcal{C}}_P)$-doctrine then it is implicational. 

For every $A$ in ${\mathcal{C}}$ and every $\phi,\psi$ in $P(A)$ define$$\phi{\rightarrow}\psi = \Pi_{\lfloor\phi\rfloor}\lfloor\phi\rfloor^*\psi$$We need to verify points ii), iii) and iv) of definition \[redundus\].\
\
ii) Suppose that $f:X{\longrightarrow}Y$ is an arrow in ${\mathcal{C}}$. By the restricted Beck-Chevalley condition on the class ${\mathcal{C}}_P$ we have $$f^*\Pi_{\lfloor\phi\rfloor}\lfloor\phi\rfloor^*\psi = \Pi_{\lfloor f^*\phi\rfloor}\lfloor f^*\phi\rfloor^*f^*\psi$$ which proves that $f^*(\alpha{\rightarrow}\beta) = f^*\alpha{\rightarrow}f^*\beta$.\
\
iii) Suppose that $\pi_A:X\times A{\longrightarrow}A$ is a projection in ${\mathcal{C}}$. Suppose $\alpha$ is in $P(A)$ and $\beta$ in $P(X\times A)$. Consider the pullback $$\xymatrix{
\{\pi_A^*\alpha\}\ar[r]^{p_A}\ar[d]_-{\lfloor\pi_A^*\alpha\rfloor}&\{\alpha\}\ar[d]^-{\lfloor\alpha\rfloor}\\
X\times A\ar[r]_-{\pi_A}&A
}$$ Since $({\mathcal{C}},P)$ is a $\Pi$-doctrine the Beck-Chevalley condition holds for $\pi_A$ and $p_A$ (which is a projection, since the square is a pullback).  Then it is $$\notag
\begin{split}
\Pi_{\pi_A}(\pi_A^*\alpha{\rightarrow}\beta) & = \Pi_{\pi_A}\Pi_{\lfloor\pi_A^*\alpha\rfloor}\lfloor\pi_A^*\alpha\rfloor^*\beta\\
& =\Pi_{\lfloor\alpha\rfloor}\Pi_{p_A}\lfloor\pi_A^*\alpha\rfloor^*\beta\\
& =\Pi_{\lfloor\alpha\rfloor}\lfloor\alpha\rfloor^*\Pi_{\pi_A}\beta\\
& =\alpha{\rightarrow}\Pi_{\pi_A}\beta
\end{split}$$ iv) Suppose $\phi, \psi, \gamma$ are in $P(A)$.\
\
iv-a) This is an immediate consequence of the fact that $\Pi_{\lfloor\psi\rfloor}$ is a right adjoint.\
\
iv-b) Note that $$\notag
\begin{split}
(\gamma{\rightarrow}\phi){\rightarrow}(\gamma{\rightarrow}\psi) & = \Pi_{\lfloor\gamma{\rightarrow}\phi\rfloor}\lfloor\gamma{\rightarrow}\phi\rfloor^*(\gamma{\rightarrow}\psi)\\
& = \Pi_{\lfloor\gamma{\rightarrow}\phi\rfloor}(\lfloor\gamma{\rightarrow}\phi\rfloor^*\gamma{\rightarrow}\lfloor\gamma{\rightarrow}\phi\rfloor^*\psi)\\
& = \gamma{\rightarrow}\Pi_{\lfloor\gamma{\rightarrow}\phi\rfloor}\lfloor\gamma{\rightarrow}\phi\rfloor^*\psi\\
& = \gamma{\rightarrow}((\gamma{\rightarrow}\phi){\rightarrow}\psi)
\end{split}$$ The arrow $\lfloor\top_A\rfloor$ is the identity on $A$, hence $\top_A{\rightarrow}\phi = \Pi_{\lfloor\top_A\rfloor}\lfloor\top_A\rfloor^*\phi = \phi$. Recalling that $\lfloor \gamma\rfloor^*\gamma = \top_A$, we get the following associativity law $$\lfloor\gamma\rfloor^*(\gamma{\rightarrow}(\phi{\rightarrow}\psi))=\lfloor \gamma\rfloor^*(\phi{\rightarrow}\psi) = \lfloor\gamma\rfloor^*((\gamma{\rightarrow}\phi){\rightarrow}\psi)$$ whence $$\notag
\begin{split}
\gamma{\rightarrow}(\phi{\rightarrow}\psi)& \le \Pi_{\lfloor\gamma\rfloor}\lfloor\gamma\rfloor^*((\gamma{\rightarrow}\phi){\rightarrow}\psi)\\
&= \gamma{\rightarrow}((\gamma{\rightarrow}\phi){\rightarrow}\psi)
 \end{split}$$ iv-c) Assume $\gamma\le\phi{\rightarrow}\psi$ and $\gamma\le\phi$. Since $\lfloor\gamma\rfloor^*\gamma=\top_A$, we have $\lfloor\gamma\rfloor^*\phi\le\lfloor\gamma\rfloor^*\psi$ and hence $\top_A\le\lfloor\gamma\rfloor^*\psi$. By fullness of comprehension $\gamma\le\psi$.\
\
iv-d) Suppose $\phi\le\psi$. It is $\gamma\le\Pi_{\lfloor\phi\rfloor}\lfloor\phi\rfloor^*\psi$ if and only if $\lfloor\phi\rfloor^*\gamma\le\lfloor\phi\rfloor^*\psi$. Since $\lfloor\phi\rfloor^*\phi = \top_A$, the assumption that $\phi\le\psi$ implies $\lfloor\phi\rfloor^*\psi=\top_A$, from which the claim. 

We did not find any reference for lemma \[bingo\].  Even if the author is aware that similar statements are known in the case in which the doctrine ${({\mathcal{C}},P)}$ is primary.  In this respect the following statement is more general as it does not require a meet operation on posets.  If the doctrine $({\mathcal{C}},P)$ is primary the statement is proved by showing that ${\rightarrow}$ is a Heyting implication, i.e. $\alpha \wedge \phi \le \psi$ if and only if $\alpha\le \phi{\rightarrow}\psi$. This proof can be found in [@RM]. 

Fullness of comprehension might appear to play a little role in the proof, but in a $\Pi$-doctrine with comprehension the assignment $$(\alpha,\beta) \mapsto \Pi_{\lfloor\alpha\rfloor}\lfloor\alpha\rfloor^*\beta$$provides the implicational structure if and only if comprehension is full.  One direction is in the previous theorem.  For the converse we have that $\lfloor\alpha\rfloor^*\alpha\le\lfloor\alpha\rfloor^*\beta$ if and only if $\alpha\le\alpha{\rightarrow}\beta$. Then $\alpha\le\beta$ by iv-c.\
\
Co-comprehension is the dual notion of comprehension.  We say that a doctrine ${({\mathcal{C}},P)}$ has **co-comprehension** if for every $A$ in ${\mathcal{C}}$ the poset $P(A)$ has a bottom element $\bot_A$ and for every $\alpha$ in ${P}(A)$ there is an arrow $$\lceil\alpha\rceil:\{\alpha\}^o{\longrightarrow}A$$ with $\lceil\alpha\rceil^*\alpha {\simeq}\bot_X$ such that for every $f:Y{\longrightarrow}A$ with $f^*\alpha{\simeq}\bot_Y$ there is a unique arrow $k:Y{\longrightarrow}$ with $\lceil\alpha\rceil k = f$.\
\
Arrows of the form $\lceil\alpha\rceil$ are monic.  Thus if ${({\mathcal{C}},P)}$ has co-comprehension, there is a faithful contravariant functor from ${P}(A)$ to $\textbf{sub}_{\mathcal{C}}(A)$ which is given by the assignment $\alpha\mapsto\lceil\alpha\rceil$. We say that ${({\mathcal{C}},P)}$ has full co-comprehension if the previous assignment is also full.  If this is the case, it is not hard to prove that $\alpha\le\beta$ if and only if $\lceil\beta\rceil^*\alpha=\bot_{\{\alpha\}^o}$.\
\
Let ${({\mathcal{C}},P)}$ be a doctrine with co-comprehension.  Suppose $\alpha$ is in ${P}(A)$ and consider any arrow $f:X{\longrightarrow}A$. The following is a pullback $$\xymatrix{
\{f^*\alpha\}^o\ar[r]^-{q}\ar[d]_-{\lceil f^*\alpha\rceil}&\{\alpha\}^o\ar[d]^-{\lceil\alpha\rceil}\\
X\ar[r]_-{f}&A
}$$ where $q$ is the arrow induced by the universal property of $\lceil\alpha\rceil$. Hence the class ${\mathcal{C}}_P^o$ of arrows of ${\mathcal{C}}$ of the form $\lceil\alpha\rceil$ is closed under pullbacks.\
\
The notion of co-comprehension is related to the notion of comprehension in the case in which the doctrine as a operation of negation.\
\
Recall that a primary doctrine **has negation** if for every $A$ in ${\mathcal{C}}$ the poset $P(A)$ has a bottom element and there is an operation $\neg:P(A){\longrightarrow}P(A)$ such that for every $\alpha,\beta$ in $P(A)$, it is $$\alpha\le \neg\beta\ \ \ \ \ \text{if and only if}\ \ \ \ \  \alpha\wedge\beta =\bot_A$$ If it holds also that $\alpha = \neg\neg \alpha$ the doctrine is said **classical**

Suppose ${({\mathcal{C}},P)}$ is a doctrine with comprehension and negation.  The following hold. 

-   ${({\mathcal{C}},P)}$ has co-comprehension. 

-   if ${({\mathcal{C}},P)}$ is a restricted $\Sigma({\mathcal{C}}_P)$-doctrine, it is also a restricted $\Sigma({\mathcal{C}}_P^o)$-doctrine

-   if ${({\mathcal{C}},P)}$ has full comprehension, then ${({\mathcal{C}},P)}$ has full co-comprehension if and only if ${({\mathcal{C}},P)}$ is classical. 

i\) Suppose $\alpha$ is in $P(A)$. Define $$\lceil\alpha\rceil:\{\alpha\}^o{\longrightarrow}A = \lfloor\neg\alpha\rfloor:\{\neg\alpha\}{\longrightarrow}A$$ It is $\top_A= \lfloor\neg\alpha\rfloor^*(\neg\alpha)$ then $\bot_A = \neg \top_A= \neg\lfloor\neg\alpha\rfloor^*(\neg\alpha)=\lfloor\neg\alpha\rfloor^*(\neg\neg\alpha)$. Since $\alpha\le\neg\neg\alpha$ we have $\bot_A= \lfloor\neg\alpha\rfloor^*\alpha$.\
\
If $f:Y{\longrightarrow}A$ is such that $f^*\alpha=\bot_Y$, then $\top_Y=\neg f^*\alpha = f^*(\neg \alpha)$. By the universal property of comprehension, there is a unique $k:Y{\longrightarrow}\{\alpha\}^o$ with $f=\lfloor\neg\alpha\rfloor k = \lceil\alpha\rceil k$.\
\
ii) Since arrows in ${\mathcal{C}}_P^o$ are of the form $\lfloor\neg\alpha\rfloor$, ${\mathcal{C}}_P^o$ constitutes a pullback stable subclass of ${\mathcal{C}}_P$. Then the restricted Beck-Chevally condition with respect to ${\mathcal{C}}_P^o$ is inherited from the restricted Beck-Chevalley condition with respect to ${\mathcal{C}}_P$.\
\
iii) Suppose ${({\mathcal{C}},P)}$ has full comprehension.  If $\lfloor\neg\alpha\rfloor^*\beta\le\lfloor\neg\alpha\rfloor^*\alpha$ it is also $\lfloor\neg\alpha\rfloor^*\neg\alpha\le\lfloor\neg\alpha\rfloor^*\neg\beta$. By fullness of comprehension we have $\neg\alpha\le\neg\beta$. Then $\beta\le\alpha$ if and only if ${({\mathcal{C}},P)}$ is classical. 

We proved that in a doctrine with full-comprehension, a classical negation implies the existence of full co-comprehension.  If we think at co-comprehension as a way to deal with abstract complementation, we may guess that the presence of both full comprehension and full co-comprehension implies the existence of a classical negation.  The answer is negative.  Consider the doctrine $(\textbf{Top}, \textbf{op})$, where $\textbf{Top}$ is the category of topological spaces and continuous functions and **op** is the functor which maps every topological space into the collection of its open sets and every continuous function to the inverse image functor.  For every space $X$ and every open set $U$ of $X$ the inclusions $$U\hookrightarrow X\ \ \ \ \ \text{and}\ \ \ \ \ U^c\hookrightarrow X$$ where $U$ and its complement $U^c$ are endowed with the subspace topology, provide the full comprehension and the full co-comprehension structure for $(\textbf{Top}, \textbf{op})$, which has not the operation of negation [@cofree]. 

The axiom of choice in doctrines {#sec2}
================================

In this section we introduce the axiom choice in the context of doctrines.  The idea is to mimic what happen in the doctrine $(\textbf{Sets}, \mathcal{P})$ where the base is the category of sets and functions and $\mathcal{P}$ is the contravariant powersets functor.  The axiom of choice can be phrased in the following way: for every binary relation $\psi$ in $\mathcal{P}(\Gamma\times A)$, where the set $A$ is not empty, there is function ${\mathcal{\epsilon}}_\psi:\Gamma{\longrightarrow}A$ such that for all element $x$ in $\Gamma$ $$\exists a\in A\ (x,a)\in \phi {\leftrightarrow}(x, {\mathcal{\epsilon}}_\phi(x))\in \phi$$ Clearly the fact that $A$ is not empty is not empty is a necessary condition for the existence of the function ${\mathcal{\epsilon}}_\psi$. Then, to deal with the axiom of choice, in the way we have formulated it, we need a notion of emptiness, at the general level of doctrines.  The generalization of the empty set in the context of a generic doctrine is provided by the notion of stable initial object [@PittsCL], i.e an object $0$ of ${\mathcal{C}}$ which is initial and such that $X\times 0{\simeq}0$ for any $X$.

\[prima\] A doctrine ${({\mathcal{C}},P)}$ satisfies the axiom of choice (AC) if for every object $A$ in ${\mathcal{C}}$ which is not a stable initial object, for every object $\Gamma$ in ${\mathcal{C}}$ the functor $\pi_\Gamma^*$ has a left adjoint $\Sigma_{\pi_\Gamma}$ and for every $\psi$ in ${P}(\Gamma\times A)$ there exists an arrow ${\mathcal{\epsilon}}_\psi:\Gamma{\longrightarrow}A$ such that $$\Sigma_{\pi_\Gamma}\psi = <id_\Gamma,{\mathcal{\epsilon}}_\psi>^*\psi$$

We now prove that, under some mild conditions, every doctrine validating the axiom of choice (AC) is a $\Sigma$-doctrine. 

\[zero\] If a ${({\mathcal{C}},P)}$ validates $AC$, if ${\mathcal{C}}$ has a stable initial object and if posets $P(A)$ are not empty, then all arrows of the form $k:X{\longrightarrow}0$ are isomorphisms. 

If $k$ is not iso, $X$ is not a stable initial object, and since $P(1\times X)$ contains an element $x$, by AC we have an arrow ${\mathcal{\epsilon}}_x:1{\longrightarrow}X$. Then $k{\mathcal{\epsilon}}_x:1{\longrightarrow}0$ makes ${\mathcal{C}}$ degenerate.  A contradiction. 

\[BC\] Suppose ${({\mathcal{C}},P)}$ is a doctrine satisfying AC.  For every projection $\pi_\Gamma:\Gamma\times A{\longrightarrow}\Gamma$ where $A$ is not a stable initial object, for every $\psi\in {P}(\Gamma\times A)$ and every $h:\Gamma{\longrightarrow}A$, it is $$<id_\Gamma, h>^*\psi\le<id_\Gamma,{\mathcal{\epsilon}}_\psi>^*\psi$$

Apply $<id_\Gamma, h>^*$ to both sides of $\psi\le\pi_\Gamma^*\Sigma_{\pi_\Gamma}\psi=\pi_\Gamma^* <id_\Gamma,{\mathcal{\epsilon}}_\psi>^*\psi$.

\[nonne0\] Suppose ${({\mathcal{C}},P)}$ is a doctrine satisfying AC, such that for every $A$ in ${\mathcal{C}}$ the poset $P(A)$ has a bottom element.  Suppose also that if $0$ is a stable initial object, then $P(0)$ is a singleton.  ${({\mathcal{C}},P)}$ is a $\Sigma$-doctrine. 

We need to prove that for every projection $\pi_\Gamma:\Gamma\times A{\longrightarrow}\Gamma$ the left adjoint $\Sigma_{\pi_\Gamma}$ satisfying the Beck-Chevalley condition.\
\
Suppose $A$ is not a stable initial object.  By AC it is $$\Sigma_{\pi_\Gamma}\psi = <id_\Gamma,{\mathcal{\epsilon}}_\psi>^*\psi$$ Consider an arrow $f:\Delta{\longrightarrow}\Gamma$ and the composition ${\mathcal{\epsilon}}_\psi f:\Delta{\longrightarrow}A$. By \[BC\] it is $$<id_\Delta,{\mathcal{\epsilon}}_\psi f>^*(f\times id_A)^*\psi\le <id_\Delta,{\mathcal{\epsilon}}_{P(f\times id_A)(\psi)}>^*(f\times id_A)^*\psi$$ since $$(f\times id_A)<id_\Delta,{\mathcal{\epsilon}}_\psi f>=<f,{\mathcal{\epsilon}}_\psi f>=<id_\Gamma,{\mathcal{\epsilon}}_\psi>f$$ the previous inequality can be rewritten as $$f^*\Sigma_{\pi_\Gamma}\psi\le\Sigma_{\pi_\Delta}(f\times id_A)^*\psi$$ which proves the claim, as the other inequality is standard.\
\
Suppose $A{\simeq}0$ is a stable initial object.  Since $0$ is stable we can confuse the projection $\pi_\Gamma$ with the unique arrow $!_ \Gamma:0{\longrightarrow}\Gamma$. Since $P(0)$ is a singleton, the assignment $\bot_0\mapsto\bot_\Gamma$ provides a left adjoint to $!_ \Gamma^*$.\
\
By \[zero\] every arrow with codomain $0$ is iso.  So the pullback of $f:\Delta{\longrightarrow}\Gamma$ along the projection $0{\longrightarrow}\Gamma$ is necessarily of the form $$\xymatrix{
0\ar[d]_-{id_0}\ar[r]^-{!_\Delta}&\Delta\ar[d]^-{f}\\
0\ar[r]_-{!_\Gamma}&\Gamma
}$$ Hence $f^*\Sigma_{!_\Gamma}\bot_0 = f^*\bot_\Gamma=\bot_\Delta=\Sigma_{!_\Delta}\bot_0= id_0^*\Sigma_{!_\Delta}\bot_0$.

Lemmas \[BC\] and \[nonne0\] have the following corollary. 

\[nonne1\] A primary doctrine which satisfies the hypothesis of proposition \[nonne0\] is existential. 

Suppose ${({\mathcal{C}},P)}$ is such a doctrine.  After \[BC\] and \[nonne0\] it remains to prove that $({\mathcal{C}},P)$ satisfy Frobenius Reciprocity.  Consider a projection $\pi_\Gamma:\Gamma\times A{\longrightarrow}A$\
\
Suppose $A$ is not a stable initial object and for $\phi$ in $P(\Gamma\times A)$ and $\beta$ in $P(A)$ denote by $\xi$ the formula $\phi\wedge\pi_\Gamma^*\beta$. We have $$\Sigma_{\pi_\Gamma}(\phi\wedge\pi_\Gamma^*\beta)= <id_\Gamma,{\mathcal{\epsilon}}_\xi>^*(\phi\wedge\pi_\Gamma^*\beta)$$ Moreover $$<id_\Gamma,{\mathcal{\epsilon}}_\phi>^*\phi\wedge \beta = <id_\Gamma,{\mathcal{\epsilon}}_\phi>^*(\phi\wedge\pi_\Gamma^*\beta)$$ apply lemma \[BC\] to get $$\Sigma_{\pi_\Gamma}\phi\wedge \beta=<id_\Gamma,{\mathcal{\epsilon}}_\phi>^*\phi\wedge \beta \le <id_\Gamma,{\mathcal{\epsilon}}_\xi>^*(\phi\wedge\pi_\Gamma^*\beta)=\Sigma_{\pi_\Gamma}(\phi\wedge\pi_\Gamma^*\beta)$$ from which the claim follows, as the other inequality is standard.\
\
If $A{\simeq}0$ the the claim is trivial since the image of the left adjoints is a bottom element. 

Heacos and triposes {#sec5}
===================

In this section we introduce the notion of Heaco which is an acronym for **H**igher order **E**lementary doctrine validating **A**C and with **CO**-comprehension.  We also require that all these structures well interact together in the sense specified below, in the formal definition of heaco.  Most of the section is devoted to prove that a heaco ${({\mathcal{C}},P)}$ has enough structure to construct a tripos with base ${\mathcal{C}}$.\
\
Suppose $({\mathcal{C}},P)$ is a doctrine.  To every poset $P(A)$, we can associate the poset $P(A)^{op}$ where $\alpha\le \beta$ in $P(A)^{op}$ if and only if $\beta\le\alpha$ in $P(A)$. The functor $$P^o:{\mathcal{C}}^{op}{\longrightarrow}\textbf{Pos}$$ which maps every object $A$ of ${\mathcal{C}}$ in $P^o(A)=P(A)^{op}$ and every arrow $f:A{\longrightarrow}B$ of ${\mathcal{C}}$ in $P^o(f) = P(f)=f^*$ gives rise to a doctrine $({\mathcal{C}},P^o)$.\
\
It is straightforward to verify that the assignment $({\mathcal{C}},P)\mapsto({\mathcal{C}},P^o)$ is nilpotent, i.e. $({\mathcal{C}},(P^o)^o)=({\mathcal{C}},P)$. Moreover $({\mathcal{C}},P)$ has (full) comprehension if and only if $({\mathcal{C}},P^o)$ has (full) co-comprehension. 

\[sinistra\] If $({\mathcal{C}},P)$ is a higher order $\Sigma$-doctrine with full co-comprehension which is also a restricted $\Sigma({\mathcal{C}}_P^o)$-doctrine, then $({\mathcal{C}},P^o)$ is a tripos with full comprehension. 

Since ${({\mathcal{C}},P)}$ is a $\Sigma$-doctrine, $({\mathcal{C}},P^o)$ is clearly a $\Pi$-doctrine.  For the same reason $({\mathcal{C}},P^o)$ is a restricted $\Pi({\mathcal{C}}_P^o)$-doctrine, since ${\mathcal{C}}_P^o$ coincides with ${\mathcal{C}}_{P^o}$, the class of full comprehension of $({\mathcal{C}},P^o)$. The claim follows from \[redundus\] and \[bingo\]. 

Recall that in an elementary doctrine $({\mathcal{C}},P)$ for every arrow $f:X{\longrightarrow}A$ of ${\mathcal{C}}$ the formula $$\mathcal{G}(f)=(f\times id_A)^*\delta_X$$ is called graph of $f$.

An **eaco** is an elementary doctrine ${({\mathcal{C}},P)}$ with full co-comprehension satisfying AC, such that: for every $f:X{\longrightarrow}A$ in ${\mathcal{C}}$ and every $\alpha$ in $P(A)$ it holds that $$f^*<{\mathcal{\epsilon}}_{\mathcal{G}(\lceil\alpha\rceil)}, id_A>^*\mathcal{G}(\lceil\alpha\rceil)=<{\mathcal{\epsilon}}_{\mathcal{G}(\lceil f^*\alpha\rceil)}, id_X>^*\mathcal{G}(\lceil f^*\alpha\rceil)$$ A **heaco** is an eaco which is higher order. 

Suppose $({\mathcal{C}},P)$ is an eaco.  Suppose that ${\mathcal{C}}$ has a stable initial object $0$.

\[checazzo2\] ${P}(0)$ is a singleton. 

Suppose $\xi$ is in ${P}(0)$ and consider its co-comprehension $$\lceil\xi\rceil:\{\xi\}^o{\longrightarrow}0$$ By \[zero\] $\lceil\xi\rceil$ is iso.  By fullness of co-comprehension $\xi= \bot_0$.

Every eaco is a an existential doctrine. 

This is a corollary of \[nonne1\] and \[checazzo2\]. 

Since an eaco $({\mathcal{C}},P)$ is also elementary we have that for every $f:A{\longrightarrow}B$ the functor $f^*$ has a left adjoint $\Sigma_f$. Recall that we denoted by ${\mathcal{C}}^o_P$ the class of arrows of ${\mathcal{C}}$ of the form $\lceil\alpha\rceil$.

\[baggins\] Every eaco $({\mathcal{C}},P)$ is a restricted $\Sigma({\mathcal{C}}_P^o)$-doctrine. 

Suppose $({\mathcal{C}},P)$ is an eaco.  Suppose also that $f:X{\longrightarrow}A$ is an arrow in ${\mathcal{C}}$ and $\alpha$ is in $P(A)$. Consider the diagram $$\xymatrix{
\{f^*\alpha\}^o\ar[r]^-{q}\ar[d]_-{\lceil f^*\alpha\rceil}&\{\alpha\}^o\ar[d]^-{\lceil\alpha\rceil}\\
X\ar[r]_-{f}&A
}$$ Since an eaco is existential and elementary, we have that the functors $\lceil\alpha\rceil^*$ has a left adjoint $\Sigma_{\lceil\alpha\rceil}$. We want to prove the restricted Beck-Chevalley condition$$f^*\Sigma_{\lceil\alpha\rceil}\lceil\alpha\rceil^*\beta = \Sigma_{\lceil f^*\alpha\rceil}q^*\lceil\alpha\rceil^*\beta$$ An eaco validates AC, then it is existential as it validates Frobenius reciprocity.  Moreovoer equality predicates are substitutive.  Then we have that the left hand side of the previous equality is $$\notag
\begin{split}
f^*\Sigma_{\lceil\alpha\rceil}\lceil\alpha\rceil^*\beta & = f^*\Sigma_{\pi_A}(\lceil\alpha\rceil\times id_A)^*\delta_A\wedge \pi_{\{\alpha\}}^*\lceil\alpha\rceil^*\beta\\
& = f^*\Sigma_{\pi_A}(\lceil\alpha\rceil\times id_A)^*\delta_A\wedge \pi_A^*\beta\\
& = f^*\beta\wedge f^*\Sigma_{\pi_A}(\lceil\alpha\rceil\times id_A)^*\delta_A
\end{split}$$ For analogous reasons, the right hand side is $$\notag
\begin{split}
\Sigma_{\lceil f^*\alpha\rceil}q^*\lceil\alpha\rceil^*\beta & = \Sigma_{\lceil f^*\alpha\rceil}\lceil f^*\alpha\rceil^*f^*\beta\\
& = f^*\beta \wedge \Sigma_{\lceil f^*\alpha\rceil}\top_{s}\\
& = f^*\beta\wedge\Sigma_{\pi_X}(\lceil f^*\alpha\rceil\times id_X)^*\delta_X
\end{split}$$ Finally $$\notag
\begin{split}
f^*\Sigma_{\pi_A}(\lceil\alpha\rceil\times id_A)^*\delta_A& = f^*\Sigma_{\pi_A}\mathcal{G}(\lceil\alpha\rceil)\\ 
& = f^*<{\mathcal{\epsilon}}_{\mathcal{G}(\lceil\alpha\rceil)}, id_A>^*\mathcal{G}(\lceil\alpha\rceil)\\ 
& = <{\mathcal{\epsilon}}_{\mathcal{G}(\lceil f^*\alpha\rceil)}, id_X>^*\mathcal{G}(\lceil f^*\alpha\rceil)\\
& = \Sigma_{\pi_X}\mathcal{G}(\lceil f^*\alpha\rceil)\\ 
& = \Sigma_{\pi_X}(\lceil f^*\alpha\rceil\times id_X)^*\delta_X
\end{split}$$ from which the claim. 

The immediate application of \[sinistra\] and \[baggins\] is that every heaco ${({\mathcal{C}},P)}$ gives rise to a tripos $({\mathcal{C}},P^o)$, this allows us to prove the following propositions. 

\[frodo\] Every heaco is a $\Pi$-doctrine. 

Suppose ${({\mathcal{C}},P)}$ is a heaco.  By \[sinistra\] and \[baggins\] $({\mathcal{C}},P^o)$ is a tripos and therefore a $\Sigma$-doctrine.  Then $({\mathcal{C}},(P^o)^o)={({\mathcal{C}},P)}$ is a $\Pi$-doctrine. 

Using the same argument we can infer that in every heaco, posets of the form $P(A)$ have finite joins (since $P(A)^o$ is a Heyting algebra). 

\[caratterino\] Suppose ${({\mathcal{C}},P)}$ is an heaco, the following are equivalent

-   ${({\mathcal{C}},P)}$ is implicational

-   ${({\mathcal{C}},P)}$ is a tripos

ii)$\Rightarrow$i) is immediate.  The converse is also immediate after \[frodo\] and \[redundus\]. 

[1]{}

Jesse Hughes and Bart Jacobs.  Factorization systems and fibrations: Toward a fibred birkhoff variety theorem. ,  69(0):156 – 182, 2003.  CTCS’02, Category Theory and Computer Science. 

J. M. E. Hyland, P. T. Johnstone, and A. M. Pitts.  Tripos theory. ,  88:205–232, 1980. 

B. Jacobs. ,  volume 141 of [*Studies in Logic and the foundations of mathematics*]{}.  North-Holland Publishing Co., 1999. 

Maria Emilia Maietti and Giuseppe Rosolini.  Quotient completion for the foundation of costructive mathematics. ,  7(3):371–402, 2013. 

Fabio Pasquali.  A co-free construction for elementary doctrines. ,  23(1):29–41, 2015. 

Fabio Pasquali.  Remarks on the tripos to topos construction: Comprehension, extensionality, quotients and functional-completeness. ,  pages 1–15, 2015. 

A. M. Pitts.  Tripos theory in retrospect. ,  12:265–279, 2002. 

Andrew M. Pitts.  Categorical logic.  In [*Handbook of logic in computer science, [V]{}ol.  5*]{}, volume 5 of [*Handb.  Log.  Comput.  Sci.*]{},  pages 39–128.  Oxford Univ.  Press, New York, 2000. 

Dag Prawitz. .  Acta Universitatis Stockholmiensis.  Stockholm Studies in Philosophy, No.  3.  Almqvist & Wiksell, Stockholm, 1965. 

[^1]: It is common to refer at equality in triposes as non-extesional.  There are several notions of extensionality in categorical logic.  One of these, which can be phrased using the structure of a tripos, is that for two terms $q$ and $p$ of type $\mathbb{P}(A)$ it is $q=p$ if and only if $\forall x:A\ x\in q {\leftrightarrow}x\in p$. There are triposes for which this property is valid - it is enough to think at the internal logic of any elementary topos - but that property fails to hold for generic triposes.  In particular it fails in important triposes such as the realizability tripos and in some localic triposes [@Jacobs].  In this respect, the equality in triposes is non-extensional. 

[^2]: As customary, we freely confuse a subobject with any of its representative.