With a simple proof environment as follows,
\documentclass{article}
\usepackage{amsmath, amsthm}
\vspace{-5pt}
\begin{document}
\begin{proof}~\\
\item First line
\item Lastline ................\end{proof}
\end{document}
the symbol for the end of the proof is on the same line as the last line of the proof.
If we have an enumeration environment inside the proof environment, the symbol for the end of the proof only shows up at the next line:
\documentclass{article}
\usepackage{amsmath, amsthm}
\vspace{-5pt}
\begin{document}
\begin{proof}~\\
\begin{enumerate}
\item First line
\item Last line ......................
\end{enumerate}
\end{proof}
\end{document}
May the proof environment with an enumeration environment be amended, so that the symbol for the end of the proof is on the same line as the last line of the proof?

\qedheremacro that's provided by the amsthm package? Can you guess what it does? – Mico Oct 29 '22 at 04:11