Currently reading P. Aluffi's: Algebra: Chapter 0 and I really like the way theorems, definitions, etc. are emphasized by a lower right corner symbol (\rlcorner). For reference
I have tried recreating this formatting by manually inserting \hfill$\rlcorner$ in the following way
\documentclass[a4paper, 10pt]{article}
\usepackage{amsmath, amssymb, amsthm}
\usepackage[singlespacing]{setspace}
\theoremstyle{definition}
\newtheorem{exam}{Example}
\newtheorem{definition}{Definition}
\DeclareMathOperator{\im}{im}
\begin{document}
\begin{exam}
A complex
$$\cdots\longrightarrow M\overset\beta\longrightarrow N\longrightarrow0\longrightarrow\cdots$$
is exact at $N$ if and only if $\beta$ is an epimorphism.\par
Indeed, the complex is exact at $N$ if and only if $\im\beta=$ kernel of the trivial homomorphism $N\to0$, that is, $\im\beta=N$.\hfill$\lrcorner$
\end{exam}
\begin{definition} A {\it short exact sequence} is an exact complex of the form
$$0\longrightarrow M\overset\alpha\longrightarrow N\overset\beta\longrightarrow0.$$\hfill$\lrcorner$
\end{definition}
\end{document}
Anyway, I am not happy with this solution as, on the one hand, it does not seem efficient and, one the otehr hand, I am not able to adjust the height of the second \rlcorner to match the excerpt (writing $$[Diagramm].\hfill\rlcorner$$ does not work).
Could someone help me out? I would prefer to declare this style within the preamble for all kinds of theorem enviroments at once.
Thanks in advance!


$$....$$it is not LaTeX and it does not support LaTeX configuration. Her you can use\tag*{$\lrcorner$}, but guess what$$...$$is not supported by\tag. You can also usentheorem(it cannot be used withamsthm), it supports adding endmarker to all theorem like envs (incl proof). It also have the feature to move the marker into math ending the theorem. Somethingamsthmdoes not support. Note that the endmarker inntheoremis fragile in the sense that\end{env}should never have blank line before it. – daleif Mar 30 '20 at 08:44