Multiple alignment
Multiple alignment points with no gap between expressions is obtained using the alignat
environment from amsmath
. The following MWE illustrates that:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{alignat*}{3}
&[x \mapsto s]x &&= s && \\
&[x \mapsto s]y &&= y \qquad &&\text{als } y\neq x \\
&[x \mapsto s](\lambda(y)t_1) &&= \lambda(y)[x \mapsto s]t_1 \qquad &&\text{als } y \neq x \text{ en } y \not \in FV(s) \\
&[x \mapsto s](t_1 \; t_2)&&= ([x \mapsto s]t_1)\;([x \mapsto s]t_2) &&
\end{alignat*}
\end{document}
I've taken the liberty to convert the unknown \la{<arg>}
macro to \lambda(<arg>)
.
Consider reading Herbert's mathmode
document. It illustrates the various "alignment environments" of amsmath
clearly. Specifically, see section 25 align
environments, p 43 onward.
using just align
would be done like this:
\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{align*}
[x \mapsto s]x &= s \\
[x \mapsto s]y &= y &&\text{als } y\neq x \\
[x \mapsto s](\lambda(y)t_1) &= \lambda(y)[x \mapsto s]t_1 &&\text{als } y \neq x \text{ en } y \not \in FV(s) \\
[x \mapsto s](t_1 \; t_2) &= (x \mapsto s]t_1)\;([x \mapsto s]t_2)
\end{align*}
\end{document}
this gives the following result: