§ Topological proof of infinitude of primes

We take the topological proof and try to view it from the topology as semidecidability perspective.
  • Choose a basis for the topology as the basic open sets S(a,b)={an+b:nZ}={mathbbZ+b}S(a, b) = \{ a n + b : n \in \mathbb Z \} = \{ mathbb Z + b \}. This set is indeed semi-decidable. Given a number kk, I can check if (kb)(k - b) % a == 0. So this is our basic decidability test.
  • By definition, \emptyset is open, and Z=S(1,0)\mathbb Z = S(1, 0). Thus it is a valid basis for the topology. Generate a topology from this. So we are composing machines that can check in parallel if for some ii, (kb[i])(k - b[i]) % a[i] == 0 for some index.
  • The basis S(a,b)S(a, b) is clopen, hence the theory is decidable.
  • Every number other than the units {+1,1}\{+1, -1\} is a multiple of a prime.
  • Hence, Z{1,+1}=pprimeS(p,0)\mathbb Z \setminus \{ -1, +1 \} = \cup_{p \text{prime}} S(p, 0).
  • Since there a finite number of primes [for contradiction ], the right hand side must be must be closed.
  • The complement of Z{1,+1}\mathbb Z \setminus \{ -1, +1 \} is {1,+1}\{ -1, +1 \}. This set cannot be open, because it cannot be written as the union of sets of the form {an+b}\{ a n + b \}: any such union would have infinitely many elements. Hence, Z{1,+1}\mathbb Z \setminus \{ -1, +1 \} cannot be closed.