A functor is a discrete fibration if for every object in , and every morphism of the form in there is a unique morphism in such that . For a generalisation, see Grothendieck fibration.
Given a discrete fibration , define a functor as follows:
There is a size issue here, is in fact small? We say that the fibration has small fibres if so; else we must pass to a larger universe when we define Set.
Conversely, give a functor , define a category and a discrete fibration as follows:
Let be the category of elements of the functor ; that is:
The functor from to is the obvious forgetful functor.
If you start from , construct and , and then construct a new , it will be equal to the original . Conversely, if you start with and , construct , and then construct a new and , then there will be an isomorphism of categories between and , relative to which and are equal.
Note that the definition of fibration refers to equality of morphisms without previously assuming that the sources match, while the construction of from refers to equality of objects. This is also why we get equality of functors and isomorphism of categories in the immediately preceding paragraph. So the only non-evil thing on this page is the idea of a functor to Set. That is the fundamental invariant notion; a discrete fibration is just a convenient way of talking about it.