@edwin_teejay @eeevgen in turn, consider example 3.1.1, which perhaps better illustrates my point.

they define s as the set of outcomes of 10  tosses, and x : s -&gt; r as the number of heads.

the right way is to formulate s as the *range* of a random variable, not its domain.