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) -> ifMinus(le(s(X), Y), s(X), Y) ifMinus(true, s(X), Y) -> 0 ifMinus(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))) 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: MINUS(s(X), Y) -> IFMINUS(le(s(X), Y), s(X), Y) MINUS(s(X), Y) -> LE(s(X), Y) IFMINUS(false, s(X), Y) -> MINUS(X, Y) 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) Furthermore, R contains three 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: IFMINUS(false, s(X), Y) -> MINUS(X, Y) MINUS(s(X), Y) -> IFMINUS(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(IFMINUS(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: ifMinus(true, s(X), Y) -> 0 ifMinus(false, s(X), Y) -> s(minus(X, Y)) minus(s(X), Y) -> ifMinus(le(s(X), Y), s(X), Y) minus(0, Y) -> 0 Used ordering: Polynomial ordering with Polynomial interpretation: POL(s(x_1)) = 1 + x_1 POL(le(x_1, x_2)) = 0 POL(ifMinus(x_1, x_2, x_3)) = x_2 POL(minus(x_1, x_2)) = x_1 POL(true) = 0 POL(QUOT(x_1, x_2)) = x_1 + x_2 POL(0) = 0 POL(false) = 0 resulting in no subcycles. Termination of R successfully shown. Duration: 0.838 seconds.