Term Rewriting System R: [x, y, z, k, l] minus(x, 0) -> x minus(s(x), s(y)) -> minus(x, y) minus(minus(x, y), z) -> minus(x, plus(y, z)) quot(0, s(y)) -> 0 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) plus(0, y) -> y plus(s(x), y) -> s(plus(x, y)) app(nil, k) -> k app(l, nil) -> l app(cons(x, l), k) -> cons(x, app(l, k)) sum(cons(x, nil)) -> cons(x, nil) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) Termination of R to be shown. R contains the following Dependency Pairs: SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(x, cons(y, k))))) SUM(app(l, cons(x, cons(y, k)))) -> APP(l, sum(cons(x, cons(y, k)))) SUM(app(l, cons(x, cons(y, k)))) -> SUM(cons(x, cons(y, k))) SUM(cons(x, cons(y, l))) -> SUM(cons(plus(x, y), l)) SUM(cons(x, cons(y, l))) -> PLUS(x, y) PLUS(s(x), y) -> PLUS(x, y) MINUS(s(x), s(y)) -> MINUS(x, y) MINUS(minus(x, y), z) -> MINUS(x, plus(y, z)) MINUS(minus(x, y), z) -> PLUS(y, z) APP(cons(x, l), k) -> APP(l, k) QUOT(s(x), s(y)) -> QUOT(minus(x, y), s(y)) QUOT(s(x), s(y)) -> MINUS(x, y) Furthermore, R contains six SCCs. SCC1: APP(cons(x, l), k) -> APP(l, k) 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(APP(x_1, x_2)) = 1 + x_1 + x_2 POL(cons(x_1, x_2)) = 1 + x_1 + x_2 The following Dependency Pairs can be deleted: APP(cons(x, l), k) -> APP(l, k) 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: SUM(cons(x, cons(y, l))) -> SUM(cons(plus(x, y), l)) 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)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(SUM(x_1)) = 1 + x_1 POL(0) = 1 POL(cons(x_1, x_2)) = x_1 + x_2 No Dependency Pairs can be deleted. The following rules of R can be deleted: sum(cons(x, nil)) -> cons(x, nil) sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) minus(x, 0) -> x minus(s(x), s(y)) -> minus(x, y) minus(minus(x, y), z) -> minus(x, plus(y, z)) app(cons(x, l), k) -> cons(x, app(l, k)) app(l, nil) -> l app(nil, k) -> k quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) quot(0, s(y)) -> 0 plus(0, y) -> y This transformation is resulting in one new subcycle: SCC3.MRR1: SUM(cons(x, cons(y, l))) -> SUM(cons(plus(x, y), l)) 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)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(SUM(x_1)) = 1 + x_1 POL(cons(x_1, x_2)) = 1 + x_1 + x_2 The following Dependency Pairs can be deleted: SUM(cons(x, cons(y, l))) -> SUM(cons(plus(x, y), l)) This transformation is resulting in no new subcycles. SCC4: SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(x, cons(y, k))))) 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(nil) = 0 POL(plus(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(SUM(x_1)) = 1 + x_1 POL(sum(x_1)) = x_1 POL(app(x_1, x_2)) = x_1 + x_2 POL(0) = 1 POL(cons(x_1, x_2)) = x_1 + x_2 No Dependency Pairs can be deleted. The following rules of R can be deleted: minus(x, 0) -> x minus(s(x), s(y)) -> minus(x, y) minus(minus(x, y), z) -> minus(x, plus(y, z)) quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) quot(0, s(y)) -> 0 plus(0, y) -> y This transformation is resulting in one new subcycle: SCC4.MRR1: SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(x, cons(y, k))))) 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(nil) = 0 POL(plus(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(SUM(x_1)) = 1 + x_1 POL(sum(x_1)) = x_1 POL(app(x_1, x_2)) = 1 + x_1 + x_2 POL(cons(x_1, x_2)) = x_1 + x_2 No Dependency Pairs can be deleted. The following rules of R can be deleted: app(l, nil) -> l app(nil, k) -> k This transformation is resulting in one new subcycle: SCC4.MRR1.MRR1: SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(x, cons(y, k))))) 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(nil) = 0 POL(plus(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(SUM(x_1)) = 1 + x_1 POL(sum(x_1)) = x_1 POL(app(x_1, x_2)) = x_1 + x_2 POL(cons(x_1, x_2)) = 1 + x_1 + x_2 No Dependency Pairs can be deleted. The following rules of R can be deleted: sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) This transformation is resulting in one new subcycle: SCC4.MRR1.MRR1.MRR1: SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(x, cons(y, k))))) 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(nil) = 0 POL(SUM(x_1)) = 1 + x_1 POL(sum(x_1)) = x_1 POL(app(x_1, x_2)) = x_1 + x_2 POL(cons(x_1, x_2)) = x_1 + x_2 No Dependency Pairs can be deleted. The following rules of R can be deleted: plus(s(x), y) -> s(plus(x, y)) This transformation is resulting in one new subcycle: SCC4.MRR1.MRR1.MRR1.MRR1: SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(x, cons(y, k))))) On this Scc, a Narrowing SCC transformation can be performed. As a result of transforming the rule SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(x, cons(y, k))))) one new Dependency Pair is created: SUM(app(cons(x'', l''), cons(x0, cons(y', k'')))) -> SUM(cons(x'', app(l'', sum(cons(x0, cons(y', k'')))))) The transformation is resulting in no subcycles. SCC5: MINUS(minus(x, y), z) -> MINUS(x, plus(y, z)) 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(plus(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(minus(x_1, x_2)) = x_1 + x_2 POL(MINUS(x_1, x_2)) = 1 + x_1 + x_2 POL(0) = 1 The following Dependency Pairs can be deleted: MINUS(minus(x, y), z) -> MINUS(x, plus(y, z)) The following rules of R can be deleted: sum(cons(x, nil)) -> cons(x, nil) sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) minus(x, 0) -> x minus(s(x), s(y)) -> minus(x, y) minus(minus(x, y), z) -> minus(x, plus(y, z)) app(cons(x, l), k) -> cons(x, app(l, k)) app(l, nil) -> l app(nil, k) -> k quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) quot(0, s(y)) -> 0 plus(0, y) -> y This transformation is resulting in one new subcycle: SCC5.MRR1: 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. SCC6: 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(x, 0) -> x minus(s(x), s(y)) -> minus(x, y) minus(minus(x, y), z) -> minus(x, plus(y, z)) Used ordering: Polynomial ordering with Polynomial interpretation: POL(s(x_1)) = 1 + x_1 POL(plus(x_1, x_2)) = 0 POL(minus(x_1, x_2)) = x_1 POL(QUOT(x_1, x_2)) = 1 + x_1 POL(0) = 0 resulting in no subcycles. Termination of R successfully shown. Duration: 1.65 seconds.