# beamer: Different numbering for Theorems, Examples, Definition, and Lemma

I want to have different numbering for Theorems, Examples, Definition, and Lemma. I use the following code in preamble

\setbeamertemplate{theorem}[ams style]
\setbeamertemplate{theorems}[numbered]


This code works fine but it has continuing numbering for Theorems and other Environments. I'd appreciate your help if you guide me how to get different numbering for Theorems, Examples, Definition, and Lemma in beamer.

-
BTW, numbering anything in a presentation is most probably a very bad idea. Unless the presentation is for the speaker (to put one more item in the cv, for example) and not for the audience, of course (as is often the case). –  mbork Nov 12 '12 at 22:19

Load beamer with the notheorems option and declare all theorem types "by hand" without introducing a common numbering scheme. (Note: This is somewhat a hack, as it breaks the countsect package option [theorem numbering by section] for every type but theorem.)

\documentclass[notheorems]{beamer}

\setbeamertemplate{theorem}[ams style]
\setbeamertemplate{theorems}[numbered]

\makeatletter
\ifbeamer@countsect
\newtheorem{theorem}{\translate{Theorem}}[section]
\else
\newtheorem{theorem}{\translate{Theorem}}
\fi
\newtheorem{corollary}{\translate{Corollary}}
\newtheorem{fact}{\translate{Fact}}
\newtheorem{lemma}{\translate{Lemma}}
\newtheorem{problem}{\translate{Problem}}
\newtheorem{solution}{\translate{Solution}}

\theoremstyle{definition}
\newtheorem{definition}{\translate{Definition}}
\newtheorem{definitions}{\translate{Definitions}}

\theoremstyle{example}
\newtheorem{example}{\translate{Example}}
\newtheorem{examples}{\translate{Examples}}

% Compatibility
\newtheorem{Beispiel}{Beispiel}
\newtheorem{Beispiele}{Beispiele}
\theoremstyle{plain}
\newtheorem{Loesung}{L\"osung}
\newtheorem{Satz}{Satz}
\newtheorem{Folgerung}{Folgerung}
\newtheorem{Fakt}{Fakt}
\newenvironment{Beweis}{\begin{proof}[Beweis.]}{\end{proof}}
\newenvironment{Lemma}{\begin{lemma}}{\end{lemma}}
\newenvironment{Proof}{\begin{proof}}{\end{proof}}
\newenvironment{Theorem}{\begin{theorem}}{\end{theorem}}
\newenvironment{Problem}{\begin{problem}}{\end{problem}}
\newenvironment{Corollary}{\begin{corollary}}{\end{corollary}}
\newenvironment{Example}{\begin{example}}{\end{example}}
\newenvironment{Examples}{\begin{examples}}{\end{examples}}
\newenvironment{Definition}{\begin{definition}}{\end{definition}}
\makeatother

\begin{document}

\begin{frame}

\begin{theorem}[A theorem]
Some text.
\end{theorem}

\begin{definition}[A definition]
Some text.
\end{definition}

\end{frame}

\end{document}


-
Thanks @lockstep for your nice answer. Much appreciated your time and effort. –  MYaseen208 Nov 13 '12 at 13:51