Definition of function

66 Views Asked by At

When defining a function, mathematicians often write something like this:

Let $f\colon \mathbb R\to \mathbb R$ be the function given by $x\mapsto x^2$.

The purpose of this definition may be to assert something about this function, for example:

Then $f$ neither injective nor surjective.

One can shorten this whole thing as follows:

The function $f\colon \mathbb R\to\mathbb R:x\to x^2$ is neither injective nor surjective.

My question is whether $f\colon \mathbb R\to\mathbb R:x\to x^2$ is a correct notation. Also, I wonder if there are alternative notations. Maybe using the "$;$" instead of "$:$"?