[Tex/LaTex] customization of theorem, lemma, definition, … in ieeeconf

amsthmieeeconftheorems

I am working with following ieeeconf-based template:

\documentclass[letterpaper, 10 pt, conference]{ieeeconf}  % Comment this line out if you need a4paper

\IEEEoverridecommandlockouts                              % This command is only needed if 
                                                          % you want to use the \thanks command
\overrideIEEEmargins                                      % Needed to meet printer requirements.

\usepackage{graphics} % for pdf, bitmapped graphics files
\usepackage{epsfig} % for postscript graphics files
\usepackage{mathptmx} % assumes new font selection scheme installed
\usepackage{times} % assumes new font selection scheme installed
\usepackage{amsmath} % assumes amsmath package installed
\usepackage{amssymb}  % assumes amsmath package installed

\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{cor}{Corollary}
\newtheorem{defn}{Definition}[section]
\newtheorem{conj}{Conjecture}[section]
\newtheorem{exmp}{Example}[section]
\newtheorem{rem}{Remark}

\title{\LARGE \bf
My Title*
}

\author{Guy$^{1}$
\thanks{*This work was not supported by any organization}% <-this % stops a space
\thanks{$^{1}$Guy is with Hell,
        {\tt\small guy@hell.edu}}%
}

\begin{document}

\maketitle
\thispagestyle{empty}
\pagestyle{empty}

\begin{abstract}

ABSTRACT

\end{abstract}

\section{INTRODUCTION}


\begin{thm}
My theorem is blaw.
\proof Here is the proof.
\end{thm}

\begin{lem}
My lemma is blaw.
\proof Here is the proof.
\end{lem}

\begin{defn}
Look at my definition.
\end{defn}

\begin{thebibliography}{99}

\bibitem{c1} G. O. Young, ÒSynthetic structure of industrial plastics (Book style with paper title and editor),Ó    in Plastics, 2nd ed. vol. 3, J. Peters, Ed.  New York: McGraw-Hill, 1964, pp. 15Ð64.


\end{thebibliography}

\end{document}

As you can compile the MWE, I don't like the formation and style of my logic environments, and I'd like to change them to be shown something like below:

enter image description here

enter image description here

(All environments needs to be bold, with numerals to address them. Lemma and theorem must be ended with a black square and so on.)

But as I try to customize the style with \newtheoremstyle{plain} and using amsthm package, an error will be raised as following:

! LaTeX Error: Command \proof already defined.

Update 1: Adding \let\proof\relax did not lead to error-free compilation.

Update 2: @egreg's answer does still throw the error on my machine, as following:

enter image description here

Update 3: Here is my IEEEconf version from log file: Document Class: ieeeconf 2016/4/23 revision V1.6b by Pradeep Misra

Best Answer

  1. The class name is IEEEconf with the first part capitalized. Calling it ieeeconf works on Windows, but not on other systems

  2. The epsf package should not be used in new documents. If the people at the conference tell you to, they are lagging twenty years behind.

  3. Don't use \bf in any document. Formatting instructions like \LARGE in the argument to \title will just annoy the copy editors.

  4. Loading times after mathptmx is redundant (and maybe even dangerous).

  5. \IEEEoverridecommandlockouts and \overrideIEEEmargins aren't defined in the current version of IEEEconf.

  6. Loading amsthm in an IEEEconf class is perfectly fine.

The main problem is how you are calling proof: it should not be

\begin{thm}
My theorem is blaw.
\proof Here is the proof.
\end{thm}

but

\begin{thm}
My theorem is blaw.
\end{thm}
\begin{proof}
Here is the proof.
\end{proof}

Here's an example, massaged to be compilable.

\documentclass[letterpaper, 10pt, conference]{IEEEconf}

\usepackage{graphicx}
\usepackage{mathptmx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}

\renewcommand{\qedsymbol}{$\blacksquare$}

\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{cor}{Corollary}
\newtheorem{conj}{Conjecture}[section]
\theoremstyle{definition}
\newtheorem{defn}{Definition}[section]
\newtheorem{exmp}{Example}[section]
\newtheorem{rem}{Remark}

\title{My Title*}

\author{Guy$^{1}$
\thanks{*This work was not supported by any organization}% <-this % stops a space
\thanks{$^{1}$Guy is with Hell, {\tt\small guy@hell.edu}}%
}

\begin{document}

\maketitle
\thispagestyle{empty}
\pagestyle{empty}

\begin{abstract}

ABSTRACT

\end{abstract}

\section{INTRODUCTION}


\begin{thm}
My theorem is blaw.
\end{thm}
\begin{proof}
Here is the proof.
\end{proof}

\begin{lem}
My lemma is blaw.
\end{lem}
\begin{proof}
Here is the proof.
\end{proof}

\begin{defn}
Look at my definition.
\end{defn}

\begin{thebibliography}{99}

\bibitem{c1} G. O. Young, ÒSynthetic structure of industrial plastics (Book style with paper title and editor),Ó    in Plastics, 2nd ed. vol. 3, J. Peters, Ed.  New York: McGraw-Hill, 1964, pp. 15Ð64.


\end{thebibliography}

\end{document}

enter image description here