The function inst should be used as follows:
   inst [{redex_1, residue_1},...,{redex_n, residue_n}] tm