Term Rewriting System R: [x, y] even(0) -> true even(s(0)) -> false even(s(s(x))) -> even(x) half(0) -> 0 half(s(s(x))) -> s(half(x)) plus(0, y) -> y plus(s(x), y) -> s(plus(x, y)) times(0, y) -> 0 times(s(x), y) -> if_times(even(s(x)), s(x), y) if_times(true, s(x), y) -> plus(times(half(s(x)), y), times(half(s(x)), y)) if_times(false, s(x), y) -> plus(y, times(x, y)) 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: EVEN(s(s(x))) -> EVEN(x) TIMES(s(x), y) -> IF_TIMES(even(s(x)), s(x), y) TIMES(s(x), y) -> EVEN(s(x)) IF_TIMES(true, s(x), y) -> PLUS(times(half(s(x)), y), times(half(s(x)), y)) IF_TIMES(true, s(x), y) -> TIMES(half(s(x)), y) IF_TIMES(true, s(x), y) -> HALF(s(x)) IF_TIMES(false, s(x), y) -> PLUS(y, times(x, y)) IF_TIMES(false, s(x), y) -> TIMES(x, y) PLUS(s(x), y) -> PLUS(x, y) HALF(s(s(x))) -> HALF(x) Furthermore, R contains four SCCs. SCC1: EVEN(s(s(x))) -> EVEN(x) 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(EVEN(x_1)) = 1 + x_1 The following Dependency Pairs can be deleted: EVEN(s(s(x))) -> EVEN(x) This transformation is resulting in no new subcycles. SCC2: PLUS(s(x), y) -> PLUS(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(PLUS(x_1, x_2)) = 1 + x_1 + x_2 POL(s(x_1)) = 1 + x_1 The following Dependency Pairs can be deleted: PLUS(s(x), y) -> PLUS(x, y) This transformation is resulting in no new subcycles. SCC3: HALF(s(s(x))) -> HALF(x) 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(HALF(x_1)) = 1 + x_1 The following Dependency Pairs can be deleted: HALF(s(s(x))) -> HALF(x) This transformation is resulting in no new subcycles. SCC4: IF_TIMES(false, s(x), y) -> TIMES(x, y) IF_TIMES(true, s(x), y) -> TIMES(half(s(x)), y) TIMES(s(x), y) -> IF_TIMES(even(s(x)), s(x), y) By using a polynomial ordering, at least one Dependency Pair of this SCC can be strictly oriented. Additionally, the following rules can be oriented: half(0) -> 0 half(s(s(x))) -> s(half(x)) Used ordering: Polynomial ordering with Polynomial interpretation: POL(s(x_1)) = 1 + x_1 POL(TIMES(x_1, x_2)) = x_1 POL(even(x_1)) = 0 POL(true) = 0 POL(IF_TIMES(x_1, x_2, x_3)) = x_2 POL(half(x_1)) = x_1 POL(0) = 0 POL(false) = 0 resulting in one subcycle. SCC4.Polo1: TIMES(s(x), y) -> IF_TIMES(even(s(x)), s(x), y) IF_TIMES(true, s(x), y) -> TIMES(half(s(x)), y) On this Scc, a Narrowing SCC transformation can be performed. As a result of transforming the rule TIMES(s(x), y) -> IF_TIMES(even(s(x)), s(x), y) two new Dependency Pairs are created: TIMES(s(0), y) -> IF_TIMES(false, s(0), y) TIMES(s(s(x'')), y) -> IF_TIMES(even(x''), s(s(x'')), y) The transformation is resulting in one subcycle: SCC4.Polo1.Nar1: TIMES(s(s(x'')), y) -> IF_TIMES(even(x''), s(s(x'')), y) IF_TIMES(true, s(x), y) -> TIMES(half(s(x)), y) On this Scc, a Narrowing SCC transformation can be performed. As a result of transforming the rule IF_TIMES(true, s(x), y) -> TIMES(half(s(x)), y) one new Dependency Pair is created: IF_TIMES(true, s(s(x'')), y) -> TIMES(s(half(x'')), y) The transformation is resulting in one subcycle: SCC4.Polo1.Nar1.Nar1: IF_TIMES(true, s(s(x'')), y) -> TIMES(s(half(x'')), y) TIMES(s(s(x'')), y) -> IF_TIMES(even(x''), s(s(x'')), y) By using a polynomial ordering, at least one Dependency Pair of this SCC can be strictly oriented. Additionally, the following rules can be oriented: half(0) -> 0 half(s(s(x))) -> s(half(x)) Used ordering: Polynomial ordering with Polynomial interpretation: POL(s(x_1)) = 1 + x_1 POL(TIMES(x_1, x_2)) = x_1 POL(even(x_1)) = 0 POL(true) = 0 POL(IF_TIMES(x_1, x_2, x_3)) = x_2 POL(half(x_1)) = x_1 POL(0) = 0 POL(false) = 0 resulting in no subcycles. Termination of R successfully shown. Duration: 11.136 seconds.