The standard way to prove the Pigeonhole Principle that, putting $n+1$ pigeons into $n$ pigeonholes necessitates the existence of at least one pigeonhole with at least 2 pigeons is by contradiction. Namely, that if it is false that there is at least one pigeonhole in which there are at least two pigeons, then every pigeonhole has at most one pigeon, so there are at most $n$ pigeons.
Can proof by contradiction be avoided?
Below are two formalized (in Agda) proofs of a version of the pigeonhole principle. The way I've stated the principle is thus:
Suppose you have a list of natural numbers. Then if the sum of the numbers (number of pigeons) is greater than the length of the list (number of holes), the list has an element that is greater than 1 (hole has more than 1 pigeon).
First I have a couple simple proofs common to both:
Here is a proof that first proves the 'negative' version of the theorem:
I tried using an actual classical principle instead of
search, but it actually ended up longer.Here is the direct version (note, there's an omitted case for the empty list in the proof, because the computer can tell that $\mathsf{length}\ l < \mathsf{sum}\ l$ is impossible for the empty list):
As you can see, the proof of the negative statement is structurally almost the same as the direct proof of the positive statement, because they both just do induction on the list. Proving the negative version first just led to extra work deriving the actual desired statement afterwards (which itself is about as long as the direct proof).
In cases like this—decidable propositions about finitely many numbers—procedures like $\mathsf{search}$ allow proof-by-contradiction to be used constructively. You can either look at this as classical logic being justified, or adding no essential power in those cases.
However, it's also not necessarily the case that proof-by-contradiction makes your proofs any easier/shorter. Frequently mathematicians use such proofs out of habit, rather than because they are necessary or (by any measure) beneficial. You could assume that you'd already proved the negative statement, I suppose, but you could just as well have already proved the pigeonhole principle and derive the negative statement from it.
Here is the complete file containing the proofs.
There are versions of the pigeonhole principle where the direct proof is much more difficult than the one here. However, the reason those are difficult has to do with manipulating functions between finite types, which is the analogue of $\mathsf{cancel}$. It's possible the indirect proof could be easier in that case, but the analogues of facts about ordering in it are also going to be more difficult to prove.