[proof-new] Adding a proof-producing ensure literal method (#5889)