Bounded surprise exam paradox

A small fun thing I came up with this morning.

The surprise exam paradox goes as follows: “you’ll be given a surprise exam on one of the days next week, and you won’t figure out the date of the exam on the previous day”. Then you figure that the exam can’t be on Sunday as it’s the last day and you’d know it on Saturday, so it can’t be on Saturday and so on, ruling out all days. Then the exam happens on Wednesday and you’re surprised.

The standard solution, which I agree with, is to interpret it as a self-referential sentence S = “there is a natural number X from 1 to 7, such that from knowing any lower bound on X and also knowing S, it’s impossible to prove the value of X”. This isn’t a liar kind of paradox, because the self-reference in S only talks about provability, not truth. So we can take any formal theory that’s strong enough to talk about provability within itself (same conditions as Gödel’s theorems), convert S into a non-self-referential sentence by using the diagonal lemma, and observe that S is false. And from a falsehood anything follows, so for the student’s conclusions are only the student’s problem.

It’s a satisfying solution, but there’s a wrinkle. What if we interpret the teacher’s statement as being not about provability, but as a prediction of the future? Not “there’s no proof”, but “you specifically, as a deterministic algorithm running in finite time, will not find a proof”?

We can encode that by using two self-references instead of one. The student will be a program P, which on the evening of each day will enumerate all proofs in Peano arithmetic up to N symbols long, for some large N. The teacher’s statement S will be: “The program P, quoted here in full, won’t on any day find a proof that {S + knowledge of that day} implies the exam is the next day.” All self- and mutual references can again be resolved by using the diagonal lemma. So P will either find a proof or won’t. Which is it?

Well, if N is large enough, P can prove that the exam can’t happen on the last day, then on the day before and so on, by the same method as in the original paradox. So on the very first day P will prove that S is false, and also that S implies the exam will be on Monday, and S implies the exam will be on Tuesday, all of that at the same time. In other words, even if the student is a bounded deterministic program without logical omniscience, the teacher is still lying. The student will still prove from the teacher’s words that the exam will happen on a specific day, and also on another specific day, and also the moon is made of green cheese.