adding a formula to the proof and marking it as needed