Move array in array down

I have the following code

\begin{array}{rl}
\textbf{fetcher} : \mathcal{T} &\to \mathcal{T} \\
(P_{\star}, w) &\mapsto \bigcup \limits_{p \in P_{\star}} \left(
{\setstretch{1.25}
\begin{array}{llll}
best_{b_{R}} \big(& \big( R(p), &w_{R} \cdot \textbf{rank}_{R(p)} \big)&\big)  \ \cup \\
best_{b_{C}} \big(& \big( C(p), &w_{C} \cdot \textbf{rank}_{C(p)} \big)&\big)  \ \cup \\
best_{b_{A}} \big(& \big( A(p), &w_{A} \cdot \textbf{rank}_{A(p)} \big)&\big)
\end{array}}
\right)
\end{array}


which results in

I would however rather have it look like so:

I am not sure if array is the best choice for this, but I did not find any better way. Is there a way to move the second array down, or should I rather use something else?

• use \begin{array}[t] so it aligns on the top row and remove the \left( \right) if you don't want them, as in the second image. – David Carlisle Jun 5 '14 at 8:29
• so easy! would you care to make this an actual answer? – fabian789 Jun 5 '14 at 8:38

You don't want array, but aligned:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\functionnameX}[1]{\mathit{#1}}
\newcommand{\functionnameY}[1]{\mathbf{#1}}
\newcommand{\best}{\functionnameX{best}}
\newcommand{\rank}{\functionnameY{rank}}
\newcommand{\fetcher}{\functionnameY{fetcher}}

\begin{document}
\begin{aligned} \fetcher\colon \mathcal{T} &\to \mathcal{T} \\ (P_{\star}, w) &\mapsto \bigcup_{p \in P_{\star}} \begin{aligned}[t] \Bigl[&\best_{b_{R}} \bigl((R(p), w_{R} \cdot \rank_{R(p)})\bigr) \cup {} \\ &\best_{b_{C}} \bigl((C(p), w_{C} \cdot \rank_{C(p)})\bigr) \cup {}\\ &\best_{b_{A}} \bigl((A(p), w_{A} \cdot \rank_{A(p)})\bigr)\Bigr] \end{aligned} \end{aligned}
\end{document}


Note \bigl or \Bigr in front of opening delimiters, \bigr or \Bigr for closing ones. I have some doubts about the double parentheses for the argument of best.

Note also how one can obtain uniform appearance of function names by using appropriate definitions in the preamble. Use better names than \functionnameX or \functionnameY so to give them some semantics that help in choosing one or the other.

• Thanks! I did not now about aligned, I only tried with align but got an error when nesting. The double parentheses are there because the argument of best is a tuple. – fabian789 Jun 5 '14 at 11:40
• @fabian789 oh no! see what you have done:-) chat.stackexchange.com/transcript/message/15921306#15921306 – David Carlisle Jun 5 '14 at 12:01
• haha I'm sorry! But the square brackets were just too juicy :) – fabian789 Jun 5 '14 at 12:32

Use \begin{array}[t] so it aligns on the top row and remove the \left( \right) if you don't want them, as in the second image. (If you wanted to put brackets around a top aligned array then the delarray package can help.)