Revert "Revert "simplification in substitution and function evaluation""

Reverts kframework/k#1208