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: weighted path order base order: max/plus interpretations on natural numbers: rev2#_A(x1,x2) = x2 + 9 cons_A(x1,x2) = max{8, x2 + 2} rev#_A(x1) = x1 + 9 rev2_A(x1,x2) = x2 rev_A(x1) = max{4, x1} rev1_A(x1,x2) = max{0, x2 - 6} |0|_A = 1 nil_A = 8 s_A(x1) = 0 precedence: rev2# = cons = rev2 = rev = rev1 > rev# > |0| = nil = s partial status: pi(rev2#) = [] pi(cons) = [] pi(rev#) = [] pi(rev2) = [] pi(rev) = [] pi(rev1) = [] pi(|0|) = [] pi(nil) = [] pi(s) = [] The next rules are strictly ordered: p2 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: rev2#(X,cons(Y,L)) -> rev#(rev2(Y,L)) p2: rev2#(X,cons(Y,L)) -> rev2#(Y,L) p3: 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 estimated dependency graph contains the following SCCs: {p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: 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 set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: rev2#_A(x1,x2) = max{x1 + 1, x2} cons_A(x1,x2) = max{x1 + 2, x2 + 1} precedence: rev2# = cons partial status: pi(rev2#) = [1, 2] pi(cons) = [2] The next rules are strictly ordered: p1 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: weighted path order base order: max/plus interpretations on natural numbers: rev1#_A(x1,x2) = max{x1 + 1, x2} cons_A(x1,x2) = max{x1 + 2, x2 + 1} precedence: rev1# = cons partial status: pi(rev1#) = [1, 2] pi(cons) = [2] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.