Show that $f$ is measurable if and only if $f^{-1}([c,\infty))$ is measurable for every $c\in \mathcal{S}$. Let $f:\mathbb{R} \to \mathbb{R}$ be a real valued function and $\mathcal{S}$ a dense subset of $\mathbb{R}$. Show that $f$ is measurable if and only if $$f^{-1}([c,\infty))$$ is measurable for every $c\in \mathcal{S}$.
Proof:
Theorem: A function $:\mathbb{R}\to [-\infty,\infty]$ is measurable if and only if $f^-1(E)\in \mathcal{M}$ for every $E\in\mathcal{B}$.
How would I go with this? I was thinking that we need to show that $[c,\infty)$ is a Borel set. But it seems too familiar to the the proof of the theorem above.
 A: I am also new to Measure Theory,so please check the solution and notify me
The first implication is obvious.
Conversely given that $\{x:f(x)\ge c\}$ is measurable for each $c\in S$.
Now let $c\in \Bbb R$ then as $S$ is dense there exits an increasing  sequence $c_n\to c$ where $c_n\in S$ .
Then $\{x:f(x)\ge c\}=\cup_{n=1}^\infty\{x:f(x)\ge x_n\}$ which is measurable as Measurable sets form a $\sigma$ algebra.
A: The forward direction is automatic, so lets look at the reverse direction.
Let $C = \{ [c,\infty) \mid c \in \mathbb{R} \}$ as is mentioned in the hints, $\sigma(C) = \mathcal{B}$ i.e. the $\sigma$-algebra generated by the sets in the question is the Borel $\sigma$-algebra. We will use this in the proof, so if you haven't covered this, you may need to prove it.
Using this, consider the collection 
$$\mathcal{A} = \{ A \subseteq \mathbb{R} \mid f^{-1}[A] \in \mathcal{M} \}$$
Now, verify that $\mathcal{A}$ is a $\sigma$-algebra.  Using this, we have
$$ C \subseteq \mathcal {A}$$
(by the assumption of the problem) hence,
$$ \mathcal{B} = \sigma(C) \subseteq \sigma(\mathcal{A}) = \mathcal{A}$$
Thus, $\mathcal{B} = \mathcal{A}$, so $f$ is measurable.
To show $\mathcal{A}$ is a $\sigma$-algebra, you need to show 
(i) $\emptyset \in \mathcal{A}$
(ii) $A \in \mathcal{A} \implies A^c \in \mathcal{A}$
(iii) $A_i \in \mathcal{A}$ for $i=1,2,\ldots \implies \bigcup_{i=1}^\infty A_i \in \mathcal{A}$
If you need help showing any of these, I can add to my answer, but they are not hard to show using the properties of inverse image.
Edit: Explanations for (ii) and (iii)
(ii) Suppose $A \in \mathcal {A}$.  This means $f^{-1}[A] \in \mathcal{M}$.  We want to show that $f^{-1}[A^c] \in \mathcal{M}$
Now,
$$f^{-1}[A^c] = \{x \mid f(x) \in A^c \} = \{ x \mid f(x) \notin A \} = \left ( \{x \mid f(x) \in A \} \right)^c = (f^{-1}[A])^c$$
Since $\mathcal{M}$ is a $\sigma$-algebra (it is closed under complements), and $f^{-1}[A] \in \mathcal{M}$, $f^{-1}[A^c] = (f^{-1}[A])^c \in \mathcal{M}$. So $A^c \in \mathcal{A}$.
(iii) Assume $A_i \in \mathcal{A}$ for $i=1,2,\ldots$.  Then,
$$f^{-1}[\bigcup_i^\infty A_i] = \{ x \mid f(x) \in A_i \text{ for some $i$ } \} = \bigcup_{i=1}^\infty \{x \mid f(x) \in A_i\} = \bigcup_{i=1}^\infty f^{-1}[A_i] $$
Since, $\mathcal{M}$ is closed under countable unions, $f^{-1}[\bigcup_i^\infty A_i] = \bigcup_{i=1}^\infty f^{-1}[A_i] \in \mathcal{M}$.  So $\bigcup_{i=1}^\infty A_i \in \mathcal{A}$.
