(VAR x y) (RULES app(D, t) -> 1 app(D, constant) -> 0 app(D, app(app(+, x), y)) -> app(app(+, app(D, x)), app(D, y)) app(D, app(app(*, x), y)) -> app(app(+, app(app(*, y), app(D, x))), app(app(*, x), app(D, y))) app(D, app(app(-, x), y)) -> app(app(-, app(D, x)), app(D, y)) )