I am trying to define the Shannon entropy as a map $S:?\to \mathbb{R}_{\geq 0}$. What is the appropriate notation for $?$.
The entropy is
$$ S[\mathbb{Q}]=-\sum_{q\in\mathbb{Q}}\rho[q]\ln \rho[q] $$
Defining the map as $S:X\to \mathbb{R}_{\geq 0}$, where $X$ is a set does not work because $\mathbb{Q}$ is itself a 'complete' set, not an element of a set.
Is this acceptable?
$$ \begin{eqnarray} S\colon &&\mathbb{Q} \to \mathbb{R}_{\geq 0}\\ &&\mathbb{Q} \to -\sum_{q\in \mathbb{Q}}\rho[q]\ln \rho[q] \end{eqnarray} $$
or is it abuse of notation?
The argument of the entropy is not $\mathbb{Q}$, but the probability mass function $\rho$. So $S:X\rightarrow \mathbb{R}_{\geq 0}$ where $X = \{f:\mathbb{Q}\rightarrow [0,1]|\sum_\mathbb{Q} \rho(q)=1 \}$ is the set of PMFs on $\mathbb{Q}$.