# Characterize the family of Diophantine equations for the “$\pmod p$” method to work.

Let $$f\in\Bbb Z[x_1,...,x_n]$$ be a polynomial with no integer solutions. We call such $$f$$ not solvable $$\pmod p$$ if for some prime number $$p$$ the polynomial $$f$$ does not have a solution $$\pmod p$$. This question seems extremely broad, but I am looking for a explict description for the set of such $$f$$. This property of $$f$$ is a commonly used way to (possibly) deduce a diophantine equation has no solutions. The simplest example is $$3x+3y=2$$, when looking at solutions $$\pmod 3$$.

Another not-so-trivial example is given by $$7x^3+2=y^3$$, by looking at the equation $$\pmod 7$$ one has $$y^3=2\pmod 7$$ but then $$1=y^6=4\pmod 7$$ a contradiction, by Fermat's little theorem, since appearently $$y\neq 0\pmod 7$$. In general there are only finite cases to examine, and often times multiplicative structure of $$\Bbb Z/p\Bbb Z$$ helps us reduce the amount of calculations needed.

Observe that a polynomial $$f$$ not solvable $$\pmod n$$ for some integer $$n>1$$ then by Chinese Reminder Theorem there is a prime power for which $$f$$ is not solvable $$\pmod {p^n}$$ and if Hensel's Lemma applies(that is, $$f'$$ with no repeated roots modulo $$p$$) $$f$$ is not solvable $$\pmod p$$ for some prime $$p$$. So that the definition we made in the first paragraph is almost general enough.

A weaker description/partial result related to this property are also appreciated, since by my guess this should have been extensively studied centries ago. Thank you very much.

• Also in your 3rd paragraph what you state is incorrect, consider $x^2 + 1$ mod $4$ and mod $2$... – Mummy the turkey Oct 6 '20 at 22:21
• @Mummytheturkey Sorry for the handwaving I should have said that $f(x)$ with $f'(x)$ not $0$ modulo $p$. – William Sun Oct 7 '20 at 0:02

For polynomials in one variable this is, as far as I know, a wide open question. If $$f(x) \in \mathbb{Z}[x]$$ has the property that its splitting field is abelian then by the Kronecker-Weber theorem it embeds in some cyclotomic field and the splitting behavior of $$f(x) \bmod p$$ is governed by congruence conditions on $$p$$. In particular if $$f(x) = x^2 - q$$ this question is answered by quadratic reciprocity which more or less completely answers this question if $$f$$ is quadratic. This is a special case of class field theory, which generalizes quadratic reciprocity to Artin reciprocity.

If $$f$$ is cubic, irreducible, and has Galois group $$S_3$$ (the smallest nonabelian group) then the situation is already enormously more complicated. In this case the splitting behavior of $$f(x) \bmod p$$ is described (conjecturally? I don't know what the state of the art is, and we might also need $$f$$ to have a complex root) by the coefficients of a modular form, as described e.g. here. As an explicit example, if $$f(x) = x^3 - x - 1$$ then $$f(x)$$ has a root $$\bmod p$$ if and only if the coefficient $$a_p$$ of $$q^p$$ in the modular form

$$A(q) = q \prod_{n=1}^{\infty} (1 - q^n)(1 - q^{23n})$$

is equal to either $$2$$ or $$0$$.

The question of what happens for more general polynomials is related to the Langlands program / nonabelian class field theory. It's known that by the Chebotarev density theorem the density of primes such that $$f(x) \bmod p$$ has a root ("solvable" is bad terminology here, since it conflicts with "solvable" meaning that the splitting field of $$f(x)$$, or equivalently its Galois group, is solvable) is the density of elements of the Galois group $$G$$ of $$f$$ fixing at least one root, which in particular is at least $$\frac{1}{|G|}$$. (For example, if $$\deg f = n$$ and $$G = S_n$$, which is the generic case, then the density is the density of permutations with at least one fixed point which is asymptotically $$1 - e^{-1}$$.) But as far as I know (which is not that far, I am not a number theorist) a description of exactly which primes these are for a Galois group $$G$$ that doesn't embed into $$GL_2(\mathbb{Z}/\ell)$$ for some prime $$\ell$$ is out of reach. I have no idea what is even conjectured here.

For polynomials in more than one variable things are actually easier: generically we expect a polynomial $$f(x_1, \dots x_n) \in \mathbb{Z}[x_1, \dots x_n]$$ to have a zero $$\bmod p$$ for sufficiently large $$p$$. Heuristically the idea is that the variety $$\{ f = 0 \}$$ has dimension $$n-1$$ so we expect there to be approximately $$p^{n-1}$$ points on it $$\bmod p$$, and this intuition can be made precise using the Lang-Weil bound or (at least in the smooth irreducible case) the Weil conjectures. In the case $$n = 2$$, if the homogenization of $$f$$ defines a smooth projective curve of genus $$g$$ then we have the Hasse-Weil bound (implied by the Weil conjectures for curves) which implies that there are at least

$$p - 2g \sqrt{p} + 1 - \deg f.$$

zeroes of $$f(x) \bmod p$$ (the final term comes from the need to subtract points at infinity), which is positive for $$p$$ sufficiently large.

Your use of Hensel's lemma in the third paragraph is incorrect.

In general this is a fascinating topic but it doesn't have all that much relevance to the question of finding a prime $$p$$ such that you can show a Diophantine equation has no solution $$\bmod p$$, since you only need to find one such prime, not all of them. Mostly you're just going to use the fact that $$x^k$$ takes on $$\frac{p-1}{\gcd(k, p-1)} + 1$$ values $$\bmod p$$.