Proving the sup and the inf $A=\{\frac{n}{m}: n,m \in \mathbb{Z}, n^2<5m^2\}$. $A=\{\frac{n}{m}: n,m \in \mathbb{Z}, n^2<5m^2\}$.
My goal is to find and prove the $\inf$ and $\sup$ of $A$. I can't really use anything beyond the definition of inf and sup. I have been trying to find a way to generate integers $n,m$ for all $\epsilon>0$ such that the following is satisficed $\sqrt{5}-\epsilon<\frac{n}{m}<\sqrt{5}$.
How would you go about proving this?
 A: 
Claim: If $q \in \mathbb Q$ then $q \in A$ if and only if $-\sqrt 5 < q < \sqrt 5$.

Proof:
If $q \in A$ then $q = \frac nm$ for some integers $n,m$ with $n^2 < 5m^2$.  That means $q^2 = (\frac nm) = \frac {n^2}{m^2} < 5$ which means $|q| < \sqrt 5$ which means $-\sqrt 5 < q < \sqrt 5$.
If on the other hand if $-\sqrt 5 < q < \sqrt 5$, the if we let $q = \frac nm; n,m\in \mathbb Z$ then $-\sqrt 5 < q < \sqrt 5$ so $q^2 = \frac {n^2}{m^2} < 5$.  So $n^2 < 5m^2$.  So $q \in A$.
.....
Now.... can you use the definitions of $\inf$ and $\sup$ to determine and prove what $\inf A, \sup A$ are?

 If $q \in A$ then $q < \sqrt 5$.  So $\sqrt 5$ is an upper bound of $A$.
 If $w < \sqrt 5$ then by the archimedian principal there exists a rational number $r$ so that $w < r < \sqrt 5$.  So as $r \in A$. ... well, it is if $r > -\sqrt 5$.  .... Let's do this again.

 If $w< \sqrt 5$ then either $w < 2$ or $2 \le w < \sqrt 5$.  If $w < 2$ then $w$ is not an upper bound of $A$ because $2 \in A$ and $w < 2$.  If $2 \le w < \sqrt 5$ then there exists a rational $r$ so that $w < r < \sqrt 5$.  So $-\sqrt 5 < r < \sqrt 5$ so $r \in A$. But $r > w$ so $w$ is not an upper bound of $r$.  So either way... if $w < \sqrt 5$ then $w$ is not an upper bound $r$.

 So we have $\sqrt 5$ is an upper bound of $A$; and if $w < \sqrt 5$ then $w$ is not an upper bound.  And that is the definition that $\sup A = \sqrt 5$.

A: Notice that for $\frac nm\in A$, we have $\frac{n^2}{m^2}<5$, so that $-\sqrt 5<\frac nm<\sqrt 5$. Thus, $-\sqrt 5$ and $\sqrt 5$ are lower and upper bounds of $A$, respectively.
Let's prove that $\sqrt 5$ is the lowest upper bound of $A$. Choose $\epsilon>0$ for which we wish to find $\frac nm\in A$ satisfying $\frac nm>\sqrt 5-\epsilon$. Since $\mathbb Q$ is dense in $\mathbb R$, there is some $\frac n m\in\mathbb Q_{\geq 0}$ for which $\sqrt 5-\epsilon<\frac nm<\sqrt 5$. One easily sees that $\frac nm\in A$. This shows that $\sqrt 5$ is the supremum of $A$.
Can you do the same for the infimum?
A: Note that $A=\{q\in\mathbb{Q}:q^2<5\}$.
For $x>0$, define a function $f:\mathbb{Q}\cap(0,\infty)\to\mathbb{Q}$ by
$$f(x)=2+\frac{1}{2+x}$$
$1\in A$ implies $A$ is non-epmty and also clearly $\sqrt{5}$ is an upper bound of $A$. Therefore $\sup A$ exists.
Here is an idea to construct a monotonically increasing sequence on $A$ that converges to $\sqrt{5}$.
Let $k\in\mathbb{Q}$ such that $0<k<\sqrt{5}$. Then clearly $(f\circ f)(k)\in\mathbb{Q}$ and we have that
$$(f\circ f)(k)-k>0$$
and
$$5-[(f\circ f)(k)]^2>0$$
Hence, $(f\circ f)(k)\in A$ and $k<(f\circ f)(k)\leq \sqrt{5}$.
Using this it is possible to prove that $\sup A=\sqrt{5}$ by constructing a sequence and also $\inf A=-\sup A$ since $x\in A\iff -x\in A$.
Note that $(f\circ f\circ f\circ f\cdots\circ f)(2)$ is the continued fraction of $\sqrt{5}$.
$$\sqrt5=2+\frac1{4+\frac1{4+\frac1{4+\ddots}}}$$
