Let $P: \mathcal{C}\to\mathcal{S}$ a fibration ($\mathcal{S}$ with finite limits).
In "Sketches of an Elephant I", pag. 272 P. Johnstone define $P$ a locally small if:
given any two objects $X, Y\in \mathcal{C}$ (let $A=P(X),\ B=P(Y)$) there exist a arrow $(a, b): I\to A\times B$ and a morphisms $f: a^\ast X\to b^\ast Y$ in the fibre $\mathcal{C}(I)$ such that given any $(c, d): J\to A\times B$ and any $g: c^\ast X\to d^\ast Y $ in $\mathcal{C}(J)$ there exists a unique $u: J\to I$ such that $a\circ u=c,\ b\circ u=d$ and $u^\ast(f)\ \dot{=}\ g$ (where " $\dot{=}$ " means up to canonical isomorphisms).
In LNM 661 "Indexed Categories and its Applications" p. 40, the authors post the J. Benabou definition: $P$ is a locally small if:
for any $I\in\mathcal{S}$ and every $X, Y\in \mathcal{C}(I)$ there exist a morfisms ${}^Ih_{A, B}: {}^IH_{A, B} \to I$ such that for any $\alpha: J\to I$ there is a bijection between the morphisms:
$\alpha \to {}^Ih_{A, B}$ in $\mathcal{S}\downarrow I$
and the morphisms $\alpha^\ast(X)\to \alpha^\ast(Y)$ in $\mathcal{C}(I)$
I ask: how are related (if they are) these two definitions?
Edit:
Johnston define "locally small" as the (what he define) comprehension scheme for the inclusion $2\to \underline{2}$
($2$ is the discrte category $\{0, 1}$ and $\underline{2}$ is $0\to 1$ plus identities).
THis means that the composition funtor $Rect(\underline{2},\ \mathcal{C} )\to Rect(2,\ \mathcal{C} )$ has a right adjoint, where $Rect(\mathcal{D},\ \mathcal{C} )$ is the category with objects the diagrams $d: \mathcal{D}\to \mathcal{C}$ with vertical edges (i.e. mapped to identities by $P$), and with morphisms the transformations with all components cartesians. (articulating this, get the definition given at the beginning).
THe BEnabou definition is equivalent to the more strict assert:
the composition funtor $Rect_P(\underline{2},\ \mathcal{C} )\to Rect_P(2,\ \mathcal{C} )$ has a right adjoint, where $Rect_P(\mathcal{D},\ \mathcal{C} )\subset Rect(\mathcal{D},\ \mathcal{C} )$ is given by diagram $d: \mathcal{D}\to \mathcal{C}$ with $P\circ d$ constant (i.e. maps all on some object $A$ and its identity $1_A$) and with morphisms the transformations with all components cartesians and mapped by $P$ on the same morphism.
THen the Johnstone definition imply the BEnabou one: by restriction of adjunction, observing that $2$ is just the objects of $\underline{2}$ then the condiction on transformations components is preserved.
From the CHuck answere, the reverse i true too:
LEt $X, Y\in \mathcal{C}$ and let $A=P(X),\ B=P(Y)$, considering $\pi_A: A\times B\to A,\ \pi_B : A\times B\to B$, put $I:=A\times B$ and considering $\pi_A^\ast(X),\ \pi_B^\ast(Y)$ on the $I$-fibre, appling the BEnabou condiction follow the Johnstone one.
Then the initial request has the follow generalization:
given a functor $F: \mathcal{D'}\to \mathcal{D} $
Is true that:
If the natural funtor
$Rect(\mathcal{D},\ \mathcal{C} )\to Rect(\mathcal{D'},\ \mathcal{C} )$ has a right adjoint
then
$Rect_P(\mathcal{D},\ \mathcal{C} )\to Rect_P(\mathcal{D'},\ \mathcal{C} )$ has a right adjoint ?
(from above, I seem the if $F$ is surjective on objets then the proposition is true)
Is true the reverse?, with such conditions on $F$ the reverse can be true?