# Why 'equality almost everywhere' is transitive?

Rudin RCA p.27

Let $\mu$ be a measure.

Define $f\sim g$ iff $\mu(\{x|f(x)≠g(x)\})=0$ ($f,g$ are measurable functions from $X$ to a topological space $Y$.

How come this relation $\sim$ is transitive?

Let'a assume $f\sim g$ and $g\sim h$.

By assumtion, $\{x|f(x)≠g(x)\}$ and $\{x|g(x)≠h(x)\}$ are measurable sets.

However, why this gurantees that $\{x|f(x)≠h(x)\}$ is measurable? If this is not measurable, then $\mu(\{x|f(x)≠h(x)\})$ is not defined, hence $f$ is not equivalent with $h$.

-
Are $f,g,h$ $\mathbb{R}$ valued, with $\mathbb{R}$ given Lebesgue measure? – uncookedfalcon Jan 13 '13 at 11:43
@uncookedfalcon No. $f,g,h$ be any maps to a topological space $Y$. – Katlus Jan 13 '13 at 11:50

If you assume $f, h$ are measurable functions (which is an acceptable assumption) then $\{x;f(x)\neq h(x)\}$ is a measurable set and we have $\{x;f(x)\neq h(x)\}\subseteq \{x;f(x)\neq g(x)\}\cup \{x;g(x)\neq h(x)\}$.

-
Besides if the measure is complete then such sets are always measurable. – Vahid Shirbisheh Jan 13 '13 at 11:47
do you mean "$\mu$ is complete" is essential? – Katlus Jan 13 '13 at 12:06
Yes because every subset of a set with measure zero is a measurable set in a complete measure by definition. – Vahid Shirbisheh Jan 13 '13 at 12:08
So the relation in my post fails to be an equivalence relation for an arbitrary measure.. Thank you – Katlus Jan 13 '13 at 12:12
In measure theory we usually consider measurable functions. In that case, as I said in the above the relation is an equivalence relation again, because $\{x; f(x)\neq h(x)\}=(f-h)^{-1} (\mathbb{R}-0)$. – Vahid Shirbisheh Jan 13 '13 at 12:16

Since you're saying $f\sim g$ and $g\sim h$ it is implicitly given that $f,g,h$ are measurable. To show that $\mu(\{x\mid f(x)\neq h(x)\})=0$ show and use that $$\{x\mid f(x)=g(x)\}\cap\{x\mid g(x)=h(x)\}\subseteq\{x\mid f(x)=h(x)\}.$$

-
I showed that equality, but still don't understand why $\{x|f(x)=h(x)\}$ is measurable. Let $y\in Y$ (See my edited post). If it could be shown that $\{y\}$ is a borel set, then the proof is done. If $Y$ is any topological space how come $\{y\}$ is a borel set ? – Katlus Jan 13 '13 at 12:01

Note that: $$\forall x\in X[f(x)\not=h(x)\implies f(x)\not=g(x) \,or\ g(x)\not=h(x)]$$

Thus:

$$\{x|f(x)\not= h(x)\}\subseteq \{x|f(x)\not=g(x)\}\cup\{x|f(x)\not=g(x)\}$$

Now use the monotonicity of an outer measure along with the fact that the union of two null sets is a null set.

-
To appeal monotonicity of a measure, i think, firstly, it should be shown that $\{x|f(x)≠h(x)\}$ is measurable. – Katlus Jan 13 '13 at 12:03
@Kaltus This is not necessary for an outer measure – Amr Jan 13 '13 at 13:46

I'm assuming all our functions are $\mathbb{R}^n$ valued, with $\mathbb{R}^n$ given Lesbesgue measure. In general, for any two such $f,g$, $f-g$ is measurable, and so the set of points where $f \neq g$ is simply the preimage of $\mathbb{R}^n - 0$ under $f-g$, hence measurable.

Edit: As pointed out in other comments, for $Y$ arbitrary if the measure on $X$ is complete it follows this is an equivalence relation. I just wanted to add that if $Y$ is Hausdorff you don't need this: for any $f,g$, the set of points where $f = g$ is exactly the pullback of the diagonal of $Y \times Y$, which is closed.

-

Concerning the measurability of $$A = \{x| f(x) \neq h(x)\}$$

If $f$ and $g$ are measurable functions so is $$t(x)=f(x)-h(x)$$

Now note that $$A = t^{-1}(- \infty,0) \cup t^{-1}(0, +\infty)$$ which by definition is measurable.

On a final note, this works if the topological space you are mapping your functions into has the order topology, for example $f$ and $g$ map to $\mathbb{R}$ or the extended real line. If it is a general topological space think about what kind of set $A$ is. Is it open, closed? What happens when you take the preimage of it by a continuous function?

-