Existence of a utility on a topological semigroup