What is the name of $a \mapsto b$? $f: A \to B$ is called a mapping, where $A$ and $B$ are two sets.
What is $a \mapsto b$, where $a \in A$ and $b \in B$, called then? Thanks.
Note that $a↦b$ is not a function/mapping, since $a$ and $b$ are not sets. Note that $a↦b$ is not necessarily related to $f$: it can be a part of $f$ or not.
An example would be in the definition of formal grammar, a set $P$ of rules forms a mapping $: \text{a subset of }(Σ \cup N)^* N (Σ \cup N)^* \to (Σ \cup N)^*$. But each rule is just like $a \mapsto b$, where $a \in \text{a subset of }(Σ \cup N)^* N (Σ \cup N)^*$ and $b \in (Σ \cup N)^*$.
 A: The relation is called $f$ sends $a$ to $b$. However if as you note in a comment $a\mapsto b$ is written in a context with no relation to $f$ (or any other specified function) then it is perfectly meaningless. There is always some function that sends a given element $a$ to a given element $b$, so this is telling you nothing. One can invent artificial situations in which this would have a meaning; for instance if one is discussing the functions $\{a\}\to B$ then $a\mapsto b$ selects exactly one of them, or one could announce that $a$ is a variable ranging over $A$ while $b\in B$ is a constant, in which case this specifies the constant function with value$~b$.
What is much more common that left of "$\mapsto$" one writes a variable ranging of some specified domain, and to the right of it some expression involving that variable. For instance $x\mapsto 2x^3-4x^2+7$ describes a function once the domain and codomain are separately specified; thus this notation allows introducing a function without having to introduce a name for it, which is the "anonymyous function" that Asaf refers to in a comment.
To answer the addition to the question, I don't think $a\mapsto b$ has any conventional use in the context of formal grammars. One can imagine using it in writing production rules, but again $b$ would usually be replaced by a more elaborate expression, and even then I think it would be mostly confusing, especially since there may be multiple production rules with the same left hand side but different right hand sides.
