YES We show the termination of the TRS R: le(|0|(),Y) -> true() le(s(X),|0|()) -> false() le(s(X),s(Y)) -> le(X,Y) minus(|0|(),Y) -> |0|() minus(s(X),Y) -> ifMinus(le(s(X),Y),s(X),Y) ifMinus(true(),s(X),Y) -> |0|() ifMinus(false(),s(X),Y) -> s(minus(X,Y)) quot(|0|(),s(Y)) -> |0|() quot(s(X),s(Y)) -> s(quot(minus(X,Y),s(Y))) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: le#(s(X),s(Y)) -> le#(X,Y) p2: minus#(s(X),Y) -> ifMinus#(le(s(X),Y),s(X),Y) p3: minus#(s(X),Y) -> le#(s(X),Y) p4: ifMinus#(false(),s(X),Y) -> minus#(X,Y) p5: quot#(s(X),s(Y)) -> quot#(minus(X,Y),s(Y)) p6: quot#(s(X),s(Y)) -> minus#(X,Y) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: minus(|0|(),Y) -> |0|() r5: minus(s(X),Y) -> ifMinus(le(s(X),Y),s(X),Y) r6: ifMinus(true(),s(X),Y) -> |0|() r7: ifMinus(false(),s(X),Y) -> s(minus(X,Y)) r8: quot(|0|(),s(Y)) -> |0|() r9: quot(s(X),s(Y)) -> s(quot(minus(X,Y),s(Y))) The estimated dependency graph contains the following SCCs: {p5} {p2, p4} {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: quot#(s(X),s(Y)) -> quot#(minus(X,Y),s(Y)) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: minus(|0|(),Y) -> |0|() r5: minus(s(X),Y) -> ifMinus(le(s(X),Y),s(X),Y) r6: ifMinus(true(),s(X),Y) -> |0|() r7: ifMinus(false(),s(X),Y) -> s(minus(X,Y)) r8: quot(|0|(),s(Y)) -> |0|() r9: quot(s(X),s(Y)) -> s(quot(minus(X,Y),s(Y))) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: quot#_A(x1,x2) = x1 + (1,0) s_A(x1) = ((1,1),(1,0)) x1 + (4,4) minus_A(x1,x2) = ((1,1),(1,0)) x1 + (2,2) le_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,0),(1,0)) x2 + (7,5) |0|_A() = (5,5) true_A() = (0,0) false_A() = (1,1) ifMinus_A(x1,x2,x3) = ((1,1),(1,0)) x2 + (1,2) precedence: minus > ifMinus > s = le > |0| = false > quot# > true partial status: pi(quot#) = [1] pi(s) = [] pi(minus) = [] pi(le) = [] pi(|0|) = [] pi(true) = [] pi(false) = [] pi(ifMinus) = [] 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: ifMinus#(false(),s(X),Y) -> minus#(X,Y) p2: minus#(s(X),Y) -> ifMinus#(le(s(X),Y),s(X),Y) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: minus(|0|(),Y) -> |0|() r5: minus(s(X),Y) -> ifMinus(le(s(X),Y),s(X),Y) r6: ifMinus(true(),s(X),Y) -> |0|() r7: ifMinus(false(),s(X),Y) -> s(minus(X,Y)) r8: quot(|0|(),s(Y)) -> |0|() r9: quot(s(X),s(Y)) -> s(quot(minus(X,Y),s(Y))) The set of usable rules consists of r1, r2, r3 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: ifMinus#_A(x1,x2,x3) = ((1,1),(1,1)) x2 + (1,1) false_A() = (0,2) s_A(x1) = ((1,1),(1,1)) x1 + (1,1) minus#_A(x1,x2) = ((1,1),(1,1)) x1 + (2,3) le_A(x1,x2) = ((1,1),(1,1)) x2 + (5,6) |0|_A() = (2,2) true_A() = (1,1) precedence: false = le > ifMinus# = minus# > |0| > s = true partial status: pi(ifMinus#) = [] pi(false) = [] pi(s) = [] pi(minus#) = [] pi(le) = [] pi(|0|) = [] pi(true) = [] 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: minus#(s(X),Y) -> ifMinus#(le(s(X),Y),s(X),Y) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: minus(|0|(),Y) -> |0|() r5: minus(s(X),Y) -> ifMinus(le(s(X),Y),s(X),Y) r6: ifMinus(true(),s(X),Y) -> |0|() r7: ifMinus(false(),s(X),Y) -> s(minus(X,Y)) r8: quot(|0|(),s(Y)) -> |0|() r9: quot(s(X),s(Y)) -> s(quot(minus(X,Y),s(Y))) The estimated dependency graph contains the following SCCs: (no SCCs) -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: le#(s(X),s(Y)) -> le#(X,Y) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: minus(|0|(),Y) -> |0|() r5: minus(s(X),Y) -> ifMinus(le(s(X),Y),s(X),Y) r6: ifMinus(true(),s(X),Y) -> |0|() r7: ifMinus(false(),s(X),Y) -> s(minus(X,Y)) r8: quot(|0|(),s(Y)) -> |0|() r9: quot(s(X),s(Y)) -> s(quot(minus(X,Y),s(Y))) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: le#_A(x1,x2) = ((0,1),(0,0)) x1 + ((0,1),(0,0)) x2 + (2,2) s_A(x1) = ((0,0),(0,1)) x1 + (1,1) precedence: le# = s partial status: pi(le#) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.