# inline bracket, similar to a permutation and binomial, but aligned

I'm often experiencing instances, when I need to define a function on two sets in a domain. I'd like to create a command \newcommand{\func}[4]{...}, which makes an inline bracket, that shows how the function maps both sets of points.

So far, I've managed to do this

via the command \binom{\tiny(x,s,t)\mapsto(x,s(1-t))}{\tiny(y,t)\mapsto y~~~~~~~~~}. As you can see, I'm having problems with the alignment of both \mapstos and also with the size of the both outer brackets. Could anyone please help me write such a command? I tried it with an inline table, but it is way too large. It would be desirable (but not necessary) that both outer brackets would respond to \left and \right or \big. COMMENT: this is how my current solution (via \binom with no alignment) looks like: Any solution that produces larger brackets is not acceptable. The only thing that is missing is alignment. - add comment ## 5 Answers Ideally, one would have a version of aligned with smaller spacing. I'm not aware of any implementation of that though. Here is a non-automatic solution with \mathllap and psmallmatrix* from mathtools: \documentclass{article} \usepackage{mathtools} \begin{document} abc\begin{psmallmatrix*}[l]
(x,s,t)                           \mapsto (x,s(1-t)) \\
\phantom{(x,s,t)}\mathllap{(y,t)} \mapsto y

Here we are not in math mode: \func{(x,s,t)}{(x,s(1-t))}{(y,t)}{y}

\end{document}


(I would never have thought of using \ensuremath, but I saw it in @Tobi's answer.)

-