What is rigorous notation for functions? I have seen many ways to denote a function: $f(x)=x^2, y=x^2, f: x\mapsto x^2$ and so on. What is exact notation for functions? Please include lethal doses of rigor, set theory, and of course notational exactness.
Note: I am very familiar with functions in general. I just know that a lot of mathematical literature abuses notation when it comes to functions.
 A: 
$$f:E\to F,\quad x\mapsto f(x)$$

For example, the function $f:\mathbb R\to\mathbb R$, $x\mapsto x^2$, is not the function $g:\mathbb R_+\to\mathbb R$, $x\mapsto x^2$, but the functions $h:\{-1,0,1\}\to\mathbb R$, $x\mapsto x^2$ and $k:\{-1,0,1\}\to\mathbb R$, $x\mapsto |x|$ are equal.
A: You should include the following:
1: The name of your function e.g. $f$
2: The domain and codomain (not the image!) of your function. e.g. $A \rightarrow B$
3: The rule of your function, e.g. $x \mapsto x^2$.
so this function would be:
$f:A \rightarrow B,\ x \mapsto x^2 $
A: Using ZF a function $f$ is a subset $f \subseteq \mathcal P(X \times Y)$ for some fixed sets $X,Y$ such that $\forall x \in X \ \exists ! y \in Y \ (x,y) \in f$. We denote with $f(x) \in Y$ the unique value in $Y$ such that $(x,f(x)) \in f$.
Now, what is allowed to describe for a given $x \in X$ its image $f(x) \in Y$, heavily depends on the structure of $Y$ and we may introduce notation such as $f: X \rightarrow Y, \ x \mapsto f(x)$ for our own convenience...
