# Command \proof already defined. }

I am getting error command \proof already defined here is my thesis.tex file

\documentclass[oneside,mtp]{iiitg}
\let\mydegree\degree
\let\degree\relax
%
% The rest of the class options are the same as the regular book class.
% A few to remember:
%
%   oneside : Produces single sided print layout (recommended for theses less than 50 pages)
%   twoside : Produces single sided print layout (the default if you remove oneside)
%
% The BYUPhys class provides the following macros:
%
%   \makepreliminarypages : Makes the preliminary pages
%   \clearemptydoublepage : same as \cleardoublepage but doesn't put page numbers
%                           on blank intervening pages
%   \singlespace          : switch to single spaced lines
%   \doublespace          : switch to double spaced lines
%

% The graphicx package allows the inclusion of figures.  Plain LaTeX and
% pdfLaTeX handle graphics differently. The following code checks which one
% you are compiling with, and switches the graphicx package options accordingly.

\usepackage{makecell,tabularx} % for 'tabularx' env. and 'X' col. type
\usepackage{longtable}
%usepackage[shortlabels]{enumitem}
%usepackage{setspace}
\usepackage{emptypage}
\usepackage{changepage,ifthen}
%\textwidth 6.5in
%\textheight 10in
%\setlength{\parindent}{0pt}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{pdfpages}
\usepackage{epsfig}
%\usepackage{amsmath}
%\usepackage{geometry}
%\usepackage{setspace}
%\usepackage{arydshln}
\usepackage{amsmath,amssymb,verbatim,eufrak}

%\usepackage{natbib,stfloats}
\usepackage{mathrsfs}
%\usepackage{algorithm}
\usepackage{algorithm}
%\usepackage{algorithmic}

\usepackage{algpseudocode}
\usepackage{xltabular}
%\usepackage{fixltx2e}
%\usepackage{stfloats}

\usepackage{float}
%\usepackage[hyphens]{url}
%\urlstyle{rm}
%\usepackage{breakurl}
%\usepackage{hyperref}
%\def\UrlBreaks{\do\/\do-}
\usepackage{arydshln}
\algtext*{EndIf}

%\usepackage{babel}
%\usepackage{enumitem}
\usepackage{program}

\usepackage{comment}
\usepackage{amsfonts}
%\usepackage{amssymb}
%\usepackage[centertags]{amsmath}
\usepackage{epsfig}
\usepackage{epstopdf}
\usepackage{enumerate}
\usepackage{graphicx}
\usepackage{graphics}
\usepackage{subfig}
\usepackage{multirow}
\usepackage{rotating}
\usepackage{times}
\usepackage{lscape}
\usepackage[bottom]{footmisc}
\usepackage{booktabs}
\usepackage{colortbl}
\usepackage{threeparttable}
%\usepackage{algorithm}

\usepackage{algorithmicx}

%\usepackage[lined,algonl,algochapter,algoruled]{algorithm2e}
%\usepackage{algpseudocode}
\usepackage{amsthm}
\usepackage{epstopdf}
%\usepackage[cmex10]{amsmath}
%\usepackage{hyperref}
\usepackage{geometry}
\usepackage{gensymb}
%\usepackage{fixltx2e}

\newcommand {\g}[1]{\textcolor[gray]{0.6} {#1}}
\newcommand{\todo}[1]{\textcolor{red}{TODO: #1}\\}

% these are for the algorithms style file, for writing algorithms
\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Output:}}
%\renewcommand{\algorithmiccomment}[1]{\begin{small}/* #1 */\end{small}}
\renewcommand{\algorithmiccomment}[1]{/* #1 */}

% The fancyhdr package allows you to easily customize the page header.
% The settings below produce a nice, well separated header.
\usepackage{fancyhdr}
\fancyfoot{}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\chaptername \ \thechapter \ \ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection \ \ #1}}

% The caption package allows us to change the formatting of figure captions.
% The commands here change to the suggested caption format: single spaced and a bold tag
% Change the \DeclareCaptionFormat line below to make the captions fully bold
\usepackage{caption}
%\DeclareCaptionFormat{suggested}{\singlespace#1#2 #3\par\doublespace}
\DeclareCaptionFormat{suggested}{\singlespace \textbf{#1}\textbf{#2}#3 \doublespace}
\captionsetup{format=suggested}

%To instruct Latex to try to fit each paragraph into 1 less line
%\let\markeverypar\everypar
%\newtoks\everypar
%\everypar\markeverypar
%\markeverypar{\the\everypar\looseness=-1\relax}

%\newcommand{\captionfonts}{\small}

% The cite package cleans up the way citations are handled.  For example, it
% wants superscript citations, use the overcite package instead of the cite package.
\usepackage{cite}
%\usepackage[tone]{tipa}

% The makeidx package makes your index for you.  To make an index entry,
% go to the place in the book that should be referenced and type
%  \index{key}
% An index entry labeled "key" (or whatever you type) will then
% be included and point to the correct page.
\usepackage{makeidx}
\makeindex

\usepackage[hyphens]{url}
\urlstyle{rm}
% If you have a lot of equations, you might be interested in the amstex package.
% It defines a number of environments and macros that are helpful for mathematics.
% We don't do much math in this example, so we haven't used amstex here.w%
% To include a link in your pdf use \href{URL}{Text to be displayed}.  If your
% display text is the URL, you probably should use the \url{} command discussed
% above.
%
% To add a bookmark in the pdf you can use \pdfbookmark.  You can look up its usage
% in the hyperref package documentation
%\usepackage[hyphenbreaks]{breakurl}
% ---------------- Fill in these fields for the preliminary pages -------------------
%
% For Senior and honors this is the year and month that you submit the thesis

\newcommand{\bigsize}{\fontsize{14pt}{20pt}\selectfont}

\Year{1988}
\Month{Alp}
\mydegree{Master }
% If you have a long title, split it between two lines. The \TitleBottom field defines the second line
% A two line title should be an "inverted pyramid" with the top line longer than the bottom.
\TitleTop{{\bigsize \bf BBB}}
%\TitleBottom{{\bigsize \bf  MEMORY SYSTEMS }}
%\TitleBottomagain{{\bigsize \bf MEMORY SYSTEMS}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%% APPROVAL BY DSC %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%\Approval{
%\singlespace
%\hspace{6cm}
%%Date:\hspace{.8cm}$\backslash \ \ \ \ \ \ \backslash$ 20  \\  \\
%Date:\hspace{.8cm}$/ \ \ \ \ \ \ /$ 20  \\  \\
%Certified that the thesis entitled {\bf TITLE OF THE THESIS''} submitted by NAME OF THE AUTHOR to the somehwere, for the award of the degree of Master of Technology has been accepted by examiners and that the student has successfully defended the thesis in the viva-voce examination held today.
%
%\vspace{0.5in}
%
%%\noindent
%%Signature:~~~~~~~~~~\hfill Signature:~~~~~\hfill Signature:\hfill~
%
%%\noindent
%%Name:~~~~~~~~~~~~~~~\hfill Name:~~~~~~~~~~\hfill Name:~~~~~\hfill~
%
%\vspace{1in}
%\noindent
%(Member)~~~~~\hfill(Member)~~~~~\hfill(Member)
%
%\vspace{0.3in}
%%\hspace{2cm}
%%Signature:
%\vspace{1in}
%%\hspace{2cm}
%%Name:
%\noindent
%%\hspace{2cm}
%(Supervisor) %~~~~~\hfill(Supervisor 2)
%
%
%
%\vspace{0.3in}
%
%%\hspace{2cm}
%%Name:~~~~~~~~~~~~~~~~~~~~~~~\hfill Name:~~~~~\hfill ~~~~
%
%%\vspace{1in}
%%%\hspace{2cm}
%%\noindent
%%(External Examiner)\hspace{0.8in}(Chairman)
%}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%% CERTIFICATE BY SUPERVISOR %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\Certificate{
%\noindent%
{\em This is to certify that the thesis entitled {\bf BBB''}, submitted by {\bf koeradoera CCC} to the somehwere, for the award of the degree of Master of Technology, is a record of bona fide research work carried out by him under my supervision and guidance.
The thesis, in my opinion, is worthy of consideration for the award of the degree of Master of Technology in accordance with the regulations  of the Institute.  To the best of my/our knowledge, the results embodied in the thesis have not been submitted to any other university or institute for the award of any other degree or diploma}
% To the best of my knowledge, the results embodied in this thesis have not been submitted to any other University or Institute for the award of any other Degree or Diploma.}

\signaturebox{Dr. AAAAA BBB,\\ Assistant Professor,\\Department of Computer Science and Engineering\\somehwere}
%\hspace{10pt}
%\signaturebox{Name of the Supervisor 2,\\ Designation,\\Department of Computer Science and Engineering\\somehwere}

\datebox
%\vskip 0pt plus 2fill
%\noindent Accepted for the Department\hfill%
%\signaturebox{\@DepRep, \@DepRepTitle\\Department of Physics and
%Astronomy }{} \vfill \noindent Accepted for the College\hfill
%\signaturebox{\@Dean, \@DeanTitle \\
%College of Mathematics and Physical Sciences}

}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%% DECLARATION BY STUDENT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\Declaration{
\noindent
I certify that
\begin{enumerate}
\item[a.]   Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing
\item[b.]   Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing
\item[c.]   Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing
\item[d.]   Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing
\item[e.]   Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing
\item[f.]   Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing Some random thing
\end{enumerate}

\vspace{0.6in}

\hfill koeradoera CCC ~ ~ ~
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%% ACKNOWLEDGMENTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\Acknowledgments{
\input{texfiles/acknowledgments}
\medskip
\bigskip\medskip
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%% ABSTRACT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\Abstract{
\input{texfiles/abstract}
}

\fussy

\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}

\normalsize
\renewcommand{\baselinestretch}{1.0}
%\newfloatcommand{capbtabbox}{table}[][\FBwidth]
%\floatsetup[table]{capposition=top}
%\graphicspath{ {/home/arya/Desktop/synopsis_seminar/figures/} }
\graphicspath{ {./figures/} }

\begin{document}
% Start page counting in roman numerals
\frontmatter

% This command makes the formal preliminary pages.
% You can comment it out during the drafting process if you want to save paper.

\makepreliminarypages

\singlespace

\clearemptydoublepage
\thispagestyle{empty}

\hspace{-0.3cm}{\huge \textbf{List of Abbreviations}}\\
%  \end{center}
\input{texfiles/abrreviation}

\clearemptydoublepage
\thispagestyle{empty}

%\hspace{-0.4cm}{\huge \textbf{List of Symbols}}\\
%  \end{center}
%\input{texfiles/symbol}
%above three lines commented by koeradoera removing symbol table
\clearemptydoublepage
%\makepreliminarypages
\tableofcontents

\clearemptydoublepage

% Make the list of figures
\listoffigures
\clearemptydoublepage

% Make the list of tables
\listoftables
\clearemptydoublepage

%\phantomsection \addcontentsline{toc}{chapter}{List of Symbols and Abbreviation}
%\include{files/symb_b}
%\include{files/symb_b1}
%\clearemptydoublepage

\onehalfspace

% Start regular page counting at page 1
\mainmatter

\abovedisplayskip=13pt
\belowdisplayskip=13pt

\clearemptydoublepage
\input{texfiles/chapter1}
\clearemptydoublepage
\input{texfiles/chapter2}
\clearemptydoublepage
\input{texfiles/chapter3}
\clearemptydoublepage
\input{texfiles/chapter4}
\clearemptydoublepage
\input{texfiles/conclusion}
\clearemptydoublepage

%\bibliographystyle{abbrv}
%\clearemptydoublepage
%\singlespace
%\bibliography{biblio}

%\cite{*}
%\bibliographystyle{plain}
%\bibliographystyle{alpha}
\bibliographystyle{unsrt}
\clearemptydoublepage
\bibliography{biblio}

%\input{texfiles/flat}
%\clearemptydoublepage
%\input{texfiles/nest}
%\clearemptydoublepage
%\input{texfiles/intent}
%\clearemptydoublepage
%\input{texfiles/lm}
%\clearemptydoublepage
%\input{texfiles/conclusions}
%\clearemptydoublepage

%\appendix

%\bibliographystyle{abbrv}
%\clearemptydoublepage
%\singlespace
%\bibliography{thesis}

% \include{AppendixA}
% \clearemptydoublepage
% \include{AppendixB}
% \clearemptydoublepage

%\renewcommand{\baselinestretch}{1} \small \normalsize
\clearemptydoublepage

\input{texfiles/cv}
\end{document}

%%%%%%%%%%%%%%%%%%
\if 0

\begin{figure}[tb]
\centerline{
\includegraphics[width=0.5\textwidth]{./figures/}
}
\caption{{\bf }}
\label{fig:}
\end{figure}

\begin{figure*}[tb]
\centerline{
\subfloat[{\bf }]{\includegraphics[height=0.3\textwidth,width=3.5cm,angle=-90]{./figures/}}
\hfil
\subfloat[{\bf }]{\includegraphics[height=0.3\textwidth,width=3.5cm,angle=-90]{./figures/}}
\hfil
\subfloat[{\bf }]{\includegraphics[height=0.3\textwidth,width=3.5cm,angle=-90]{./figures/}}
}
\caption{{\bf }}
\label{fig:}
\end{figure*}

\fi
%%%%%%%%%%%%%%%%%%


I get following errors

line 441: Command \proof already defined. }
line 164: Option clash for package url. \urlstyle
line 184: Option clash for package hyperref.
line 386: File ended while scanning use of \next. \input{texfiles/chapter4}
: Emergency stop.
line 36: The eufrak package is redundant if the amsfonts package is used
line 126: \fancyhead's E' option without twoside option is useless
line 127: \fancyhead's E' option without twoside option is useless
: Not defining \perthousand.
: Not defining \micro.
: destination with the same identifier (name{bm:Title.0}) has been already used, duplicate ignored<to be read again> \relax l.332 \makepreliminarypages
: \headheight is too small (9.03374pt): Make it at least 13.59999pt.


If any one wants to see full code rest of the chapters etc then they can see here only latex part will be visible as I have added random content in all chapters.

• Do you have to use this template? It seems like it may cause you more problems than it's worth. If so, what's line 441 of this file? Also, start trimming this down to a minimal example that still causes the problem: comment out the last half (or whatever you think doesn't cause the problem). If the problem remains, iterate. If the problem goes away, comment out other stuff. Ideally, you should be able to get this down to 10-20 lines and still have that problem occur, at which point you'll be able to solve it yourself or someone here will be able to quickly spot the reason. – Teepeemm May 16 at 21:05
• yes unfortunately I have to use this template I dont have a choice there, had they asked me I would have written every thing on microsoft word, I use Tex Studio I don't know how to bring line numbers in it, actually I feel the problem is related with amsmath packages and algorithimic packages. – koeradoera May 16 at 21:08
• why do you load so many packages (several of them more than once) it does nothing useful and makes multiple definitions as in \proof almost inevitable. Do not load epsfig, or epstopdf don't load graphics, don;t load graphicx twice, .... – David Carlisle May 16 at 21:18
• Regarding line numbers in TeXstudio: tex.stackexchange.com/q/183801/134144 might be helpful. – leandriis May 17 at 8:29

A proper MWE that still reproduces the error message

Command \proof already defined.


would be the following. Please note that I switched from your documentclass to article. Since the error persists with this class as well, the error is not related to the iiitg.

\documentclass{article}
\usepackage{program}
\usepackage{amsthm}

\begin{document}
text
\end{document}


Looking at the above MWE, we can easily get rid of the error message itself, if we switch the load order of the two packages from

\usepackage{program}
\usepackage{amsthm}


to

\usepackage{amsthm}
\usepackage{program}


Apart from that, you definitely should take a look at your preable and declutter it. First of all, do not load packages more than once, especially not with different options. One example for this is the hyperref package. You load it in line 40 as follows:

\usepackage{hyperref}


and again in line 175 as follows:

\usepackage[bookmarksnumbered,pdfpagelabels=true,plainpages=false,colorlinks=true,linkcolor=black,citecolor=black,urlcolor=black]{hyperref}


This will cause the following error message:

Option clash for package hyperref.


You can get rid of that, if you remove line 40. Also keep in mind that hyperref should generally (with a few exceptions that are mentioned in the manuals of these packages) be the last package in your preamble.

More hints on what packages you should not load were already given to you in a previous comment by David Carlisle

Having had a closer look at the massive amount of packages that you load, (especially with regard to the original error message):

algorithm, algpseudocode and program which are all related to algorithms and pseudocodes. If you want a uniform representation of all the algorithms in your document, you might want to reevaluate if you really need all the three packages. Is there something that only program can do, and that you can't also achieve with alogrithm and algpeudocode? If not, there is no need for program.