# Where will a theorem be used?

I have once seen a book (Graph Theory by Reinhard Diestel) where the author flags his theorems by adding on the left/right of the page the reference number of later theorems where said theorem will be applied. A truly bidirectional cross-reference!

I assume this is done automatically, but how? I have never seen a package for this.

Here is a screenshot:

-
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say "thank you" to users who helped you. –  Kurt Mar 11 at 0:28
I'm not aware of a package that does it for you. Have you thought of asking the author. –  Marc van Dongen Mar 11 at 4:54
See tex.stackexchange.com/q/37918/15925 and tex.stackexchange.com/q/14981/15925 for implementations of related types of back referencing. –  Andrew Swann Mar 11 at 8:11
@Delio If you have found a solution, would you like to share it here? –  egreg Apr 21 at 22:28
This feature clearly deserves a package. –  TonioElGringo Apr 27 at 13:01

Allthough the \vskip is disturbing me a little, because it is arbitrary, this could work:

\reversemarginpar

\newenvironment{refthm}[1]
{\marginpar[\centering\vskip3mm\lbrack\ref{#1}\rbrack]{}\begin{somethmenv}}
{\end{somethmenv}}

\begin{refthm}{somethm:1}
A theorem which will be applied in a later theorem with the label somethm:1.
\end{refthm}

...

\begin{someotherthmenv}\label{somethm:1}
A Theorem in which a certain theorem is used.
\end{someotherthmenv}

Edit:

I slightly modified my previous approach. Now the solution does, what it is supposed to:

\documentclass{book}
\usepackage[margin=3cm,marginparwidth=2cm]{geometry}
\usepackage{lipsum}
\usepackage{marginnote}
\usepackage{amsthm}

\newtheorem{prop}{Proposition}[section]

\newenvironment{refprop}[1]
{\begin{prop}\marginnote{\centering\normalfont\lbrack\ref{#1}\rbrack}}
{\end{prop}}

\begin{document}
%%%%%%%%%%%%%%%%%%%%
\makeatletter
\c@chapter=1
\c@section=9
\c@prop=2
\makeatother
%%%%%%%%%%%%%%%%%%%%
\mbox{}
\clearpage
\lipsum[1-4]
\begin{refprop}{somethm:1}
Together with $\emptyset$ the cuts in $G$ from a subspace $\mathcal{C}^*$ of $\mathcal{E}(G)$. This space is generated by cuts of the form $E(v)$.
\end{refprop}
\lipsum[5-8]
...
%%%%%%%%%%%%%%%%%%%%
\makeatletter
\c@chapter=4
\c@section=6
\c@prop=2
\makeatother
%%%%%%%%%%%%%%%%%%%%
\begin{prop}\label{somethm:1}
A Theorem in which a certain theorem is used.
\end{prop}
\end{document}

Output:

Remark: The next step would be to apply this to a given set of theorem environments. For that task a wrapper could be written. But this is not the scope of the answer.

-