TITLE: If $f$ measurable and $f=g$ a.e. implies $g$ measurable, then $\mu$ is complete
QUESTION [5 upvotes]: This is the Proposition 2.11 of the book Real Analysis from Folland.

The following implications are valid if and only if the measure is complete:
(a) If $f$ is measurable and $f = g$ $\mu$-a.e., then $g$ is measurable.
(b) If $f_n$ is measurable for $n\in \mathbb{N}$ and $f_n\rightarrow f$ $\mu$-a.e., then $f$ is measurable.

The complete solution to this question can be found in this answer. But note that it was considered that $f,g:(X,\mathcal{M})\to(\mathbb{R},\mathcal{B}_{\mathbb{R}})$, other solutions like [1] or others that I found on the internet also assume that the image is $\mathbb{R}$ or $\overline{\mathbb{R}}$.
I'm thinking about the general case, where, $f:(X,\mathcal{M})\to(Y,\mathcal{N})$.
In this answer, the proposition $\mu$ is complete $\Rightarrow$ (a) is demonstrated in the general case.
I tried to show the opposite direction but I couldn't, in the general case is this proposition true? How to demonstrate this?

REPLY [5 votes]: If you only ask that there is some sigma algebra $(Y, \mathcal N)$ such that "for all $f , g : X \to Y$ such that $f$ measurable and $f = g$ a.e., we have $g$ measurable", in general you can't conclude that the measure on $X$ is complete. For example, when $Y$ is a singleton or another set with the coarse sigma-algebra, any $f, g : X \to Y$ are measurable, and the assumption gives no information.
As soon as $Y$ contains a nontrivial measurable set, the implication is true. The argument when $Y = \mathbb R$ still works: let $\mathbf 0$ be any nontrivial measurable subset of $Y$ with complement $\mathbf 1$, and take $0 \in \mathbf 0$ and $1 \in \mathbf 1$. When $A \subset X$ is contained in a set of measure $0$, take $f$ to be the constant function $0$ and $g$ to be $1$ on $A$ and $0$ on $X - A$. Then $f$ is constant, hence measurable, and $f = g$ a.e. so that $g^{-1}(\mathbf 1) = A$ is measurable.