YES We show the termination of the TRS R: app(nil(),y) -> y app(add(n,x),y) -> add(n,app(x,y)) reverse(nil()) -> nil() reverse(add(n,x)) -> app(reverse(x),add(n,nil())) shuffle(nil()) -> nil() shuffle(add(n,x)) -> add(n,shuffle(reverse(x))) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(add(n,x),y) -> app#(x,y) p2: reverse#(add(n,x)) -> app#(reverse(x),add(n,nil())) p3: reverse#(add(n,x)) -> reverse#(x) p4: shuffle#(add(n,x)) -> shuffle#(reverse(x)) p5: shuffle#(add(n,x)) -> reverse#(x) and R consists of: r1: app(nil(),y) -> y r2: app(add(n,x),y) -> add(n,app(x,y)) r3: reverse(nil()) -> nil() r4: reverse(add(n,x)) -> app(reverse(x),add(n,nil())) r5: shuffle(nil()) -> nil() r6: shuffle(add(n,x)) -> add(n,shuffle(reverse(x))) The estimated dependency graph contains the following SCCs: {p4} {p3} {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: shuffle#(add(n,x)) -> shuffle#(reverse(x)) and R consists of: r1: app(nil(),y) -> y r2: app(add(n,x),y) -> add(n,app(x,y)) r3: reverse(nil()) -> nil() r4: reverse(add(n,x)) -> app(reverse(x),add(n,nil())) r5: shuffle(nil()) -> nil() r6: shuffle(add(n,x)) -> add(n,shuffle(reverse(x))) The set of usable rules consists of r1, r2, r3, r4, r5 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: shuffle#_A(x1) = x1 + 4 add_A(x1,x2) = max{5, x1 + 3, x2} reverse_A(x1) = max{2, x1} app_A(x1,x2) = max{5, x1, x2} nil_A = 4 shuffle_A(x1) = 6 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: shuffle#_A(x1) = x1 add_A(x1,x2) = x1 + x2 + 4 reverse_A(x1) = x1 + 1 app_A(x1,x2) = x1 + x2 nil_A() = 0 shuffle_A(x1) = x1 shuffle#!_A(x1) = 1 add!_A(x1,x2) = x2 + 3 reverse!_A(x1) = x1 + 2 app!_A(x1,x2) = x1 + x2 nil!_A() = 1 shuffle!_A(x1) = 0 partial status: pi(shuffle#) = [1] pi(add) = [] pi(reverse) = [] pi(app) = [2] pi(nil) = [] pi(shuffle) = [] The following rules are removed: p1 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: reverse#(add(n,x)) -> reverse#(x) and R consists of: r1: app(nil(),y) -> y r2: app(add(n,x),y) -> add(n,app(x,y)) r3: reverse(nil()) -> nil() r4: reverse(add(n,x)) -> app(reverse(x),add(n,nil())) r5: shuffle(nil()) -> nil() r6: shuffle(add(n,x)) -> add(n,shuffle(reverse(x))) The set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: reverse#_A(x1) = max{7, x1 - 9} add_A(x1,x2) = max{x1 - 5, x2 + 8} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: reverse#_A(x1) = x1 add_A(x1,x2) = x1 + x2 + 3 reverse#!_A(x1) = x1 add!_A(x1,x2) = x2 + 2 partial status: pi(reverse#) = [] pi(add) = [2] The following rules are removed: p1 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(add(n,x),y) -> app#(x,y) and R consists of: r1: app(nil(),y) -> y r2: app(add(n,x),y) -> add(n,app(x,y)) r3: reverse(nil()) -> nil() r4: reverse(add(n,x)) -> app(reverse(x),add(n,nil())) r5: shuffle(nil()) -> nil() r6: shuffle(add(n,x)) -> add(n,shuffle(reverse(x))) The set of usable rules consists of r5 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: app#_A(x1,x2) = 22 add_A(x1,x2) = max{22, x1 + 19, x2 + 19} shuffle_A(x1) = max{23, x1 - 23} nil_A = 13 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: app#_A(x1,x2) = x1 add_A(x1,x2) = x1 + x2 + 1 shuffle_A(x1) = x1 nil_A() = 1 app#!_A(x1,x2) = x1 add!_A(x1,x2) = x2 + 3 shuffle!_A(x1) = 1 nil!_A() = 0 partial status: pi(app#) = [] pi(add) = [1, 2] pi(shuffle) = [] pi(nil) = [] The following rules are removed: p1 Then no dependency pair remains.