[Tex/LaTex] How to number subtheorems hierarchically

amsartlyxnumberingtheorems

Problem in a nutshell: I'd like to number theorems that are embedded within other theorems' proofs with numbers that indicate the parent-child relationship between the two theorems.

Problem in detail: When embedding theorems etc. inside other theorems' proofs, the embedded items are numbered using the same counter as the parent theorem. For instance, if the parent theorem is "Theorem 3", a theorem embedded in Theorem 3's proof will be dubbed "Theorem 4". I'd like the embedded theorems etc. to be numbered hierarchically, so that, to continue the example, the embedded theorem will be dubbed "Theorem 3.1".

Example (Desired Output):

Theorem 1: If x=2, x^3=8.

Proof: Let x=2.

Claim 1.1: For all x and all natural numbers n, x^n = x*x*…*x (n times).

Proof: By induction. QED

(Theorem 1's proof continued) By Claim 1.1, x^3 = 2*2*2 = 8. QED

Additional requirements: Preferably the document class should be "amsart".

Software used: LyX + MiKTeX + BibTeX on Windows 7

My level of LaTeX proficiency: Beginner+

Best Answer

Update version 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

With amsart Now I think (not sure) that your problem comes from Lyx. I think you try to use tag given in the menu but I can't give you a correct answer because I don't know Lyx.Perhaps it's possible to modify the menus, the tags etc. but I don't know ! :(

\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

Related Question