I would like to be able to add some proofs of my document in appendix. I like the solution "New Version" given here, but I would like in addition to have:

- A text below the theorem that write something like "Please, find the proof of this theorem in appendix".
- Add a link from this text to the proof
- Add another link from the proof title to the theorem
- If possible recall the theorem just above the proof

For example it would looks like, in pseudo-generated-code:

```
Theorem 1.1
\label{th1.1}
1 = 1
Please find the \hyperlink{th1.1}{proof of this theorem} in appendix.
[... lot's of stuff ...]
Proofs.
Theorem 1.1
1 = 1
\hypertarget{th1.1}
Proof of \autoref{th1.1}
Trivial.
```

I tried to change by myself the code of the above answer, but I'm not familiar enough with tex syntax, and I'm getting stuck on point 3 with link that point nowhere (I suspect bugs with the `expandafter`

, but I don't know how to debug my code).

Thank you for your help !

## Best Answer

I found a first solution, that seems to work for points 1,2,3, but not for 4 : I don't know how to change the environment of theorem (

`\begin{theorem}`

must be transform in`\begin{restatable}[]{theorem}{}`

EDIT : it seems that adding an option`restate=foo`

is enough, but I don't know how I could add such an option... I tried to set`\xdef\pat@restate{foo}`

but it doesn't work... Any idea ?).