Suppose a measure space $(X, \mathcal{A}, \mu)$. I am reading measure theory and coming to a notion that the $L^p(\mu)$ space is a quotient space on $\mathcal{L}^p(\mu)$ space under an equivalence relation $\sim$ defined by $$ \forall f, g \in \mathcal{L}^p:\; f \sim g \iff \mu( \{ x \in X \mid f(x) \neq g(x) \} ) = 0 \,, $$ i. e., any functions $f, g \in \mathcal{L}^p(\mu)$ satisfy $f \sim g$ if and only if $f = g$ $\mu$-almost everywhere. I tried to prove the equivalence relation and has not checked the literature. Please help me validate my proof whether it is correct or I did some mistakes. Thanks for your kind help.
Here's my proof:
Proof. We need to show that $\sim$ is reflexive, symmetric and transitive in order to show that $\sim$ as defined above is a valid equivalence relation. Let $f, g, h \in \mathcal{L}^p(\mu)$.
It is trivial to show that $f \sim f$, which is given by $$ \mu( \{ x \in X \mid f(x) \neq f(x) \} ) = \mu( \varnothing ) = 0 \,. $$ Then, we need to be aware that $$ \{ x \in X \mid f(x) \neq g(x) \} = \{ x \in X \mid g(x) \neq f(x) \} \,. $$ Then, by assuming $f \sim g$, we will obtain $g \sim f$ and vice versa. Thus, $f \sim g \iff g \sim f$, which means that $\sim$ is symmetric. Now suppose $f \sim g$ and $g \sim h$. Let $$ A := \{ x \in X \mid f(x) \neq g(x) \} \;\text{ and}\; B := \{ x \in X \mid g(x) \neq h(x) \} \,. $$ By definitition, $\mu(A) = \mu(B) = 0$. Now let $$ C := \{x \in X \mid f(x) \neq h(x) \} \,. $$ If $c_1 \in C$ such that $f(c_1) \neq g(c_1)$, then $c_1 \in A$. And if $c_2 \in C$ such that $g(c_2) \neq h(c_2)$, then $c_2 \in B$. Now suppose $c \in C$ such that $f(c) = g(c)$ and $g(c) = h(c)$. Then $c \in \varnothing$, since $$ f(c) \neq h(c) = g(c) = f(c) $$ is a contradiction. Thus, we have $C \subseteq A \cup B$, which implies $$ \mu(C) \leq \mu(A \cup B) \leq \mu(A) + \mu(B) = 0 + 0 = 0 \,, $$ which shows that $f \sim h$. Hence, $f \sim g \land g \sim h \implies f \sim h$, which means that $\sim$ is transitive. We conclude that $\sim$ is an equivalence relation on $\mathcal{L}^p(\mu)$. Q. E. D