[Math] Notation for set of constant functions

elementary-set-theoryfunctions

I have a constant function that always returns the same integer value. How do I represent a set of functions where each function is a constant function that returns some arbitrary constant? For example, I would like to identify an element $f_p$ of this set as a function that always returns the integer value $p$. Similarly, $f_3$ would be a constant function that always returns $3$.

I'm also confused as to how I would define any arbitrary instance of a constant function. For example, if I had a function that always returned $2$, would I define it as $f: \mathbb{Z} \rightarrow \{2\}$?

Best Answer

Since your domain seems to be fixed throughout your argument, there is no need to make it visible to your reader. In these cases, it's quite common to write $c_x$ for the constant function $c_x \colon D \to \{x\}$, where $D$ is the fixed domain. Then $$ \mathcal C = \{ c_x \mid x \in X \} $$ is the collection of all constant functions with value in $X$ - for some given $X$. In your particular case, $$ \mathcal C = \{ c_z \mid z \in \mathbb Z\} $$ is the collection of all constant functions with integer values.

Related Question