YES We show the termination of the TRS R: times(x,plus(y,s(z))) -> plus(times(x,plus(y,times(s(z),|0|()))),times(x,s(z))) times(x,|0|()) -> |0|() times(x,s(y)) -> plus(times(x,y),x) plus(x,|0|()) -> x plus(x,s(y)) -> s(plus(x,y)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: times#(x,plus(y,s(z))) -> plus#(times(x,plus(y,times(s(z),|0|()))),times(x,s(z))) p2: times#(x,plus(y,s(z))) -> times#(x,plus(y,times(s(z),|0|()))) p3: times#(x,plus(y,s(z))) -> plus#(y,times(s(z),|0|())) p4: times#(x,plus(y,s(z))) -> times#(s(z),|0|()) p5: times#(x,plus(y,s(z))) -> times#(x,s(z)) p6: times#(x,s(y)) -> plus#(times(x,y),x) p7: times#(x,s(y)) -> times#(x,y) p8: plus#(x,s(y)) -> plus#(x,y) and R consists of: r1: times(x,plus(y,s(z))) -> plus(times(x,plus(y,times(s(z),|0|()))),times(x,s(z))) r2: times(x,|0|()) -> |0|() r3: times(x,s(y)) -> plus(times(x,y),x) r4: plus(x,|0|()) -> x r5: plus(x,s(y)) -> s(plus(x,y)) The estimated dependency graph contains the following SCCs: {p2, p5, p7} {p8} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: times#(x,s(y)) -> times#(x,y) p2: times#(x,plus(y,s(z))) -> times#(x,s(z)) p3: times#(x,plus(y,s(z))) -> times#(x,plus(y,times(s(z),|0|()))) and R consists of: r1: times(x,plus(y,s(z))) -> plus(times(x,plus(y,times(s(z),|0|()))),times(x,s(z))) r2: times(x,|0|()) -> |0|() r3: times(x,s(y)) -> plus(times(x,y),x) r4: plus(x,|0|()) -> x r5: plus(x,s(y)) -> s(plus(x,y)) The set of usable rules consists of r2, r4, r5 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: times#_A(x1,x2) = x1 + ((0,0),(1,0)) x2 + (6,1) s_A(x1) = x1 + (2,0) plus_A(x1,x2) = ((1,0),(1,1)) x1 + ((1,0),(0,0)) x2 + (3,2) times_A(x1,x2) = (2,1) |0|_A() = (1,0) precedence: times# = s = plus = times = |0| partial status: pi(times#) = [] pi(s) = [] pi(plus) = [] pi(times) = [] pi(|0|) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: times#_A(x1,x2) = x1 + (3,5) s_A(x1) = ((1,0),(1,0)) x1 + (0,1) plus_A(x1,x2) = ((1,0),(1,1)) x1 + (2,4) times_A(x1,x2) = (0,0) |0|_A() = (1,2) precedence: times > |0| > times# > s = plus partial status: pi(times#) = [1] pi(s) = [] pi(plus) = [1] pi(times) = [] pi(|0|) = [] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: times#(x,plus(y,s(z))) -> times#(x,s(z)) p2: times#(x,plus(y,s(z))) -> times#(x,plus(y,times(s(z),|0|()))) and R consists of: r1: times(x,plus(y,s(z))) -> plus(times(x,plus(y,times(s(z),|0|()))),times(x,s(z))) r2: times(x,|0|()) -> |0|() r3: times(x,s(y)) -> plus(times(x,y),x) r4: plus(x,|0|()) -> x r5: plus(x,s(y)) -> s(plus(x,y)) The estimated dependency graph contains the following SCCs: {p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: times#(x,plus(y,s(z))) -> times#(x,plus(y,times(s(z),|0|()))) and R consists of: r1: times(x,plus(y,s(z))) -> plus(times(x,plus(y,times(s(z),|0|()))),times(x,s(z))) r2: times(x,|0|()) -> |0|() r3: times(x,s(y)) -> plus(times(x,y),x) r4: plus(x,|0|()) -> x r5: plus(x,s(y)) -> s(plus(x,y)) The set of usable rules consists of r2, r4, r5 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: times#_A(x1,x2) = x1 + ((1,0),(0,0)) x2 + (1,2) plus_A(x1,x2) = ((1,0),(1,1)) x1 + ((1,0),(1,0)) x2 + (1,4) s_A(x1) = x1 + (5,3) times_A(x1,x2) = (2,1) |0|_A() = (1,1) precedence: plus > times# = s = times = |0| partial status: pi(times#) = [] pi(plus) = [1] pi(s) = [1] pi(times) = [] pi(|0|) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: times#_A(x1,x2) = (0,0) plus_A(x1,x2) = ((1,0),(1,1)) x1 + (3,4) s_A(x1) = ((1,0),(1,1)) x1 + (2,3) times_A(x1,x2) = (0,1) |0|_A() = (1,2) precedence: plus > s = times > times# = |0| partial status: pi(times#) = [] pi(plus) = [1] pi(s) = [1] pi(times) = [] pi(|0|) = [] 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: plus#(x,s(y)) -> plus#(x,y) and R consists of: r1: times(x,plus(y,s(z))) -> plus(times(x,plus(y,times(s(z),|0|()))),times(x,s(z))) r2: times(x,|0|()) -> |0|() r3: times(x,s(y)) -> plus(times(x,y),x) r4: plus(x,|0|()) -> x r5: plus(x,s(y)) -> s(plus(x,y)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: plus#_A(x1,x2) = ((0,0),(1,0)) x2 + (1,1) s_A(x1) = x1 + (2,2) precedence: s > plus# partial status: pi(plus#) = [] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: plus#_A(x1,x2) = (0,0) s_A(x1) = (1,1) precedence: plus# = s partial status: pi(plus#) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.