(VAR x) (THEORY (AC h)) (RULES f(f(x)) -> f(g(x)) g(x) -> h(f(x), f(x)) )