YES We show the termination of the TRS R: plus(|0|(),Y) -> Y plus(s(X),Y) -> s(plus(X,Y)) min(X,|0|()) -> X min(s(X),s(Y)) -> min(X,Y) min(min(X,Y),Z()) -> min(X,plus(Y,Z())) quot(|0|(),s(Y)) -> |0|() quot(s(X),s(Y)) -> s(quot(min(X,Y),s(Y))) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: plus#(s(X),Y) -> plus#(X,Y) p2: min#(s(X),s(Y)) -> min#(X,Y) p3: min#(min(X,Y),Z()) -> min#(X,plus(Y,Z())) p4: min#(min(X,Y),Z()) -> plus#(Y,Z()) p5: quot#(s(X),s(Y)) -> quot#(min(X,Y),s(Y)) p6: quot#(s(X),s(Y)) -> min#(X,Y) and R consists of: r1: plus(|0|(),Y) -> Y r2: plus(s(X),Y) -> s(plus(X,Y)) r3: min(X,|0|()) -> X r4: min(s(X),s(Y)) -> min(X,Y) r5: min(min(X,Y),Z()) -> min(X,plus(Y,Z())) r6: quot(|0|(),s(Y)) -> |0|() r7: quot(s(X),s(Y)) -> s(quot(min(X,Y),s(Y))) The estimated dependency graph contains the following SCCs: {p5} {p2, p3} {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: quot#(s(X),s(Y)) -> quot#(min(X,Y),s(Y)) and R consists of: r1: plus(|0|(),Y) -> Y r2: plus(s(X),Y) -> s(plus(X,Y)) r3: min(X,|0|()) -> X r4: min(s(X),s(Y)) -> min(X,Y) r5: min(min(X,Y),Z()) -> min(X,plus(Y,Z())) r6: quot(|0|(),s(Y)) -> |0|() r7: quot(s(X),s(Y)) -> s(quot(min(X,Y),s(Y))) The set of usable rules consists of r1, r2, r3, 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: quot#_A(x1,x2) = ((0,0),(1,0)) x1 + (1,1) s_A(x1) = x1 + (3,5) min_A(x1,x2) = ((1,0),(1,1)) x1 + ((0,0),(1,0)) x2 + (2,6) plus_A(x1,x2) = x1 + ((1,0),(0,0)) x2 + (2,0) |0|_A() = (1,0) Z_A() = (3,1) precedence: min > Z > plus = |0| > quot# = s partial status: pi(quot#) = [] pi(s) = [1] pi(min) = [1] pi(plus) = [] pi(|0|) = [] pi(Z) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: quot#_A(x1,x2) = (0,0) s_A(x1) = x1 + (3,1) min_A(x1,x2) = ((1,0),(1,1)) x1 + (2,2) plus_A(x1,x2) = (0,0) |0|_A() = (1,1) Z_A() = (1,1) precedence: |0| > min = Z > s = plus > quot# partial status: pi(quot#) = [] pi(s) = [1] pi(min) = [1] pi(plus) = [] pi(|0|) = [] pi(Z) = [] 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: min#(min(X,Y),Z()) -> min#(X,plus(Y,Z())) p2: min#(s(X),s(Y)) -> min#(X,Y) and R consists of: r1: plus(|0|(),Y) -> Y r2: plus(s(X),Y) -> s(plus(X,Y)) r3: min(X,|0|()) -> X r4: min(s(X),s(Y)) -> min(X,Y) r5: min(min(X,Y),Z()) -> min(X,plus(Y,Z())) r6: quot(|0|(),s(Y)) -> |0|() r7: quot(s(X),s(Y)) -> s(quot(min(X,Y),s(Y))) The set of usable rules consists of r1, r2 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: min#_A(x1,x2) = x1 + ((0,0),(1,0)) x2 + (1,1) min_A(x1,x2) = ((1,0),(1,0)) x1 + (3,2) Z_A() = (2,7) plus_A(x1,x2) = ((1,0),(1,0)) x1 + x2 + (3,1) s_A(x1) = ((1,0),(0,0)) x1 + (2,2) |0|_A() = (1,1) precedence: min = Z = plus = s = |0| > min# partial status: pi(min#) = [1] pi(min) = [] pi(Z) = [] pi(plus) = [] pi(s) = [] pi(|0|) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: min#_A(x1,x2) = (0,0) min_A(x1,x2) = (1,1) Z_A() = (0,2) plus_A(x1,x2) = (0,3) s_A(x1) = (1,1) |0|_A() = (0,0) precedence: min# = min = Z = plus = s = |0| partial status: pi(min#) = [] pi(min) = [] pi(Z) = [] pi(plus) = [] pi(s) = [] pi(|0|) = [] 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: min#(min(X,Y),Z()) -> min#(X,plus(Y,Z())) and R consists of: r1: plus(|0|(),Y) -> Y r2: plus(s(X),Y) -> s(plus(X,Y)) r3: min(X,|0|()) -> X r4: min(s(X),s(Y)) -> min(X,Y) r5: min(min(X,Y),Z()) -> min(X,plus(Y,Z())) r6: quot(|0|(),s(Y)) -> |0|() r7: quot(s(X),s(Y)) -> s(quot(min(X,Y),s(Y))) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: min#(min(X,Y),Z()) -> min#(X,plus(Y,Z())) and R consists of: r1: plus(|0|(),Y) -> Y r2: plus(s(X),Y) -> s(plus(X,Y)) r3: min(X,|0|()) -> X r4: min(s(X),s(Y)) -> min(X,Y) r5: min(min(X,Y),Z()) -> min(X,plus(Y,Z())) r6: quot(|0|(),s(Y)) -> |0|() r7: quot(s(X),s(Y)) -> s(quot(min(X,Y),s(Y))) The set of usable rules consists of r1, r2 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: min#_A(x1,x2) = ((0,0),(1,0)) x1 + ((0,0),(1,0)) x2 + (1,1) min_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(1,1)) x2 + (4,10) Z_A() = (2,8) plus_A(x1,x2) = ((1,0),(1,1)) x1 + x2 + (1,1) |0|_A() = (1,1) s_A(x1) = (2,2) precedence: plus > min# = Z = s > min > |0| partial status: pi(min#) = [] pi(min) = [] pi(Z) = [] pi(plus) = [1, 2] pi(|0|) = [] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: min#_A(x1,x2) = (0,0) min_A(x1,x2) = (1,1) Z_A() = (0,0) plus_A(x1,x2) = (0,0) |0|_A() = (1,1) s_A(x1) = (0,0) precedence: |0| > min = plus > min# = Z = s partial status: pi(min#) = [] pi(min) = [] pi(Z) = [] pi(plus) = [] pi(|0|) = [] pi(s) = [] 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#(s(X),Y) -> plus#(X,Y) and R consists of: r1: plus(|0|(),Y) -> Y r2: plus(s(X),Y) -> s(plus(X,Y)) r3: min(X,|0|()) -> X r4: min(s(X),s(Y)) -> min(X,Y) r5: min(min(X,Y),Z()) -> min(X,plus(Y,Z())) r6: quot(|0|(),s(Y)) -> |0|() r7: quot(s(X),s(Y)) -> s(quot(min(X,Y),s(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) = ((1,0),(1,1)) x1 + (1,2) s_A(x1) = ((1,0),(0,0)) x1 + (2,1) precedence: s > plus# partial status: pi(plus#) = [1] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: plus#_A(x1,x2) = (1,1) s_A(x1) = (2,2) 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.