I was typing my thesis in ubuntu in gedit and compiling in the terminal and it worked fine but now due to some reasons I installed windows 7 in my PC but the same code is not working in texmaker. When I compile my code I see these errors.
Error-1- line 11- command \proof already defined.
Error-2 line22- \qed already defined.
Here is my (sample) code-
\documentclass{article}
\usepackage{graphicx}
\usepackage{amsmath,amsfonts,amssymb,amsthm,epsfig,epstopdf,titling,url,array}
\usepackage[a4paper, total={5in, 10in}]{geometry}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newenvironment{proof}[1][Proof]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{definition}[1][Definition]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{example}[1][Example]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{remark}[1][Remark]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newcommand{\qed}{\nobreak \ifvmode \relax \else
\ifdim\lastskip<1.5em \hskip-\lastskip
\hskip1.5em plus0em minus0.5em \fi \nobreak
\vrule height0.75em width0.5em depth0.25em\fi}
\begin{document}
\title{An Introduction to Differential Algebra-(Notes)}
\author{Jagdeep Singh}
\maketitle
\section{GENERALITIES CONCERNING DIFFERENTIAL RINGS}
\subsection{Derivations}
\begin{definition} - A derivation of a ring A is an additive mapping $ a \mathbb{\to} a'$ of A into itself satisfying
$$ (ab)' = a'b + ab' $$
\end{definition}
\end{document}

\newenvironment{proof}to\renewenvironment{proof}and\newcommand{\qed}to\renewcommand{\qed}. Since both already exist, latex simply does not overwrite the existing definitions without a warning. – HATEthePLOT Mar 10 '16 at 18:25proofand\qedhave been defined for decades inamsthm, so perhaps you addedamsthmwhen you switched systems? – barbara beeton Mar 10 '16 at 19:05amsthmdefinesproofand\qed, either you didn't loadamsthmon the old system, or you have added these new definitions when you changed systems, or you ignored error messages on the old system. there are no other possibilities. – barbara beeton Mar 10 '16 at 19:10\newcommand{\qed}with\renewcommand, and\newenvironment{proof}with\renewenvironment, or simply remove these definitions – Au101 Mar 10 '16 at 19:14