YES We show the termination of the relative TRS R/S: R: minus(x,o()) -> x minus(s(x),s(y)) -> minus(x,y) div(|0|(),s(y)) -> |0|() div(s(x),s(y)) -> s(div(minus(x,y),s(y))) divL(x,nil()) -> x divL(x,cons(y,xs)) -> divL(div(x,y),xs) S: cons(x,cons(y,xs)) -> cons(y,cons(x,xs)) -- 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: div#(s(x),s(y)) -> div#(minus(x,y),s(y)) p3: div#(s(x),s(y)) -> minus#(x,y) p4: divL#(x,cons(y,xs)) -> divL#(div(x,y),xs) p5: divL#(x,cons(y,xs)) -> div#(x,y) and R consists of: r1: minus(x,o()) -> x r2: minus(s(x),s(y)) -> minus(x,y) r3: div(|0|(),s(y)) -> |0|() r4: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r5: divL(x,nil()) -> x r6: divL(x,cons(y,xs)) -> divL(div(x,y),xs) r7: cons(x,cons(y,xs)) -> cons(y,cons(x,xs)) The estimated dependency graph contains the following SCCs: {p4} {p2} {p1} -- Reduction pair. Consider the non-minimal dependency pair problem (P, R), where P consists of p1: divL#(x,cons(y,xs)) -> divL#(div(x,y),xs) and R consists of: r1: minus(x,o()) -> x r2: minus(s(x),s(y)) -> minus(x,y) r3: div(|0|(),s(y)) -> |0|() r4: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r5: divL(x,nil()) -> x r6: divL(x,cons(y,xs)) -> divL(div(x,y),xs) r7: cons(x,cons(y,xs)) -> cons(y,cons(x,xs)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7 Take the reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: nil > div > divL > |0| > minus > s > o > cons > divL# argument filter: pi(divL#) = [1, 2] pi(cons) = 2 pi(div) = 1 pi(minus) = 1 pi(o) = [] pi(s) = 1 pi(|0|) = [] pi(divL) = [1, 2] pi(nil) = [] 2. lexicographic path order with precedence: precedence: nil > |0| > div > divL > s > minus > o > cons > divL# argument filter: pi(divL#) = 2 pi(cons) = [2] pi(div) = [1] pi(minus) = [1] pi(o) = [] pi(s) = [1] pi(|0|) = [] pi(divL) = [2] pi(nil) = [] 3. lexicographic path order with precedence: precedence: nil > |0| > divL# > div > divL > minus > s > o > cons argument filter: pi(divL#) = [] pi(cons) = [2] pi(div) = [] pi(minus) = [] pi(o) = [] pi(s) = 1 pi(|0|) = [] pi(divL) = 2 pi(nil) = [] 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: div#(s(x),s(y)) -> div#(minus(x,y),s(y)) and R consists of: r1: minus(x,o()) -> x r2: minus(s(x),s(y)) -> minus(x,y) r3: div(|0|(),s(y)) -> |0|() r4: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r5: divL(x,nil()) -> x r6: divL(x,cons(y,xs)) -> divL(div(x,y),xs) r7: cons(x,cons(y,xs)) -> cons(y,cons(x,xs)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7 Take the reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: div > divL > cons > nil > |0| > o > minus > s > div# argument filter: pi(div#) = [1, 2] pi(s) = [1] pi(minus) = 1 pi(o) = [] pi(div) = 1 pi(|0|) = [] pi(divL) = [1, 2] pi(nil) = [] pi(cons) = 2 2. lexicographic path order with precedence: precedence: |0| > div > divL > cons > nil > o > minus > s > div# argument filter: pi(div#) = [1, 2] pi(s) = [1] pi(minus) = 1 pi(o) = [] pi(div) = [1] pi(|0|) = [] pi(divL) = 2 pi(nil) = [] pi(cons) = [2] 3. lexicographic path order with precedence: precedence: div > divL > cons > nil > |0| > o > minus > s > div# argument filter: pi(div#) = 2 pi(s) = [1] pi(minus) = 1 pi(o) = [] pi(div) = 1 pi(|0|) = [] pi(divL) = 2 pi(nil) = [] pi(cons) = 2 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,o()) -> x r2: minus(s(x),s(y)) -> minus(x,y) r3: div(|0|(),s(y)) -> |0|() r4: div(s(x),s(y)) -> s(div(minus(x,y),s(y))) r5: divL(x,nil()) -> x r6: divL(x,cons(y,xs)) -> divL(div(x,y),xs) r7: cons(x,cons(y,xs)) -> cons(y,cons(x,xs)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7 Take the reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: divL > minus > cons > o > div > nil > s > |0| > minus# argument filter: pi(minus#) = [2] pi(s) = 1 pi(minus) = 1 pi(o) = [] pi(div) = 1 pi(|0|) = [] pi(divL) = 1 pi(nil) = [] pi(cons) = [2] 2. lexicographic path order with precedence: precedence: div > divL > cons > nil > |0| > o > minus > minus# > s argument filter: pi(minus#) = [2] pi(s) = [1] pi(minus) = 1 pi(o) = [] pi(div) = 1 pi(|0|) = [] pi(divL) = 1 pi(nil) = [] pi(cons) = [] 3. lexicographic path order with precedence: precedence: div > divL > cons > nil > |0| > o > minus > s > minus# argument filter: pi(minus#) = [2] pi(s) = 1 pi(minus) = 1 pi(o) = [] pi(div) = 1 pi(|0|) = [] pi(divL) = [1] pi(nil) = [] pi(cons) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.