我需要使用 LaTeX 编写一些数学归纳法。是否有可用于此目的的软件包?
答案1
我认为这是 的工作alignat
。关于代码的一些评论:
包裹
enumitem
提供了label
我用来修改内部itemize
环境标签的密钥。我手动添加了一些空格(
\medskip
代码中的 v.),以便输出类似于扫描副本。\documentclass{amsart} % http://www.ctan.org/pkg/amsart \usepackage{enumitem} % http://www.ctan.org/pkg/enumitem \begin{document} \begin{itemize} \item \emph{Induction Principle}: The formula $\phi$ may be derived by proving the formula \medskip \begin{itemize}[label=$\lozenge$, itemsep=2ex] \item \emph{Base Case}: \[\texttt{(implies (and (not }q_1 \texttt{)} \dots \texttt{(not }q_k\texttt{)) }\phi\texttt{)}\] \item \emph{Induction Step(s)}: For each $1 \leq i \leq n$, \begin{alignat*}{5} \texttt{(implies} &\quad&&\texttt{(and} &\quad& &&q_i \\ && & && &&\phi/\sigma_{i,1}\\ && & && &&\dots\\ && & && &&\phi/\sigma_{i,k_i}\texttt{)} \\ && &\phi\texttt{)} \end{alignat*} provided that for terms $m, q_1, \dots, q_k$, and substitutions $\sigma_{i,j}$ ($1 \leq i \leq h_i$), the following measure conjectures are theorems. \item \texttt{(EO-ORDINALP} $m$\texttt{)} \item For each $1 \leq i \leq k$ and for $1 \leq j \leq h_i$, \[\texttt{(IMPLIES } q_i \texttt{ (EO-ORD-< } m/\sigma_{i,j} \quad m \texttt{))}\] \end{itemize} \end{itemize} \end{document}
谢谢埃格尔他好心地送给我这些东西,并同意不偷我的绿色勾号,我至少学到了两种不同的方法来做到这一点:
代码片段
\[ % works without \[ and \] as well.
\begin{minipage}{\linewidth}
\begin{tabbing}
\texttt{(implies}\quad\= \texttt{(and}\quad\= $q_i$ \\
\> \> $\phi/\sigma_{i,1}$\\
\> \> \dots\\
\> \> $\phi/\sigma_{i,k_i}$\texttt{)} \\
\> $\phi$\texttt{)}
\end{tabbing}
\end{minipage}
\]
\[ % works without \[ and \] as well.
\begin{minipage}{\linewidth}\ttfamily
\begin{tabbing}
(implies\quad\= (and\quad\= $q_i$ \\
\> \> $\phi/\sigma_{i,1}$\\
\> \> \dots\\
\> \> $\phi/\sigma_{i,k_i}$) \\
\> $\phi$)
\end{tabbing}
\end{minipage}
\]
请注意,我添加了评论:
% works without \[ and \] as well.
为了突出这一点,因此您可以将其与左对齐,就像在扫描中通过删除一样\[...\]
。
答案2
我所做的只是使用description
带有Base:
和Induction:
标签的环境。