Term Rewriting System R: [X, Y] p(0) -> 0 p(s(X)) -> X leq(0, Y) -> true leq(s(X), 0) -> false leq(s(X), s(Y)) -> leq(X, Y) if(true, X, Y) -> activate(X) if(false, X, Y) -> activate(Y) diff(X, Y) -> if(leq(X, Y), n__0, n__s(diff(p(X), Y))) 0 -> n__0 s(X) -> n__s(X) activate(n__0) -> 0 activate(n__s(X)) -> s(X) activate(X) -> X Termination of R to be shown. R contains the following Dependency Pairs: LEQ(s(X), s(Y)) -> LEQ(X, Y) ACTIVATE(n__0) -> 0' ACTIVATE(n__s(X)) -> S(X) IF(false, X, Y) -> ACTIVATE(Y) IF(true, X, Y) -> ACTIVATE(X) DIFF(X, Y) -> IF(leq(X, Y), n__0, n__s(diff(p(X), Y))) DIFF(X, Y) -> LEQ(X, Y) DIFF(X, Y) -> DIFF(p(X), Y) DIFF(X, Y) -> P(X) Furthermore, R contains two SCCs. SCC1: LEQ(s(X), s(Y)) -> LEQ(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(LEQ(x_1, x_2)) = 1 + x_1 + x_2 The following Dependency Pairs can be deleted: LEQ(s(X), s(Y)) -> LEQ(X, Y) This transformation is resulting in no new subcycles. SCC2: DIFF(X, Y) -> DIFF(p(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(n__0) = 0 POL(0) = 0 POL(p(x_1)) = x_1 POL(DIFF(x_1, x_2)) = 1 + x_1 + x_2 No Dependency Pairs can be deleted. The following rules of R can be deleted: leq(s(X), s(Y)) -> leq(X, Y) leq(0, Y) -> true leq(s(X), 0) -> false s(X) -> n__s(X) activate(n__0) -> 0 activate(n__s(X)) -> s(X) activate(X) -> X if(false, X, Y) -> activate(Y) if(true, X, Y) -> activate(X) diff(X, Y) -> if(leq(X, Y), n__0, n__s(diff(p(X), Y))) p(s(X)) -> X This transformation is resulting in one new subcycle: SCC2.MRR1: DIFF(X, Y) -> DIFF(p(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(n__0) = 0 POL(0) = 1 POL(p(x_1)) = x_1 POL(DIFF(x_1, x_2)) = x_1 + x_2 No Dependency Pairs can be deleted. The following rules of R can be deleted: 0 -> n__0 This transformation is resulting in one new subcycle: SCC2.MRR1.MRR1: DIFF(X, Y) -> DIFF(p(X), Y) Applying the non-overlappingness check to the DPs. The transformation is resulting in one subcycle: SCC2.MRR1.MRR1.NOC1: DIFF(X, Y) -> DIFF(p(X), Y) Found an infinite P-chain over R: P = DIFF(X, Y) -> DIFF(p(X), Y) R = [p(0) -> 0] s = DIFF(X, Y) evaluates to t = DIFF(p(X), Y) Thus, s starts an infinite reduction as s matches t. Non-Termination of R could be shown. Duration: 0.710 seconds.