# Correct mapping “update” notation for computer science papers

A nice easy one.

I'm interested to know the most standard and accepted way to denote the update of a mapping in the context of a theoretical computer science paper.

By example, suppose we have a mapping $m$:

$$m = \{1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4\}$$

Now suppose we wish to mutate the $m$ such that $~m(1) = 666$. How would this be best denoted?

Off the top of my head, I have seen this denoted as $m \leftarrow m \circ \{1 \mapsto 666\}$ or even $m \leftarrow m[1 \mapsto 666]$. How would you do it?

Cheers

• This is not research level theoretical computer science. Migrating to Computer Science. – Dave Clarke Jun 14 '13 at 13:17
• $\sigma[x\mapsto a]$ is not uncommon in logic for the function $\sigma$ modified by mapping $x$ to $a$. – Kaveh Jun 14 '13 at 14:31
• Thanks. Having spoken to a colleague, we have a hunch that there is no "standardised" notation per se. – Edd Barrett Jun 14 '13 at 15:29
• As Kaveh says, also used subscripted, given map $m$, we often denote $m_{[x \mapsto v]}$ for $m$, but with $x$ given the value $v$. – Pål GD Jun 14 '13 at 18:29