Measurable function that is constant on every subset of sigma algebra I'm working on the following problem and got stuck:
Let $\Omega$ be a set, $(A_n)_{n\in \mathbb{N}}$ be a family of disjoint sets such that $\cup_{n\in \mathbb{N}} A_n = \Omega $ and  $\mathcal{A} = \big\{ \cup_{i\in I} A_i : I\subset \mathbb{N} \big\}$

*

*Show that $\mathcal{A}$ is a $\sigma$-algebra.

*Let $f:\Omega \to \mathbb{R}$, a $\mathcal{A}$-measurable function. Show that $f$ is constant on every $A_n$.

I managed to do the part 1.
$i) \Omega \in \mathcal{A}$
since for $I = \mathbb{N}$ we have $\cup_{i\in I} A_i = \Omega\in \mathcal{A}$
$ii) A\in \mathcal{A} \implies A^{c} \in \mathcal{A}:$
Let $A\in\mathcal{A}$. Then $A=\cup_{i\in I} A_i$. Thus
$A^{c} = \big(\cup_{i\in I} A_i\big)^{c} = \cup_{n\in \mathbb{N}} A_n \setminus \cup_{i\in I} A_i = \cup_{j\in J} A_j$
for some $J$ such that $J \cup I = \mathbb{N}$.
Similar for the countable unions.
For 2. I know that $f$ is measurable if:
$$\{f\geq t\}\in \mathcal{A}$$
I was wondering if I can show 2. knowing that $\{f\geq t\}\in \mathcal{A}$ is equivalent to $\{f\leq t\}\in \mathcal{A}$ and thus $f=t$?
Any help would be appreciated.
 A: Let $x \in A_n$ and $y=f(x)$. Let $f_n$ be he restriction of $f$ to $A_n$.  Then $f_n^{-1}(y)$ is in $\mathcal A$ and conatisn $x$. It is also a subset of $A_n$. But the only subsets of $A_n$ in $\mathcal A$ are $\emptyset$ and $A_n$. Since $f_n^{-1}(y)$  is not empty, it must be $A_n$. This means $f=y$ on $A_n$.
A: The key here is that $(A_n)_{n\in\mathbb{N}}$ is a disjoint family of sets. To prove the second part, fix $n\in \mathbb{N}$ and let $x,y\in A_n$. Aiming for a contradiction, assume that $f(x)\ne f(y)$.
Because $f$ is $\mathcal{A}$-measurable, we have that $f^{-1}\left(\left\{f(x)\right\}\right)\in\mathcal{A}$ and $f^{-1}\left(\left\{f(y)\right\}\right)\in\mathcal{A}$. By definition of $\mathcal{A}$, we have that $$f^{-1}\left(\left\{f(x)\right\}\right) = \bigcup_{i\in I_x} A_i\quad \text{and}\quad f^{-1}\left(\left\{f(y)\right\}\right) = \bigcup_{i\in I_y} A_i$$
for some sets $I_x,I_y\subset \mathbb{N}$. Obviously $x\in f^{-1}\left(\left\{f(x)\right\}\right)$ and $y\in f^{-1}\left(\left\{f(y)\right\}\right)$, so by disjointness of the family $(A_n)_{n\in\mathbb{N}}$, it follows that $n\in I_x\cap I_y$. By this and since $f(x)\ne f(y)$ we have $$A_n\subset f^{-1}\left(\left\{f(x)\right\}\right)\cap f^{-1}\left(\left\{f(y)\right\}\right)=\emptyset,$$
a contradiction.
