(VAR x y z) (RULES app(app(*, x), app(app(+, y), z)) -> app(app(+, app(app(*, x), y)), app(app(*, x), z)) app(app(*, app(app(+, y), z)), x) -> app(app(+, app(app(*, x), y)), app(app(*, x), z)) app(app(*, app(app(*, x), y)), z) -> app(app(*, x), app(app(*, y), z)) app(app(+, app(app(+, x), y)), z) -> app(app(+, x), app(app(+, y), z)) )