Little confusion about Lebesgue's integral notation 
So, I'm having a bit of trouble interpreting the integral of a integrable function over a measurable set. 
Let's say we have a measure space $(X,\,\Sigma,\,\mu)$, $A \in \Sigma$ a measurable set and $f \colon X \longrightarrow [-\,\infty,\,+\,\infty]$ an integrable function. We put
\begin{align}
\int_A f\,\mathrm{d} \mu := \int f\,\boldsymbol{1}_A\,\mathrm{d} \mu, 
\end{align}
in which $\boldsymbol{1}_A$ denotes the indicator function of $A$. Thus,
\begin{align}
\int_A f(x)\,\mathrm{d}\mu(x) = \int f(x)\,\boldsymbol{1}_A(x)\,\mathrm{d}\mu(x).
\end{align}
Since $f(x)\,\boldsymbol{1}_A(x) = f(x)$ if $x \in A$ and $0$ otherwise, can we put
\begin{align}
\int_A f(x) \, \mathrm{d} \mu(x) = \int f_{\vert A} (x) \, \mathrm{d} \mu,
\end{align}
being $f_{\vert A}$ the restriction of $f$ to $A$? I started thinking about this solving the following problem: 
"Consider the measure spaces $(X,\,\Sigma_X,\,\mu)$ and $(Y,\,\Sigma_Y,\,\nu)$, where $X = Y = \mathbb{N}$, $\Sigma_X = \Sigma_Y = \mathcal{P}(\mathbb{N})$ and $\mu = \nu$ is the counting measure, and let $f \colon \mathbb{N} \times \mathbb{N} \longrightarrow \left\{-\,1,\,0,\,1\right\}$ be
\begin{align}
f(m,\,n) = \begin{cases}
1,\,\text{if}\,\,m = n, \\ -\,1,\,\text{if}\,\,m = n + 1, \\ 0,\,\text{otherwise}.
\end{cases}
\end{align}
Prove that the iterated integrals $\iint f \, \mathrm{d} \mu \, \mathrm{d} \nu$ and $\iint f \, \mathrm{d} \nu \, \mathrm{d} \mu$ exist and are unequal." 
So, I know how to solve this, I'm just struggling with the notation. That said, for each $n \in \mathbb{N}$, let $f^n(m) = f(m,\,n)$, for all $m \in \mathbb{N}$, and consider sets $A = \left\{m \in \mathbb{N} \colon m = n\right\}$, $B = \left\{m \in \mathbb{N} \colon m = n + 1\right\}$ and $C = (A \cup B)^c$, such that $\mathbb{N} = A \cup B \cup C$ and
\begin{align}
\int_\mathbb{N} f^n(m) \, \mathrm{d} \mu(m) &= \int_{A\,\cup\,B\,\cup\,C} f^n(m) \, \mathrm{d} \mu(m) \\ &= \int_A f^n(m) \, \mathrm{d} \mu(m) + \int_B f^n(m) \, \mathrm{d} \mu + \int_C f^n(m) \, \mathrm{d} \mu(m) \\ &= \int_\mathbb{N} f^n(m)\,\boldsymbol{1}_A(x)\,\mathrm{d} \mu(m) + \int_\mathbb{N} f^n(m)\,\boldsymbol{1}_B(x)\,\mathrm{d} \mu(m) + \int_\mathbb{N} f^n(m)\,\boldsymbol{1}_C(x)\,\mathrm{d} \mu(m).
\end{align}
If it's true that $f(x)\,\boldsymbol{1}_A(x) = f_{\vert A}(x)$, then the integral above is \begin{align}
\int_A 1\,\mathrm{d} \mu(m) + \int_B (-\,1)\,\mathrm{d} \mu(m) + \int_C 0\,\mathrm{d} \mu(m),
\end{align} so that the integrals reduce to $1 - 1 + 0 = 0$ (because $A = \left\{(n,\,n)\right\}$ and $B = \left\{(n + 1,\,n)\right\}$), which is the answer for the iterated integral $\iint f \, \mathrm{d} \mu \, \mathrm{d} \nu$. 
Is this correct? That is, if the integral of $f$ ver a measurable set $A$ is the integral of the restriction of $f$ to the set $A$. 
This is bothering me a little. Thanks in advance!
 A: Yes, it is true, and the calculation you did is fine. If you wanted, you can formulate this as follows:
Fix a measure space $(X, \Sigma, \mu)$ and $f: X \to [-\infty, \infty]$, integrable. Then, we may define a new measure $\mu|_A$ on a measurable subset $(A, \Sigma_A, \mu|_A)$ such that $\Sigma_A = \{E \cap A \mid E \in \Sigma\}$, and $\mu|_A$ is just $\mu$ restricted to $\Sigma_A$.
Formally, the integral $\int f|_A d\mu|_A$ now makes sense, since $f|_A$ has domain $A$.
Can you convince yourself that
$$
  \int_A f d\mu = \int f|_A d\mu|_A
$$
is true?
More specifically, let $f$ be nonnegative and consider that the left integral is $$\sup \left\{\int s d\mu \mid s: X \to \mathbb R \text{ is simple}, s \leq f \chi_A\right\}$$ and the right integral is $$\sup \left\{\int s d\mu|_A \mid s: A \to \mathbb R \text{ is simple}, s \leq f|_A\right\}.$$ It's clear that every simple function in the former set is the same as a simple function in the latter, extended by 0, and that their integrals are therefore equal, and so the supremums are the same as well.
EDIT: Sorry, posted before I was done editing, and mentioned something wrong.
