TITLE: Universal property for collection of epimorphisms
QUESTION [8 upvotes]: Question Is there a nice universal property which captures the notion of "collection of all epimorphisms  out of a given object". Of course I will have to consider two epimorphisms $X \rightarrow Y$ the same if they are isomorphic over $X$. The answer to the dual question is yes, at least in a topos: The power object $P(X)=\Omega^X$ , where $\Omega$ is the subobject classifier can be thought of as "the collection of all subobjects of X".  The universal property is just the property for exponentials. 
Background (Not strictly necessary for the question): I have been reading Sheaves in Geometry and Logic by Mac Lane and Moerdijk.  Their definition of an elementary topos is this: A category with pullbacks, a terminal object (i.e. all finite limits), a subobject classifier, and a power object for every object.  They construct all other exponential objects from these axioms.  The construction they use is to basically consider the "collection" of all graphs of morphisms. This is just the standard construction in set theory suped up to toposes.
This construction agrees with the set theoretic convention that a function should be regarded as a set of ordered pairs, i.e. if $f:A \rightarrow B$, then the set theorist will define $f$ as the image of the map $A \rightarrowtail A \times B$ induced by the $1_A$ and $f$ (this may be the most convoluted sentence I have ever written).  Why not define functions dually? There is also a map $A+B \twoheadrightarrow B$ induced by $1_B$ and $f$.  Then we could define $f$ as the partition of $A$ induced by this epimorphism, which seems like a perfectly nice way to define functions.
I was wondering if this construction could be used to construct exponential objects if I was given finite colimits and some kind of epimorphism classifier, or collection of epimorphisms out of a given object. 
Comment if it turns out that there is no really nice answer to this question, do you think that has bearing on the fact that the formula for the number of subsets of a set is easy ($2^{|X|}$) but the formula for the number of partitions of a set is relatively hard (http://en.wikipedia.org/wiki/Partition_of_a_set)?

REPLY [7 votes]: I think the natural meaning of "collection of all epimorphisms out of $X$" or "epimorphism classifier" in a category $\mathbf{S}$ would be: an object $E$, an object $Y\to E$ of $\mathbf{S}/E$, and an epimorphism $p\colon E\times X \twoheadrightarrow Y$ in $\mathbf{S}/E$, such that for any object $U$ and any epimorphism $q\colon U\times X\twoheadrightarrow Z$ in $\mathbf{S}/U$, there exists a unique morphism $f\colon U\to E$ such that $(f\times 1)^*q$ is isomorphic to $p$ under $E\times X$ in $\mathbf{S}/E$.  In other words, a representing object for the presheaf on $\mathbf{S}$ which sends an object $U$ to the set of (isomorphism classes of) epimorphisms out of $U\times X$.
In a topos, such epimorphism classifiers can be constructed from power objects.  Every epimorphism $X\twoheadrightarrow Z$ in a topos is the quotient of its kernel pair, which is an internal equivalence relation on $X$, i.e. a particular element of $P(X\times X)$, and every internal equivalence relation has a quotient.  Therefore, the subobject of $P(X\times X)$ which internally "consists of all equivalence relations" can be shown to be an epimorphism classifier in the above sense.