Term Rewriting System R: [x, y] minus(x, 0) -> x minus(s(x), s(y)) -> minus(x, y) le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) quot(x, s(y)) -> if_quot(le(s(y), x), x, s(y)) if_quot(true, x, y) -> s(quot(minus(x, y), y)) if_quot(false, x, y) -> 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(x, s(y)) -> IF_QUOT(le(s(y), x), x, s(y)) QUOT(x, s(y)) -> LE(s(y), x) IF_QUOT(true, x, y) -> QUOT(minus(x, y), y) IF_QUOT(true, x, y) -> MINUS(x, y) MINUS(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: 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. SCC3: IF_QUOT(true, x, y) -> QUOT(minus(x, y), y) QUOT(x, s(y)) -> IF_QUOT(le(s(y), x), x, s(y)) On this Scc, a Narrowing SCC transformation can be performed. As a result of transforming the rule QUOT(x, s(y)) -> IF_QUOT(le(s(y), x), x, s(y)) two new Dependency Pairs are created: QUOT(s(y''), s(y0)) -> IF_QUOT(le(y0, y''), s(y''), s(y0)) QUOT(0, s(y')) -> IF_QUOT(false, 0, s(y')) The transformation is resulting in one subcycle: SCC3.Nar1: QUOT(s(y''), s(y0)) -> IF_QUOT(le(y0, y''), s(y''), s(y0)) IF_QUOT(true, x, y) -> QUOT(minus(x, y), y) On this Scc, a Narrowing SCC transformation can be performed. As a result of transforming the rule IF_QUOT(true, x, y) -> QUOT(minus(x, y), y) two new Dependency Pairs are created: IF_QUOT(true, s(x''), s(y'')) -> QUOT(minus(x'', y''), s(y'')) IF_QUOT(true, x'', 0) -> QUOT(x'', 0) The transformation is resulting in one subcycle: SCC3.Nar1.Nar1: IF_QUOT(true, s(x''), s(y'')) -> QUOT(minus(x'', y''), s(y'')) QUOT(s(y''), s(y0)) -> IF_QUOT(le(y0, y''), s(y''), s(y0)) 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), s(y)) -> minus(x, y) minus(x, 0) -> x Used ordering: Polynomial ordering with Polynomial interpretation: POL(IF_QUOT(x_1, x_2, x_3)) = x_2 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 POL(0) = 0 POL(false) = 0 resulting in no subcycles. Termination of R successfully shown. Duration: 10.851 seconds.