I'm new to proofs and I'm trying to understand how to approach them. I understand the proof itself, I'm just wondering what would prompt someone to come up with it and how I can build up enough mathematical intuition to do the same.
If $a,b \in \mathbb{R}$ and $a < b$, then $\exists x \in \mathbb{Q}$ s.t. $a < x < b$.
Proof:
Since $\mathbb{Z}$ increases without bound, $\exists n \in \mathbb{Z}$ s.t. $\frac{1}{b-a}<n$. Therefore $\frac{1}{n} < b-a$.
Choose $m \in \mathbb{Z}$ as large as possible satisfying $\frac{m}{n} \leq a$.
Then $a < \frac{m+1}{n}$, and also $\frac{m+1}{n}=\frac{m}{n} + \frac{1}{n} < a + (b-a) = b$
$\therefore$ taking $x=\frac{m+1}{n} \in \mathbb{Q}$ satisfies $a < x < b$. $\square$
I understand this is a direct proof of existence by finding an element in the domain of discourse that satisfies the conditional proposition. These are the proofs I seem to have the most trouble with because they involve a "wildcard."
For instance, I get why we picked $\frac{m}{n} = a$ initially. It makes sense to start at the lower bound of the interval. But why did we, all of a sudden, decide to check $\frac{m+1}{n}$. It's not like that's the "next" rational number (because there's no such thing). The choice to examine $\frac{m+1}{n}$ inspired the choice of $n$ and the whole proof just came together. But how, on earth, did the author cook up $\frac{m+1}{n}$. Is there something that would explain his train of thought other than the fact that he's smarter than me?
How would you approach this proof?