LaTeX에서 수식 정렬

LaTeX에서 수식 정렬
\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}

관련 정보