假设一个定理的证明包含一个主张及其证明,主张的证明完成了定理的证明。也就是说,在主张的证明结束后,定理的证明中不需要进一步的文字。例如:
\documentclass{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\newtheorem{claim}{Claim}
\begin{document}
\begin{theorem}
Today is Thursday.
\begin{proof}
We know that the day after Wednesday is always Thursday.
Thus the theorem follows from the following claim:
\begin{claim}
Yesterday was Wednesday.
\begin{proof}
My computer said so.
\end{proof}
\end{claim}
\end{proof}
\end{theorem}
\end{document}
默认情况下,第二个 QED 符号位于第一个符号下方一行,即使该行上没有文本。将两个 QED 符号放在同一行并排放置似乎更自然,以表明两个(嵌套)证明都在该点结束。我们如何实现这一点?我尝试插入命令,\qedhere
但似乎没有帮助。
答案1
加倍\qedsymbol
。
在序言中,
\let\oldqedbox\qedsymbol
\newcommand{\twoqedbox}{\oldqedbox\oldqedbox}
然后,在第一个之前\end{proof}
插入
\renewcommand{\qedsymbol}{\twoqedbox}
在第二个之前\end{proof}
插入
\renewcommand{\qedsymbol}{}
“更新”\qedsymbol
不会持续下去。
amsthm
不是为处理嵌套证明而设计的;它们非常罕见。
答案2
你可以伪造证明环境。
\begin{theorem}
Today is Thursday.
\end{theorem} % moved to here
\begin{proof}
We know that the day after Wednesday is always Thursday.
Thus the theorem follows from the following claim:
\begin{claim}
Yesterday was Wednesday.
\end{claim}
\noindent\textit{\proofname.} My computer said so.\qedhere\qedsymbol
\end{proof}