Take the 2-minute tour ×
MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

Background: In running algebraic geometry computations using software such as Macaulay2, it is often easier and faster to work over $\mathbb F_p = \mathbb Z / p\mathbb Z$ for a large prime $p$, rather than over $\mathbb Q$. (Note that working directly over $\mathbb C$ is not really possible for exact computations.) Some basic model theory implies (more or less) that if you have a question that is capable of being answered by an algorithm, and the question has the same answer for $k$ as for $\bar{k}$, then its answer over $\mathbb Q$ will be the same as its answer over $\mathbb F_p$ for all but finitely many primes $p$. The accepted wisdom is that with virtually no exceptions, if you want to answer an algebro-geometric question over $\mathbb Q$, you can get a reliable answer by picking a large prime such as $p=32003$ and doing your computations over $\mathbb F_p$.

I think people generally pick a prime near the top of the range their software can handle, which is relatively easy to remember; $32003$ and $31667$, for instance, both fit the bill when using Macaulay2. However, I was wondering whether there are other mathematical characteristics of a prime that can affect how well it approximates characteristic zero. For instance, does some special pathology arise if $p$ is (or is not) a Mersenne prime, or if $(p-1)/2$ is (or is not) prime, or...?

Note that I only am asking about behavior that affects how well characteristic $p$ approximates characteristic $0$. Questions that one would only ever ask in finite characteristic are not relevant. Also irrelevant are questions that cannot be answered by an algorithm; for instance, "is $n\cdot1=0$ for some positive integer $n$" cannot be asked unless you include a bound on $n$.

The Question: Are there valid mathematical reasons for preferring one large prime over another to approximate characteristic $0$, other than the assumption that larger primes are generally better?

share|improve this question
I think this is an interesting question, to which I do not have an answer. I will point out that in some sense no prime is better than any other: for any particular finite set of primes, certainly there are sentences that fail exactly on that set. So your question presupposes something about "interesting" questions that can be answered by an algorithm, or about questions that are "likely" to come up in "research". I doubt that pure model theory and pure number theory can give an absolute answer to things about "interesting" questions and "likely research", but conversely much work does ... –  Theo Johnson-Freyd May 16 '13 at 2:17
... go into developing precisely this type of heuristic. –  Theo Johnson-Freyd May 16 '13 at 2:17
One kind of problem that can arise is that your polynomials of interest may include a univariate polynomial that "accidentally" splits modulo $p$. I'd be surprised if there were a uniform choice of $p$ that minimized such accidents; from a practical point of view, if you're worried about such things, it is probably better to repeat the calculation with a different choice of $p$ than to strain too hard to select the One True Value of $p$. –  Timothy Chow May 16 '13 at 18:46
Timothy: The sort of question for which this technique is applicable should have the same answer for $k$ as for $\bar{k}$. Thus, if the question you are asking has an answer that changes when a univariate polynomial splits, it's probably the wrong sort of question to begin with. –  Charles Staats May 19 '13 at 15:32
Charles - this is an interesting question, really inspiring to think about. I am not in algebraic geometry that deep but interested in wht you wrote; one question is there similarly a way to use prime powers $p^m$ instead of $p$? –  al-Hwarizmi Jun 26 '13 at 20:32
show 2 more comments

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.