(proof-new) Prepare the theory of strings for proof reconstruction (#4885)