Tcolorbox : create a proof environnement with a QED symbol at the very end
Add the lines
\usepackage{amssymb}% defines \blacksquare
\AtEndEnvironment{proof}{\null\hfill\textcolor{blue}{$\blacksquare$}}
to your preamble; replace \blacksquare
by \square
if the symbol is too massive.
For LaTeX versions older than 2020/10/01, you need the etoolbox
package before using \AtEndEnvironment
.
\documentclass{article}
\usepackage{amssymb}
\AtEndEnvironment{proof}{\null\hfill\textcolor{blue}{$\blacksquare$}}%
\usepackage{changepage}
\usepackage{tcolorbox}
\tcbuselibrary{most}
\newtcolorbox{proof}{
fonttitle=\bfseries,
enhanced,
top=0mm,
boxrule=0pt,frame empty,
borderline west={4pt}{0pt}{blue},
coltitle=blue,
colback=white,
sharp corners,
title=Proof
}
\begin{document}
\begin{proof}
Let's show that girls are Evil.
\begin{adjustwidth}{5mm}{0mm}
So, girls are evil:
\begin{equation}
girls = \left(\sqrt{evil}\right)^2 = evil
\end{equation}
\end{adjustwidth}
We have shown that girls are Evil.
\end{proof}
\end{document}
Adapted from this answer
Using the ntheorem
package, you have the automatic placement of the end-of-proof symbol at the end of the last line, including the cases when the last line is an equation:
\documentclass{article}
\usepackage{fourier}
\usepackage{amsmath, amssymb}
\usepackage[thmmarks, amsmath, thref]{ntheorem}
\usepackage{changepage}
\usepackage{tcolorbox}
\tcbuselibrary{most}
\theoremstyle{nonumberbreakn}
\theoremheaderfont{\scshape\color{blue}}
\theoremseparator{:\smallskip}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\color{blue}\blacksquare}}
\newtheorem{proof}{Proof}
\tcolorboxenvironment{proof}{
fonttitle=\bfseries,
enhanced,
top=0mm,
boxrule=0pt,frame empty,
borderline west={4pt}{0pt}{blue},
coltitle=blue,
colback=white,
sharp corners
}
\begin{document}
\begin{proof}
Let's show that girls are Evil.
\begin{adjustwidth}{5mm}{0mm}
Girls require time and money
\begin{equation}
girls = time \times money
\end{equation}
Time is money
\begin{equation}
time = money
\end{equation}
So girls are money squared:
\begin{equation}
girls = money^2
\end{equation}
Money is the root of all evil
\begin{equation}
money = \sqrt{evil}
\end{equation}
So, girls are evil:
\begin{equation*}
girls = \left(\sqrt{evil}\right)^2 = evil
\end{equation*}
\end{adjustwidth}
% We have shown that girls are Evil.
\end{proof}
\end{document}