Term Rewriting System R: [x, y] minus(x, 0) -> x minus(s(x), s(y)) -> minus(x, y) f(0) -> s(0) f(s(x)) -> minus(s(x), g(f(x))) g(0) -> 0 g(s(x)) -> minus(s(x), f(g(x))) Termination of R to be shown. This program has no overlaps, so it is sufficient to show innermost termination. R contains the following Dependency Pairs: F(s(x)) -> MINUS(s(x), g(f(x))) F(s(x)) -> G(f(x)) F(s(x)) -> F(x) MINUS(s(x), s(y)) -> MINUS(x, y) G(s(x)) -> MINUS(s(x), f(g(x))) G(s(x)) -> F(g(x)) G(s(x)) -> G(x) Furthermore, R contains two SCCs. SCC1: MINUS(s(x), s(y)) -> MINUS(x, y) Removing rules from R by ordering and analyzing Dependency Pairs, Usable Rules, and Usable Equations. This is possible by using the following (C_E-compatible) Polynomial ordering. Polynomial interpretation: POL(s(x_1)) = 1 + x_1 POL(MINUS(x_1, x_2)) = 1 + x_1 + x_2 The following Dependency Pairs can be deleted: MINUS(s(x), s(y)) -> MINUS(x, y) This transformation is resulting in no new subcycles. SCC2: G(s(x)) -> G(x) F(s(x)) -> F(x) G(s(x)) -> F(g(x)) F(s(x)) -> G(f(x)) By using a polynomial ordering, at least one Dependency Pair of this SCC can be strictly oriented. Additionally, the following rules can be oriented: g(0) -> 0 g(s(x)) -> minus(s(x), f(g(x))) f(0) -> s(0) f(s(x)) -> minus(s(x), g(f(x))) minus(s(x), s(y)) -> minus(x, y) minus(x, 0) -> x Used ordering: Polynomial ordering with Polynomial interpretation: POL(g(x_1)) = x_1 POL(s(x_1)) = 1 + x_1 POL(G(x_1)) = x_1 POL(minus(x_1, x_2)) = x_1 POL(F(x_1)) = x_1 POL(f(x_1)) = 1 + x_1 POL(0) = 0 resulting in no subcycles. Termination of R successfully shown. Duration: 0.828 seconds.