basic constructions:
strong axioms
(0,1)-category theory: logic, order theory
proset, partially ordered set (directed set, total order, linear order)
distributive lattice, completely distributive lattice, canonical extension
natural deduction metalanguage, practical foundations
type theory (dependent, intensional, observational type theory, homotopy type theory)
computational trinitarianism = propositions as types +programs as proofs +relation type theory/category theory
In set theory, the axiom scheme of separation aka specification states that, given any set $X$ and any property $P$ of the elements of $X$, there is a set
consisting precisely of those elements of $X$ for which $P$ holds:
Note that $\{X|P\}$ is a subset of $X$.
It is important to specify what language $P$ can be written in. This connects the axiom to logic and the foundations of mathematics. Arguably, first-order logic developed in order to explain the meaning of Ernst Zermelo's axiom of separation (although Zermelo himself disagreed with the interpretation that this gave). Separation is (usually) given as an axiom scheme because there is one axiom for each way to state a property in the language. (We also allow parameters in $P$.)
From weaker to stronger:
For bounded separation aka restricted separation aka $\Delta_0$-separation, $P$ must be written in the language of first-order set theory and all quantifications must be guarded by a set: of the form $\forall x \in A$ or $\exists x \in A$ for some set $A$.
For limited separation aka $\Delta_0^{\mathcal{P}}$-separation, $P$ must be written in the language of first-order set theory and all quantifications must be guarded by a set or a power class: of the form $\forall x \in A$, $\exists B \subseteq A$, etc. Limited separation trivially implies bounded separation, while bounded separation implies limited separation if power sets exist.
For full separation aka simply separation, $P$ must be written in the language of first-order set theory, but otherwise anything goes; in a class theory?, $P$ must be guarded by a class. Full separation trivially implies limited separation.
For large separation, $P$ must be written in the language of first-order class theory; of course, this only makes sense in a class theory. The difference in strength between the class theories $MK$ and $NBG$ is precisely that the former has large separation but the latter does not.
Separation is sometimes called restricted comprehension; for full comprehension aka simply comprehension, no set $X$ needs to be given ahead of time. Full comprehension was proposed by Gottlob Frege, but leads to Russell's paradox. However, full comprehension can sometimes be allowed if the ambient logic is nonclassical, such as linear logic or paraconsistent logic.
For stratified comprehension, no set $X$ is given, but $P$ is restricted to stratified formulas, in which each variable $x$ can be given a consistent natural number $\sigma(x)$ (its stratification) such that $x \in y$ appears in the formula only if $\sigma(y) = \sigma(x) + 1$. This is used in Van Quine?'s New Foundations?.
Set theory is usually given in material form, with a language based on a global membership relation $\in$, and we have implicitly followed this above. However, separation makes sense also in structural set theory (although full comprehension does not, except in a structural class theory with a class of all sets?, where it again leads to paradox). The conclusion of the axiom is the existence of a set
and an injection $i_P\colon \{X|P\} \to X$ such that
Note that $\{X|P\}$, equipped with $i_P$, is a subset of $X$ in the structural sense.
The structural axioms can of course be stated even in a material set theory, where they are actually weaker than the corresponding material axioms; however, the material axioms follow (as usual) from the structural axioms using restricted replacement, which is quite weak (and also follows from the material form of bounded separation).
If a structural set theory is given by stating axioms for the category of sets, then restricted separation amounts to the property that this category is a Heyting category. If it is an elementary topos, then since it satisfies the power set axiom, this implies limited separation as well. Full separation is somewhat less natural to state category-theoretically, but the combination of full separation with the structural axiom of collection is equivalent to saying that the category of sets is autological?.
Lawvere gives a definition (Lawvere70, p. 12-13) of comprehension in hyperdoctrines.
Let $p \colon E \to B$ be a bifibration over the category $B$, and assume that each fibre $E_X$ of $E$ has a terminal object $T_X$. For any morphism $t \colon Y \to X$ in $B$, define the image $im t$ of $t$ to be the pushforward (dependent sum) $t_! T_Y$. This gives rise to a functor $im \colon B/X \to E_X$ for each $X$. Then $E$ is said to have comprehension, or to satisfy the comprehension schema, if each image functor has a right adjoint $\{-\} \colon E_X \to B/X$.
This means that for each $P \in E_X$ there is a morphism $i_P \colon \{ P \} \to X$ in $B$ such that there is a bijection between commuting triangles $t = i_P \circ t'$ in $B$ and morphisms $im t \to P$ in $E_X$. Lawvere calls the morphism $\{P\} \to X$ the extension of $P$, so that one could say that $E$ satisfies the comprehension schema if the extensions of all predicates exist.
Notice that, in the above situation, morphisms $\im t \to P$ in $E_X$ are in bijection with morphisms $T_Y \to t^* P$ in $E_Y$, and that these are the same as morphisms $T_Y \to P$ in the total category $E$ that lie over $t$. This leads to an alternative formulation of the definition, given in Jacobs 99. If the fibres $E_X$ have terminal objects, then there is a (fully faithful) functor $B \to E$ that sends $X$ to $T_X$, and this is in fact right adjoint to the projection $E \to B$. Comprehension in the sense above is equivalent to the existence of a further right adjoint to this terminal-object functor (and in fact this version does not require pushforwards in $E$).
The implication from Lawvere’s definition to Jacobs’s is clear. Conversely, if a fibration $p \colon E \to B$ satisfies the Jacobs definition, then there is a bijection between morphisms $T_Y \to P$ in $E$ and morphisms $Y \to \{P\}$ in $B$. One must then show that the composite of this last with the canonical $\{P\} \to X$ (given by $p$ applied to the counit $T_{\{P\}} \to P$) is equal to $p$ applied to the morphism $Y \to \{P\}$, thus giving a morphism in $B/X$ of the right sort. But in fact the morphism $Y \to \{P\}$ is unique with the property that applying the functor $T_{-}$ and composing with the counit gives the morphism $T_Y \to P$, by the counit’s universal property, and applying $p$ to this commuting triangle in $E$ produces the required one in $B$.
The tautological example which is useful to see what the abstract definition by Lawvere axiomatizes is the following.
Let $B =$Set be the category of sets and for $X$ a set let $E_X$ be the poset of subsets of $X$, regarded as the propositions about elements in $X$. Then comprehension exists and is given by sending a subset of $X$ regarded as an object of $E_X$ (hence regarded as a proposition) to the same subset, but now regarded as a monomorphism in Set into $X$.
More generally, the same construction works for the posets of subobjects in any regular category.
There is a functor $Cat_1^{op} \to CAT_1$, from the large 1-category of categories and functors to the ‘very large’ 1-category of large categories and functors, that sends a category $C$ to the category of presheaves $[C^{op}, Set]$ on $C$, and a functor $F \colon C \to D$ to the pullback functor $F^* \colon [D^{op}, Set] \to [C^{op}, Set]$. These pullback functors have left and right adjoints given by Kan extension.
Lawvere 70 shows that this fibration has comprehension, with the extension of a presheaf given by its category of elements together with the canonical projection from this to the base category.
If the hyperdoctrine has linear type theories/symmetric monoidal categories as fibers, then it is more natural to consider in def. 1 not the terminal object in some fiber (if any) but the tensor unit (which of course happens to be the terminal object in the case of cartesian monoidal) fibers.
In this case then the image functor in def. 1 is
If this has a right adjoint $R_X$, hence if we have linear comprehension according to def. 1, then the induced comonad
is (the dependent version of) the canonical categorical interpretation of the !-modality of linear logic. See at dependent linear type theory – The canonical co-modality for more.
If the extension functors $E_X \to B/X$ are fully faithful, then together they make $E$ into a ‘fibrewise reflective’ subfibration of the codomain fibration of $B$, which is a reflective subfibration if the image functors preserve pullbacks. (See stable factorization system.)
Call a morphism of the form $\{P\} \to X$ a subtype inclusion. Every morphism $t \colon Y \to X$ of $B$ factors through one such by means of the unit $\eta_t$ of the adjunction $im \dashv \{-\}$:
This gives rise to an orthogonal factorization system precisely when each $\eta_t$ is orthogonal to all subtype inclusions. It is shown by (Carboni et. al., section 2.12) that this holds if and only if subtype inclusions are closed under composition.
For the subobject fibration of a regular category, this gives the usual (regular epi, mono) factorization system, while for the fibration of presheaves over $Cat$ it gives the factorization of a functor into a final functor followed by a discrete fibration. (See also comprehensive factorization for a description of the latter as a factorization system in a 2-category.)
Although usually presented as an axiom scheme, in many cases, all instances of separation follow from finitely many special cases (which can then be packaged into a single axiom, using conjunction, although this is probably pointless). This is the case, for example, in ETCS (a structural set theory that satisfied bounded separation) and NBG (a material class theory that satisfies full separation). In type-theoretic foundations of mathematics, separation is usually invisible, but again some form (generally only bounded) can again be proved from a few specific axioms or constructions.
Full separation follows from the axiom of replacement and the principle of excluded middle (along with the axiom of the empty set). Therefore, the axiom is often left out entirely of a description of ZFC (the usually accepted foundation of mathematics). In versions of set theory for constructive mathematics, however, we often have replacement but only bounded or limited separation, and in any case separation must be listed explicitly.
(…)
Finn Lawler, section “Tabulation and comprehension” in Fibrations of predicates and bicategories of relations (2014)
Carboni, Janelidze, Kelly, Paré. On localization and stabilization for factorization systems. Applied Categorical Structures, 1997.