Fix the LaTeX error: environment proof undefined.
The error occurs because standard LaTeX does not know what \begin{proof} means until you load the AMS theorem package or define the environment yourself.
The short answer: add \usepackage{amsthm} to your preamble. If that fails, check for a capital P in \begin{Proof} or a conflict with document classes.
Why the error happens
Plain LaTeX and basic classes such as article, report, and book include tools for text and math, but they leave theorem formatting to specialised packages. When you type \begin{proof}, LaTeX scans your preamble for instructions on how to render the heading and the square QED symbol at the end. If it finds nothing, it stops with the undefined environment error.
This trips up writers who copy preambles from journal templates that include amsmath and amssymb but omit amsthm. The math symbols work, so the missing proof environment comes as a surprise.
Four ways to fix it
Load the amsthm package
Add \usepackage{amsthm} to your preamble, placing it after \usepackage{amsmath} and before \begin{document}.
\documentclass{article} \usepackage{amsmath} \usepackage{amsthm} \begin{document} \begin{proof} Your proof goes here. \end{proof} \end{document}Check for capitalisation
LaTeX is strict about case. Typing \begin{Proof} with a capital P triggers an undefined error even when amsthm is loaded, because the command is lowercase.
% Incorrect \begin{Proof} Text \end{Proof} % Correct \begin{proof} Text \end{proof}
Where to place the package
Package order matters in LaTeX. Place \usepackage{amsthm} after your math packages and theorem declarations, but before \usepackage{hyperref} if your document uses hyperlinks.
On Texeno, if a missing package causes a build failure, the error log points directly to the line where \begin{proof} failed, letting you jump straight to the fix.
Questions
Why do I get environment proof undefined when my theorem environment works?
The \newtheorem{theorem}{Theorem} command defines theorems, but it does not define proofs. The proof environment belongs exclusively to the amsthm package.
Does amsart class need amsthm?
No. The amsart document class loads amsthm automatically. The error usually appears when switching from amsart to article, report, or book classes.
How do I change the word Proof to something else?
Pass a new header name when declaring a theorem style or use \renewcommand{\proofname}{My Custom Proof} after loading amsthm.
Try your own paper in Texeno.
Start free, upload a project as a .zip and press Recompile. Upgrade when you need longer compiles.
Start writing