Is it always possible to "disintegrate" a set to obtain an uniquely definable total ordering? This looks like it should be a simple question, but I can't quite do it.
Let $A$ be a set in ZFC. So it's well-orderable and in particular there exist total ordering. The question is about uniquely definable total ordering (when talking about definable we allow to use this set $A$ as parameter). Now it might be too hard to actually define such a total ordering, so we allow ourselves to "disintegrate" or "unfuzzying" the set first, by making a set $B$ and a surjection $f:B\rightarrow A$, and require that $B,f$ are uniquely definable. Then we could maybe define a total ordering on $B$. The question is: can this always be done, and be done uniformly (with $A$ as parameter)?
If you want a more technical phrasing of the question, it is as follow. The question is whether there exist a ZFC formula $\phi(a,b,h,r)$ with the following property: for any ZFC universe $\mathcal{U}$ and any element $A$ in $\mathcal{U}$, then there exist an unique tuple $B,f,R$ in $\mathcal{U}$ such that $\mathcal{U}\models\phi(A,B,f,R)$, and further more, $f$ is a surjection $B\rightarrow A$ and $R$ is a total ordering on $B$.
So anyone help?
If the question were changed to "well-ordering" then the claim should be false, intuitively. Because a well-ordering on $B$ induce a definable injection $A\rightarrow B$ that is a right inverse to $f$, which in turn induce a definable well-ordering on $A$. And even though I can't prove it, it seems wrong to be able to define a well-ordering on any arbitrary sets, like $\mathbb{R}$.
 A: This is an answer I got from reddit, rephrased in my own words which I think is clearer.
Let $C$ be a set of pair of ordinal, then it uniquely defines a (potentially infinite) directed graph, where the vertices are all the ordinals that appeared in a pair, and the directed edges are these pairs. Let this graph be called $G(C)$.
The $\in$ relation on the transitive closure of $A$ form a well-founded graph $G$. We can write a formula that restrict our attention to consider only those $C$ which defines a graph isomorphic to this $G$. The isomorphism is unique as well, since these are well-founded, call it $g(C):V(G(C))\rightarrow V(G)$.
Hence once we restrict to all $C$ that define a well-founded graph isomorphic to $G$, then we have a definable function that pick out an element of $A$ for each $C$, namely the element correspond (through the unique isomorphism) to the smallest ordinal that is a vertex in the tree. In notation, $f(C)=g(C)(\min\{\alpha\in V(G(C))|g(C)(\alpha)\in A\})$
Consider any arbitrary element $a\in A$. By axiom of choice we can get a bijection $A\rightarrow|TC(A)|$ that send $a$ to $0$. Let $G$ induce a graph through this bijection, we obtain a set $C$. Then $f(C)=a$ because $g(C)(0)=a$ and $0$ is clearly the smallest ordinal.
So define our $B$ to be the set (easily check to be a set) of all $C$ that define a well-founded graph with vertices in $|TC(A)|$ only that is isomorphic to $G$, and $f$ be the $f$ above but restricted to $B$ so that it's a function. By the argument in the previous paragraph, $f$ is surjective.
Now pair of ordinal has a definable well-ordering, by lexicographic ordering. So sets of pair of ordinals has a total ordering, by comparing the minimum elements in each of their differences.
And easily check that the above construction are uniform and work in all ZFC universe.
