0
$\begingroup$

I have a set of mappings from keys to pairs of real numbers. So lets say this mapping is $K \to \langle \mathbb{R}, \mathbb{R} \rangle$. So this essentially is a set of mappings $k \to \langle v_1, v_2 \rangle$.

What is the most elegant way to define the family of sets of mappings $K \to \mathbb{R}$ of all possible permutations? That is each set should only have one entry $k \to v$, where $v \in \{v_1, v_2\}$, but each $k \in K$ has to feature in each set.

So if I had $\{ a \to \langle 1, 2 \rangle, b \to \langle 3, 4 \rangle \}$ I would want the set of sets $\{ \{a \to 1, b \to 3 \}, \{a \to 2, b \to 3 \}, \{a \to 2, b \to 3 \}, \{a \to 2, b \to 4\} \}$

$\endgroup$
  • 1
    $\begingroup$ $\langle A,B\rangle$ is the ordered pair with $A$ and $B$ in the particular coordinates. It seems to me that you're talking about mappings from $K$ to $\Bbb{R\times R}$ instead. $\endgroup$ – Asaf Karagila Dec 10 '15 at 18:19
  • $\begingroup$ You can see it as you want. Yes it is an ordered tuple in actual fact, not that relevant to this problem I have though. I can probably reformulate it as $K \to \mathbb{R} \times \mathbb{R}$ if it makes a difference. $\endgroup$ – jbx Dec 11 '15 at 11:14
  • $\begingroup$ If an ordered pair is $\{\{A\},\{A,B\}\}$ then $\Bbb{\langle R,R\rangle=\{\{R\}\}}$. It is a singleton. And the set of all mappings from anything into a singleton is again a singleton. So it's not as much as "see it as you want" as much as it is "formulate it correctly". $\endgroup$ – Asaf Karagila Dec 11 '15 at 11:53
  • $\begingroup$ @AsafKaragila No idea what you're making a fuss about. I have a mapping from a key to a pair. The order is there, both in the fact that it is a tuple, and also in the semantics of what I am using this in. I said you can see it as you want because if the second version made it easier, I might be able to change one to the other. You are now introducing stuff I didn't even mention. $\endgroup$ – jbx Dec 12 '15 at 22:12
1
$\begingroup$

Using only the projection functions $\langle x,y\rangle_1=x$ and $\langle x,y\rangle_2=y$, and supposing that your input function is $f:K\to\Bbb R^2$:

$$A=\{g:K\to\Bbb R\mid\forall x\in K,g(x)\in\{f(x)_1,f(x)_2\}\}.$$

If you do some notation abuse so that $a\in\langle x,y\rangle$ is interpreted as $a=x\lor a=y$, then you can write it more simply as

$$A=\{g:K\to\Bbb R\mid\forall x\in K,g(x)\in f(x)\}.$$

If you use Kuratowski ordered pairs, you can also take advantage of the fact that $\bigcup \langle x,y\rangle=\{x,y\}$ to write

$$A=\{g:K\to\Bbb R\mid\forall x\in K,g(x)\in\textstyle\bigcup f(x)\}.$$

Any of these versions can also be written using the notation of an indexed Cartesian product, for example

$$A=\prod_{x\in K}\textstyle\bigcup f(x).$$

This set actually has a name: this is the collection of all choice functions for the family of sets enumerated by $f$. (Usually $f$ is a function into sets, though, not ordered pairs, and as the above shows the most inelegant part of the construction is unwrapping the ordered pair to get just its set of components.)

$\endgroup$
  • $\begingroup$ Thanks for your explanations. I guess I actually can convert my tuples to sets in reality first, and use the concept of a choice function as you indicated. $\endgroup$ – jbx Dec 11 '15 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.