Term Rewriting System R: [x, y, z] qsort(nil) -> nil qsort(.(x, y)) -> ++(qsort(lowers(x, y)), .(x, qsort(greaters(x, y)))) lowers(x, nil) -> nil lowers(x, .(y, z)) -> if(<=(y, x), .(y, lowers(x, z)), lowers(x, z)) greaters(x, nil) -> nil greaters(x, .(y, z)) -> if(<=(y, x), greaters(x, z), .(y, greaters(x, z))) 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: GREATERS(x, .(y, z)) -> GREATERS(x, z) QSORT(.(x, y)) -> QSORT(lowers(x, y)) QSORT(.(x, y)) -> LOWERS(x, y) QSORT(.(x, y)) -> QSORT(greaters(x, y)) QSORT(.(x, y)) -> GREATERS(x, y) LOWERS(x, .(y, z)) -> LOWERS(x, z) Furthermore, R contains two SCCs. SCC1: GREATERS(x, .(y, z)) -> GREATERS(x, z) 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(GREATERS(x_1, x_2)) = 1 + x_1 + x_2 POL(.(x_1, x_2)) = 1 + x_1 + x_2 The following Dependency Pairs can be deleted: GREATERS(x, .(y, z)) -> GREATERS(x, z) This transformation is resulting in no new subcycles. SCC2: LOWERS(x, .(y, z)) -> LOWERS(x, z) 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(LOWERS(x_1, x_2)) = 1 + x_1 + x_2 POL(.(x_1, x_2)) = 1 + x_1 + x_2 The following Dependency Pairs can be deleted: LOWERS(x, .(y, z)) -> LOWERS(x, z) This transformation is resulting in no new subcycles. Termination of R successfully shown. Duration: 0.614 seconds.