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