I need to write the next formula in LaTeX, but I can’t put it in multiple lines and with the right indentation for the subsequent lines, this is my code.
\begin{displaymath}
\pi_D^B(r) = \{z^{(|D|+1)}|\exists x \in r(z[D]=x[D])\wedge \\
\forall y \in r (y[D]=z[D]\Rightarrow y[T]\subseteq z[T])\wedge \\
\forall y \in z[T \exists y \in r (y[D]=z[D]\wedge t \in y[T])\}
\end{displaymath}
Since displaymath is not numbered perhaps you prefer the align* environment instead of align. Note, usually the & symbol is used before a relation symbol for the alignment.
For more information look at one of the documents listed here: Mathematics with LaTeX.
Stefan