3
$\begingroup$

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

$\endgroup$

migrated from cstheory.stackexchange.com Jun 14 '13 at 13:18

This question came from our site for theoretical computer scientists and researchers in related fields.

  • $\begingroup$ This is not research level theoretical computer science. Migrating to Computer Science. $\endgroup$ – Dave Clarke Jun 14 '13 at 13:17
  • 2
    $\begingroup$ $\sigma[x\mapsto a]$ is not uncommon in logic for the function $\sigma$ modified by mapping $x$ to $a$. $\endgroup$ – Kaveh Jun 14 '13 at 14:31
  • $\begingroup$ Thanks. Having spoken to a colleague, we have a hunch that there is no "standardised" notation per se. $\endgroup$ – Edd Barrett Jun 14 '13 at 15:29
  • $\begingroup$ 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$. $\endgroup$ – Pål GD Jun 14 '13 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.