Record theorem assumptions for deduced proofs as well

This allows us to correctly delete theorems as well