Constant functions are measurable explanation The definition of measurable functions is: Let $\Sigma$ be a sigma algebra of set $X$. Then $f:X \rightarrow \bar{\mathbb R}$ is measurable if $\{x:f(x)>a\} \in \Sigma$ for all $a \in \mathbb R$.
Let $f(x)=c$. For any $a \in \mathbb R$, the preimage $f^{-1}(a, +\infty)$ is equal to either the empty set or $X$.

I can't see how this works out the statement. I do know that the empty set and $X$ are always in $\Sigma$ but I don't know how it came to finding out what the preimage is equal to. 
Also what does the real numbers with a bar mean?
 A: Ok lets look at it step by step
$f(x)=c_1$ Now we need to check the $\{x\in X| f(x)>c\}$
Basically this is the same as $\{x\in X| c1>c\}$ Now we debate depending on variable $c$
For $c \ge c_1$ We get $\{x\in X| c_1>c\ge c_1\}=\emptyset$ since  $c_1>c_1$ cannot happen. And as we know empty set is in sigma algebra by definition.
Now for $c < c_1$ We get $\{x\in X| c_1>c \}=X$ since $c_1<c$ is exactly how we chose $c$
And since we know that empty set is in sigma algebra and we also know that if 
$A\in \Sigma \implies A^c \in \Sigma$ So that means that $X \in \Sigma$
Now we know that $(\forall c \in R) \space \{x\in X| f(x)>c \}\in \Sigma$
So by definition the function is measurable.

$\bar{\mathbb R} = \mathbb{R}\cup\{-\infty,+\infty\}$
A: Let $X$ and $Y$ be measurable sets with $\Sigma$-algebras $\Sigma_{X}$ and $\Sigma_{Y}$, respectively.
Let $f:X\longrightarrow Y$ be constant s.t. $\forall x\in X: f(x)=a$. Then $\forall U\in\Sigma_{Y}$ we have:
\begin{equation*}
    f^{-1}(U)=\left\{\begin{matrix}X & \text{if $a\in U$}\\ \emptyset & 
    \text{else.}\end{matrix}\right.
\end{equation*}
Both $X$ and $\emptyset$ are in $\Sigma_{X}$.
Same argument shows that $f$ is continuous by the way, if you have topologies on $X$ and $Y$.
