Necessary and sufficient conditions for the existence of a utility function I was reading Jehle and Reny, Advanced Microeconomic Theory, where they discuss in detail, the choice problem of a consumer. The Consumption Set (or Choice Set) $X$ is a subset of $R_+^n$, is closed and convex and contains $0\in R_+^n$. They define a preference relation $\succeq$ on $X$ that satisfies completeness, transitivity and continuity. Then they argue that these conditions are sufficient for the existence of a continuous real-valued utility function that represents the preference relation $\succeq$.
I wondered if there are more general results about the existence of utility functions (continuous or not) to represent rational preferences. The theorem in Jehle and Reny has nothing to say about cases where the choice set does not satisfy the conditions assumed or when we simply do not care about the continuity of the utility function. For example, if $C= \{a, b, c\}$ is the choice set and the preference ordering is simply $a, b, c$ (the preference relation is accordingly defined), then $u: C\rightarrow R$, $u(a)=10, u(b)=2.5, u(c)=\frac{\pi}{100}$ is a legitimate utility function, but the theorem in Jehle and Reny does not say anything about these cases. Again, the famous lexicographic preferences (that satisfy rationality but violate continuity) have no utility functions, but Jehle and Reny's theorem does not tell us anything about it. I wanted to know the most general necessary and sufficient conditions for the existence of utility functions, that also cover these and other possible cases.
Formally, let $C$ be the set of all conceivable choices (no conditions on it assumed so far), and let $\succeq$ be a binary relation on $C$ that satisfies completeness and transitivity.
What are the necessary and sufficient conditions that $C$ and $\succeq$ must satisfy, so that a utility function from $C$ to $R$ that represents $\succeq$ exists?
I would appreciate both proofs and/ or reference materials for this, or even partial solutions.
The following is essentialy due to Debreu. The result is formulated in terms of linear orders, but each complete and transitive relation induces a linear order on the indifference classes:
Theorem: Let $S$ be a set and $\preceq$ be a linear order on $S$. Then $\preceq$ has a utility representation if and only if there exists a countable set $C\subseteq S$ such that whenever $x\prec y$, then there is some $c\in C$ such that $x\preceq c\preceq y$.
Proof: To see that the condition is necessary for the existence of a utility representation, let $u$ be a utility representation of $\preceq$. Call $(x,y)\in S\times S$ a jump if $x\prec y$ and there is no $z$ such that $x\prec z\prec y$. We show that the set of jumps is countable. Clearly, if $(x,y)$ and $(x',y')$ are both jumps, then $\big(u(x),u(y)\big)$ and $\big(u(x'),u(y')\big)$ are disjoint intervals of real numbers. Each such interval contains a rational number, so there is an injective function from jumps to rational numbers and so the set of jumps is countable. Let $J$ be the set of all elements of $S$ that occur as the first or second coordinate of a jump. Clearly, $J$ is countable too. Let $$Q=\Big\{(q_1,q_2)\in\mathbb{Q}\times\mathbb{Q}:q_1&lt;q_2, u^{-^1}\big((q_1,q_2)\big)\neq\emptyset\Big\}.$$ The set $Q$ is countable. For each $(q_1,q_2)\in Q$, choose some $s\in  u^{-^1}\big((q_1,q_2)\big)$ and let $B$ be the set of such $s$. $B$ is also countable and we can choose $C=B\cup J$.
Now we show that the existence of such a set $C$ is sufficient for the existence of a utility representation. Without loss of generality, we can take $C$ to be nonempty and write $C=\{c_0,c_1,\ldots\}$. Now define $u$ by $$u(x)=\sum_{n:c_n\preceq x}\frac{1}{2^n}-\sum_{n:c_n\succeq x}\frac{1}{2^n}.$$
$\square$
A comprehensive source for all things existence of utility functions is the book Representations of Preferences Orderings by Douglas S. Bridges and Ghanshyam B. Mehta.