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 r5, r7 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: div#_A(x1,x2) = max{1, x1 - 17} div_A(x1,x2) = max{16, x1 + 11, x2 - 14} times_A(x1,x2) = max{2, x1 - 26, x2 + 1} quot#_A(x1,x2,x3) = max{1, x1 - 17} |0|_A = 8 s_A(x1) = x1 + 6 div#!_A(x1,x2) = max{23, x1 + 22} div!_A(x1,x2) = max{5, x1 - 10, x2 - 3} times!_A(x1,x2) = x2 + 9 quot#!_A(x1,x2,x3) = max{23, x1 + 22} |0|!_A = 2 s!_A(x1) = 1 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: div#_A(x1,x2) = max{1, x1 - 3} div_A(x1,x2) = max{2, x1 + 1, x2 - 13} times_A(x1,x2) = max{17, x1 - 10, x2 + 6} quot#_A(x1,x2,x3) = max{1, x1 - 3} |0|_A = 0 s_A(x1) = x1 + 6 div#!_A(x1,x2) = 0 div!_A(x1,x2) = max{20, x2 + 2} times!_A(x1,x2) = max{4, x1 - 1} quot#!_A(x1,x2,x3) = 0 |0|!_A = 3 s!_A(x1) = 2 partial status: pi(div#) = [] pi(div) = [1, 2] pi(times) = [2] pi(quot#) = [] pi(|0|) = [] pi(s) = [] The following rules are removed: p1, p4 -- 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 r4 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: div#_A(x1,x2) = max{0, x1 - 2, x2 - 8} quot#_A(x1,x2,x3) = max{0, x1 - 2, x2 - 8, x3 - 8} |0|_A = 3 s_A(x1) = max{7, x1 - 2} times_A(x1,x2) = max{9, x1 - 9, x2 - 11} div#!_A(x1,x2) = max{3, x2 + 1} quot#!_A(x1,x2,x3) = max{2, x3 + 1} |0|!_A = 9 s!_A(x1) = 0 times!_A(x1,x2) = max{12, x1 - 8, x2 - 1} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: div#_A(x1,x2) = max{0, x1 - 2, x2 - 3} quot#_A(x1,x2,x3) = max{0, x1 - 2, x2 - 3, x3 - 3} |0|_A = 0 s_A(x1) = max{2, x1 - 1} times_A(x1,x2) = max{1, x1 - 3, x2 - 5} div#!_A(x1,x2) = max{1, x1 - 1, x2 - 4} quot#!_A(x1,x2,x3) = max{1, x1 - 1, x3 - 4} |0|!_A = 2 s!_A(x1) = 4 times!_A(x1,x2) = max{5, x1 - 4, x2 - 7} partial status: pi(div#) = [2] pi(quot#) = [2] pi(|0|) = [] pi(s) = [] pi(times) = [] The following rules are removed: p2 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: div#(x,y) -> quot#(x,y,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 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 r4 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: times#_A(x1,x2) = 0 s_A(x1) = max{14, x1 - 7} times_A(x1,x2) = max{5, x1 - 16, x2 - 17} |0|_A = 5 times#!_A(x1,x2) = max{1, x1 - 43} s!_A(x1) = max{2, x1 - 42} times!_A(x1,x2) = max{3, x1 - 33, x2 - 67} |0|!_A = 1 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: times#_A(x1,x2) = 0 s_A(x1) = max{7, x1 - 2} times_A(x1,x2) = max{11, x1 - 11, x2 - 15} |0|_A = 3 times#!_A(x1,x2) = max{1, x1 - 8, x2 - 1} s!_A(x1) = 0 times!_A(x1,x2) = max{1, x1 - 8, x2 - 2} |0|!_A = 0 partial status: pi(times#) = [1] pi(s) = [1] pi(times) = [] pi(|0|) = [] 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: 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 r4 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = 0 s_A(x1) = max{13, x1 - 8} times_A(x1,x2) = max{3, x1 - 15, x2 - 16} |0|_A = 3 plus#!_A(x1,x2) = max{1, x1 - 12} s!_A(x1) = max{6, x1 + 2} times!_A(x1,x2) = max{7, x1 - 21, x2 - 25} |0|!_A = 4 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = 0 s_A(x1) = max{17, x1 - 12} times_A(x1,x2) = max{3, x1 - 19, x2 - 20} |0|_A = 3 plus#!_A(x1,x2) = max{0, x1 - 25} s!_A(x1) = max{5, x1 - 24} times!_A(x1,x2) = max{4, x1 - 25, x2 - 33} |0|!_A = 1 partial status: pi(plus#) = [1] pi(s) = [1] pi(times) = [] pi(|0|) = [] The following rules are removed: p1 Then no dependency pair remains.