I didn't really know how to write the title, hope it's clear enough (I'm willing to change it if anyone suggests anything better).
My problem is the following: I want to align different items with respect to each other, but with the anchor inside an already aligned environment (this of course fails as it isn't seen outside this environment). Typically I'm giving several definitions of functions, and I'd like to have a pleasing horizontal and vertical alignment between them: horizontal with respect to the column and vertical with respect to the base of first line. Here's a MWE:
\documentclass{minimal}
\usepackage{amsmath}
\usepackage{amsfonts}
\newcommand*\Rset{\mathbb{R}}
\newcommand*\mapping[5]{%
\begingroup
\setlength\arraycolsep{0.2em}%
\begin{array}{ccccc}%
{#1}&\colon&{#2}&\longrightarrow&{#3}\\
&&{#4}&\longmapsto&{#5}%
\end{array}%
\endgroup
}%
\begin{document}
\begin{align*}
&\mapping f\Rset\Rset x{x^2,}&
&\mapping M\Rset\Rset x{x^{42},}\\*[2ex]
&\mapping{\mathrm{Function}}XYx{\dfrac1{1+\dfrac1{1+x^2}},}&
&\mapping U\Rset\Rset x{x.}
\end{align*}
\end{document}
So far my only option is to put the & for the align* environment in front of the \mapping command, so the horizontal alignment is from the beginning of the name of the function. How can I somehow put the & inside the array environment so that it is not seen by the array environment but by the outer align* environment?
Not mentioning the awful vertical alignment!
Maybe you'll have an altogether different (and better) method to achieve this, but anyways, I'd like to know if it is at all possible (in an easy way) or not.


\begin{array}[t]{*{5}{c}}. Are you meaning that "f" should be center aligned with respect to "Function"? – egreg Oct 2 '12 at 17:54align*environment) inside thearrayenvironment. – gniourf_gniourf Oct 2 '12 at 17:56\begin{array}[t]{ccccc}. The second is unclear with respect to the relative position of f and Function. – egreg Oct 2 '12 at 18:08