[Tex/LaTex] inline bracket, similar to a permutation and binomial, but aligned

horizontal alignmentinline()math-mode

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

enter image description here

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:

enter image description here

Any solution that produces larger brackets is not acceptable. The only thing that is missing is alignment.

Best Answer

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
\end{psmallmatrix*}$
abc
\end{document}

result

Related Question