YES We show the termination of the TRS R: minus(|0|(),Y) -> |0|() minus(s(X),s(Y)) -> minus(X,Y) geq(X,|0|()) -> true() geq(|0|(),s(Y)) -> false() geq(s(X),s(Y)) -> geq(X,Y) div(|0|(),s(Y)) -> |0|() div(s(X),s(Y)) -> if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|()) if(true(),X,Y) -> X if(false(),X,Y) -> Y -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: minus#(s(X),s(Y)) -> minus#(X,Y) p2: geq#(s(X),s(Y)) -> geq#(X,Y) p3: div#(s(X),s(Y)) -> if#(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|()) p4: div#(s(X),s(Y)) -> geq#(X,Y) p5: div#(s(X),s(Y)) -> div#(minus(X,Y),s(Y)) p6: div#(s(X),s(Y)) -> minus#(X,Y) and R consists of: r1: minus(|0|(),Y) -> |0|() r2: minus(s(X),s(Y)) -> minus(X,Y) r3: geq(X,|0|()) -> true() r4: geq(|0|(),s(Y)) -> false() r5: geq(s(X),s(Y)) -> geq(X,Y) r6: div(|0|(),s(Y)) -> |0|() r7: div(s(X),s(Y)) -> if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|()) r8: if(true(),X,Y) -> X r9: if(false(),X,Y) -> Y The estimated dependency graph contains the following SCCs: {p5} {p1} {p2} -- Reduction pair. Consider the 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(|0|(),Y) -> |0|() r2: minus(s(X),s(Y)) -> minus(X,Y) r3: geq(X,|0|()) -> true() r4: geq(|0|(),s(Y)) -> false() r5: geq(s(X),s(Y)) -> geq(X,Y) r6: div(|0|(),s(Y)) -> |0|() r7: div(s(X),s(Y)) -> if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|()) r8: if(true(),X,Y) -> X r9: if(false(),X,Y) -> Y The set of usable rules consists of r1, r2 Take the reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: |0| > minus > s > div# argument filter: pi(div#) = [1] pi(s) = [1] pi(minus) = 1 pi(|0|) = [] 2. matrix interpretations: carrier: N^1 order: standard order interpretations: div#_A(x1,x2) = x1 s_A(x1) = x1 + 1 minus_A(x1,x2) = 2 |0|_A() = 1 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: minus#(s(X),s(Y)) -> minus#(X,Y) and R consists of: r1: minus(|0|(),Y) -> |0|() r2: minus(s(X),s(Y)) -> minus(X,Y) r3: geq(X,|0|()) -> true() r4: geq(|0|(),s(Y)) -> false() r5: geq(s(X),s(Y)) -> geq(X,Y) r6: div(|0|(),s(Y)) -> |0|() r7: div(s(X),s(Y)) -> if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|()) r8: if(true(),X,Y) -> X r9: if(false(),X,Y) -> Y The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: s > minus# argument filter: pi(minus#) = 2 pi(s) = [1] 2. matrix interpretations: carrier: N^1 order: standard order interpretations: minus#_A(x1,x2) = 0 s_A(x1) = x1 + 1 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: geq#(s(X),s(Y)) -> geq#(X,Y) and R consists of: r1: minus(|0|(),Y) -> |0|() r2: minus(s(X),s(Y)) -> minus(X,Y) r3: geq(X,|0|()) -> true() r4: geq(|0|(),s(Y)) -> false() r5: geq(s(X),s(Y)) -> geq(X,Y) r6: div(|0|(),s(Y)) -> |0|() r7: div(s(X),s(Y)) -> if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|()) r8: if(true(),X,Y) -> X r9: if(false(),X,Y) -> Y The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: s > geq# argument filter: pi(geq#) = 2 pi(s) = [1] 2. matrix interpretations: carrier: N^1 order: standard order interpretations: geq#_A(x1,x2) = 0 s_A(x1) = x1 + 1 The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.