Term Rewriting System R: [X, Y, L] rev1(0, nil) -> 0 rev1(s(X), nil) -> s(X) rev1(X, cons(Y, L)) -> rev1(Y, L) rev(nil) -> nil rev(cons(X, L)) -> cons(rev1(X, L), rev2(X, L)) rev2(X, nil) -> nil rev2(X, cons(Y, L)) -> rev(cons(X, rev(rev2(Y, L)))) 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: REV1(X, cons(Y, L)) -> REV1(Y, L) REV2(X, cons(Y, L)) -> REV(cons(X, rev(rev2(Y, L)))) REV2(X, cons(Y, L)) -> REV(rev2(Y, L)) REV2(X, cons(Y, L)) -> REV2(Y, L) REV(cons(X, L)) -> REV1(X, L) REV(cons(X, L)) -> REV2(X, L) Furthermore, R contains two SCCs. SCC1: REV1(X, cons(Y, L)) -> REV1(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(REV1(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: REV1(X, cons(Y, L)) -> REV1(Y, L) This transformation is resulting in no new subcycles. SCC2: REV2(X, cons(Y, L)) -> REV2(Y, L) REV2(X, cons(Y, L)) -> REV(rev2(Y, L)) REV(cons(X, L)) -> REV2(X, L) REV2(X, cons(Y, L)) -> REV(cons(X, rev(rev2(Y, L)))) By using a polynomial ordering, at least one Dependency Pair of this SCC can be strictly oriented. Additionally, the following rules can be oriented: rev2(X, cons(Y, L)) -> rev(cons(X, rev(rev2(Y, L)))) rev2(X, nil) -> nil rev(nil) -> nil rev(cons(X, L)) -> cons(rev1(X, L), rev2(X, L)) Used ordering: Polynomial ordering with Polynomial interpretation: POL(nil) = 0 POL(s(x_1)) = 0 POL(rev2(x_1, x_2)) = x_2 POL(REV(x_1)) = x_1 POL(rev1(x_1, x_2)) = 0 POL(rev(x_1)) = x_1 POL(REV2(x_1, x_2)) = x_2 POL(0) = 0 POL(cons(x_1, x_2)) = 1 + x_2 resulting in no subcycles. Termination of R successfully shown. Duration: 0.764 seconds.