如何按层次对子定理进行编号?

如何按层次对子定理进行编号?

问题概述:我想对嵌入在其他定理的证明中的定理进行编号,并用数字来表明两个定理之间的父子关系。

问题详细:当将定理等嵌入其他定理的证明中时,嵌入的项目使用与父定理相同的计数器进行编号。例如,如果父定理是“定理 3”,则嵌入定理 3 的证明中的定理将被称为“定理 4”。我希望嵌入的定理等按层次编号,以便继续这个例子,嵌入的定理将被称为“定理 3.1”。

示例(期望输出)

定理 1:如果 x=2,则 x^3=8。

证明:设 x=2。

声明 1.1:对于所有 x 和所有自然数 n,x^n = x*x*...*x(n 次)。

证明:通过归纳法。QED

(定理 1 的证明继续)根据断言 1.1,x^3 = 2*2*2 = 8。QED

其他要求:最好将文档类别定为“amsart”。

使用的软件:Windows 7 上的 LyX + MiKTeX + BibTeX

我的 LaTeX 熟练程度: 初学者+

答案1

更新版本 2。

\documentclass{scrartcl}   
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 

\newtheorem{theorem}{Theorem}[section]
\newtheorem{subtheorem}{Sub-Theorem}[theorem]

 \newenvironment{proof}[1][Proof]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}


\newcommand{\qed}{\nobreak \ifvmode \relax \else
      \ifdim\lastskip<1.5em \hskip-\lastskip
      \hskip1.5em plus0em minus0.5em \fi \nobreak
      \vrule height0.75em width0.5em depth0.25em\fi}

\begin{document}
\section{Introduction}

\begin{theorem} 
  \label{main}
 If $x=2$, $x^3=8$. 
\end{theorem}   

\begin{proof} 

   Let $x=2.$     
  \begin{subtheorem}   
    \label{sub}   
      For all $x$ and all natural numbers $n$, $x^n = x*x*...*x$ (n times).
  \end{subtheorem}


\begin{proof} 
  By induction. \qed
\end{proof} 

(Theorem \ref{main}'s proof continued) by Claim \ref{sub}, $x^3 = 2*2*2 = 8$  .\qed

\end{proof}       
\end{document} 

enter image description here

使用 amsart 现在我认为(不确定)您的问题来自 Lyx。我认为您尝试使用菜单中给出的标签,但我无法给您正确的答案,因为我不知道 Lyx。也许可以修改菜单、标签等。但我不知道! :(

\documentclass{amsart}   
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 

\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}{Lemma}[section]
\newtheorem{cor}{Corollary}[section]
\newtheorem{prop}{Proposition}[section]
\newtheorem{crit}{Criterion}[section]
\newtheorem{alg}{Algorithm}[section]
\theoremstyle{definition}
\newtheorem{defn}{Definition}[section]
\newtheorem{claim}{Claim}[thm] 
\newtheorem{other}{Other}[defn] 


\begin{document}
\section{Introduction}

\begin{defn} 
a new definition that uses this definition 
\end{defn}  

\begin{thm} 
  \label{main}
 If $x=2$, $x^3=8$. 
\end{thm}   

\begin{proof} 

   Let $x=2.$     
  \begin{claim}   
    \label{sub}   
      For all $x$ and all natural numbers $n$, $x^n = x*x*...*x$ (n times).
  \end{claim}


\begin{proof} 
  By induction. 
\end{proof} 

(Theorem \ref{main}'s proof continued) by Claim \ref{sub}, $x^3 = 2*2*2 = 8$.

\end{proof}  

\begin{defn} 
a new definition that uses this definition 
 \begin{other}
     other definition
 \end{other}

\end{defn}        
\end{document} 

enter image description here

相关内容