A measure is sigma-finite if, and only if, there exists a integrable function w such that its image is contained in (0,1) I have to prove the following proposition:
Consider a measure space $(S,\Sigma,\mu)$. Prove that $\mu$ is $\sigma$-finite if, and only if, there exists $w\in\mathcal{L}^1(S,\Sigma,\mu)$ such that $0<w(s)<1$ for all $s\in S$.
Below, I write a sketch of my proof. May someone check whether it is correct and, if not, help me with the correct answer? Since I started to learn how to use LaTeX only recently, I might have made some typos and I am sorry for them. (For example, I don't know how to write the symbol for the natural numbers.) 
Proof of sufficiency ($\Rightarrow$): Assume that $\mu$ is $\sigma$-finite, i.e., there exists a sequence $\{S_n\}_n$ in $\Sigma$ such that $\mu(S_n)<\infty$ for each $n$ and $S=\bigcup_n S_n$. Without any loss of generality, we can assume that $\{S_n\}_n$ is a sequence of pairwise disjoint sets. For each n, define $f_n=\frac{1_{S_n}}{2^m\mu(S_n)}$ if $\mu(S_m)\neq0$ or $f_n=\frac{1_{S_n}}{2^m}$ if $\mu(S_m)=0$. Pose $w:=\sum_n f_n$ and observe that $0<w(s)<1$ for all $s\in S$ because $\{S_n\}_n$ is a sequence of disjoint sets such that $S=\bigcup_n S_n$. Note also that $\mu(w)=\mu(\sum_n f_n)\leq\sum_n \frac{1}{2^m}=1$, implying that $w\in\mathcal{L}^1(S,\Sigma,\mu)$.
Proof of necessity ($\Leftarrow$): Fix n arbitrarily. Define $S_n:=\{s \in S: \frac{1}{2^n}\leq w(s) \leq \frac{1}{2^{n-1}}\}=w^{-1}([\frac{1}{2^n},\frac{1}{2^{n-1}}))$ and $f_n:=\frac{1_{S_n}}{2^n}$. Observe that $f_n\leq w$, implying that  $\mu(S_n)\leq \infty$. Now, observe that $(0,1)=\bigcup_n [\frac{1}{2^n},\frac{1}{2^{n-1}})$, implying that $S=w^{-1}((0,1))=w^{-1}(\bigcup_n [\frac{1}{2^n},\frac{1}{2^{n-1}}))=\bigcup_n w^{-1}([\frac{1}{2^n},\frac{1}{2^{n-1}}))=\bigcup_n S_n$. Therefore, $\mu$ is $\sigma$-finite.
Thank you very much for your help!
 A: Proposition: Consider a measure space $(S,\Sigma,\mu)$. Prove that $\mu$ is $\sigma$-finite if, and only if, there exists $w\in\mathcal{L}^1(S,\Sigma,\mu)$ such that $0<w(s)<1$ for all $s\in S$.
Proof of sufficiency ($\Rightarrow$): Assume that $\mu$ is $\sigma$-finite, i.e., there exists a sequence $\{S_n\}_{n \in \mathbb{N}}$ in $\Sigma$ such that $\mu(S_n)<\infty$ for each $n \in \mathbb{N}$ and $S=\bigcup_{n \in \mathbb{B}} S_n$. Without any loss of generality\footnote{We can always take the sequence $\{A_m\}_{m \in \mathbb{N}}$, where $A_m=S_m\cap \left[\bigcup_{n\neq m}S_n\right]^\text{c}$ for each $m \in \mathbb{N}$ instead of $\{S_n\}_{n \in \mathbb{N}}$, because $\{A_m\}_{m \in \mathbb{N}}$ is a sequence of disjoint sets such that $S=\bigcup_{m \in \mathbb{B}} A_m$.} , we can assume that $\{S_n\}_n$ is a sequence of pairwise disjoint sets. For each $n \in \mathbb{N}$, define
\begin{equation*}
f_n=\dfrac{1_{S_n}}{2^n[\mu(S_n)+1]}
\end{equation*}
and note that $f_n \in m\Sigma$ and, for any $s \in S$, $0\leq f_n(s)\leq\frac{1}{2^n}<1$. Pose
\begin{equation*}
w:=\sum_{n \in \mathbb{N}} f_n
\end{equation*}
and observe that $w\in m\Sigma$. We also claim that $0<w(s)<1$ for all $s \in S$. Take any $s \in S$. Since $\{S_n\}_n$ is a sequence of disjoint sets such that $S=\bigcup_n S_n$, there exists a unique $\overline{n}$ such that $s \in S_{\overline{n}}$, implying that
\begin{equation*}
\begin{split}
w(s)& = \sum_{n<\overline{n}}f_n(s)+f_{\overline{n}}(s)+\sum_{n>\overline{n}}f_n(s)\\
& =\sum_{n<\overline{n}}0+\frac{1}{2^n[\mu(S_n)+1]}+\sum_{n>\overline{n}}0\\
&=\frac{1}{2^n[\mu(S_n)+1]}\in (0,1)
\end{split}
\end{equation*}
as claimed.
Note also that
\begin{equation*}
\begin{split}
\mu(|w|)&=\mu(w)\\
&=\mu\left(\sum_{n \in \mathbb{N}} f_n\right)\\
&=\sum_{n \in \mathbb{N}}\mu\left(f_n\right)\\
&=\sum_{n \in \mathbb{N}}\dfrac{\mu(S_n)}{2^n[\mu(S_n)+1]}\\
& \leq \sum_{n\in \mathbb{N}} \frac{1}{2^n}\\
&=1
\end{split}
\end{equation*}
implying that $w\in\mathcal{L}^1(S,\Sigma,\mu)$.
Proof of necessity ($\Leftarrow$): Fix $n \in \mathbb{N}$ arbitrarily. Define
\begin{equation*}
\begin{split}
S_n&:=\left\{s \in S: \dfrac{1}{2^n}\leq w(s) \leq \dfrac{1}{2^{n-1}}\right\}\\
&=w^{-1}\left(\left[\dfrac{1}{2^n},\dfrac{1}{2^{n-1}}\right]\right) \in \Sigma \text{,}
\end{split}
\end{equation*}
because, $w \in m\Sigma$, and
\begin{equation*}
f_n:=\dfrac{1_{S_n}}{2^n}
\end{equation*}
Observe that $f_n\leq w$, implying, by monotonicity of the integral, that
\begin{equation*}
\mu(f_n)=\dfrac{\mu(S_n)}{2^n} \leq \mu(w) < \infty
\end{equation*}
As a consequence, we also have that $\mu(S_n) < \infty$. 
Now, observe that
\begin{equation*}
(0,1)=\bigcup_{n\in \mathbb{N}} \left[\frac{1}{2^n},\dfrac{1}{2^{n-1}}\right)
\end{equation*}
implying that
\begin{equation*}
\begin{split}
S&=w^{-1}((0,1))=w^{-1}\left(\bigcup_{n \in \mathbb{N}} \left[\dfrac{1}{2^n},\dfrac{1}{2^{n-1}}\right)\right)\\
&=\bigcup_{n \in \mathbb{N}} w^{-1}\left(\left[\dfrac{1}{2^n},\dfrac{1}{2^{n-1}}\right)\right)\\
&=\bigcup_{n \in \mathbb{N}} S_n
\end{split}
\end{equation*}
Therefore, $\mu$ is $\sigma$-finite.
A: The idea for the proof that the condition is necessary is good. We actually are looking for a sequence of numbers $(c_m)_{m\geqslant 0}$ such that $0\lt c_m\lt 1$ for each $m$  and $\sum_n c_m\mu(S_m)$ converges. In the body of the question, you define $c_m:=2^{-m}/\mu(S_m)$ but the problem is that $\mu(S_m)$ can be small and $c_m$ is not necessarily smaller than $1$. But we can define 
$$c_m:=\frac 12\frac 1{2^m\mu(S_m)+1},$$
which also  contains the case $\mu(S_m)=0$. 
The second part is good, maybe we have to justify the finiteness of the measure of $S_m$ by the integrability of $w$ (it is not explicitely stated in the attempt). 
