I am currently trying to get my head around the proof of the definition of continuity of a function given in my Elementary Analysis textbook. The definition given is: Let $f$ be a real-valued function whose domain is a subset of $\mathbb{R}$.Then $f$ is continuous at $x_0$ in $dom(f)$ if and only if: for each $\epsilon>0$, there exists $\delta>0$ such that $x\in dom(f)$ and $|{x-x_0}|$ imply $|f(x)-f(x_0)|<\epsilon $.
The proof goes as follows:
Assume $f$ is continuous at $x_0$ but the definition fails. Then there exists $\epsilon>0$ so that the implication "$x\in dom(f)$ and $|{x-x_0}|$ imply $|f(x)-f(x_0)|<\epsilon $" fails for each $\delta>0$.
In particular, the implication "$x\in dom(f)$ and $|{x-x_0}|< \frac{1}{n}$ imply $|f(x)-f(x_0)|<\epsilon $" fails for each $n\in\mathbb{N}$.
Could somebody please explain to me why the implication "$x\in dom(f)$ and $|{x-x_0}|< \frac{1}{n}$ imply $|f(x)-f(x_0)|<\epsilon $" would be true when the definition holds, i.e. why has $\frac{1}{n}$ been used rather than $\delta$ as surely it could be the case that $\delta$ is a natural number? Thank you in advance.
In general, when we say that some statement "fails for every $\delta > 0,$" then the statement must "fail" when $\delta = 1,$ because $1 > 0.$ If the statement somehow did not fail when $\delta = 1,$ then $\delta = 1$ would be a counterexample for the claim that the statement "fails for every $\delta > 0,$" and the claim would be false.
Likewise, since $\frac12 > 0,$ the statement also must fail when $\delta = \frac12.$ Similar reasons show it fails also when $\delta = \frac13,$ when $\delta = \frac14,$ when $\delta = \frac15,$ and indeed when $\delta = \frac1n$ where $n$ is any positive integer.
Of course the statement also fails when $\delta = 2,$ when $\delta = 3,$ when $\delta = 17,$ when $\delta = \sqrt2,$ and when $\delta = \pi.$ All of that is true, but it does not negate any of the claims about the statement failing for any of the values $\delta = \frac1n$ for any integer $n.$ All of those claims are true, provided that the statement fails for all $\delta > 0.$
It often happens in mathematics that we take something that is said to be true for a very large number of cases, and focus our attention on only a small subset of those cases, because those cases are enough to show whatever it is we need to show next.
To see whether the proof is correct, we have to look at what is done with the limited set of cases afterwards, that is, what is the rest of the proof. The part you have copied for us is (presumably) barely the beginning.