Given an integer n, we might try to prove the goal
(n^2\equiv 0\mod 4) \lor (n^2\equiv 1\mod 4)
right away. Unfortunately, we just don’t have enough information to proceed! Indeed, if we try to open “door #1” and prove n^2\equiv 0\mod 4, we are definitely going to go wrong because it’s not the case that 1^2 \equiv 0\mod 4. On the other hand, if we try to open “door #2” and prove n^2\equiv 1\mod 4, we are going to go wrong because it is not the case that 0^2 \equiv 1\mod 4.
So we need some additional information before we can make our choice. In the examples we considered, we note that 0 is even and 1 is odd. Could it be that we need to branch on whether n is even or odd?
We know, indeed, that every integer is either even or odd; so we may assume \mathsf {isEven}(n)\lor \mathsf {isOdd}(n) and then we may use this assumption and proceed by cases on whether n is even or odd: then, perhaps, when n is even we should try to show its square is congruent to 0, and when n is odd we should try to show that its square is congruent to 1. Before we try and write out the whole proof, let’s just try these cases and see if they work out.