In my own custom theorem environment, I'm using the
\qed command to create a white box. This works wonderfully when the theorem ends with a regular paragraph — the box is pushed to the right where it should be.
Note that I just type out the
\qed manually whenever I need it. It works fine. I don't need it automated.
However, if I use this command when the theorem ends with displayed mathmode, the box is just put there right beside the formula — it is not pushed to the right. How can I accomplish that?