[proofplan]
The indicator function only takes the two values $0$ and $1$, so every preimage under $\mathbb{1}_A$ is determined by whether the target set contains $0$, contains $1$, contains both, or contains neither. If $A$ is measurable, these four possibilities give only $\varnothing$, $A$, $X \setminus A$, and $X$, all of which lie in $\mathcal{M}$. Conversely, if $\mathbb{1}_A$ is measurable, the preimage of the Borel ray $(1/2,\infty)$ is exactly $A$.
[/proofplan]
custom_env
admin
[step:Compute all Borel preimages when $A$ is measurable]Assume $A \in \mathcal{M}$. Let $B \in \mathcal{B}(\mathbb{R})$ be arbitrary. For every $x \in X$, the value $\mathbb{1}_A(x)$ is $1$ if $x \in A$ and $0$ if $x \in X \setminus A$. Therefore $\mathbb{1}_A^{-1}(B)$ is determined by membership of $0$ and $1$ in $B$ as follows: if $0 \in B$ and $1 \in B$, then $\mathbb{1}_A^{-1}(B)=X$; if $1 \in B$ and $0 \notin B$, then $\mathbb{1}_A^{-1}(B)=A$; if $0 \in B$ and $1 \notin B$, then $\mathbb{1}_A^{-1}(B)=X \setminus A$; and if $0 \notin B$ and $1 \notin B$, then $\mathbb{1}_A^{-1}(B)=\varnothing$.
Since $\mathcal{M}$ is a $\sigma$-algebra, $X \in \mathcal{M}$ and $\varnothing \in \mathcal{M}$. Since $A \in \mathcal{M}$, also $X \setminus A \in \mathcal{M}$. Hence $\mathbb{1}_A^{-1}(B) \in \mathcal{M}$ for every $B \in \mathcal{B}(\mathbb{R})$, so $\mathbb{1}_A$ is $\mathcal{M}/\mathcal{B}(\mathbb{R})$-measurable.[/step]
custom_env
admin
[guided]Assume $A \in \mathcal{M}$. To prove that $\mathbb{1}_A: X \to \mathbb{R}$ is $\mathcal{M}/\mathcal{B}(\mathbb{R})$-measurable, we must prove that the preimage of every Borel subset of $\mathbb{R}$ belongs to $\mathcal{M}$. Let $B \in \mathcal{B}(\mathbb{R})$ be arbitrary.
The key point is that $\mathbb{1}_A$ has only two possible values. For $x \in A$, we have $\mathbb{1}_A(x)=1$. For $x \in X \setminus A$, we have $\mathbb{1}_A(x)=0$. Thus the condition $\mathbb{1}_A(x) \in B$ depends only on whether $B$ contains $1$ and whether $B$ contains $0$.
There are four cases. If $0 \in B$ and $1 \in B$, then both possible values of $\mathbb{1}_A$ lie in $B$, so every point of $X$ lies in the preimage and $\mathbb{1}_A^{-1}(B)=X$. If $1 \in B$ and $0 \notin B$, then precisely the points where $\mathbb{1}_A$ equals $1$ lie in the preimage, so $\mathbb{1}_A^{-1}(B)=A$. If $0 \in B$ and $1 \notin B$, then precisely the points where $\mathbb{1}_A$ equals $0$ lie in the preimage, so $\mathbb{1}_A^{-1}(B)=X \setminus A$. If neither $0$ nor $1$ belongs to $B$, then neither possible value of $\mathbb{1}_A$ lies in $B$, so $\mathbb{1}_A^{-1}(B)=\varnothing$.
Each of these four sets is measurable. Indeed, $X \in \mathcal{M}$ and $\varnothing \in \mathcal{M}$ because $\mathcal{M}$ is a $\sigma$-algebra. Also $A \in \mathcal{M}$ by assumption, and therefore $X \setminus A \in \mathcal{M}$ because $\sigma$-algebras are closed under complements relative to the ambient set $X$. Hence $\mathbb{1}_A^{-1}(B) \in \mathcal{M}$ for every Borel set $B \subset \mathbb{R}$, which is exactly the definition of $\mathcal{M}/\mathcal{B}(\mathbb{R})$-measurability.[/guided]
custom_env
admin
[step:Recover $A$ as the preimage of a Borel ray]
Conversely, assume that $\mathbb{1}_A$ is $\mathcal{M}/\mathcal{B}(\mathbb{R})$-measurable. Define the open ray $U \subset \mathbb{R}$ by $U=(1/2,\infty)$. Since $U$ is open in $\mathbb{R}$, it belongs to $\mathcal{B}(\mathbb{R})$. By measurability of $\mathbb{1}_A$, the preimage $\mathbb{1}_A^{-1}(U)$ belongs to $\mathcal{M}$.
For every $x \in X$, we have $\mathbb{1}_A(x) \in U$ if and only if $\mathbb{1}_A(x)=1$, and this holds if and only if $x \in A$. Therefore
\begin{align*}
\mathbb{1}_A^{-1}(U)=A.
\end{align*}
Since $\mathbb{1}_A^{-1}(U) \in \mathcal{M}$, it follows that $A \in \mathcal{M}$.
[/step]
custom_env
admin
[step:Conclude the equivalence]
The first step proves that $A \in \mathcal{M}$ implies that $\mathbb{1}_A$ is $\mathcal{M}/\mathcal{B}(\mathbb{R})$-measurable. The second step proves the converse implication. Hence $\mathbb{1}_A$ is measurable if and only if $A \in \mathcal{M}$.
[/step]