YES We show the termination of the TRS R: 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)))) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: rev1#(X,cons(Y,L)) -> rev1#(Y,L) p2: rev#(cons(X,L)) -> rev1#(X,L) p3: rev#(cons(X,L)) -> rev2#(X,L) p4: rev2#(X,cons(Y,L)) -> rev#(cons(X,rev(rev2(Y,L)))) p5: rev2#(X,cons(Y,L)) -> rev#(rev2(Y,L)) p6: rev2#(X,cons(Y,L)) -> rev2#(Y,L) and R consists of: r1: rev1(|0|(),nil()) -> |0|() r2: rev1(s(X),nil()) -> s(X) r3: rev1(X,cons(Y,L)) -> rev1(Y,L) r4: rev(nil()) -> nil() r5: rev(cons(X,L)) -> cons(rev1(X,L),rev2(X,L)) r6: rev2(X,nil()) -> nil() r7: rev2(X,cons(Y,L)) -> rev(cons(X,rev(rev2(Y,L)))) The estimated dependency graph contains the following SCCs: {p3, p4, p5, p6} {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: rev2#(X,cons(Y,L)) -> rev#(rev2(Y,L)) p2: rev#(cons(X,L)) -> rev2#(X,L) p3: rev2#(X,cons(Y,L)) -> rev2#(Y,L) p4: rev2#(X,cons(Y,L)) -> rev#(cons(X,rev(rev2(Y,L)))) and R consists of: r1: rev1(|0|(),nil()) -> |0|() r2: rev1(s(X),nil()) -> s(X) r3: rev1(X,cons(Y,L)) -> rev1(Y,L) r4: rev(nil()) -> nil() r5: rev(cons(X,L)) -> cons(rev1(X,L),rev2(X,L)) r6: rev2(X,nil()) -> nil() r7: rev2(X,cons(Y,L)) -> rev(cons(X,rev(rev2(Y,L)))) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7 Take the reduction pair: max/plus interpretations on natural numbers: rev2#_A(x1,x2) = x2 + 2 cons_A(x1,x2) = max{6, x2 + 5} rev#_A(x1) = x1 rev2_A(x1,x2) = x2 rev_A(x1) = max{1, x1} rev1_A(x1,x2) = max{0, x2 - 9} |0|_A = 0 nil_A = 6 s_A(x1) = 0 The next rules are strictly ordered: p1, p2, p3, p4 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: rev1#(X,cons(Y,L)) -> rev1#(Y,L) and R consists of: r1: rev1(|0|(),nil()) -> |0|() r2: rev1(s(X),nil()) -> s(X) r3: rev1(X,cons(Y,L)) -> rev1(Y,L) r4: rev(nil()) -> nil() r5: rev(cons(X,L)) -> cons(rev1(X,L),rev2(X,L)) r6: rev2(X,nil()) -> nil() r7: rev2(X,cons(Y,L)) -> rev(cons(X,rev(rev2(Y,L)))) The set of usable rules consists of (no rules) Take the reduction pair: max/plus interpretations on natural numbers: rev1#_A(x1,x2) = max{x1 + 1, x2} cons_A(x1,x2) = max{x1 + 2, x2 + 1} The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.