As in the title, I have a notational problem regarding functions whose codomain directly depends on the elements taken from the domain.
Here there is an example.
Let $X$ be a set with $x \in X$. Let $Y$ be another set and put a correspondence between $X$ and $Y$ such that for every $x \in X$ there is at least one $y \in Y$. Let $Y(x)$ denote the set of those elements of $Y$ that are in correspondence with $x$.
Now, imagine that we want to set a function $f$ that for every $x \in X$ gives an element in the set of probability distributions over $Y(x)$.
How do we write this function?
An option is of course $$ f : X \to \Delta ( Y(x) ), $$ but in my opinion this is not completely correct, because of the $x$ that pops up in the codomain that does depend from the element we choose from the domain, without making explicit this relation.
Another option is to write that there is a function $f$ such that $x \mapsto \Delta ( Y(x) )$.
What is the correct one?
Is there any other option?
Thanks in advance for your feedbacks.
If I were going to be talking about only one such function, I’d probably just say something like this:
If I were going to be talking about several such functions, I’d define the set of them:
(I use the notation ${}^AB$ for the set of functions from $A$ to $B$; you can substitute whatever other notation you prefer.)