# Extend the domain of a function

I get back to a question I post long time ago, because that is quite important to me...

Let $\mathbb{X} = \{a, b, c...\}$ be a finite set, $\mathbb{N}$ refers to the set of all natural numbers. I have defined a function $\rho \in \mathbb{X} \rightarrow \mathbb{N} = \mathbb{N}^\mathbb{X}$.

Now I am looking for a function to extend the domain of $\rho$: adding 2 variables to it. For instance, adding $\alpha \mapsto 2$ and $\beta \mapsto 3$ to $\rho$, to make a new function $\rho': \mathbb{X} \cup \{\alpha, \beta\} \rightarrow \mathbb{N}$, such that $\rho'(\alpha) = 2, \rho'(\beta) = 3 \wedge \forall x \in \mathbb{X}, \rho(x) = \rho'(x)$

I really would like to write it in an elegent way, becase I use it very often. Some suggest to write $\rho' = \rho \times [\alpha \mapsto 2, \beta \mapsto 3]$, some suggest $\rho' = \rho \wedge (\alpha \mapsto 2, \beta \mapsto 3)$. I don't find them perfect. Isn't there a conventional way to write it?

Could anyone help?

-
The straightforward answer is that $\rho'=\rho\cup\{\langle\alpha,2\rangle,\langle\beta,3\rangle\}$. This isn’t as readable as a by-case definition, though. – Brian M. Scott Feb 23 '13 at 22:59

If $\alpha,\beta\notin\Bbb X$ then we can fix $f\in\Bbb N^{\alpha,\beta}$ (in our case $f(\alpha)=2, f(\beta)=3$), and define the following map from $\Bbb{N^X}$ to $\Bbb{N^{X\cup\{\alpha,\beta\}}}$ defined by: $$\rho\mapsto\rho\cup f$$
We can define this as $\rho'$ or $\rho_f$ if you want to consider some other $f$ (or allow it to somewhat vary).
For $\rho\in\Bbb{N^X}$ we denote $\rho'$ the extension of the function $\rho$ to the domain $\Bbb X\cup\{\alpha,\beta\}$, such that $$\rho'(x) = \begin{cases}\rho(x) & x\in\Bbb X\\ 2& x=\alpha\\ 3& x=\beta\end{cases}$$
I understand your comment, but I don't need to write it in general, what I am really looking for, is a way to write this special case in short: for instance, $\rho' = \rho \times [\alpha \mapsto 2, \beta \mapsto 3]$ that unfortunately I don't find perfect... – SoftTimur Feb 23 '13 at 17:39