I'm wondering if there's a relatively simple way to achieve a result similar to the following:
In particular, I'd like to be able to assign names and/or numbers to theorems/lemmas/propositions and to then replace the standard QED symbol of that theorem/lemma/proposition with an outlined version of the theorem/lemma/proposition name/number.
I don't have a minimum working example here because, unfortunately, my knowledge of modifying theorem environments is sufficiently low that I haven't the slightest clue how to start. Any suggestions would be hugely appreciated.
Best Answer
This does what you want, though I find it cumbersome and not really informative.
If a proof is delayed, use the
proof*
environment, which wants as argument the label used in the relative theorem.As you see, proofs can be nested. I only showed a nested proof inside a “delayed” proof, but you can check it works also with the standard
proof
environment.Some words of explanation.
First I modify the definition of
\@begintheorem
to add a couple of settings. If the theorem is unnumbered, I set (globally, because we're already in an environment)\qed@current
to\qed@empty
(which is defined to be the standard QED symbol, we'll see later why); if the theorem is numbered, I do\xdef\qed@current{#2}
, because#2
contains the theorem number (but not in explicit form, so the need to fully expand it).In case the theorem numbers contain formatting instructions or when different number systems are used (Greek numerals with
babel
, for instance), this should bein order to avoid problems. In standard English settings this shouldn't be needed.
Other than these two changes,
\@begintheorem
is the same as the original.Then I redefine
\qedsymbol
. It compares\qed@thiscurrent
with\qed@empty
; if it's the same, it typesets the standard symbol, otherwise it typesetsbecause, as we'll see,
\qed@thiscurrent
contains the number of the theorem currently being proved.Also
\proofname
is redefined to add “of<number>
” using\qed@thiscurrent
if the last stated theorem is numbered.The
proof
environment is modified to set (locally)\qed@thiscurrent
to\qed@current
; finallyproof*
is defined to do likeproof
but retrieving the number with\ref
.The case of a simple
proof
following a theorem is easy:\qed@thiscurrent
will contain the theorem number. The same forproof*
.If a
proof
environment is inside anotherproof
, the statement will globally reset\qed@current
, but this will not influence\qed@thiscurrent
at the end of the main proof, because\qed@thiscurrent
for the nested proof is set locally and\end{proof}
will revert the local\qed@thiscurrent
to the previous value.