Let $(X,\mathcal{A},\mu)$ be a measure space, $g:X \to \mathbb{R}$ a $\mu$-integrable map and $A=X$\ $g^{-1}(0)$.
How to show that it exists a countable sequence $(A_i)_{i \in \mathbb{N}}$ of $\mathcal{A}$ such that
$A=\bigcup\limits_{i=1}^{\infty} A_{i}$ and $\mu(A_i)<\infty, \ \forall n \in \mathbb{N}$?
I got:
Since $A\in\mathcal{A}\Rightarrow (X$\ $g^{-1}(0))^c \in \mathcal{A}$
So $X=A \dot\cup (X$\ $g^{-1}(0))^c$
By finite additivity of measures: $\mu(X)=\mu(A)+\mu(X$\ $g^{-1}(0))^c$
By non-negativity: $\mu(A)<\infty$
I'm not sure if this works for $A_i$ and how to show that $(A_i)_{i \in \mathbb{N}}$ exists with $A=\bigcup\limits_{i=1}^{\infty} A_{i}$.
You can take $A_i=\{x\in X\mid |g(x)|\geq\frac1i\}$.
Observe that $\mu(A_i)=\int\mathbf1_{A_i}\;d\mu\leq\int i\mathbf|g|\;d\mu\leq i\int\mathbf|g|\;d\mu<\infty$.
Also the $A_i$ are preimages of Borel sets wrt measurable $|g|$ so are elements of $\mathcal A$.
It is evident that $\bigcup_{i=1}^{\infty}A_i=\{x\in X\mid g(x)\neq0\}=X\setminus g^{-1}(\{0\})=A$.