More general version of 3bitr3i. Useful for converting definitions in a formula. (Contributed by NM, 4-Jun-1995.)