  The main focus of this paper is on the problem of relating an ideal $I$ in
the polynomial ring $\mathbb Q[x_1, \dots, x_n]$ to a corresponding ideal in
$\mathbb F_p[x_1,\dots, x_n]$ where $p$ is a prime number; in other words, the
\textit{reduction modulo $p$} of $I$. We first define a new notion of
$\sigma$-good prime for $I$ which does depends on the term ordering $\sigma$,
but not on the given generators of $I$. We relate our notion of $\sigma$-good
primes to some other similar notions already in the literature.
  Then we introduce and describe a new invariant called the universal
denominator which frees our definition of reduction modulo~$p$ from the term
ordering, thus letting us show that all but finitely many primes are good for
$I$.
  One characteristic of our approach is that it enables us to easily detect
some bad primes, a distinct advantage when using modular methods.
