Term Rewriting System R: [y, x] le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) minus(0, y) -> 0 minus(s(x), y) -> if_minus(le(s(x), y), s(x), y) if_minus(true, s(x), y) -> 0 if_minus(false, s(x), y) -> s(minus(x, y)) quot(0, s(y)) -> 0 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) log(s(0)) -> 0 log(s(s(x))) -> s(log(s(quot(x, s(s(0)))))) 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: LE(s(x), s(y)) -> LE(x, y) QUOT(s(x), s(y)) -> QUOT(minus(x, y), s(y)) QUOT(s(x), s(y)) -> MINUS(x, y) MINUS(s(x), y) -> IF_MINUS(le(s(x), y), s(x), y) MINUS(s(x), y) -> LE(s(x), y) IF_MINUS(false, s(x), y) -> MINUS(x, y) LOG(s(s(x))) -> LOG(s(quot(x, s(s(0))))) LOG(s(s(x))) -> QUOT(x, s(s(0))) Furthermore, R contains four SCCs. SCC1: LE(s(x), s(y)) -> LE(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(LE(x_1, x_2)) = 1 + x_1 + x_2 POL(s(x_1)) = 1 + x_1 The following Dependency Pairs can be deleted: LE(s(x), s(y)) -> LE(x, y) This transformation is resulting in no new subcycles. SCC2: IF_MINUS(false, s(x), y) -> MINUS(x, y) MINUS(s(x), y) -> IF_MINUS(le(s(x), y), s(x), y) By using a polynomial ordering, at least one Dependency Pair of this SCC can be strictly oriented. No rules need to be oriented. Used ordering: Polynomial ordering with Polynomial interpretation: POL(s(x_1)) = 1 + x_1 POL(le(x_1, x_2)) = 0 POL(true) = 0 POL(IF_MINUS(x_1, x_2, x_3)) = x_2 POL(MINUS(x_1, x_2)) = x_1 POL(0) = 0 POL(false) = 0 resulting in no subcycles. SCC3: QUOT(s(x), s(y)) -> QUOT(minus(x, y), s(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: minus(s(x), y) -> if_minus(le(s(x), y), s(x), y) minus(0, y) -> 0 if_minus(true, s(x), y) -> 0 if_minus(false, s(x), y) -> s(minus(x, y)) Used ordering: Polynomial ordering with Polynomial interpretation: POL(s(x_1)) = 1 + x_1 POL(le(x_1, x_2)) = 0 POL(minus(x_1, x_2)) = x_1 POL(true) = 0 POL(QUOT(x_1, x_2)) = x_1 + x_2 POL(if_minus(x_1, x_2, x_3)) = x_2 POL(0) = 0 POL(false) = 0 resulting in no subcycles. SCC4: LOG(s(s(x))) -> LOG(s(quot(x, s(s(0))))) By using a polynomial ordering, at least one Dependency Pair of this SCC can be strictly oriented. Additionally, the following rules can be oriented: quot(0, s(y)) -> 0 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) minus(s(x), y) -> if_minus(le(s(x), y), s(x), y) minus(0, y) -> 0 if_minus(true, s(x), y) -> 0 if_minus(false, s(x), y) -> s(minus(x, y)) Used ordering: Polynomial ordering with Polynomial interpretation: POL(s(x_1)) = 1 + x_1 POL(le(x_1, x_2)) = 0 POL(minus(x_1, x_2)) = x_1 POL(true) = 0 POL(if_minus(x_1, x_2, x_3)) = x_2 POL(0) = 0 POL(false) = 0 POL(LOG(x_1)) = 1 + x_1 POL(quot(x_1, x_2)) = x_1 resulting in no subcycles. Termination of R successfully shown. Duration: 0.981 seconds.