Let two sets $\mathcal{A} \subset \mathbb{R}^2 = \left \{ (x_1,x_2) | x_1,x_2 \in \mathbb{R} \right \} $ and $\mathcal{B} \subset \mathbb{R}^3 = \left \{ (x_1,x_2,x_3) | x_1,x_2,x_3 \in \mathbb{R} \right \}$
How can I mathematically write that $\mathcal{B}$ is an extended version of $\mathcal{A}$ with the same number of elements?
For example if $\mathcal{A} = \left \{ (1,2) , (2,5) , (4,1) \right \}$ and $\mathcal{B} = \left \{ (1,2,1) , (2,5,0) , (4,1,3) \right \}$, for each element of $\mathcal{B}$ there is one and only one element in $\mathcal{A}$ with the same $x_1$ and $x_2$, and $\left | \mathcal{A} \right |=\left |\mathcal{B}\right |$.
I would do it saying that the function $$f:B\to A$$ given by $f(x,y,z)=(x,y)$, is a bijection.