Without an image of exactly how you want this typeset it is difficult to know for sure, but perhaps one of these is what you are looking for:
or perhaps:
\documentclass{book}
\usepackage{amsmath}
\newcommand{\fib}{\mathrm{fib}}
\begin{document}
\begin{align*}
&\text{if } x < 2 & \fib X &= 1 \\
&\text{otherwise } & \fib X &= (\fib (X - 1)) + (\fib (X - 2))
\end{align*}
Another option is:
\begin{align*}
\fib X = \begin{cases}
\text{if } x < 2 & = 1 \\
\text{otherwise } & = (\fib (X - 1)) + (\fib (X - 2))
\end{cases}
\end{align*}
\end{document}
Here is how you can modify the given MWE to obtain better spacing:
Notes:
Code:
\documentclass{article}
\usepackage{amsmath}
\newcommand{\prodtime}{\operatorname{prodtime}}
\begin{document}
\[
\begin{array}{l l @{}l}
\prodtime V & X = Y &{}= 0 \\
\prodtime V & X = f(\ldots) &{}= 0 \\
\prodtime V & p(X_1,\,\ldots,\,X_n) &{}= \prodtime V\,(\operatorname{body} p) \\
\prodtime V & V = \,f(X_1,\,\ldots,\,X_n) &{}= \prodtime V\,(\operatorname{body} f) \\
\prodtime V & X_0(X_1,\,\ldots,\,X_n) &{}= \mathit{time\_of\_call} \\
\prodtime V & m(X_1,\,\ldots,\,X_n) &{}= \mathit{time\_of\_call} \\
\prodtime V & \mathit{foreign}(\ldots) &{}= 0 \\
\prodtime V & G_\mathrm{head},\,G_\mathrm{tail}
\end{array}
\]
\end{document}
You don't need \left
and \right
; your input has several mistakes, by the way: for instance \split{equation}
means nothing (and it will produce errors). Also “mean” should be treated as an operator. I don't think the parentheses ()
around the set are useful.
With split
you can choose the alignment point; here's a possibility:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\begin{split}
X_{t} = \operatorname{mean}(\{\,
&\lvert Y_{t-4} - Z_{t-4}\rvert,\dots,\\
&\lvert Y_{t+4} - Z_{t+4}\rvert\,\})
\end{split}
\end{equation}
\end{document}
Best Answer
I'd argue that not only the middle vertical bar but also the outer parentheses are unnecessarily large. Try using
\bigl(
,\bigm|
, and\bigr)
to control the size of the symbols. As an extra nice touch, you could add a thinspace on either side of the big parentheses.