This idea may be generalized to work in any suitable 2-category, although if the 2-category is not strict, then one has to generalize instead the non-strict notion of Street fibration. The generalized definition can be given in any of several equivalent ways, in such a way that
A morphism in is a (non-strict) fibration when the following equivalent conditions hold:
is a Street fibration in for each , and for all in
is a morphism of fibrations.
The canonical map has a right adjoint in .
is an algebra for the 2-monad on given by .
If is a strict 2-category with finite strict 2-limits, then we say that is a strict fibration when the corresponding conditions hold where “Street fibration” is replaced by “Grothendieck fibration”, slice 2-categories are replaced by strict-slice 2-categories, comma objects are replaced by strict comma objects, and 2-pullbacks are replaced by strict 2-pullbacks. In this case the 2-monad is in fact a strict 2-monad, but we do not require to be a strict algebra, only a pseudoalgebra; strict algebras for would instead be split fibrations.
Note also that the first definition makes perfect sense regardless of whether has any limits, although this is not true of the others.
By way of spelling out the first definition, we may define a 2-cell to be -cartesian if is -cartesian for every . Since this definition already incorporates stability under pullback, we can then say that is a fibration in if for every 2-cell there is a cartesian such that and .
We can show that the first and third definitions are equivalent by using the representability of fibrations and adjunctions, plus the following lemma, whose proof can be found at Street fibration.
A functor is a cloven Street fibration if and only if the canonical functor has a right adjoint in .
It follows that a morphism in any 2-category is representably a fibration (i.e. satisfies the first definition) if and only if the adjunction exists in (i.e. it satisfies the third condition).
Now we connect the first three conditions with the fourth. Because is finitely complete, we may form the tricategory of spans in . In particular, is equivalent to the hom-2-category . Now recall that can be expressed as a pullback or span composite
Write . The functor is then given by composition: . To show that is a fibration iff it is an -algebra, it suffices to show
Lemma. is a colax-idempotent monad in with unit .
Proof. Write for the monoidal 2-category whose underlying 1-category is the augmented simplex category (q.v.) . Recall that for each is given by the -fold composite of the cospan with itself, where we take a 0-fold composite to denote the identity . Recall also that the monoidal structure on is generated by composing the cospans (together with the fact that are the initial and terminal objects).
Thus for each , there is a span , which is canonically equivalent to the -fold composite , because cotensor preserves finite limits. For the same reason, almost restricts to a monoidal 2-functor , except that does not yield a span from to . Precomposing with the functor that sends to , while and does yield a monoidal 2-functor , which by the universal property of corresponds to a unique colax-idempotent monad in .
In detail, the monoid object in is sent to the monad in , with structure maps and . Moreover, because of the adjunction in , we have in with identity unit.
It follows that is a monad, and is colax-idempotent because, for a span , we have , , and
with identity unit. It is clear, too, that the morphism as above is given by , where denotes the obvious span . Thus, by the definition of a colax-idempotent monad, a morphism carries the structure of an -algebra if and only if the unit has a right adjoint.
It is easy to show that a composite of fibrations is a fibration. Moreover, if denotes the 2-category of fibrations over , then we have:
A morphism in is a fibration in the 2-category iff its underlying morphism in is a fibration.
This is a standard result, at least in the case , and is apparently due to Benabou. References include:
Therefore, for any fibration in we have , and similarly for opfibrations. This is a fibrational 2-categorical analogue of the standard equivalence for ordinary slice categories.
Mark Weber, Yoneda structure from 2-toposes. Applied Categorical Structures 15:259–323 (2007).