Intrepreting tuples as functions I have been mulling over this for a while now. I am told $\mathbb R^n$ can be interpreted as a set of functions.
Take $\mathbb R^2$, for example I can see how we might interpret it as a set containing all ordered pairs: $<x_1,x_2>$. However I do not understand the notation:
$  \{ f:\{1,2\} \longrightarrow \mathbb R \} = \mathbb R^2$
This would mean we have a domain with two elements and a codomain with $| \mathbb R|$ elements(which doesn't make sense to me). What would the values of $f(1)$ and $f(2)$ be by this definition?
Basically I'm asking what justification is there for the following:

$$  \{ f:\{1,2\} \longrightarrow \mathbb R \} = \{\langle x_1,x_2\rangle:x_1,x_2 \in \mathbb R^2\}$$

For instance it's easy to see why the R.H.S. can be interpreted as Cartesian plane but how does two-dimensional plane relate to the L.H.S in the above?
 A: The left hand side is the set of all functions from $\{1,2\}$ to $\mathbb{R}$.  For instance one such function is given by $1\to \pi$, $2\to -7$.  This function corresponds to the point $(\pi, -7)$ in $\mathbb{R}^2$.  
More generally, the function that sends $1$ to $a$ and $2$ to $b$ (with $a,b\in\mathbb{R}$) corresponds to the point $(a,b)\in \mathbb{R}^2$.
A: Structurally speaking, the set $T$ of ordered pairs of real numbers (i.e. $2$-tuples) is such a set that we can:

*

*With each $t\in T$, associate some unique $t_1,t_2\in {\bf R}$.

*With each two (not necessarily distinct) $a,b\in {\bf R}$ we can associate a unique element $t_{a,b}\in T$.

*These two correspondences are inverse to one another, so that $(t_{a,b})_1=a$, $(t_{a,b})_2=b$ and $t=t_{t_1, t_2}$.

One can easily check that this is satisfied by the set on the left hand side. It is also satisfied by e.g. the set of Kuratowski's pairs, or one of several other constructions.
This construction has the added advantage of being easy to extend to longer tuples (which is harder for e.g. Kuratowski's pair), including infinite (which is impossible with Kuratowski's pair, as far as I know).
When we do not care about set-theoretic "implementation", but rather the structural properties of the set of ordered pairs (which is pretty much always), it doesn't matter which construction we use.
In fact, the abstraction goes further: the Cartesian product, which is (in its most basic form) the set of ordered pairs, is usually assumed to be associative, which is not true about either for the constructions I have mentioned (nor is it true about any formal definition I have been introduced to in any classes). (Note that this "associativity", when used carelessly,  can lead to mistakes, so it is good to be aware of the associated problems, but must of the time it is rather benign.)
A: Consider the following sets:
$$A:=\{(a,b):a,b\in\Bbb R\}, \\
 B:=\{f:\{0,1\}\to \Bbb R\}$$
An element of A looks like $(x,y)$, an element of B is a function $f:0\mapsto r,1\mapsto t; r,t\in \Bbb R$.
We have the natural bijection $F((x,y))=f:0\mapsto x, 1\mapsto y$, so we might as well treat these sets as equals.
