(a) Let $f: [0,1]\rightarrow[0,\infty[$ be a mapping such that $\forall\epsilon>0$ the set $A_{\epsilon}=\{x\in[0,1]:f(x)\geq\epsilon\}$ is finite. Show that if $f(\overline{x})=0$, then $f$ is continuous at $\overline{x}$ .
I've been given this exercise explicitly without us being unable to solve it, since the necessary tools for it weren't introduced yet in the lecture (I'm a first year student and we're running out of time so examples and exercises are being offloaded to the practice sessions).
However I would still like to get some understanding on what is being asked here and how a possible solution to the exercise would look like. Would anybody be so kind to point me in the right directions?
In case it is relevant, there is also a second exercise (b) that probably refers back to this one:
(b) Let there be $f:[0,1]\rightarrow[0,\infty[, f(x)=\begin{cases} \frac{1}{q} &,\text{for }x=\frac{p}{q}\in\mathbb{Q} \text{ in simplest form}\\ 0 &,\text{else.} \end{cases}$
Show for $\overline{x}\in[0,1]$ that $f$ is continuous in $\overline{x}$ if and only if $\overline{x}\in[0,1]\setminus\mathbb{Q}$.
In a) you have to show: If $f(\overline{x}) = 0$ then $f$ is continuous in $\overline{x}$.
I'll give you a scetch: To show this use the $\varepsilon$-$\delta$ - definition of continuity and fix $\varepsilon > 0$ then $A_\varepsilon$ is finite hence can be written as $A_\varepsilon = \{x_1,\ldots,x_n\}$, then choose $$\delta < \min_{i \in \{1,\ldots,n\}} \{|\overline{x} - x_i|\}$$ and you are done.
Now prove b) by showing the equivalent statements:
i) $\overline{x}\in[0,1]\setminus\mathbb{Q}$ then $f$ is continuous in $\overline{x}$. Hint: Use a) for this one
ii) $\overline{x}\not\in[0,1]\setminus\mathbb{Q}$ then $f$ is not continous in $\overline{x}$ (pretty simple by observing that in each ball around $\overline{x}$ there are elements of $[0,1]\setminus\mathbb{Q}$).