使用引理的最佳方法是什么?

使用引理的最佳方法是什么?

所以,我通常采用问题证明格式来工作。

我是这么做的

\newenvironment{problem}{1}[Problem]
{\begin{trivlist} \item[\hskip \labelsep {\itshape #1.}]}{\end{trivlist}}

进而,

\begin{problem}{}
\end{problem}

I also have the exact same code with solution instead of problem. Sometimes I need a solution not a proof. 
And in the body I write,
\begin{proof}[Solution]{}
\end{proof}

并且它显示了解决方案。现在,我遇到了一个问题,需要在证明环境中编写引理。请帮我看看在序言和正文中该怎么做。

我希望输出看起来像:引理:语句

类似于当我在中间输入问题时发生的情况

\begin{problem}{}
\end{problem}

\begin{proof}{}
If $f(x)$ is the ordinary power series of the sequence $\{a_i\}_{i=0}^\infty$, then $f(x)/(1-x)$ is the ordinary power series of $\{\sum_{j=0}^ia_j\}_{i=0}^\infty$ i.e., the partial sums of the first sequence.
Let 
\begin{align}
f(x) &= \sum_{n\geq 0}a_nx^n \\
\intertext{Now, we multiply both sides with 1/(1-x)}\frac{1}{1-x}f(x) &= \\frac{1}{1-x}\sum_{n\geq 0}a_nx^n \notag \\
\intertext{Using it's expansion as an infinite geometric progression}\implies \frac{1}{1-x}f(x) &= \sum_{n\geq 0}1\cdot x^n\sum_{n\geq 0}a_nx^n \notag \\
&= \sum_{n\geq 0}\bigg(\sum_{i=0}^n b_i\cdot a_{n-i} \bigg)x^n &\text{where $\{b_i\}_0^\infty = 1$} \notag \\
&=\sum_{n\geq 0}\bigg(\sum_{i=0}^n a_n \bigg)x^n \notag \\
&=\sum_{n\geq 0}s_nx^n &\text{where $s_n = \sum_{i=0}^na_i$}
\end{align}
Now, if we find a generating function for the sequence $\{1/n\}_{n=1}^\infty$, we just have to divide it by $(1-x)$
\begin{align}
\intertext{Let}G(x) &= \sum_{n=1}^\infty \frac{x^n}{n} \notag\\
\intertext{We differentiate with respect to $x$ on both sides to get}\dfrac{dG(x)}{dx} &=\sum_{n=0}^\infty x = \implies G(x) &= -\log(1-x) = \log\Big(\frac{1}{1-x}\Big) \\
\intertext{Now,}\sum_{n=1}^\infty H_nx^n &= \frac{G(x)}{1-x} \notag\\
\implies \sum_{n\geq 1}H_nx^n &= \frac{1}{1-x}\log\Big(\frac{1}{1-x}\Big)
\end{align}
\end{proof}\frac{1}{1-x}\notag \\

现在,我希望直到第一次对齐之前的所有内容都符合引理,然后真正的证明才开始。

答案1

以下是一个全面的例子,展示了各种“类定理”环境。如果你排版这个,你会看到,虽然定理、公理、命题、引理和推论环境将其文本设置为斜体(这就是 所做的\theoremstyle{plain},等等),\theoremstyle{definition}但定义、示例、练习和问题环境将其文本设置为正常直立((这就是 所做的。注释等注释类环境使用斜体标题,而其他环境使用粗体标题(和编号)。

\documentclass{article}
\usepackage{amsthm}

\theoremstyle{plain}% default
\newtheorem{theorem}{Theorem}[section]
\newtheorem{axiom}[theorem]{Axiom}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{problem}[theorem]{Problem}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{note}[theorem]{Note}

\renewcommand{\qed}{\quad\hbox{\qedsymbol}}% run-in QED

\begin{document}

\section{Even and odd integers}

\begin{definition}
An integer $n$ is said to be \emph{even} when $n = 2 k$ for some integer $k$.
\end{definition}

\begin{example}
The integers $6$, $0$, and $-12$ are even, whereas $1$, $51$, and $-17$ are not.
\end{example}

\begin{problem}
Must an integer that is divisible by 4 be even?
\end{problem}

\begin{theorem}
If integer $n$ is divisible by 4, then $n$ is even.
\end{theorem}

\begin{proposition}
If integer $n$ is divisible by 4, then $n$ is even.
\end{proposition}

\begin{lemma}
If integer $n$ is divisible by 4, then $n$ is even.
\end{lemma}

\begin{proof}
Let $n$ be an integer that is divisible by 4. Then $n = 4 k$ for some integer     
$k$. But then also $n = 2(2k)$, and so $n$ is even.
\end{proof}

\begin{note}
The result above has the contrapositive that if integer $n$ is odd, then $n$ 
cannot be divisible by 4.
\end{note}

\end{document}

答案2

这会达到你想要的效果吗?(您也可以类似地创建问题环境。)

\documentclass{article}
\usepackage{amsthm}

\theoremstyle{plain}% default
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}

\renewcommand{\qed}{\quad\hbox{\qedsymbol}}% run-in QED

\begin{document}

\begin{lemma}
If integer $n$ is divisible by 4, then $n$ is even.
\end{lemma}

\begin{proof}
Let $n$ be an integer that is divisible by 4. Then $n = 4 k$ for some integer     
$k$. But then also $n = 2(2k)$, and so $n$ is even.
\end{proof}

\end{document}

相关内容