The space of preorders on a commutative monoid
For a finitely generated commutative monoid $\Pi$, we present a constructive description of all (total) preorders on $\Pi$ that are compatible with the monoid structure. Equipped with a natural topology, these preorders form an irreducible spectral space, which we show can be covered by a countable union of admissible sets: subsets of $\mathbb{R}^N$ of the form $A \setminus H$ where $A$ is semialgebraic and $H$ is a countable union of hyperplanes, both defined over the rational numbers. As a consequence of this description, we show that the universal theory of commutative monoids with a total order is decidable. Our proofs use a divide-and-conquer technique that requires establishing all of our results in the greater generality of sets on which $\Pi$ acts with finitely many orbits. As a by-product, we find a new description of all monomoial orders on free modules over a polynomial ring.