Let $\Omega = \mathbb R$ and $P = E(1)$ be the exponential distribution with unit parameter, i.e., $P$ has the density $$f_{P}(x) = e^{−x},\quad x > 0.$$
Define $X(\omega) \triangleq \lfloor \omega \rfloor$ to be the integer part of $\omega \in \Omega$, i.e., $X(\omega) = k$ if $k \leq \omega < k + 1, k \in \mathbb Z$.
(a) Show that $X$ is a random variable on $(\mathbb R, \operatorname{Borel}(\mathbb R))$.
(b) Describe $\sigma(X)$ (the $\sigma$-algebra generated by $X$).
Ok, so I am completely new to measure theory and I am struggling to understand. Here is my attempt for part (a).
I know to show something is a random variable we use the reverse image of the random variable itself.
Now, I said that since $X(\omega) = k, k \in \mathbb Z$ and since $\mathbb Z \subset \mathbb R$ then the interval $(k, k+1] \subset \mathbb R$ and element of the Borel set on $\mathbb R$.
Then I was trying to show that $\omega$ is a part of the real numbers by definition.
If $X:\Omega\to\mathbb R$ is a function that only takes values in $\mathbb Z\subseteq\mathbb R$ then for proving that it is a random variable it is enough to verify that sets of the form $\{X=k\}:=\{\omega\in\Omega\mid X(\omega)=k\}$ where $k\in\mathbb Z$ are measurable.
This because in that situation for every $B\subseteq\mathbb R$ we can be write: $$\{X\in B\}=\bigcup_{k\in B\cap\mathbb Z}\{X=k\}\tag1$$ which is a countable union that sort of sets.
In your case we have: $$\{X=k\}=[k,k+1)\tag2$$ and this set is in this context (where $\Omega=\mathbb R$ and is equipped with Borel $\sigma$-algebra) evidently measurable.
We have $\sigma(X)=\{\{X\in B\}\mid B\in\mathcal B(\mathbb R)\}$ and with $(1)$ and $(2)$ we find that: $$\{X\in B\}=\bigcup_{k\in B\cap\mathbb Z}[k,k+1)$$
This makes clear that: $$\sigma(X)=\{\bigcup_{k\in A}[k,k+1)\mid A\subseteq\mathbb Z\}$$