I am working on the following problem from Rustan Leino's website (http://leino.science/puzzles/the-exact-batting-average/):
At some point during a baseball season, a player has a batting average of less than 80%. Later during the season, his average exceeds 80%. Prove that at some point, his batting average was exactly 80%.
I have what I think is the beginning of a proof, but I was hoping to get some feedback on whether my solution is on the right track.
First, I want to point out a critical assumption. By a player having a batting average less than 80%, I take the puzzle to mean the player has a batting average less than 80% after having had at least 1 at bat.
Suppose the batting average does not equal .8 at any point. We can show this is a contradiction (I think).
Observe that if the batting average is below .8, eventually exceeds .8, and never equals .8, then there will eventually be some hit such that before the hit the batting average is below .8 and afterwards the batting average is above .8. Prior to this hit we have $a/b<4/5$ where $a$ is the total number of hits and $b$ is the total number of at bats; after this hit, we have $(a+1)/(b+1)>4/5$ where $a$ is an integer $\geq0$ and $b$ is an integer $\geq1$. This implies the following two inequalities:
(1) $5a<4b$,and
(2) $5a+1>4b$.
I think these two inequalities produce a contradiction. If $5a$ is an integer that is less that $4b$, adding $1$ should at most make $5a$ equal to $4b$ since $5a\leq4b-1$.
Am I on the right track here?
Yes, it looks like you're on the right track.
We have $5a<4b$ and $5a+1>4b$, which means
$$5a<4b<5a+1 \implies 0<4b-5a<1$$
We know that $a$ is a non-negative integer and $b$ is a natural number, both by definition. In other words, $a$ and $b$ are both integers.
The integers are closed under multiplication, so $4b$ and $5a$ must both be integers. The integers are also closed under subtraction, so $4b-5a$ is also an integer.
At this point, you would have to prove that no integer exists between $0$ and $1$. From what I've seen in browsing for proofs of this, they mostly involve the well-ordering principle, as shown in this question here. I'm not sure how deep the question wants you to go though: maybe the prior paragraph would be enough to establish a contradiction.