**I:**(proved on the board) ∀a:∃b:(a<b)∧P(b), "There is a prime larger than any given natural."- Let a be an arbitrary natural.
- Let z be a! + 1 (where "!" is the factorial function)
**Claim 1:**∀q:(2≤q≤a)→¬D(q,z)- Proof of Claim 1: Let q be arbitrary and assume 2≤q≤a.
- Since q is one of the numbers multiplied to make a!, a! is congruent to 0 (mod q) and thus a!+1 is congruent to 1 (mod q)
- Since q≥2, we know D(q,z) is false.

**Claim 2:**∀y:(y>1)→[∃p:P(p)∧D(p,z)]- We have argued this informally in lecture. Note p=z is possible.

- Specialize Claim 2 to z and let p be the resulting natural. So P(p) and D(p,z) are true. Note z>1 because a!≥1.
- Specialize Claim 1 to p. So (2≤p≤a)→¬D(p,z).
- Since D(p,z) is true, by Modus Tollens, ¬(2≤p≤a).
- Since p<2 is ruled out by p being prime, we have that p>a.
- By Existence, ∃b:(a<b)∧P(b).
- By Generalization, we are done.

**II:**Prove the following: ∀S[∀x:(x∈S)→P(x)]→ [∃y:P(y)∧(y∉S)], or "Given any set of primes, there is a prime not in the set."- Let S be an arbitrary finite set.
- Assume that all elements of S are primes.
- Let d be the product of all the elements of S.
- Note that for every x in S, d ≡ 0 (mod x) because x is one of the numbers multiplied together to get d.
- Let z = d+1.
- By Claim 2 above, let p be a natural such that P(p) and D(p,z).
- For any x in S, z ≡ 1 (mod x).
- Thus p cannot be any of the numbers in S.
- By Existence, ∃y:P(y) ∧ (y∉S).
- By Generalization, ∀S:∃y:P(y) ∧ (y∉S)

**III:**Prove the following: ∀S[∀x:(x∈S)→P_{3}(x)]→ [∃y:P_{3}(y)∧(y∉S)], or "Given any set of 3-mod-4 primes, there is a 3-mod-4 prime not in the set."- Let S be an arbitrary finite set.
- Assume that S consists entirely of P
_{3}primes. - Let d be the product of all the elements of S.
- First assume that there are an even number of elements of S.
- By arithmetic, d ≡ 1 (mod 4).
- Let z be d + 2.
- So z ≡ 3 (mod 4)
- We know (as informally argued in lecture) that z is the product of primes.
- If any of these primes were 2, we could not have z ≡ 3 (mod 4).
- If all the primes dividing z were P
_{1}primes, we would have z ≡ 1 (mod 4). - So there exists a P
_{3}prime dividing z -- call it p. - As above in II, p cannot be an element of S since none of those elements
divide z. (If x is in S, z ≡ 2 (mod x) and since x is a P
_{3}prime, ¬D(x,z).) - So we have ∃y:P
_{3}(y) ∧ (y∉S) in this case.

- Now, for the other case, assume that there are an odd number of elements
in S.
- Now d ≡ 3 (mod 4).
- Let z = d + 4, so z ≡ 3 (mod 4).
- Just as in the other case, we prove that there exists p such that
P
_{3}(p) and (p∉S). (This time, we have z ≡ 4 (mod x) for any x in S.) - So in this case as well we have ∃y:P
_{3}(y) ∧ (y∉S).

- By Generalization, ∀S:∃y:P
_{3}(y) ∧ (y∉S).

Last modified 18 October 2007