# Proof without numbering

I am trying to remove the number from proof, but I could not. When I used amsthm package I got several errors. How to remove numbering of proofs without using amsthm package?

\documentclass[11pt]{article}
\usepackage{mathtools}
\mathtoolsset{showonlyrefs}
\usepackage{amsfonts,amssymb,amsmath,microtype}
\usepackage{enumitem}
\usepackage{graphicx}
\graphicspath{ {./images/} }
\usepackage{algorithmicx}
\usepackage{algorithm}
\usepackage{algpseudocode}
%\usepackage{mymacro}
\usepackage[usenames,dvipsnames]{color}
\usepackage{epsfig}
\newtheorem{definition}{Definition}
\newtheorem{thm}{Theorem}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{Corollary}[thm]{Corollary}
\newtheorem{pro}[thm]{Proof}
\newtheorem{example}{Example}[section]
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\begin{document}
\begin{thm}
A
\end{thm}

\begin{pro}
B
\end{pro}

\end{document}

• Welcome to TeX SX! You can use the ntheorem package, which defines an unnumbered theorem style. But probably you should post a minimal (yet complete) code reproducing your problem. Jul 28, 2021 at 21:14
• How to use ntheorem package?
– memo
Jul 28, 2021 at 21:22
• With \usepackage in the preamble. However, I'm very surprised that amsthm numbers proofs. There must be something in your preamble that induces this behaviour. Jul 28, 2021 at 21:25
• Amsthm comes with a proof env, in ntheorem you have to make the proof environment yourself using a suitable theorem style. Both packages have manuals you can consult. Jul 28, 2021 at 21:35
• Perhaps I'm blind, but the code doesn't show any \usepackage{amsthm}, so the question doesn't make any sense. As already noted, the amsthm environment proof doesn't number anything. This question should thus be a candidate for deletion. Jul 28, 2021 at 22:10

\documentclass[11pt]{article}
\usepackage{amsthm}                              % <---- added this line
\usepackage{mathtools}
\mathtoolsset{showonlyrefs}
\usepackage{amsfonts,amssymb,amsmath,microtype}
\usepackage{enumitem}
\usepackage{graphicx}
\graphicspath{ {./images/} }
\usepackage{algorithmicx}
\usepackage{algorithm}
\usepackage{algpseudocode}
%\usepackage{mymacro}
\usepackage[usenames,dvipsnames]{color}
\usepackage{epsfig}
\newtheorem{definition}{Definition}
\newtheorem{thm}{Theorem}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{Corollary}[thm]{Corollary}
%\newtheorem{pro}[thm]{Proof}                    % <--- commented out this line
\newenvironment{pro}{\begin{proof}}{\end{proof}} % <-- added this line
\newtheorem{example}{Example}[section]
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\begin{document}
\begin{thm}
A
\end{thm}

\begin{pro}
B
\end{pro}

\end{document}