An Efficient Proof-Producing Framework for Formula Processing