What is the total space of a stack after all?

From my general experience I think for myself of what follows as some kind of taboo question for some reason: in my imagination, everybody wants an answer to this but somehow thinks it shall not be asked.

OK among many ways to present a stack, I choose this one: we are given a Grothendieck topos $\mathbf X$ represented by sheaves of sets on a site $(\mathbb C,J)$, and then we have "a large category $\mathscr C$ in the world of $\mathbf X$", that is, a presheaf $\mathbb C^{\mathrm{op}}\to\text{Categories}$ satisfying the (three-step) glueing conditions w. r. t. $J$. In this question, by stacks are meant such $\mathscr C$'s. More precisely, we speak about stacks on $\mathbf X$, or stacks on $(\mathbb C,J)$.

Given that, we may consider the notion of "presheaf of $\mathbf X$-world sets on $\mathscr C$ in the $\mathbf X$-world". Again, there are several ways to define this, for example, as another gadget $\mathscr E$ of the same kind as $\mathscr C$ together with a "functor in the $\mathbf X$-world" $\mathscr E\to\mathscr C$ which is a discrete fibration.

All such discrete fibrations form a category which I will denote by $\operatorname{Sets}(\mathbf X)^{\mathscr C^{\mathrm{op}}}$, since, I believe, it can be appropriately described as the category of contravariant functors, in the $\mathbf X$-world, from $\mathscr C$ to $\operatorname{Sets}(\mathbf X)$, the latter being yet another gadget of the same kind as $\mathscr C$, with the "underlying" $\mathbb C^{\mathrm{op}}\to\text{Categories}$ sending $c\in\mathbb C$ to $\mathbf X/a(h_c)$ (slice over the associated sheaf of $h_c:=\hom_{\mathbb C}(-,c)$).

The question now is simply this: under what conditions does it happen that there is another Grothendieck topos $\mathbf Y$ such that the category $\operatorname{Sets}(\mathbf X)^{\mathscr C^{\mathrm{op}}}$ is equivalent to $\mathbf Y$?

Remarks

I am primarily interested in the case when $\mathscr C$ is the associated stack of an internal category of $\mathbf X$. I believe in this case several things simplify.

Since $\mathscr C$ is in general not small (i. e. not the externalization, in a known way, of an internal category of $\mathbf X$), there is in general no well-defined geometric morphism $\operatorname{Sets}(\mathbf X)^{\mathscr C^{\mathrm{op}}}\to\mathbf X$, but even if there is no such morphism, I believe it is still natural to call $\mathbf Y$, when it exists, the total space of the stack $\mathscr C$.

Whereas if there is such a geometric morphism, it still might be different from the one with inverse image "constant presheaf" and direct image "$\varprojlim_{\mathscr C}$". Or it does coincide but is not bounded. Or further, although not bounded, is $\textit{locally}$ bounded. Hence subquestion: can such things happen?

There is a variation which might be needed to have more natural examples - when $\mathscr C$ comes naturally equipped with its own "$\mathbf X$-world Grothendieck topology" which one cannot ignore, i. e. one has to consider the $\mathbf X$-world $\textit{sheaves}$ rather than $\operatorname{Sets}(\mathbf X)^{\mathscr C^{\mathrm{op}}}$ to obtain something sensible.

Finally, the natural reverse questions are - which geometric morphisms $f:\mathbf Y\to\mathbf X$ are of this form? For those which are - what, if any, additional data on $f$ enable to recover the stack $\mathscr C$?

• Just a remark: if the topology $J$ is subcanonical, every representable is a sheaf, so $a(h_c)$ is the same as $h_c$ in this case. – Qfwfq Jul 30 '17 at 11:07
• @Qfwfq Right. I would be completely happy to have an answer for this case. – მამუკა ჯიბლაძე Jul 30 '17 at 11:32

Suppose $\mathscr{C}$ is the stackification of an internal category $C$ in $\mathbf{X}$. In this case, since $\mathrm{Sets}(\mathbf{X})$ is a stack, morphisms of stacks $\mathscr{C}^{\mathrm{op}} \to \mathrm{Sets}(\mathbf{X})$ are equivalent (by the universal property of stackification) to morphisms $C^{\mathrm{op}} \to \mathrm{Sets}(\mathbf{X})$, which in turn are equivalent to $\mathbf{X}$-internal discrete fibrations over $C$. (Probably I am using here the fact that by the "comparison lemma", stacks over $\mathbb{C}$ are equivalent to stacks over $\mathbf{X}$ with its canonical topology.)
The category of such is the "$\mathbf{X}$-indexed functor category" $[C^{\mathrm{op}},\mathbf{X}]$, which is a Grothendieck topos equipped with a bounded geometric morphism to $\mathbf{X}$; see sections B2.3 and B3.2 of Sketches of an Elephant. Since $[C^{\mathrm{op}},\mathbf{X}]$ is the free cocompletion of $C$ in the $\mathbf{X}$-world, by internalizing the usual arguments it determines $C$ up to "Morita equivalence", i.e. equivalence in the bicategory of $\mathbf{X}$-internal profunctors. This can equivalently be stated as "up to internal weak Cauchy completion" in $\mathbf{X}$, i.e. the equivalence relation generated by internal functors that are "fully faithful" and "surjective up to splitting idempotents" in the internal language of $\mathbf{X}$. Upon passage to associated stacks, internally "fully faithful and essentially surjective" functors get inverted, so this becomes up to "Cauchy completion in the world of stacks", i.e. simultaneously splitting idempotents and stackifying.
If we additionally consider sheaves for an internal Grothendieck topology on $C$, we obtain another Grothendieck topos $\mathrm{Sh}_{\mathbf{X}}(C)$ that also comes with a bounded geometric morphism to $\mathbf{X}$, and the internal version of Giraud's theorem says that every bounded geometric morphism to $\mathbf{X}$ is of this form; see sections B3.3 and C2.4 of Sketches of an Elephant.