YES We show the termination of the TRS R: plus(x,|0|()) -> x plus(|0|(),y) -> y plus(s(x),y) -> s(plus(x,y)) times(|0|(),y) -> |0|() times(s(|0|()),y) -> y times(s(x),y) -> plus(y,times(x,y)) div(|0|(),y) -> |0|() div(x,y) -> quot(x,y,y) quot(|0|(),s(y),z) -> |0|() quot(s(x),s(y),z) -> quot(x,y,z) quot(x,|0|(),s(z)) -> s(div(x,s(z))) div(div(x,y),z) -> div(x,times(y,z)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: plus#(s(x),y) -> plus#(x,y) p2: times#(s(x),y) -> plus#(y,times(x,y)) p3: times#(s(x),y) -> times#(x,y) p4: div#(x,y) -> quot#(x,y,y) p5: quot#(s(x),s(y),z) -> quot#(x,y,z) p6: quot#(x,|0|(),s(z)) -> div#(x,s(z)) p7: div#(div(x,y),z) -> div#(x,times(y,z)) p8: div#(div(x,y),z) -> times#(y,z) and R consists of: r1: plus(x,|0|()) -> x r2: plus(|0|(),y) -> y r3: plus(s(x),y) -> s(plus(x,y)) r4: times(|0|(),y) -> |0|() r5: times(s(|0|()),y) -> y r6: times(s(x),y) -> plus(y,times(x,y)) r7: div(|0|(),y) -> |0|() r8: div(x,y) -> quot(x,y,y) r9: quot(|0|(),s(y),z) -> |0|() r10: quot(s(x),s(y),z) -> quot(x,y,z) r11: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r12: div(div(x,y),z) -> div(x,times(y,z)) The estimated dependency graph contains the following SCCs: {p4, p5, p6, p7} {p3} {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: div#(div(x,y),z) -> div#(x,times(y,z)) p2: div#(x,y) -> quot#(x,y,y) p3: quot#(x,|0|(),s(z)) -> div#(x,s(z)) p4: quot#(s(x),s(y),z) -> quot#(x,y,z) and R consists of: r1: plus(x,|0|()) -> x r2: plus(|0|(),y) -> y r3: plus(s(x),y) -> s(plus(x,y)) r4: times(|0|(),y) -> |0|() r5: times(s(|0|()),y) -> y r6: times(s(x),y) -> plus(y,times(x,y)) r7: div(|0|(),y) -> |0|() r8: div(x,y) -> quot(x,y,y) r9: quot(|0|(),s(y),z) -> |0|() r10: quot(s(x),s(y),z) -> quot(x,y,z) r11: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r12: div(div(x,y),z) -> div(x,times(y,z)) The set of usable rules consists of r1, r2, r3, r4, r5, r6 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: div#_A(x1,x2) = x1 + 9 div_A(x1,x2) = max{x1 + 1, x2 + 3} times_A(x1,x2) = max{x1 + 13, x2 + 6} quot#_A(x1,x2,x3) = x1 + 9 |0|_A = 5 s_A(x1) = x1 plus_A(x1,x2) = max{x1 + 6, x2} precedence: times = plus > div# = div = quot# = |0| = s partial status: pi(div#) = [] pi(div) = [2] pi(times) = [] pi(quot#) = [] pi(|0|) = [] pi(s) = [] pi(plus) = [] 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: div#(x,y) -> quot#(x,y,y) p2: quot#(x,|0|(),s(z)) -> div#(x,s(z)) p3: quot#(s(x),s(y),z) -> quot#(x,y,z) and R consists of: r1: plus(x,|0|()) -> x r2: plus(|0|(),y) -> y r3: plus(s(x),y) -> s(plus(x,y)) r4: times(|0|(),y) -> |0|() r5: times(s(|0|()),y) -> y r6: times(s(x),y) -> plus(y,times(x,y)) r7: div(|0|(),y) -> |0|() r8: div(x,y) -> quot(x,y,y) r9: quot(|0|(),s(y),z) -> |0|() r10: quot(s(x),s(y),z) -> quot(x,y,z) r11: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r12: div(div(x,y),z) -> div(x,times(y,z)) The estimated dependency graph contains the following SCCs: {p1, p2, p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: div#(x,y) -> quot#(x,y,y) p2: quot#(s(x),s(y),z) -> quot#(x,y,z) p3: quot#(x,|0|(),s(z)) -> div#(x,s(z)) and R consists of: r1: plus(x,|0|()) -> x r2: plus(|0|(),y) -> y r3: plus(s(x),y) -> s(plus(x,y)) r4: times(|0|(),y) -> |0|() r5: times(s(|0|()),y) -> y r6: times(s(x),y) -> plus(y,times(x,y)) r7: div(|0|(),y) -> |0|() r8: div(x,y) -> quot(x,y,y) r9: quot(|0|(),s(y),z) -> |0|() r10: quot(s(x),s(y),z) -> quot(x,y,z) r11: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r12: div(div(x,y),z) -> div(x,times(y,z)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: div#_A(x1,x2) = x1 + 3 quot#_A(x1,x2,x3) = x1 + 3 s_A(x1) = max{4, x1} |0|_A = 0 precedence: div# = quot# = s = |0| partial status: pi(div#) = [1] pi(quot#) = [1] pi(s) = [1] 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: div#(x,y) -> quot#(x,y,y) p2: quot#(x,|0|(),s(z)) -> div#(x,s(z)) and R consists of: r1: plus(x,|0|()) -> x r2: plus(|0|(),y) -> y r3: plus(s(x),y) -> s(plus(x,y)) r4: times(|0|(),y) -> |0|() r5: times(s(|0|()),y) -> y r6: times(s(x),y) -> plus(y,times(x,y)) r7: div(|0|(),y) -> |0|() r8: div(x,y) -> quot(x,y,y) r9: quot(|0|(),s(y),z) -> |0|() r10: quot(s(x),s(y),z) -> quot(x,y,z) r11: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r12: div(div(x,y),z) -> div(x,times(y,z)) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: div#(x,y) -> quot#(x,y,y) p2: quot#(x,|0|(),s(z)) -> div#(x,s(z)) and R consists of: r1: plus(x,|0|()) -> x r2: plus(|0|(),y) -> y r3: plus(s(x),y) -> s(plus(x,y)) r4: times(|0|(),y) -> |0|() r5: times(s(|0|()),y) -> y r6: times(s(x),y) -> plus(y,times(x,y)) r7: div(|0|(),y) -> |0|() r8: div(x,y) -> quot(x,y,y) r9: quot(|0|(),s(y),z) -> |0|() r10: quot(s(x),s(y),z) -> quot(x,y,z) r11: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r12: div(div(x,y),z) -> div(x,times(y,z)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: div#_A(x1,x2) = x2 + 7 quot#_A(x1,x2,x3) = max{6, x2 - 1, x3 + 3} |0|_A = 11 s_A(x1) = 3 precedence: div# = quot# = |0| = s partial status: pi(div#) = [] pi(quot#) = [] pi(|0|) = [] pi(s) = [] 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: quot#(x,|0|(),s(z)) -> div#(x,s(z)) and R consists of: r1: plus(x,|0|()) -> x r2: plus(|0|(),y) -> y r3: plus(s(x),y) -> s(plus(x,y)) r4: times(|0|(),y) -> |0|() r5: times(s(|0|()),y) -> y r6: times(s(x),y) -> plus(y,times(x,y)) r7: div(|0|(),y) -> |0|() r8: div(x,y) -> quot(x,y,y) r9: quot(|0|(),s(y),z) -> |0|() r10: quot(s(x),s(y),z) -> quot(x,y,z) r11: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r12: div(div(x,y),z) -> div(x,times(y,z)) The estimated dependency graph contains the following SCCs: (no SCCs) -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: times#(s(x),y) -> times#(x,y) and R consists of: r1: plus(x,|0|()) -> x r2: plus(|0|(),y) -> y r3: plus(s(x),y) -> s(plus(x,y)) r4: times(|0|(),y) -> |0|() r5: times(s(|0|()),y) -> y r6: times(s(x),y) -> plus(y,times(x,y)) r7: div(|0|(),y) -> |0|() r8: div(x,y) -> quot(x,y,y) r9: quot(|0|(),s(y),z) -> |0|() r10: quot(s(x),s(y),z) -> quot(x,y,z) r11: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r12: div(div(x,y),z) -> div(x,times(y,z)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: times#_A(x1,x2) = max{1, x1, x2} s_A(x1) = x1 + 1 precedence: times# = s partial status: pi(times#) = [1, 2] 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(x,|0|()) -> x r2: plus(|0|(),y) -> y r3: plus(s(x),y) -> s(plus(x,y)) r4: times(|0|(),y) -> |0|() r5: times(s(|0|()),y) -> y r6: times(s(x),y) -> plus(y,times(x,y)) r7: div(|0|(),y) -> |0|() r8: div(x,y) -> quot(x,y,y) r9: quot(|0|(),s(y),z) -> |0|() r10: quot(s(x),s(y),z) -> quot(x,y,z) r11: quot(x,|0|(),s(z)) -> s(div(x,s(z))) r12: div(div(x,y),z) -> div(x,times(y,z)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: plus#_A(x1,x2) = max{0, x1 - 2} s_A(x1) = max{3, x1 + 1} precedence: plus# = s partial status: pi(plus#) = [] pi(s) = [1] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.