Let \(g\colon B\to A\) be a map of animae. Given a category \(C(a)\) in context \(a:A\), we would like to regard \(C(g(b))\) as a category in context \(b:B\). The operation that allows us to do this is called substitution. We will show that it corresponds to pulling back total categories along \(g\).
Substitution should leave constant families unchanged and send the variable \(a:A\) to \(g(b)\). The following axiom expresses these requirements.
Axiom K.8 (Substitution). There is a change of theory \(g^*\) from the theory in context \(A\) to the theory in context \(B\), in the sense of Section 5.1.1. For every absolute category \(C\), it is equipped with a specified equivalence \[ g^*W_AC\iso W_BC. \] These equivalences are compatible with absolute functors, operations, and specified coherences: the required identifications are formed after identifying their sources and targets as in Section 5.1.1. After identifying \(g^*1_A\) with \(1_B\) and \(g^*W_AA\) with \(W_BA\), we also require a specified identification \[ g^*a_A=W_Bg\circ a_B \] of functors \(1_B\to W_BA\).
We write \(C(g(b))\) for \(g^*C\), and similarly for functors and identifications. The last identification says that substitution sends the generic point of \(A\) to the point of \(A\) represented by \(g\).
Proposition 5.4.1 (Substitution and pullback). For a category \(C\) in context \(A\), there is a pullback square
This square is natural in functors \(C\to D\) in context \(A\). For an object \(t\) of \(C\) in that context, the section corresponding to \(g^*t\) is the pullback of the section corresponding to \(t\), together with its identification after projection to the base.
Proof
Apply \(g^*\) to the generic-fiber square for \(C\). Since substitution preserves pullbacks and is compatible with weakening and the generic point, this identifies \(g^*C\) with \[ 1_B\times_{W_BA}W_B(\Sigma_AC), \] where the map from \(1_B\) is \(W_Bg\circ a_B\). Taking the generic fiber of \(B\times_A\Sigma_AC\to B\) gives the same pullback: weakening preserves its defining square, and we then take the fiber at \(a_B\). The required equivalence follows by taking total categories and applying Axiom K.7.
For a functor \(u\colon C\to D\) in context \(A\), apply \(g^*\) to the naturality square for \(\eta_C\) and \(\eta_D\), including its identifications over \(W_AA\). We obtain a map between the pullback squares above. It is also the map obtained by taking the generic fiber of \[ B\times_A\Sigma_AC\longrightarrow B\times_A\Sigma_AD. \] Thus Proposition 5.3.4 identifies this functor with \(\Sigma_B(g^*u)\) over \(B\), proving naturality.
For \(t\colon1_A\to C\), the total category of \(g^*1_A\) is equivalent to \(B\) over \(B\). The preceding naturality statement therefore identifies the section associated with \(g^*t\) with the pullback of the section associated with \(t\). Since this is an identification of functors over \(B\), it includes their identifications after projection to \(B\).
For example, consider the fiber \(C_x\) of \(f\colon C\to D\) at an object \(x\colon A\to D\), as in Example 5.3.12. Substituting along \(g\colon B\to A\) gives \(C_{xg}\), since substitution preserves the defining pullback. Its total category is \[ \Sigma_B C_{xg}\simeq B\times_A(A\times_D C)\simeq B\times_D C. \] A terminal object of \(C_x\) gives a terminal object of \(C_{xg}\), and substitution transports the corresponding adjunction in context. Under Proposition 5.3.11, this gives the pullback of the original right adjoint section, including its unit and counit.
Construction 5.4.2 (Successive substitutions). For maps of animae \(D\xrightarrow{h}B\xrightarrow{g}A\) and a category \(C\) in context \(A\), the preceding proposition and the pullback universal property give equivalences \[ \id_A^*C\simeq C, \qquad h^*g^*C\simeq(g\circ h)^*C. \] For the identity map, pulling back the total category leaves it unchanged. For the composite, the equivalence of total categories is \[ D\times_B(B\times_A\Sigma_AC)\simeq D\times_A\Sigma_AC. \] The universal property of pullbacks makes these equivalences natural in functors and identifications in \(C\).
When we apply a construction after successive substitutions, we use the equivalences and identifications for preservation obtained by first applying \(g^*\) and then \(h^*\). Relating these to the specified preservation data for \((gh)^*\) requires further coherence data, as explained in Section 5.1.1.
Construction 5.4.3 (Iterated anima contexts). Let \(\Gamma\) be an anima and let \(A\) be an anima in context \(\Gamma\). We will show that the iterated context \(\Gamma,a:A\) can also be regarded as the single anima context \(\Sigma_\Gamma A\).
For a category \(C\) in context \(\Gamma,a:A\), its dependent sum over \(A\) is a category in context \(\Gamma\), with a projection to \(A\). Taking the total category once more gives an absolute category equipped with a chain \[ \Sigma_\Gamma\Sigma_A C\longrightarrow\Sigma_\Gamma A\longrightarrow\Gamma. \] The middle category is an anima by Lemma 5.3.14. Thus the first projection determines a category in context \(\Sigma_\Gamma A\).
Conversely, start with a category in context \(\Sigma_\Gamma A\) and take its total category over \(\Sigma_\Gamma A\). Composing its projection with the projection to \(\Gamma\) and taking generic fibers gives a category over \(A\) in context \(\Gamma\). Its generic fiber, now taken within that theory, is a category in context \(\Gamma,a:A\). Applying Axiom K.7 and Proposition 5.3.4 at each step shows that these constructions are inverse, including on functors and identifications. We may therefore pass between the iterated context \(\Gamma,a:A\) and the single anima context \(\Sigma_\Gamma A\).
We now explain how changes of context will be left implicit in statements and proofs.
Convention 5.4.4 (Statements in an anima context). Unless a context is specified, all data in a statement belong to a common implicit anima context, and objects are absolute objects in that theory, as in Convention 5.1.2. The phrase “for all objects \(x\in C\)” means that we pass to the context of the universal object \[ C^{\simeq}\longrightarrow C \] and make the assertion there. The same interpretation applies to a construction “for each object \(x\in C\)”. In both cases, we weaken the other data to context \(C^{\simeq}\) and interpret \(x\) as the corresponding absolute object of \(W_{C^{\simeq}}C\).
Note that for any object \(x\colon A\to C\), factoring \(x\) through \(A\to C^{\simeq}\) and applying substitution gives the statement or construction for this particular object in context \(A\). These evaluations are compatible with substitution along maps of animae \(B\to A\), by the equivalences for successive substitutions. This justifies the terminology “for all objects”.
For two independently varying objects \(x,y\in C\), we use the universal pair in context \(C^{\simeq}\times C^{\simeq}\). For a family of categories \(D(x)\) in context \(x:C^{\simeq}\), the phrase “for all \(x\in C\) and \(y\in D(x)\)” is interpreted in the iterated context \(x:C^{\simeq},y:D(x)^{\simeq}\). Similarly, “for every morphism in \(C\)” refers to the universal morphism in context \(\Map([1],C)\). For a fixed category \(I\), “for every diagram \(I\to C\)” refers to the universal diagram in context \(\Map(I,C)\). All these parameter animae are formed in the current ambient theory.
Remark 5.4.5 (Reasoning with objects). By Axiom K.2, the usual axioms are available in these contexts, so we can reason with the universal objects using the usual categorical constructions. An objectwise construction made in this way already respects isomorphisms and their higher identifications. To extend it along noninvertible morphisms of \(C\), we need a functoriality result; this is the subject of the next chapter.