clean up prove/subst in functional compiler