Let $D$ and $E$ be toposes and let $f\_{\ast}\colon D\to E$ be the direct image part of a geometric morphism $(f^{\ast},f\_{\ast})$ between them. Considered as categories, we have (covariant) power-object endofunctors on each:
$$P\_D\colon D\to D \hspace{.5in} P\_E\colon E\to E$$
where, for a morphism $\phi$ in $D$ we have $P\_D(\phi)=\exists\_\phi$, sending a sub-object of the domain to its image under $\phi$.


I'm trying to construct a natural transformation $$A\_f\colon\ f\_{\ast}\circ P\_D\to P\_E\circ f\_{\ast}$$
of functors $D\to E\ $.


**Question:** For what geometric morphisms $(f^\ast,f\_\ast)$ is such a natural transformation $A\_f$ guaranteed to exist?


For example, such a thing exists in the case of change-of-base morphisms between slice toposes of ${\bf Set}$. If $q\colon X\to Y$ is a function, it induces a logical morphism $\Pi\_q\colon {\bf Set}/X\to {\bf Set}/Y$. In this case the natural transformation $$A^~\_{\Pi^~\_q}\colon\Pi\_q\circ P\_{{\bf Set}/X}\to P\_{{\bf Set}/Y}\circ \Pi\_q$$
exists. It acts fiberwise on $Y$; for each $y\in Y$ it sends a $q^{-1}(y)\ $-indexed collection of subsets to their product.


How to construct this map $A\_f$ in general? I wanted to use what would generalize to the morphism $f\_{\ast}f^{\ast}\Omega\_E\to\Omega\_E\ $ induced by the mono-part of the epi-mono factorization for $\Omega\_E\to f\_{\ast}f^{\ast}\Omega\_E$, where $\Omega\_E$ is the subobject classifier in $E$. But while such a map does exist for all geometric morphisms, and can be used to construct the components of my desired $A\_f$, I couldn't see how to prove that the naturality squares for $A\_f$ commute. I showed it in the ${\bf Set}$ case using a basic set-theoretic argument.


So what made it work for slice toposes of ${\bf Set}$? Was it very specific to that case? Was it that these change-of-base functors are logical morphisms, or that they're essential geometric, or does such an $A\_f$ always exist?



When does the direct image functor nicely push past the power/exists functor?
Since every power object is an internal Heyting algebra, and $f\_\*$ preserves the structure of internal Heyting algebras, there are trivial examples of such natural transformations corresponding to the constants $\top$ and $\bot$. Of course, this is uninteresting. 


Let me write $P^{\mathcal{D}}$ and $P^{\mathcal{E}}$ for the respective *contravariant* power object functors. Since $f\_\*$ preserves monomorphisms, there is a canonical comparison morphism $f\_\* \Omega\_{\mathcal{D}} \to \Omega\_{\mathcal{E}}$; since $f\_\*$ preserves products, there is a canonical natural morphism $f\_\* (Y^X) \to (f\_\* Y)^{f\_\* X}$; and so there is a canonical natural morphism $f\_\* P^{\mathcal{D}} X \to (f\_\* \Omega\_{\mathcal{D}})^{f\_\* X} \to P^{\mathcal{E}} f\_\* X$. So there is an *interesting* canonical natural transformation $\theta : f\_\* P^{\mathcal{D}} \Rightarrow P^{\mathcal{E}} f\_\*$. 


Now allow me to argue using generalised elements. Let $T$ be an arbitrary object of $\mathcal{E}$, and let $p : X \to Y$ be a morphism in $\mathcal{D}$. Given a generalised element $t : T \to f\_\* P\_\mathcal{D} X$, what is $\theta\_X \circ t : T \to P\_{\mathcal{E}} f\_{\ast} X$, and what is $f\_\* \exists\_p \circ t : T \to f\_\* P\_{\mathcal{D}} Y$? Let $t' : f^\* T \to P\_\mathcal{D} X$ be the left adjoint transpose of $t$, and let $A' \rightarrowtail X \times f^\* T$ be the subobject classified by $t'$. It is clear that $\theta\_X \circ t$ is just the classifying morphism for the pullback of $f\_\* A' \rightarrowtail f\_\* X \times f\_\* f^\* T$ along $f\_\* X \times T \to f\_\* X \times f\_\* f^\* T$. Also, by naturality, $f\_\* \exists\_p \circ t$ must be the right adjoint transpose of $\exists\_p \circ t' : f^\* T \to P\_\mathcal{D} Y$, which is none other than the classifying morphism for the image of the composite $A' \rightarrowtail X \times f^\* T \to Y \times f^\*T$.


This suggests the crucial criterion is that $f\_\*$ preserve epimorphisms (and hence, epi–mono factorisations) – and this automatic for all base change morphisms for slices over $\textbf{Set}$ because $\textbf{Set}$ and its slices have the axiom of choice. So assume $f\_\*$ preserves epimorphisms. If we write $A \rightarrowtail f\_\* X \times T$ for the subobject classified by $\theta\_X \circ t$, $B' \rightarrowtail Y \times f^\* T$ for the image of $A' \rightarrowtail X \times f^\* T \to Y \times f^\* T$, and $B \rightarrowtail f\_\* Y \times T$ for the subobject classified by $\theta\_Y \circ f\_\* \exists\_p \circ t$, then the preservation of epi–mono factorisations implies that $f\_\* B'$ remains the image of $f\_\* A'$ under $f\_\* X \times f\_\* f^\* T \to f\_\* Y \times f\_\* f^\* T\ $; but epi–mono factorisations are stable under pullback in a topos, hence $B$ is the image of $A$ under $f\_\* X \times T \to f\_\* Y \times T$. Thus, we have
$$\theta\_Y \circ f\_\* \exists\_p \circ t = \exists\_{f\_{\ast} p} \circ \theta\_X \circ t$$
for all generalised elements $t : T \to f\_\* P\_{\mathcal{D}} X$, and thus $\theta$ is *also* a natural transformation $f\_\* P\_{\mathcal{D}} \Rightarrow f\_\* P\_{\mathcal{E}}$.


