(VAR x y) (RULES app(app(times, x), 0) -> 0 app(app(times, x), app(s, y)) -> app(app(plus, app(app(times, x), y)), x) app(app(plus, x), 0) -> x app(app(plus, 0), x) -> x app(app(plus, x), app(s, y)) -> app(s, app(app(plus, x), y)) app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y)) )