I understand if $(X, \Sigma, \mu)$ is a measure space, and we have a sequence of measurable functions $f_{n}$ such that $\lim \limits_{n \to \infty} f_{n}$ exists almost everywhere d$\mu$ (a.e. d$\mu$), then it's equal to a measurable function almost everywhere. The way this is constructed is to first call the set where the limit doesn't exist $N$ (and this clearly has measure $0$). Then, we:
Define a new sequence $$\tilde{f_{n}} = \begin{cases} f_{n}(x) & x \not \in N \\0 & x \in N \end{cases}$$
and we can think of $\tilde{f_{n}}$ as $f_{n} - f_{n}\chi_{N}$, where $\chi_{N}$ is the characteristic function of the set $N$. Clearly, $\tilde{f_{n}}$ is measurable since it is the sum of measurable functions. And so the limit of the sequence $\{ \tilde{f_{n}} \}$ is defined everywhere and measurable. Specifically,$$\lim \limits_{n \to \infty} \tilde{f_{n}} = \begin{cases} \lim \limits_{n \to \infty} f_{n} & x \not \in N \\ 0 & x \in N. \end{cases} $$
So we have a measurable function which is equal to $\lim \limits_{n \to \infty} f_{n}$ except on $N$. But my question is:
$\lim \limits_{n \to \infty} f_{n}$ is only defined on $X \setminus N$, which means its domain is $X \setminus N$. Why do we say this is equal to $\lim \limits_{n \to \infty} \tilde{f_{n}}$ almost everywhere if they have different domains? Does it make sense to talk about them not being equal on $N$ if one of them isn't even defined on $N$?
I guess my question is: If $X \subseteq X'$, and $f : X \to Y$ and $g : X' \to Y$, suppose $f = g$ on $X$ (with $X' \setminus X$ having measure $0$). Does the statement $f = g$ a.e. even make sense? We can't compare then on $X' \setminus X$ to say they aren't equal on it because one of the functions isn't even defined on that set.
Another question that has been spawned from this question is whether it makes sense to integrate a function over a set that is not in its domain.