I like to think that I'm good at these combinatorics-kind of questions, but I can't wrap my head around this one. I can follow the construction of the matrix, but I don't understand how you came up with the formula.
Oh I see. Here's how I got there (still using the terminology / notation of my original post).
Without knowing anything about k except that k-1 < r/m, I counted how many cells are column-bad for this value of k. By the pigeon-hole-principle argument in the post this is at most c(m-1)(k-1) cells. Similarly, and still knowing nothing about k except that k-1 < c/n, I count how many cells are row-bad for this value of k and see that it is at most r(n-1)(k-1). Combining these two I know that as long as we have k-1 < r/m and k-1 < c/n the number of cells that are either column-bad or row-bad (or both) is at most:
* c(m-1)(k-1) + r(n-1)(k-1)
Since I want to be able to conclude that there is a cell that is neither column-bad nor row-bad, and since there are rc cells in total, I then further require that k is such that:
* c(m-1)(k-1) + r(n-1)(k-1) < rc
(The point is that this is a strict inequality and so there must be a cell that is neither column-bad nor row-bad.)
And then solve this to get the formula for k. Of course when expositing it in the post, I _start_ with the formula which perhaps makes things seem mysterious at first, but I thought was efficient.
Reusing the notation of my post, here's how the formula arises.
The argument based on counting cells that are either row/column good/bad requires the following of the parameter k:
These are equivalent to: And so it is sufficient to have: We can then rearrange this to the headline formula by noting: And then simplifying by repeatedly using the fact that for any x, y, z: All this is of course in the Coq code. E.g., the last fact mentioned above is here: https://github.com/ocfnash/imo-coq/blob/f6d2e8337fadf00583fd...