Suppose $a \in \mathbb{Z}$. Does $a = 0$ iff $a \equiv 0 \ (\operatorname{mod} p)$ for every prime $p$?
It's probably a silly question, but I don't know how to go about it. I'm motivated by the common contest math trick of considering a Diophantine equation $\operatorname{mod} p$. By naturality of $\mathrm{eval}_{x}: (-[t]) \to \mathrm{id}_{\mathbf{CRing}}$ the above question is at least as strong as the following:
Is an integer a root of a diophantine equation iff it is a root of the said equation mod every prime number?
It's also cool that this question is equivalent to the following:
Are functions on $\operatorname{Spec} \mathbb{Z}$ completely defined by their values on points of the underlying topological space?
I don't know how to approach this question, but I'd be grateful for an answer or a hint (if it's not much harder than a typical exercise in an abstract algebra textbook).