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: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: rev2#_A(x1,x2) = x2 + 9 cons_A(x1,x2) = max{38, x2 + 6} rev#_A(x1) = max{16, x1 + 4} rev2_A(x1,x2) = max{1, x2} rev_A(x1) = max{20, x1} rev1_A(x1,x2) = max{19, x2 + 2} |0|_A = 0 nil_A = 0 s_A(x1) = 0 precedence: rev2# = rev# = rev2 > rev = rev1 > cons = |0| = nil = s partial status: pi(rev2#) = [2] pi(cons) = [2] pi(rev#) = [] pi(rev2) = [2] pi(rev) = [] pi(rev1) = [2] pi(|0|) = [] pi(nil) = [] pi(s) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: rev2#_A(x1,x2) = x2 + 11 cons_A(x1,x2) = x2 + 11 rev#_A(x1) = 10 rev2_A(x1,x2) = 23 rev_A(x1) = 35 rev1_A(x1,x2) = x2 + 37 |0|_A = 37 nil_A = 1 s_A(x1) = 35 precedence: |0| > rev1 > rev2# = cons = rev# = rev2 > rev = nil = s partial status: pi(rev2#) = [2] pi(cons) = [2] pi(rev#) = [] pi(rev2) = [] pi(rev) = [] pi(rev1) = [2] pi(|0|) = [] pi(nil) = [] pi(s) = [] 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: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: rev1#_A(x1,x2) = max{x1 + 2, x2 + 2} cons_A(x1,x2) = max{x1 + 2, x2 + 2} precedence: cons > rev1# partial status: pi(rev1#) = [1, 2] pi(cons) = [2] 2. weighted path order base order: max/plus interpretations on natural numbers: rev1#_A(x1,x2) = max{3, x1 - 1, x2 + 2} cons_A(x1,x2) = x2 + 1 precedence: rev1# = cons partial status: pi(rev1#) = [] pi(cons) = [2] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.