Let $(X,\mathfrak{M},\mu)$ be a measure space. Let $X_1\in\mathfrak{M}$ with $\mu(X\setminus X_1)=0$ and $f:X_1\to [0,+\infty]$ be a measurable function. Can I conclude that $$\int\limits_{X} f(x)d\mu=\int\limits_{X_1} f(x)d\mu$$
The integral on the RHS makes sense but on the LHS does not because function $f(x)$ is defined on $X_1\subset X$. Even $\mu(X\setminus X_1)=0$ I don't think that this notation is rigorous.
Would be grateful to read your comments, please!