notation for set of indexed functions instead of braced functions?

40 Views Asked by At

Sorry for the vague title.

We sometimes write functions as: $$f(2)=5$$ and sometimes as $$f_2 = 5$$

and sometimes with multiple variables, as $$f_2(2)=5$$ instead of $$f(2,2)=5$$

In principle these are the same, but they allow for different emphasis.

I am wondering: can we distinguish between the two already when writing the function spaces?

we usually write: $$f: \mathbb N \times \mathbb N \to \mathbb N$$

But this doesn't allow us to say whether this will be written as $f_x(y)$ or as $f(x,y)$.

Is there standard notation to denote when defining the type signature of $f$, that it will be written as $f_x(y)$ rather than $f(x,y)$?

1

There are 1 best solutions below

0
On

The usual way of writing multivariable functions is $f(x,y,z,\cdots)$. This means that $f$ is a function where $x,y,z,\cdots$ are variables.

When only positive integer values are allowed, you can write $f(x)$ or sometimes $f_x$. The latter looks somewhat like notation used in a sequence ($a_n$), because for $x=1,2,3,\cdots$, $f_x$ is like a sequence.

But be careful, as $f_x$ is also the notation for the partial derivative of $f$ w.r.t. $x$.

Of course, you can always define things like these, for example:

For $t\in\mathbb{N}$, define $f_t:\mathbb{N}\times\mathbb{N}\times\mathbb{N}\to\mathbb{N}$ where $f_t(x,y,z)=\cdots$.