fixes to the proof system so it works with theory lemmas and explanations