added a proof to indirect-equality and fixed a bug with the instantiation of theorems.