How to number subtheorems hierarchically?

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+

Update version 2.

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

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

\newenvironment{proof}[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} 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} • Thanks, Altermundus. This is not quite what i was looking for. To clarify my intention, i've added to my original post an example as well as a an "additional requirements" section. – Itai Jan 1 '12 at 11:51
• It's always better to add a short example – Alain Matthes Jan 1 '12 at 12:00
• @Itai This is a possibility but you can modify a lot of things. Perhaps a package can do this automatically. – Alain Matthes Jan 1 '12 at 12:24
• Thanks again, Altermundus. Now your output is almost exactly what i'm looking for. The trouble is, i use the amsart (AMS Article) document class and i see no "Sub-Theorem" tag available on the menu for this document class. Using the "Theorem" tag where you used "Sub-Theorem" numbers the nested theorem as Theorem 2. But, further, what if i wish to use not a nested theorem but a nested definition, claim, etc.? – Itai Jan 1 '12 at 12:30
• @Itai: Since you're using the amsart document class, you can just take @Altermundus's solution and comment out the (re)definitions of the proof and qed environments. In addition, you needn't provide a \qed command explicitly at the end of a proof as such a command is generated automatically at the end of the amsart's own proof environment. – Mico Jan 1 '12 at 17:16