# Theorem/Definition/… with individual numbering

I would like to give the theorem/lemma/definition/... environment an individual number. For example:

1 Section

Theorem 20.1. (XXX) ...
Definiton 21.2.1.: ...

Here is the "20.1." and "21.2.1" individual numbers that I would add/pass to the theorem/definition environment. The goal is an independent numbering from the previous theorem, lemma, etc. How can I implement this?

• Please be a bit more specific. What is 20 and 1 in this case and similar for 21, 2 and 1. – daleif Jan 22 '20 at 9:44
• So you would like to number the theorems manually each time a theorem environment is called? – Vincent Jan 22 '20 at 15:26
• Yes, that is right. – Marc Jan 22 '20 at 15:28
• What's the reason for manual numbering? – egreg Jan 22 '20 at 15:52
• I am studying mathematics and I copy the theorems, definitions, etc. from the math script; quasi as a collection. The numbering is continued by remarks and examples, but they do not interest me. In order to be able to refer to what is written in the script, I would like to insert the original numbering. Thanks! – Marc Jan 22 '20 at 17:22

You can define two generic environments and assign manually the numbers.

\documentclass{article}
\usepackage{amsthm}

\newtheorem*{innerthm}{\innerthmname}
\newcommand{\innerthmname}{}% initialize
\newenvironment{statement}[1]
{\renewcommand{\innerthmname}{#1}\innerthm}
{\endinnerthm}
\theoremstyle{definition}
\newtheorem*{innerdfn}{\innerthmname}
\newenvironment{upstatement}[1]
{\renewcommand{\innerthmname}{#1}\innerdfn}
{\endinnerdfn}

\begin{document}

\begin{statement}{Theorem 20.1}[XXX]
Some text.
\end{statement}

\begin{statement}{Lemma 15.2}
Some text.
\end{statement}

\begin{upstatement}{Definition 20.1.2}
Some text.
\end{upstatement}

\end{document}