我正在尝试编写连续证明,其中公式居中对齐,方程编号左对齐,注释右对齐。下面是我想要的示例:
但从我在 StackExchange 上看到的情况来看,对齐行上的标签会替换该行的编号,并共享相同的对齐设置。以下是我遇到的问题的一个示例。
\documentclass[leqno]{article}
\usepackage{amsmath}
\usepackage{amsthm}
\begin{document}
\begin{align}
Rab
&\implies Rab \tag{R0}
\\ &\implies Rab,\neg Rab \tag{R2a}
\\ &\implies Rab, \exists y \neg Ray
\\ \neg \exists y \neg Ray
&\implies Rab
\\ \forall y Ray
&\implies Rab
\\ \exists x \forall y Rxy
&\implies Rab
\\ \exists x \forall y Rxy
&\implies \exists x Rxb
\\ \exists x \forall y Rxy, \neg \exists x Rxb
&\implies
\\ \exists x \forall y Rxy, \exists y \neg \exists x Rxy
&\implies
\\ \exists x \forall y Rxy
&\implies \neg \exists y \neg \exists x Rxy
\\ \exists x \forall y Rxy
&\implies \forall y \exists x Rxy \qedhere
\end{align}
\end{document}
相应输出的图像:
答案1
只修改了前三行,但其余的应该很容易。唉,需要更多的 & 符号。
\documentclass[leqno]{article}
\usepackage{amsmath}
\usepackage{amsthm}
\begin{document}
\begin{align}
Rab
&\implies Rab &\text{(RO)}&
\\ &\implies Rab,\neg Rab & \text{(R2aa)}&
\\ &\implies Rab, \exists y \neg Ray & \text{(and so on)}&
\\ \neg \exists y \neg Ray
&\implies Rab
\\ \forall y Ray
&\implies Rab
\\ \exists x \forall y Rxy
&\implies Rab
\\ \exists x \forall y Rxy
&\implies \exists x Rxb
\\ \exists x \forall y Rxy, \neg \exists x Rxb
&\implies
\\ \exists x \forall y Rxy, \exists y \neg \exists x Rxy
&\implies
\\ \exists x \forall y Rxy
&\implies \neg \exists y \neg \exists x Rxy
\\ \exists x \forall y Rxy
&\implies \forall y \exists x Rxy \qedhere
\end{align}
\end{document}
答案2
您可以通过以下环境轻松实现这一点flalign
:
\documentclass[leqno]{article}
\usepackage{amsmath}
\usepackage{amsthm}
\begin{document}
\begin{flalign}
& & Rab &\implies Rab & \text{(R0)}
\\ & & &\implies Rab,\neg Rab & \text{(R2a)}
\\ & & &\implies Rab, \exists y \neg Ray
\\ & & \neg \exists y \neg Ray &\implies Rab
\\& & \forall y Ray &\implies Rab
\\& & \exists x \forall y Rxy &\implies Rab
\\ & & \exists x \forall y Rxy &\implies \exists x Rxb
\\& & \exists x \forall y Rxy, \neg \exists x Rxb &\implies
\\ & & \exists x \forall y Rxy, \exists y \neg \exists x Rxy &\implies
\\ & & \exists x \forall y Rxy &\implies \neg \exists y \neg \exists x Rxy
\\ & & \exists x \forall y Rxy &\implies \forall y \exists x Rxy \qedhere
\end{flalign}
\end{document}