Is a measurable space a set or a tuple? According to Wiki:

Consider a nonempty set $X$ and a $ \sigma$-algebra $ F$ on $ X$, then the tuple $(X,A)$ is called a measurable space. 

Also according to Wiki:

A random variable $X$ is a measurable function from a sample space to a measurable space.

There are so many things that confuse me here. In the first definition measurable space is defined as a tuple, so X can't be a function because it is a mapping of a set to a tuple ( a function is defined as a mapping between 2 sets).
On the other hand, also according to Wiki:

A measurable function is mapping between 2 measurable spaces, such that...

So the random variable X can't be a measurable function, because its domain is the sample space of a measurable space, not the measurable space itself ! And if the measurable space is a tuple, a measurable function can't be a function anyway.
Did Wikipedia confuse the measurable space with the sample space?
 A: A "measurable space" can refer to both. A meaurable space is a set $\Omega$ which has some additional structure, specifically a $\sigma$-algebra $\mathcal F$. When we wish to emphasise the structure, we refer to $(\Omega, \mathcal F)$ as a "measurable space". But a lot of the time, the $\sigma$-algebra is implicit and we use the term "measurable space" to refer to just the sample space $\Omega$. This is the way "measurable space" is being used in the definition of $X$ a random variable. $X$ is a function $\Omega \to \Omega$, not $(\Omega, \mathcal F) \to (\Omega, \mathcal F)$.
Using the same term for two thing might not be a great idea, but by this point it's an extremely common practice in mathematics. The same thing can be seen when talking about topological spaces, normed spaces, inner product spaces, groups, rings, basically any kind of set with some additional structure. And in fact it's usually fine since only one interpretation would make sense in most cases - in the definition for a random variable it wouldn't make sense for a "measurable space" to mean $(\Omega, \mathcal F)$ (as you pointed out).
