\forall x\ &0 \neq S(x)\\
\forall x,y\ &S(x) = S(y) \implies x = y\\
\forall x\ &x + 0 = x\\
\forall x,y\ &x + S(y) = S(x + y)\\
\forall x\ &x \cdot 0 = 0\\
\forall x,y\ &x \cdot S(y) = x \cdot y + x
我想将上述公式对齐,如纯文本中显示的那样。
我怎样才能在 LaTeX 中做到这一点?
答案1
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{alignat*}{2}
& \forall x\ &&0 \neq S(x)\\
&\forall x,y\ &&S(x) = S(y) \implies x = y\\
&\forall x\ &&x + 0 = x\\
&\forall x,y\ &&x + S(y) = S(x + y)\\
&\forall x\ &&x \cdot 0 = 0\\
&\forall x,y\ &&x \cdot S(y) = x \cdot y + x
\end{alignat*}
\end{document}
答案2
\begin{math}
\begin{array}{ll}
\forall x\ &0 \neq S(x)\\
\forall x,y\ &S(x) = S(y) \implies x = y\\
\forall x\ &x + 0 = x\\
\forall x,y\ &x + S(y) = S(x + y)\\
\forall x\ &x \cdot 0 = 0\\
\forall x,y\ &x \cdot S(y) = x \cdot y + x
\end{array}
\end{math}