I've seen this post Defining my own proof environment? and I have a follow-up question, because the answers there are unsatisfying.
I would like to define two proof environments—one with a black qed square and one with a white qed square. I made the default proof environment to have a black qed symbol by the following code snippet:
\renewcommand{\qedsymbol}{$\blacksquare$}
I defined another proof environment by a modification of the advice given in the page I mentioned above and wrote the following:
\newenvironment{claimproof}[1]{\par\noindent\textit{Proof.}\space#1}{\hfill$\square$}
This seems like it works, but I ran into some edge cases where there are discrepancies between the two. The latter claimproof environment does not guarantee that the qed-box is placed at the same place where the default proof environment would place it. Here is an example where I found an actual difference.
Picture 1 (uses custom claimproof environment with white qed-box).
Picture 2 (uses default proof environment with black qed-box).
The claimproof environment fails to place the white box to the right (I could fix that by adding \newline but that would make unnecessary new lines that the default proof environment doesn't do). I want claimproof to act exactly the same way as the default proof environment works. Is there a less ad-hoc way to do this that actually replicates the true proof environment?




amsthmorntheoremfail to guarantee correct positioning of the tombstone (aka QED symbol). – egreg Feb 08 '23 at 21:18